Author: tkreuzer
Date: Sun Sep 21 16:00:27 2014
New Revision: 64212
URL:
http://svn.reactos.org/svn/reactos?rev=64212&view=rev
Log:
[HAL]
Fix some function prototypes and avoid real ugly casts
Modified:
trunk/reactos/hal/halx86/acpi/busemul.c
trunk/reactos/hal/halx86/include/bus.h
trunk/reactos/hal/halx86/legacy/bus/pcibus.c
trunk/reactos/hal/halx86/legacy/bussupp.c
Modified: trunk/reactos/hal/halx86/acpi/busemul.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/acpi/busemul.c?…
==============================================================================
--- trunk/reactos/hal/halx86/acpi/busemul.c [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/acpi/busemul.c [iso-8859-1] Sun Sep 21 16:00:27 2014
@@ -225,7 +225,7 @@
/* Call PCI function */
return HalpGetPCIData(&BusHandler,
&BusHandler,
- *(PPCI_SLOT_NUMBER)&SlotNumber,
+ SlotNumber,
Buffer,
Offset,
Length);
@@ -304,7 +304,7 @@
/* Call PCI function */
return HalpSetPCIData(&BusHandler,
&BusHandler,
- *(PPCI_SLOT_NUMBER)&SlotNumber,
+ SlotNumber,
Buffer,
Offset,
Length);
Modified: trunk/reactos/hal/halx86/include/bus.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/include/bus.h?r…
==============================================================================
--- trunk/reactos/hal/halx86/include/bus.h [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/include/bus.h [iso-8859-1] Sun Sep 21 16:00:27 2014
@@ -365,7 +365,7 @@
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 @@
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 @@
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 @@
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 @@
IN PBUS_HANDLER RootHandler,
IN PCI_SLOT_NUMBER PciSlot,
OUT PSUPPORTED_RANGE *Range);
-
+
VOID
NTAPI
HalpInitBusHandler(
@@ -590,7 +590,7 @@
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 @@
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 @@
OUT PKIRQL Irql,
OUT PKAFFINITY Affinity
);
-
+
extern ULONG HalpBusType;
extern BOOLEAN HalpPCIConfigInitialized;
extern BUS_HANDLER HalpFakePciBusHandler;
Modified: trunk/reactos/hal/halx86/legacy/bus/pcibus.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/legacy/bus/pcib…
==============================================================================
--- trunk/reactos/hal/halx86/legacy/bus/pcibus.c [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/legacy/bus/pcibus.c [iso-8859-1] Sun Sep 21 16:00:27 2014
@@ -343,15 +343,17 @@
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 @@
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
Modified: trunk/reactos/hal/halx86/legacy/bussupp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/legacy/bussupp.…
==============================================================================
--- trunk/reactos/hal/halx86/legacy/bussupp.c [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/legacy/bussupp.c [iso-8859-1] Sun Sep 21 16:00:27 2014
@@ -208,11 +208,11 @@
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 @@
/* 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);