mirror of
https://github.com/reactos/reactos.git
synced 2025-06-15 07:38:30 +00:00
Probing functions 1 and 2 of device 0 on bus 0 completely freezes the Xbox,
blacklist those functions svn path=/trunk/; revision=11932
This commit is contained in:
parent
b5cbaeae0c
commit
b0145a85fe
7 changed files with 103 additions and 8 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: halinit.c,v 1.2 2004/12/04 21:40:55 gvg Exp $
|
/* $Id: halinit.c,v 1.3 2004/12/04 22:52:59 gvg Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -20,6 +20,7 @@
|
||||||
/* GLOBALS *****************************************************************/
|
/* GLOBALS *****************************************************************/
|
||||||
|
|
||||||
PVOID HalpZeroPageMapping = NULL;
|
PVOID HalpZeroPageMapping = NULL;
|
||||||
|
HALP_HOOKS HalpHooks;
|
||||||
|
|
||||||
/* FUNCTIONS ***************************************************************/
|
/* FUNCTIONS ***************************************************************/
|
||||||
|
|
||||||
|
@ -38,6 +39,7 @@ HalInitSystem (ULONG BootPhase,
|
||||||
{
|
{
|
||||||
if (BootPhase == 0)
|
if (BootPhase == 0)
|
||||||
{
|
{
|
||||||
|
RtlZeroMemory(&HalpHooks, sizeof(HALP_HOOKS));
|
||||||
HalpInitPhase0();
|
HalpInitPhase0();
|
||||||
}
|
}
|
||||||
else if (BootPhase == 1)
|
else if (BootPhase == 1)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: pci.c,v 1.1 2004/12/03 20:10:43 gvg Exp $
|
/* $Id: pci.c,v 1.2 2004/12/04 22:52:59 gvg Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -21,6 +21,7 @@
|
||||||
#include <ddk/ntddk.h>
|
#include <ddk/ntddk.h>
|
||||||
#include <bus.h>
|
#include <bus.h>
|
||||||
#include <halirq.h>
|
#include <halirq.h>
|
||||||
|
#include <hal.h>
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <internal/debug.h>
|
#include <internal/debug.h>
|
||||||
|
@ -764,6 +765,10 @@ HalpInitPciBus(VOID)
|
||||||
// (pGetSetBusData)HalpAdjustPciResourceList;
|
// (pGetSetBusData)HalpAdjustPciResourceList;
|
||||||
BusHandler->AssignSlotResources =
|
BusHandler->AssignSlotResources =
|
||||||
(pAssignSlotResources)HalpAssignPciSlotResources;
|
(pAssignSlotResources)HalpAssignPciSlotResources;
|
||||||
|
if (NULL != HalpHooks.InitPciBus)
|
||||||
|
{
|
||||||
|
HalpHooks.InitPciBus(0, BusHandler);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* agp bus (bus 1) handler */
|
/* agp bus (bus 1) handler */
|
||||||
|
@ -780,6 +785,10 @@ HalpInitPciBus(VOID)
|
||||||
// (pGetSetBusData)HalpAdjustPciResourceList;
|
// (pGetSetBusData)HalpAdjustPciResourceList;
|
||||||
BusHandler->AssignSlotResources =
|
BusHandler->AssignSlotResources =
|
||||||
(pAssignSlotResources)HalpAssignPciSlotResources;
|
(pAssignSlotResources)HalpAssignPciSlotResources;
|
||||||
|
if (NULL != HalpHooks.InitPciBus)
|
||||||
|
{
|
||||||
|
HalpHooks.InitPciBus(1, BusHandler);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* PCI bus (bus 2) handler */
|
/* PCI bus (bus 2) handler */
|
||||||
|
@ -796,6 +805,10 @@ HalpInitPciBus(VOID)
|
||||||
// (pGetSetBusData)HalpAdjustPciResourceList;
|
// (pGetSetBusData)HalpAdjustPciResourceList;
|
||||||
BusHandler->AssignSlotResources =
|
BusHandler->AssignSlotResources =
|
||||||
(pAssignSlotResources)HalpAssignPciSlotResources;
|
(pAssignSlotResources)HalpAssignPciSlotResources;
|
||||||
|
if (NULL != HalpHooks.InitPciBus)
|
||||||
|
{
|
||||||
|
HalpHooks.InitPciBus(2, BusHandler);
|
||||||
|
}
|
||||||
|
|
||||||
DPRINT("HalpInitPciBus() finished.\n");
|
DPRINT("HalpInitPciBus() finished.\n");
|
||||||
}
|
}
|
||||||
|
|
|
@ -433,8 +433,11 @@ static inline VOID Ki386WriteFsByte(ULONG offset, BYTE value)
|
||||||
#error Unknown compiler for inline assembler
|
#error Unknown compiler for inline assembler
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
typedef struct tagHALP_HOOKS
|
||||||
|
{
|
||||||
|
void (*InitPciBus)(ULONG BusNumber, PBUS_HANDLER BusHandler);
|
||||||
|
} HALP_HOOKS, *PHALP_HOOKS;
|
||||||
|
|
||||||
|
extern HALP_HOOKS HalpHooks;
|
||||||
|
|
||||||
|
|
||||||
#endif /* __INTERNAL_HAL_HAL_H */
|
#endif /* __INTERNAL_HAL_HAL_H */
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# $Id: Makefile,v 1.1 2004/12/04 21:43:37 gvg Exp $
|
# $Id: Makefile,v 1.2 2004/12/04 22:52:59 gvg Exp $
|
||||||
|
|
||||||
PATH_TO_TOP = ../../..
|
PATH_TO_TOP = ../../..
|
||||||
|
|
||||||
|
@ -64,7 +64,8 @@ XBOX_OBJECTS = \
|
||||||
flashleds.o \
|
flashleds.o \
|
||||||
display_xbox.o \
|
display_xbox.o \
|
||||||
font.o \
|
font.o \
|
||||||
halinit_xbox.o
|
halinit_xbox.o \
|
||||||
|
pci_xbox.o
|
||||||
|
|
||||||
HAL_OBJECTS = $(GENERIC_OBJECTS) $(XBOX_OBJECTS)
|
HAL_OBJECTS = $(GENERIC_OBJECTS) $(XBOX_OBJECTS)
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: halinit_xbox.c,v 1.1 2004/12/04 21:43:37 gvg Exp $
|
/* $Id: halinit_xbox.c,v 1.2 2004/12/04 22:52:59 gvg Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -13,6 +13,7 @@
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
#include <ddk/ntddk.h>
|
||||||
#include <hal.h>
|
#include <hal.h>
|
||||||
|
#include "halxbox.h"
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <internal/debug.h>
|
#include <internal/debug.h>
|
||||||
|
@ -22,6 +23,8 @@
|
||||||
VOID
|
VOID
|
||||||
HalpInitPhase0(VOID)
|
HalpInitPhase0(VOID)
|
||||||
{
|
{
|
||||||
|
HalpHooks.InitPciBus = HalpXboxInitPciBus;
|
||||||
|
|
||||||
HalpInitPICs();
|
HalpInitPICs();
|
||||||
|
|
||||||
/* Setup busy waiting */
|
/* Setup busy waiting */
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: halxbox.h,v 1.1 2004/12/04 21:43:37 gvg Exp $
|
/* $Id: halxbox.h,v 1.2 2004/12/04 22:52:59 gvg Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: Xbox HAL
|
* PROJECT: Xbox HAL
|
||||||
|
@ -14,6 +14,8 @@
|
||||||
|
|
||||||
extern BYTE XboxFont8x16[256 * 16];
|
extern BYTE XboxFont8x16[256 * 16];
|
||||||
|
|
||||||
|
void HalpXboxInitPciBus(ULONG BusNumber, PBUS_HANDLER BusHandler);
|
||||||
|
|
||||||
#endif /* HALXBOX_H_INCLUDED */
|
#endif /* HALXBOX_H_INCLUDED */
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
71
reactos/hal/halx86/xbox/pci_xbox.c
Normal file
71
reactos/hal/halx86/xbox/pci_xbox.c
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
/* $Id: pci_xbox.c,v 1.1 2004/12/04 22:52:59 gvg Exp $
|
||||||
|
*
|
||||||
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
|
* PROJECT: ReactOS kernel
|
||||||
|
* FILE: hal/halx86/xbox/pci_xbox.c
|
||||||
|
* PURPOSE: Xbox specific handling of PCI cards
|
||||||
|
* PROGRAMMER: Ge van Geldorp (gvg@reactos.com)
|
||||||
|
* UPDATE HISTORY:
|
||||||
|
* 2004/12/04: Created
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
|
#include <ddk/ntddk.h>
|
||||||
|
#include <hal.h>
|
||||||
|
#include <bus.h>
|
||||||
|
#include "halxbox.h"
|
||||||
|
|
||||||
|
#define NDEBUG
|
||||||
|
#include <internal/debug.h>
|
||||||
|
|
||||||
|
/* VARIABLES ***************************************************************/
|
||||||
|
|
||||||
|
static ULONG (* STDCALL GenericGetPciData)(PBUS_HANDLER BusHandler,
|
||||||
|
ULONG BusNumber,
|
||||||
|
ULONG SlotNumber,
|
||||||
|
PVOID Buffer,
|
||||||
|
ULONG Offset,
|
||||||
|
ULONG Length);
|
||||||
|
|
||||||
|
/* FUNCTIONS ***************************************************************/
|
||||||
|
|
||||||
|
static ULONG STDCALL
|
||||||
|
HalpXboxGetPciData(PBUS_HANDLER BusHandler,
|
||||||
|
ULONG BusNumber,
|
||||||
|
ULONG SlotNumber,
|
||||||
|
PVOID Buffer,
|
||||||
|
ULONG Offset,
|
||||||
|
ULONG Length)
|
||||||
|
{
|
||||||
|
DPRINT("HalpXboxGetPciData() called.\n");
|
||||||
|
DPRINT(" BusNumber %lu\n", BusNumber);
|
||||||
|
DPRINT(" SlotNumber %lu\n", SlotNumber);
|
||||||
|
DPRINT(" Offset 0x%lx\n", Offset);
|
||||||
|
DPRINT(" Length 0x%lx\n", Length);
|
||||||
|
|
||||||
|
if (0 == BusNumber && (1 == ((SlotNumber >> 5) & 0x07) || 2 == ((SlotNumber >> 5) & 0x07)))
|
||||||
|
{
|
||||||
|
DPRINT("Blacklisted PCI slot\n");
|
||||||
|
if (0 == Offset && 2 <= Length)
|
||||||
|
{
|
||||||
|
*(PUSHORT)Buffer = PCI_INVALID_VENDORID;
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return GenericGetPciData(BusHandler, BusNumber, SlotNumber, Buffer, Offset, Length);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
HalpXboxInitPciBus(ULONG BusNumber, PBUS_HANDLER BusHandler)
|
||||||
|
{
|
||||||
|
if (0 == BusNumber)
|
||||||
|
{
|
||||||
|
GenericGetPciData = BusHandler->GetBusData;
|
||||||
|
BusHandler->GetBusData = HalpXboxGetPciData;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* EOF */
|
Loading…
Add table
Add a link
Reference in a new issue