2010-04-01 19:07:40 +00:00
|
|
|
/*
|
|
|
|
* PROJECT: ReactOS PCI Bus Driver
|
|
|
|
* LICENSE: BSD - See COPYING.ARM in the top level directory
|
|
|
|
* FILE: drivers/bus/pci/hookhal.c
|
|
|
|
* PURPOSE: HAL Bus Handler Dispatch Routine Support
|
|
|
|
* PROGRAMMERS: ReactOS Portable Systems Group
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* INCLUDES *******************************************************************/
|
|
|
|
|
|
|
|
#include <pci.h>
|
|
|
|
#define NDEBUG
|
|
|
|
#include <debug.h>
|
|
|
|
|
|
|
|
/* GLOBALS ********************************************************************/
|
|
|
|
|
Begin implement full PCI Bus Driver. code by me comments by sir_richard to avoid Engrish
DriverEntry full 100% implemented, ACPI WatchDog detect, PCI IRQ Routing detect, PCI errata/hackflag detect (PciGetDebugPorts not support, need PCI Debug Device to test)
Native (S)ATA, PCI BIOS Resource Lock, System Errata/Hackflag also is detect
HAL Hoooking enabled, callbacks stub
Stub PnP Interfaces: PciAddDevice, PciDriverUnload, PciDispatchIrp
PCI utility routines: PciUnicodeStringStrStr, PciStringToUSHORT, PciIsSuiteVersion, PciIsDatacenter, PciOpenKey, PciGetRegistryValue, PciBuildDefaultExclusionList done
PCI Verifier Support for future: PciVerifierInit/PciVerifierProfileChangeCallback (stub)
Thank you for much patience~ This 1200 first codes, have 12000 codes more to come!~~
svn path=/trunk/; revision=47894
2010-06-28 05:23:31 +00:00
|
|
|
pHalTranslateBusAddress PcipSavedTranslateBusAddress;
|
|
|
|
pHalAssignSlotResources PcipSavedAssignSlotResources;
|
|
|
|
|
2010-04-01 19:07:40 +00:00
|
|
|
/* FUNCTIONS ******************************************************************/
|
|
|
|
|
Begin implement full PCI Bus Driver. code by me comments by sir_richard to avoid Engrish
DriverEntry full 100% implemented, ACPI WatchDog detect, PCI IRQ Routing detect, PCI errata/hackflag detect (PciGetDebugPorts not support, need PCI Debug Device to test)
Native (S)ATA, PCI BIOS Resource Lock, System Errata/Hackflag also is detect
HAL Hoooking enabled, callbacks stub
Stub PnP Interfaces: PciAddDevice, PciDriverUnload, PciDispatchIrp
PCI utility routines: PciUnicodeStringStrStr, PciStringToUSHORT, PciIsSuiteVersion, PciIsDatacenter, PciOpenKey, PciGetRegistryValue, PciBuildDefaultExclusionList done
PCI Verifier Support for future: PciVerifierInit/PciVerifierProfileChangeCallback (stub)
Thank you for much patience~ This 1200 first codes, have 12000 codes more to come!~~
svn path=/trunk/; revision=47894
2010-06-28 05:23:31 +00:00
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
|
|
|
PciTranslateBusAddress(IN INTERFACE_TYPE InterfaceType,
|
|
|
|
IN ULONG BusNumber,
|
|
|
|
IN PHYSICAL_ADDRESS BusAddress,
|
|
|
|
OUT PULONG AddressSpace,
|
|
|
|
OUT PPHYSICAL_ADDRESS TranslatedAddress)
|
|
|
|
{
|
|
|
|
/* This function is not yet implemented */
|
|
|
|
UNIMPLEMENTED;
|
|
|
|
while (TRUE);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
PciAssignSlotResources(IN PUNICODE_STRING RegistryPath,
|
|
|
|
IN PUNICODE_STRING DriverClassName OPTIONAL,
|
|
|
|
IN PDRIVER_OBJECT DriverObject,
|
|
|
|
IN PDEVICE_OBJECT DeviceObject,
|
|
|
|
IN INTERFACE_TYPE BusType,
|
|
|
|
IN ULONG BusNumber,
|
|
|
|
IN ULONG SlotNumber,
|
|
|
|
IN OUT PCM_RESOURCE_LIST *AllocatedResources)
|
|
|
|
{
|
|
|
|
/* This function is not yet implemented */
|
|
|
|
UNIMPLEMENTED;
|
|
|
|
while (TRUE);
|
|
|
|
return STATUS_NOT_SUPPORTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
PciHookHal(VOID)
|
|
|
|
{
|
|
|
|
/* Save the old HAL routines */
|
|
|
|
ASSERT(PcipSavedAssignSlotResources == NULL);
|
|
|
|
ASSERT(PcipSavedTranslateBusAddress == NULL);
|
|
|
|
PcipSavedAssignSlotResources = HalPciAssignSlotResources;
|
|
|
|
PcipSavedTranslateBusAddress = HalPciTranslateBusAddress;
|
|
|
|
|
|
|
|
/* Take over the HAL's Bus Handler functions */
|
|
|
|
HalPciAssignSlotResources = PciAssignSlotResources;
|
|
|
|
HalPciTranslateBusAddress = PciTranslateBusAddress;
|
|
|
|
}
|
|
|
|
|
2010-04-01 19:07:40 +00:00
|
|
|
/* EOF */
|