mirror of
https://github.com/reactos/reactos.git
synced 2024-09-12 05:43:24 +00:00
Fix HalXbox build
svn path=/trunk/; revision=25271
This commit is contained in:
parent
8e087e40db
commit
d9e5c48061
|
@ -1,5 +1,4 @@
|
||||||
/* $Id$
|
/*
|
||||||
*
|
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
* FILE: hal/halx86/xbox/pci_xbox.c
|
* FILE: hal/halx86/xbox/pci_xbox.c
|
||||||
|
@ -24,38 +23,40 @@
|
||||||
|
|
||||||
/* VARIABLES ***************************************************************/
|
/* VARIABLES ***************************************************************/
|
||||||
|
|
||||||
static ULONG (STDCALL *GenericGetPciData)(PBUS_HANDLER BusHandler,
|
static ULONG (NTAPI *GenericGetPciData)(IN PBUS_HANDLER BusHandler,
|
||||||
ULONG BusNumber,
|
IN PBUS_HANDLER RootHandler,
|
||||||
ULONG SlotNumber,
|
IN PCI_SLOT_NUMBER SlotNumber,
|
||||||
PVOID Buffer,
|
OUT PUCHAR Buffer,
|
||||||
ULONG Offset,
|
IN ULONG Offset,
|
||||||
ULONG Length);
|
IN ULONG Length);
|
||||||
static ULONG (STDCALL *GenericSetPciData)(PBUS_HANDLER BusHandler,
|
static ULONG (NTAPI *GenericSetPciData)(IN PBUS_HANDLER BusHandler,
|
||||||
ULONG BusNumber,
|
IN PBUS_HANDLER RootHandler,
|
||||||
ULONG SlotNumber,
|
IN PCI_SLOT_NUMBER SlotNumber,
|
||||||
PVOID Buffer,
|
IN PUCHAR Buffer,
|
||||||
ULONG Offset,
|
IN ULONG Offset,
|
||||||
ULONG Length);
|
IN ULONG Length);
|
||||||
|
|
||||||
/* FUNCTIONS ***************************************************************/
|
/* FUNCTIONS ***************************************************************/
|
||||||
|
|
||||||
static ULONG STDCALL
|
static ULONG NTAPI
|
||||||
HalpXboxGetPciData(PBUS_HANDLER BusHandler,
|
HalpXboxGetPciData(IN PBUS_HANDLER BusHandler,
|
||||||
ULONG BusNumber,
|
IN PBUS_HANDLER RootHandler,
|
||||||
ULONG SlotNumber,
|
IN PCI_SLOT_NUMBER SlotNumber,
|
||||||
PVOID Buffer,
|
OUT PUCHAR Buffer,
|
||||||
ULONG Offset,
|
IN ULONG Offset,
|
||||||
ULONG Length)
|
IN ULONG Length)
|
||||||
{
|
{
|
||||||
|
ULONG BusNumber = BusHandler->BusNumber;
|
||||||
|
|
||||||
DPRINT("HalpXboxGetPciData() called.\n");
|
DPRINT("HalpXboxGetPciData() called.\n");
|
||||||
DPRINT(" BusNumber %lu\n", BusNumber);
|
DPRINT(" BusNumber %lu\n", BusNumber);
|
||||||
DPRINT(" SlotNumber %lu\n", SlotNumber);
|
DPRINT(" SlotNumber %lu\n", SlotNumber);
|
||||||
DPRINT(" Offset 0x%lx\n", Offset);
|
DPRINT(" Offset 0x%lx\n", Offset);
|
||||||
DPRINT(" Length 0x%lx\n", Length);
|
DPRINT(" Length 0x%lx\n", Length);
|
||||||
|
|
||||||
if ((0 == BusNumber && 0 == (SlotNumber & 0x1f) &&
|
if ((0 == BusNumber && 0 == SlotNumber.u.bits.DeviceNumber &&
|
||||||
(1 == ((SlotNumber >> 5) & 0x07) || 2 == ((SlotNumber >> 5) & 0x07))) ||
|
(1 == SlotNumber.u.bits.FunctionNumber || 2 == SlotNumber.u.bits.FunctionNumber)) ||
|
||||||
(1 == BusNumber && 0 != (SlotNumber & 0x1f)))
|
(1 == BusNumber && 0 != SlotNumber.u.bits.DeviceNumber))
|
||||||
{
|
{
|
||||||
DPRINT("Blacklisted PCI slot\n");
|
DPRINT("Blacklisted PCI slot\n");
|
||||||
if (0 == Offset && 2 <= Length)
|
if (0 == Offset && 2 <= Length)
|
||||||
|
@ -66,32 +67,34 @@ HalpXboxGetPciData(PBUS_HANDLER BusHandler,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return GenericGetPciData(BusHandler, BusNumber, SlotNumber, Buffer, Offset, Length);
|
return GenericGetPciData(BusHandler, RootHandler, SlotNumber, Buffer, Offset, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
static ULONG STDCALL
|
static ULONG NTAPI
|
||||||
HalpXboxSetPciData(PBUS_HANDLER BusHandler,
|
HalpXboxSetPciData(IN PBUS_HANDLER BusHandler,
|
||||||
ULONG BusNumber,
|
IN PBUS_HANDLER RootHandler,
|
||||||
ULONG SlotNumber,
|
IN PCI_SLOT_NUMBER SlotNumber,
|
||||||
PVOID Buffer,
|
IN PUCHAR Buffer,
|
||||||
ULONG Offset,
|
IN ULONG Offset,
|
||||||
ULONG Length)
|
IN ULONG Length)
|
||||||
{
|
{
|
||||||
|
ULONG BusNumber = BusHandler->BusNumber;
|
||||||
|
|
||||||
DPRINT("HalpXboxSetPciData() called.\n");
|
DPRINT("HalpXboxSetPciData() called.\n");
|
||||||
DPRINT(" BusNumber %lu\n", BusNumber);
|
DPRINT(" BusNumber %lu\n", BusNumber);
|
||||||
DPRINT(" SlotNumber %lu\n", SlotNumber);
|
DPRINT(" SlotNumber %lu\n", SlotNumber);
|
||||||
DPRINT(" Offset 0x%lx\n", Offset);
|
DPRINT(" Offset 0x%lx\n", Offset);
|
||||||
DPRINT(" Length 0x%lx\n", Length);
|
DPRINT(" Length 0x%lx\n", Length);
|
||||||
|
|
||||||
if ((0 == BusNumber && 0 == (SlotNumber & 0x1f) &&
|
if ((0 == BusNumber && 0 == SlotNumber.u.bits.DeviceNumber &&
|
||||||
(1 == ((SlotNumber >> 5) & 0x07) || 2 == ((SlotNumber >> 5) & 0x07))) ||
|
(1 == SlotNumber.u.bits.FunctionNumber || 2 == SlotNumber.u.bits.FunctionNumber)) ||
|
||||||
(1 == BusNumber && 0 != (SlotNumber & 0x1f)))
|
(1 == BusNumber && 0 != SlotNumber.u.bits.DeviceNumber))
|
||||||
{
|
{
|
||||||
DPRINT1("Trying to set data on blacklisted PCI slot\n");
|
DPRINT1("Trying to set data on blacklisted PCI slot\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return GenericSetPciData(BusHandler, BusNumber, SlotNumber, Buffer, Offset, Length);
|
return GenericSetPciData(BusHandler, RootHandler, SlotNumber, Buffer, Offset, Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue