25#define MAX_XBOX_COM_PORTS 2
85 TRACE(
"XboxGetExtendedBIOSData(): UNIMPLEMENTED\n");
108 if (PartialResourceList ==
NULL)
110 ERR(
"Failed to allocate resource descriptor\n");
115 PartialResourceList->
Version = 1;
117 PartialResourceList->
Count = 1;
138 ERR(
"Reading disk geometry failed\n");
142 TRACE(
"Disk %x: %u Cylinders %u Heads %u Sectors %u Bytes\n",
151 return PartialResourceList;
167 if (PartialResourceList ==
NULL)
169 ERR(
"Failed to allocate resource descriptor\n");
175 PartialResourceList->
Version = 1;
177 PartialResourceList->
Count = 1;
214 if (PartialResourceList ==
NULL)
216 ERR(
"Failed to allocate resource descriptor\n");
222 PartialResourceList->
Version = 1;
224 PartialResourceList->
Count = 0;
261 WARN(
"XboxGetFloppyCount() is UNIMPLEMENTED, returning 0\n");
272 TRACE(
"DetectHardware()\n");
284 TRACE(
"DetectHardware() Done\n");
306 PciCfg1.
u.
bits.Enable = 1;
307 PciCfg1.
u.
bits.BusNumber = 0;
308 PciCfg1.
u.
bits.DeviceNumber = 0;
309 PciCfg1.
u.
bits.FunctionNumber = 0;
311 PciCfg1.
u.
bits.RegisterNumber = 0x00;
312 PciCfg1.
u.
bits.Reserved = 0;
316 if (PciId != 0x02A510DE)
318 ERR(
"This is not an original Xbox!\n");
#define ExtendedBIOSDataArea
#define ExtendedBIOSDataSize
VOID FldrCreateSystemKey(_Out_ PCONFIGURATION_COMPONENT_DATA *SystemNode, _In_ PCSTR IdentifierString)
VOID FldrCreateComponentKey(_In_ PCONFIGURATION_COMPONENT_DATA SystemNode, _In_ CONFIGURATION_CLASS Class, _In_ CONFIGURATION_TYPE Type, _In_ IDENTIFIER_FLAG Flags, _In_ ULONG Key, _In_ ULONG Affinity, _In_ PCSTR IdentifierString, _In_ PCM_PARTIAL_RESOURCE_LIST ResourceList, _In_ ULONG Size, _Out_ PCONFIGURATION_COMPONENT_DATA *ComponentKey)
VOID DetectPciBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber)
FIND_PCI_BIOS FindPciBios
#define PCI_TYPE1_DATA_PORT
ULONG(* GET_SERIAL_PORT)(ULONG Index, PULONG Irq)
#define PCI_TYPE1_ADDRESS_PORT
#define DebugDisableScreenPort()
#define DBG_DEFAULT_CHANNEL(ch)
FORCEINLINE VOID FrLdrHeapFree(PVOID MemoryPointer, ULONG Tag)
FORCEINLINE PVOID FrLdrHeapAlloc(SIZE_T MemorySize, ULONG Tag)
static const WCHAR CmdLine[]
ULONG NTAPI READ_PORT_ULONG(IN PULONG Port)
VOID NTAPI WRITE_PORT_ULONG(IN PULONG Port, IN ULONG Value)
BOOLEAN PcInitializeBootDevices(VOID)
#define CmResourceTypeMemory
struct _CM_PARTIAL_RESOURCE_LIST CM_PARTIAL_RESOURCE_LIST
#define CmResourceTypeDeviceSpecific
void __cdecl _disable(void)
__INTRIN_INLINE void __halt(void)
VOID XboxGetExtendedBIOSData(PULONG ExtendedBIOSDataArea, PULONG ExtendedBIOSDataSize)
static PCM_PARTIAL_RESOURCE_LIST XboxGetHarddiskConfigurationData(UCHAR DriveNumber, ULONG *pSize)
static VOID DetectIsaBios(_In_opt_ PCSTR Options, _Inout_ PCONFIGURATION_COMPONENT_DATA SystemKey, _Out_ ULONG *BusNumber)
VOID MachInit(const char *CmdLine)
PCONFIGURATION_COMPONENT_DATA XboxHwDetect(_In_opt_ PCSTR Options)
#define MAX_XBOX_COM_PORTS
static ULONG XboxGetSerialPort(ULONG Index, PULONG Irq)
static UCHAR XboxGetFloppyCount(VOID)
VOID DetectSerialPointerPeripheral(PCONFIGURATION_COMPONENT_DATA ControllerKey, PUCHAR Base)
BOOLEAN XboxFindPciBios(PPCI_REGISTRY_INFO BusData)
VOID DetectSerialPorts(_In_opt_ PCSTR Options, _Inout_ PCONFIGURATION_COMPONENT_DATA BusKey, _In_ GET_SERIAL_PORT MachGetSerialPort, _In_ ULONG Count)
static VOID DetectDisplayController(PCONFIGURATION_COMPONENT_DATA BusKey)
VOID XboxPrepareForReactOS(VOID)
#define CM_RESOURCE_MEMORY_READ_WRITE
VOID __cdecl DiskStopFloppyMotor(VOID)
VOID HalpCalibrateStallExecution(VOID)
VOID DetectBiosDisks(PCONFIGURATION_COMPONENT_DATA SystemKey, PCONFIGURATION_COMPONENT_DATA BusKey)
GET_HARDDISK_CONFIG_DATA GetHarddiskConfigurationData
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@391::@400 DeviceSpecificData
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@391::@396 Memory
union _CM_PARTIAL_RESOURCE_DESCRIPTOR::@391 u
CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1]
ULONG BytesPerSector
Number of bytes per sector.
ULONG Cylinders
Number of cylinders on the disk.
ULONG SectorsPerTrack
Number of sectors per track.
ULONG Heads
Number of heads on the disk.
struct _PCI_TYPE1_CFG_BITS::@157::@158 bits
union _PCI_TYPE1_CFG_BITS::@157 u
VOID(* VideoGetPaletteColor)(UCHAR Color, UCHAR *Red, UCHAR *Green, UCHAR *Blue)
VOID(* GetExtendedBIOSData)(PULONG ExtendedBIOSDataArea, PULONG ExtendedBIOSDataSize)
VOID(* PrepareForReactOS)(VOID)
VOID(* VideoSetPaletteColor)(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue)
BOOLEAN(* InitializeBootDevices)(VOID)
VOID(* VideoCopyOffScreenBufferToVRAM)(PVOID Buffer)
BOOLEAN(* ConsKbHit)(VOID)
VOID(* VideoHideShowTextCursor)(BOOLEAN Show)
TIMEINFO *(* GetTime)(VOID)
UCHAR(* GetFloppyCount)(VOID)
BOOLEAN(* DiskGetDriveGeometry)(UCHAR DriveNumber, PGEOMETRY DriveGeometry)
BOOLEAN(* DiskReadLogicalSectors)(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer)
PFREELDR_MEMORY_DESCRIPTOR(* GetMemoryMap)(PULONG MaxMemoryMapSize)
VOID(* VideoGetFontsFromFirmware)(PULONG RomFontPointers)
VOID(* VideoSetTextCursorPosition)(UCHAR X, UCHAR Y)
ULONG(* VideoGetBufferSize)(VOID)
VOID(* VideoPutChar)(int Ch, UCHAR Attr, unsigned X, unsigned Y)
ULONG(* DiskGetCacheableBlockCount)(UCHAR DriveNumber)
VOID(* VideoGetDisplaySize)(PULONG Width, PULONG Height, PULONG Depth)
VOID(* VideoClearScreen)(UCHAR Attr)
VIDEODISPLAYMODE(* VideoSetDisplayMode)(char *DisplayMode, BOOLEAN Init)
BOOLEAN(* VideoIsPaletteFixed)(VOID)
PCONFIGURATION_COMPONENT_DATA(* HwDetect)(_In_opt_ PCSTR Options)
VOID(* ConsPutChar)(int Ch)
#define LPC_CONFIG_DEVICE_NUMBER
#define LPC_CONFIG_DEVICE_ACTIVATE
FORCEINLINE ULONG LpcGetIoBase(VOID)
#define LPC_DEVICE_SERIAL_PORT_2
FORCEINLINE ULONG LpcGetIrqPrimary(VOID)
FORCEINLINE UCHAR LpcReadRegister(UCHAR Register)
#define LPC_DEVICE_SERIAL_PORT_1
FORCEINLINE VOID LpcWriteRegister(UCHAR Register, UCHAR Value)
FORCEINLINE VOID LpcExitConfig(VOID)
FORCEINLINE VOID LpcEnterConfig(VOID)
#define RtlZeroMemory(Destination, Length)
#define TAG_HW_RESOURCE_LIST
_Must_inspect_result_ _In_ WDFDEVICE Device
_In_ WDFCOLLECTION _In_ ULONG Index
_In_ PWDFDEVICE_INIT _In_ PWDF_REMOVE_LOCK_OPTIONS Options
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
BOOLEAN XboxConsKbHit(VOID)
VOID XboxConsPutChar(int c)
BOOLEAN XboxDiskReadLogicalSectors(IN UCHAR DriveNumber, IN ULONGLONG SectorNumber, IN ULONG SectorCount, OUT PVOID Buffer)
ULONG XboxDiskGetCacheableBlockCount(UCHAR DriveNumber)
BOOLEAN XboxDiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY Geometry)
VOID XboxDiskInit(BOOLEAN Init)
void XboxSetLED(PCSTR pattern)
PFREELDR_MEMORY_DESCRIPTOR XboxMemGetMemoryMap(ULONG *MemoryMapSize)
TIMEINFO * XboxGetTime(VOID)
VOID XboxVideoGetPaletteColor(UCHAR Color, UCHAR *Red, UCHAR *Green, UCHAR *Blue)
VOID XboxVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y)
VOID XboxVideoPrepareForReactOS(VOID)
VOID XboxVideoSetTextCursorPosition(UCHAR X, UCHAR Y)
VOID XboxVideoSetPaletteColor(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue)
VOID XboxVideoCopyOffScreenBufferToVRAM(PVOID Buffer)
VOID XboxVideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth)
ULONG XboxVideoGetBufferSize(VOID)
VIDEODISPLAYMODE XboxVideoSetDisplayMode(char *DisplayMode, BOOLEAN Init)
VOID XboxVideoHideShowTextCursor(BOOLEAN Show)
BOOLEAN XboxVideoIsPaletteFixed(VOID)
VOID XboxVideoClearScreen(UCHAR Attr)
VOID XboxVideoGetFontsFromFirmware(PULONG RomFontPointers)
struct _CM_DISK_GEOMETRY_DEVICE_DATA CM_DISK_GEOMETRY_DEVICE_DATA
@ CmResourceShareDeviceExclusive
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE _In_ ULONG BusNumber