mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 10:11:48 +00:00
[HAL]
Fix some function prototypes and avoid real ugly casts svn path=/trunk/; revision=64212
This commit is contained in:
parent
e0e3a8067f
commit
b4aecf7095
4 changed files with 26 additions and 22 deletions
|
@ -225,7 +225,7 @@ HalGetBusDataByOffset(IN BUS_DATA_TYPE BusDataType,
|
|||
/* Call PCI function */
|
||||
return HalpGetPCIData(&BusHandler,
|
||||
&BusHandler,
|
||||
*(PPCI_SLOT_NUMBER)&SlotNumber,
|
||||
SlotNumber,
|
||||
Buffer,
|
||||
Offset,
|
||||
Length);
|
||||
|
@ -304,7 +304,7 @@ HalSetBusDataByOffset(IN BUS_DATA_TYPE BusDataType,
|
|||
/* Call PCI function */
|
||||
return HalpSetPCIData(&BusHandler,
|
||||
&BusHandler,
|
||||
*(PPCI_SLOT_NUMBER)&SlotNumber,
|
||||
SlotNumber,
|
||||
Buffer,
|
||||
Offset,
|
||||
Length);
|
||||
|
|
|
@ -365,7 +365,7 @@ NTAPI
|
|||
HalpGetPCIData(
|
||||
IN PBUS_HANDLER BusHandler,
|
||||
IN PBUS_HANDLER RootBusHandler,
|
||||
IN PCI_SLOT_NUMBER SlotNumber,
|
||||
IN ULONG SlotNumber,
|
||||
IN PVOID Buffer,
|
||||
IN ULONG Offset,
|
||||
IN ULONG Length
|
||||
|
@ -376,7 +376,7 @@ NTAPI
|
|||
HalpSetPCIData(
|
||||
IN PBUS_HANDLER BusHandler,
|
||||
IN PBUS_HANDLER RootBusHandler,
|
||||
IN PCI_SLOT_NUMBER SlotNumber,
|
||||
IN ULONG SlotNumber,
|
||||
IN PVOID Buffer,
|
||||
IN ULONG Offset,
|
||||
IN ULONG Length
|
||||
|
@ -503,7 +503,7 @@ NTAPI
|
|||
HalpAdjustPCIResourceList(IN PBUS_HANDLER BusHandler,
|
||||
IN PBUS_HANDLER RootHandler,
|
||||
IN OUT PIO_RESOURCE_REQUIREMENTS_LIST *pResourceList);
|
||||
|
||||
|
||||
ULONG
|
||||
NTAPI
|
||||
HalpGetPCIIntOnISABus(IN PBUS_HANDLER BusHandler,
|
||||
|
@ -518,7 +518,7 @@ HalpPCIPin2ISALine(IN PBUS_HANDLER BusHandler,
|
|||
IN PBUS_HANDLER RootHandler,
|
||||
IN PCI_SLOT_NUMBER SlotNumber,
|
||||
IN PPCI_COMMON_CONFIG PciData);
|
||||
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
HalpPCIISALine2Pin(IN PBUS_HANDLER BusHandler,
|
||||
|
@ -533,7 +533,7 @@ HalpGetISAFixedPCIIrq(IN PBUS_HANDLER BusHandler,
|
|||
IN PBUS_HANDLER RootHandler,
|
||||
IN PCI_SLOT_NUMBER PciSlot,
|
||||
OUT PSUPPORTED_RANGE *Range);
|
||||
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
HalpInitBusHandler(
|
||||
|
@ -590,7 +590,7 @@ BOOLEAN
|
|||
NTAPI
|
||||
HalpTranslateSystemBusAddress(
|
||||
IN PBUS_HANDLER BusHandler,
|
||||
IN PBUS_HANDLER RootHandler,
|
||||
IN PBUS_HANDLER RootHandler,
|
||||
IN PHYSICAL_ADDRESS BusAddress,
|
||||
IN OUT PULONG AddressSpace,
|
||||
OUT PPHYSICAL_ADDRESS TranslatedAddress
|
||||
|
@ -600,7 +600,7 @@ BOOLEAN
|
|||
NTAPI
|
||||
HalpTranslateIsaBusAddress(
|
||||
IN PBUS_HANDLER BusHandler,
|
||||
IN PBUS_HANDLER RootHandler,
|
||||
IN PBUS_HANDLER RootHandler,
|
||||
IN PHYSICAL_ADDRESS BusAddress,
|
||||
IN OUT PULONG AddressSpace,
|
||||
OUT PPHYSICAL_ADDRESS TranslatedAddress
|
||||
|
@ -616,7 +616,7 @@ HalpGetSystemInterruptVector(
|
|||
OUT PKIRQL Irql,
|
||||
OUT PKAFFINITY Affinity
|
||||
);
|
||||
|
||||
|
||||
extern ULONG HalpBusType;
|
||||
extern BOOLEAN HalpPCIConfigInitialized;
|
||||
extern BUS_HANDLER HalpFakePciBusHandler;
|
||||
|
|
|
@ -343,15 +343,17 @@ ULONG
|
|||
NTAPI
|
||||
HalpGetPCIData(IN PBUS_HANDLER BusHandler,
|
||||
IN PBUS_HANDLER RootHandler,
|
||||
IN PCI_SLOT_NUMBER Slot,
|
||||
IN ULONG SlotNumber,
|
||||
IN PVOID Buffer,
|
||||
IN ULONG Offset,
|
||||
IN ULONG Length)
|
||||
{
|
||||
PCI_SLOT_NUMBER Slot;
|
||||
UCHAR PciBuffer[PCI_COMMON_HDR_LENGTH];
|
||||
PPCI_COMMON_CONFIG PciConfig = (PPCI_COMMON_CONFIG)PciBuffer;
|
||||
ULONG Len = 0;
|
||||
|
||||
Slot.u.AsULONG = SlotNumber;
|
||||
#ifdef SARCH_XBOX
|
||||
/* Trying to get PCI config data from devices 0:0:1 and 0:0:2 will completely
|
||||
* hang the Xbox. Also, the device number doesn't seem to be decoded for the
|
||||
|
@ -433,15 +435,17 @@ ULONG
|
|||
NTAPI
|
||||
HalpSetPCIData(IN PBUS_HANDLER BusHandler,
|
||||
IN PBUS_HANDLER RootHandler,
|
||||
IN PCI_SLOT_NUMBER Slot,
|
||||
IN ULONG SlotNumber,
|
||||
IN PVOID Buffer,
|
||||
IN ULONG Offset,
|
||||
IN ULONG Length)
|
||||
{
|
||||
PCI_SLOT_NUMBER Slot;
|
||||
UCHAR PciBuffer[PCI_COMMON_HDR_LENGTH];
|
||||
PPCI_COMMON_CONFIG PciConfig = (PPCI_COMMON_CONFIG)PciBuffer;
|
||||
ULONG Len = 0;
|
||||
|
||||
Slot.u.AsULONG = SlotNumber;
|
||||
#ifdef SARCH_XBOX
|
||||
/* Trying to get PCI config data from devices 0:0:1 and 0:0:2 will completely
|
||||
* hang the Xbox. Also, the device number doesn't seem to be decoded for the
|
||||
|
|
|
@ -208,11 +208,11 @@ HalpAllocateAndInitPciBusHandler(IN ULONG PciType,
|
|||
sizeof(PCIPBUSDATA));
|
||||
|
||||
/* Set it up */
|
||||
Bus->GetBusData = (PGETSETBUSDATA)HalpGetPCIData;
|
||||
Bus->SetBusData = (PGETSETBUSDATA)HalpSetPCIData;
|
||||
Bus->GetInterruptVector = (PGETINTERRUPTVECTOR)HalpGetPCIIntOnISABus;
|
||||
Bus->AdjustResourceList = (PADJUSTRESOURCELIST)HalpAdjustPCIResourceList;
|
||||
Bus->AssignSlotResources = (PASSIGNSLOTRESOURCES)HalpAssignPCISlotResources;
|
||||
Bus->GetBusData = HalpGetPCIData;
|
||||
Bus->SetBusData = HalpSetPCIData;
|
||||
Bus->GetInterruptVector = HalpGetPCIIntOnISABus;
|
||||
Bus->AdjustResourceList = HalpAdjustPCIResourceList;
|
||||
Bus->AssignSlotResources = HalpAssignPCISlotResources;
|
||||
Bus->BusAddresses->Dma.Limit = 0;
|
||||
|
||||
/* Get our custom bus data */
|
||||
|
@ -221,12 +221,12 @@ HalpAllocateAndInitPciBusHandler(IN ULONG PciType,
|
|||
/* Setup custom bus data */
|
||||
BusData->CommonData.Tag = PCI_DATA_TAG;
|
||||
BusData->CommonData.Version = PCI_DATA_VERSION;
|
||||
BusData->CommonData.ReadConfig = (PciReadWriteConfig)HalpReadPCIConfig;
|
||||
BusData->CommonData.WriteConfig = (PciReadWriteConfig)HalpWritePCIConfig;
|
||||
BusData->CommonData.Pin2Line = (PciPin2Line)HalpPCIPin2ISALine;
|
||||
BusData->CommonData.Line2Pin = (PciLine2Pin)HalpPCIISALine2Pin;
|
||||
BusData->CommonData.ReadConfig = HalpReadPCIConfig;
|
||||
BusData->CommonData.WriteConfig = HalpWritePCIConfig;
|
||||
BusData->CommonData.Pin2Line = HalpPCIPin2ISALine;
|
||||
BusData->CommonData.Line2Pin = HalpPCIISALine2Pin;
|
||||
BusData->MaxDevice = PCI_MAX_DEVICES;
|
||||
BusData->GetIrqRange = (PciIrqRange)HalpGetISAFixedPCIIrq;
|
||||
BusData->GetIrqRange = HalpGetISAFixedPCIIrq;
|
||||
|
||||
/* Initialize the bitmap */
|
||||
RtlInitializeBitMap(&BusData->DeviceConfigured, BusData->ConfiguredBits, 256);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue