ReactOS 0.4.17-dev-966-gf06eace
machxbox.c
Go to the documentation of this file.
1/*
2 * FreeLoader
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18
19#include <freeldr.h>
21#include "../../vidfb.h"
22
23#include <debug.h>
25
26#define MAX_XBOX_COM_PORTS 2
27
28/* From xboxvideo.c */
29extern ULONG NvBase;
33
34static BOOLEAN
39{
40 UNREFERENCED_PARAMETER(SystemKey);
42
43 /* There are 2 known working Type 1 PCI buses on an original Xbox */
44 BusData->MajorRevision = 1;
45 BusData->MinorRevision = 0;
46 BusData->NoBuses = 2;
47 BusData->HardwareMechanism = 1;
48 return TRUE;
49}
50
51extern
52VOID
54
55static
58{
59 /*
60 * Xbox may have maximum two Serial COM ports
61 * if the Super I/O chip is connected via LPC
62 */
64 ULONG ComBase = 0;
65
67
68 // Select serial device
70
71 // Check if selected device is active
73 {
74 ComBase = LpcGetIoBase();
75 *Irq = LpcGetIrqPrimary();
76 }
77
79
80 return ComBase;
81}
82
83extern
84VOID
88 _In_ GET_SERIAL_PORT MachGetSerialPort,
90
91VOID
93{
94 TRACE("XboxGetExtendedBIOSData(): UNIMPLEMENTED\n");
97}
98
99// NOTE: Similar to machpc.c!PcGetHarddiskConfigurationData(),
100// but without extended geometry support.
101static
104{
105 PCM_PARTIAL_RESOURCE_LIST PartialResourceList;
107 GEOMETRY Geometry;
108 ULONG Size;
109
110 /* Initialize returned size */
111 *pSize = 0;
112
113 /* Set 'Configuration Data' value */
114 Size = FIELD_OFFSET(CM_PARTIAL_RESOURCE_LIST, PartialDescriptors[1]) + sizeof(*DiskGeometry);
115 PartialResourceList = FrLdrHeapAlloc(Size, TAG_HW_RESOURCE_LIST);
116 if (PartialResourceList == NULL)
117 {
118 ERR("Failed to allocate resource descriptor\n");
119 return NULL;
120 }
121
122 RtlZeroMemory(PartialResourceList, Size);
123 PartialResourceList->Version = 1;
124 PartialResourceList->Revision = 1;
125 PartialResourceList->Count = 1;
126 PartialResourceList->PartialDescriptors[0].Type =
128// PartialResourceList->PartialDescriptors[0].ShareDisposition =
129// PartialResourceList->PartialDescriptors[0].Flags =
130 PartialResourceList->PartialDescriptors[0].u.DeviceSpecificData.DataSize =
131 sizeof(*DiskGeometry);
132
133 /* Get the disk geometry */
134 DiskGeometry = (PCM_DISK_GEOMETRY_DEVICE_DATA)&PartialResourceList->PartialDescriptors[1];
135 if (XboxDiskGetDriveGeometry(DriveNumber, &Geometry))
136 {
137 DiskGeometry->BytesPerSector = Geometry.BytesPerSector;
138 DiskGeometry->NumberOfCylinders = Geometry.Cylinders;
139 DiskGeometry->SectorsPerTrack = Geometry.SectorsPerTrack;
140 DiskGeometry->NumberOfHeads = Geometry.Heads;
141 }
142 else
143 {
144 ERR("Reading disk geometry failed\n");
145 FrLdrHeapFree(PartialResourceList, TAG_HW_RESOURCE_LIST);
146 return NULL;
147 }
148 TRACE("Disk %x: %u Cylinders %u Heads %u Sectors %u Bytes\n",
149 DriveNumber,
150 DiskGeometry->NumberOfCylinders,
151 DiskGeometry->NumberOfHeads,
152 DiskGeometry->SectorsPerTrack,
153 DiskGeometry->BytesPerSector);
154
155 /* Return configuration data */
156 *pSize = Size;
157 return PartialResourceList;
158}
159
160static VOID
163{
164 PCONFIGURATION_COMPONENT_DATA ControllerKey;
165 PCM_PARTIAL_RESOURCE_LIST PartialResourceList;
166 PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor;
167 PCM_FRAMEBUF_DEVICE_DATA FramebufData;
168 ULONG Size;
169
171 return;
172
173 Size = FIELD_OFFSET(CM_PARTIAL_RESOURCE_LIST, PartialDescriptors[3]) + sizeof(*FramebufData);
174 PartialResourceList = FrLdrHeapAlloc(Size, TAG_HW_RESOURCE_LIST);
175 if (PartialResourceList == NULL)
176 {
177 ERR("Failed to allocate resource descriptor\n");
178 return;
179 }
180
181 /* Initialize resource descriptor */
182 RtlZeroMemory(PartialResourceList, Size);
183 PartialResourceList->Version = 1;
184 PartialResourceList->Revision = 2;
185 PartialResourceList->Count = 3;
186
187 /* Set IO Control Port */
188 PartialDescriptor = &PartialResourceList->PartialDescriptors[0];
189 PartialDescriptor->Type = CmResourceTypePort;
191 PartialDescriptor->Flags = CM_RESOURCE_PORT_MEMORY;
192 PartialDescriptor->u.Port.Start.LowPart = NvBase;
193 PartialDescriptor->u.Port.Start.HighPart = 0;
194 PartialDescriptor->u.Port.Length = (16 * 1024 * 1024);
195
196 /* Set Memory */
197 PartialDescriptor = &PartialResourceList->PartialDescriptors[1];
198 PartialDescriptor->Type = CmResourceTypeMemory;
200 PartialDescriptor->Flags = CM_RESOURCE_MEMORY_READ_WRITE;
201 PartialDescriptor->u.Memory.Start.LowPart = (FrameBuffer & 0x0FFFFFFF);
202 PartialDescriptor->u.Memory.Length = FrameBufferSize;
203
204 /* Set framebuffer-specific data */
205 PartialDescriptor = &PartialResourceList->PartialDescriptors[2];
206 PartialDescriptor->Type = CmResourceTypeDeviceSpecific;
208 PartialDescriptor->Flags = 0;
209 PartialDescriptor->u.DeviceSpecificData.DataSize = sizeof(*FramebufData);
210
211 /* Get pointer to framebuffer-specific data */
212 FramebufData = (PCM_FRAMEBUF_DEVICE_DATA)(PartialDescriptor + 1);
213 RtlCopyMemory(FramebufData, FrameBufferData, sizeof(*FrameBufferData));
214 FramebufData->Version = 1;
215 FramebufData->Revision = 3;
216 FramebufData->VideoClock = 0;
217
222 0,
223 0xFFFFFFFF,
224 "NV2A Framebuffer",
225 PartialResourceList,
226 Size,
227 &ControllerKey);
228
229 // NOTE: Don't add a MonitorPeripheral for now.
230}
231
232static
233VOID
238{
239 PCM_PARTIAL_RESOURCE_LIST PartialResourceList;
241 ULONG Size;
242
243 /* Set 'Configuration Data' value */
244 Size = FIELD_OFFSET(CM_PARTIAL_RESOURCE_LIST, PartialDescriptors);
245 PartialResourceList = FrLdrHeapAlloc(Size, TAG_HW_RESOURCE_LIST);
246 if (PartialResourceList == NULL)
247 {
248 ERR("Failed to allocate resource descriptor\n");
249 return;
250 }
251
252 /* Initialize resource descriptor */
253 RtlZeroMemory(PartialResourceList, Size);
254 PartialResourceList->Version = 1;
255 PartialResourceList->Revision = 1;
256 PartialResourceList->Count = 0;
257
258 /* Create new bus key */
259 FldrCreateComponentKey(SystemKey,
262 0,
263 0,
264 0xFFFFFFFF,
265 "ISA",
266 PartialResourceList,
267 Size,
268 &BusKey);
269
270 /* Increment bus number */
271 (*BusNumber)++;
272
273 /* Detect ISA/BIOS devices */
274 DetectBiosDisks(SystemKey, BusKey);
276
277 /* FIXME: Detect more ISA devices */
278}
279
280static
281UCHAR
283{
284 /* On a PC we use CMOS/RTC I/O ports 0x70 and 0x71 to detect floppies.
285 * However an Xbox CMOS memory range [0x10, 0x70) and [0x80, 0x100)
286 * is filled with 0x55 0xAA 0x55 0xAA ... byte pattern which is used
287 * to validate the date/time settings by Xbox OS.
288 *
289 * Technically it's possible to connect a floppy drive to Xbox, but
290 * CMOS detection method should not be used here. */
291
292 WARN("XboxGetFloppyCount() is UNIMPLEMENTED, returning 0\n");
293 return 0;
294}
295
299{
301 ULONG BusNumber = 0;
302
303 TRACE("DetectHardware()\n");
304
305 /* Create the 'System' key */
306 FldrCreateSystemKey(&SystemKey, "Original Xbox (PC/AT like)");
307
309
310 /* TODO: Build actual Xbox's hardware configuration tree */
312 DetectIsaBios(Options, SystemKey, &BusNumber);
313
314 /* On XBOX, the display controller is on PCI bus #1 */
315 {
317 ULONG NumPciBus = 0;
318 ULONG PciBusToFind = 1;
319
320 /* PCI buses are under the System Key (i.e. siblings) */
321 for (BusKey = SystemKey->Child; BusKey; BusKey = BusKey->Sibling)
322 {
323 ERR("** XBOX: Current bus '%s' **\n", BusKey->ComponentEntry.Identifier);
324
325 /* Try to get a match */
326 if ((BusKey->ComponentEntry.Class == AdapterClass) &&
328 /* Verify it's a PCI key */
329 (BusKey->ComponentEntry.Identifier &&
330 !_stricmp(BusKey->ComponentEntry.Identifier, "PCI")))
331 {
332 /* Got a PCI bus, check whether it's the one to find */
333 if (NumPciBus == PciBusToFind)
334 {
335 ERR("** XBOX: PCI bus #%lu found!\n **\n", PciBusToFind);
336 break;
337 }
338 /* Nope, continue */
339 ++NumPciBus;
340 }
341 }
342 if (BusKey)
343 {
344 ERR("** XBOX: Adding Display Controller on PCI #1 **\n");
346 }
347 }
348
349 TRACE("DetectHardware() Done\n");
350 return SystemKey;
351}
352
354{
355 /* UNIMPLEMENTED */
356}
357
358// FIXME: Dummy to make freeldr exports working.
360 IN UCHAR BootDrive OPTIONAL,
361 IN ULONG BootPartition OPTIONAL)
362{
363 /* No-op on XBOX */
364}
365
366/******************************************************************************/
367
368VOID
369MachInit(const char *CmdLine)
370{
371 PCI_TYPE1_CFG_BITS PciCfg1;
372 ULONG PciId;
373
374 /* Check for Xbox by identifying device at PCI 0:0:0, if it's
375 * 0x10DE/0x02A5 then we're running on an Xbox */
376
377 /* Select Host to PCI bridge */
378 PciCfg1.u.bits.Enable = 1;
379 PciCfg1.u.bits.BusNumber = 0;
380 PciCfg1.u.bits.DeviceNumber = 0;
381 PciCfg1.u.bits.FunctionNumber = 0;
382 /* Select register VendorID & DeviceID */
383 PciCfg1.u.bits.RegisterNumber = 0x00;
384 PciCfg1.u.bits.Reserved = 0;
385
388 if (PciId != 0x02A510DE)
389 {
390 ERR("This is not an original Xbox!\n");
391
392 /* Disable and halt the CPU */
393 _disable();
394 __halt();
395
396 while (TRUE)
397 NOTHING;
398 }
399
400 /* Set LEDs to red before anything is initialized */
401 XboxSetLED("rrrr");
402
403 /* Setup vtbl */
433
434 /* Initialize our stuff */
435 XboxMemInit();
437
438 /* Set LEDs to orange after init */
439 XboxSetLED("oooo");
440
442}
443
444VOID
446{
447 /* Prepare video and turn off debug messages to screen */
450}
451
452/* EOF */
unsigned char BOOLEAN
Definition: actypes.h:127
MACHVTBL MachVtbl
Definition: arcemul.c:21
#define ExtendedBIOSDataArea
Definition: winldr.c:346
#define ExtendedBIOSDataSize
Definition: winldr.c:347
VOID FldrCreateSystemKey(_Out_ PCONFIGURATION_COMPONENT_DATA *SystemNode, _In_ PCSTR IdentifierString)
Definition: archwsup.c:161
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)
Definition: archwsup.c:224
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
VOID DetectPciBus(_In_ PCONFIGURATION_COMPONENT_DATA SystemKey, _Inout_ PULONG BusNumber, _In_ DETECT_PCI_BUS MachDetectPciBus)
Definition: hwpci.c:17
#define PCI_TYPE1_DATA_PORT
Definition: hardware.h:45
ULONG(* GET_SERIAL_PORT)(ULONG Index, PULONG Irq)
Definition: hardware.h:74
#define PCI_TYPE1_ADDRESS_PORT
Definition: hardware.h:44
#define DebugDisableScreenPort()
Definition: debug.h:123
#define DBG_DEFAULT_CHANNEL(ch)
Definition: debug.h:106
VOID FrLdrHeapFree(PVOID MemoryPointer, ULONG Tag)
Definition: heap.c:539
PVOID FrLdrHeapAlloc(SIZE_T MemorySize, ULONG Tag)
Definition: heap.c:533
#define _stricmp
Definition: cat.c:22
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define __cdecl
Definition: corecrt.h:121
static const WCHAR CmdLine[]
Definition: install.c:48
ULONG NTAPI READ_PORT_ULONG(IN PULONG Port)
Definition: portio.c:70
VOID NTAPI WRITE_PORT_ULONG(IN PULONG Port, IN ULONG Value)
Definition: portio.c:123
BOOLEAN PcInitializeBootDevices(VOID)
Definition: hwdisk.c:438
#define NOTHING
Definition: input_list.c:10
__INTRIN_INLINE void __halt(void)
Definition: intrin_x86.h:1746
if(dx< 0)
Definition: linetemp.h:194
static VOID DetectDisplayController(_In_ PCONFIGURATION_COMPONENT_DATA BusKey)
Definition: machxbox.c:161
VOID XboxGetExtendedBIOSData(PULONG ExtendedBIOSDataArea, PULONG ExtendedBIOSDataSize)
Definition: machxbox.c:92
ULONG FrameBufferSize
Definition: xboxvideo.c:30
static PCM_PARTIAL_RESOURCE_LIST XboxGetHarddiskConfigurationData(UCHAR DriveNumber, ULONG *pSize)
Definition: machxbox.c:103
VOID XboxHwIdle(VOID)
Definition: machxbox.c:353
static VOID DetectIsaBios(_In_opt_ PCSTR Options, _Inout_ PCONFIGURATION_COMPONENT_DATA SystemKey, _Out_ ULONG *BusNumber)
Definition: machxbox.c:234
VOID MachInit(const char *CmdLine)
Definition: machxbox.c:369
PCONFIGURATION_COMPONENT_DATA XboxHwDetect(_In_opt_ PCSTR Options)
Definition: machxbox.c:297
#define MAX_XBOX_COM_PORTS
Definition: machxbox.c:26
static ULONG XboxGetSerialPort(ULONG Index, PULONG Irq)
Definition: machxbox.c:57
PCM_FRAMEBUF_DEVICE_DATA FrameBufferData
Definition: xboxvideo.c:31
ULONG NvBase
Definition: xboxvideo.c:28
static UCHAR XboxGetFloppyCount(VOID)
Definition: machxbox.c:282
static BOOLEAN XboxDetectPciBus(_In_ PCONFIGURATION_COMPONENT_DATA SystemKey, _Inout_ PULONG BusNumber, _Out_ PPCI_REGISTRY_INFO BusData)
Definition: machxbox.c:35
VOID __cdecl ChainLoadBiosBootSectorCode(IN UCHAR BootDrive OPTIONAL, IN ULONG BootPartition OPTIONAL)
Definition: machxbox.c:359
VOID DetectSerialPointerPeripheral(PCONFIGURATION_COMPONENT_DATA ControllerKey, PUCHAR Base)
ULONG_PTR FrameBuffer
Definition: xboxvideo.c:29
VOID DetectSerialPorts(_In_opt_ PCSTR Options, _Inout_ PCONFIGURATION_COMPONENT_DATA BusKey, _In_ GET_SERIAL_PORT MachGetSerialPort, _In_ ULONG Count)
Definition: machpc.c:780
VOID XboxPrepareForReactOS(VOID)
Definition: machxbox.c:445
#define CM_RESOURCE_PORT_MEMORY
Definition: cmtypes.h:108
#define CM_RESOURCE_MEMORY_READ_WRITE
Definition: cmtypes.h:121
_In_opt_ ULONG Base
Definition: rtlfuncs.h:2486
#define _Inout_
Definition: no_sal2.h:162
#define _Out_
Definition: no_sal2.h:160
#define _In_
Definition: no_sal2.h:158
#define _In_opt_
Definition: no_sal2.h:212
int Count
Definition: noreturn.cpp:7
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:329
VOID PcBeep(VOID)
Definition: pcbeep.c:34
VOID HalpCalibrateStallExecution(VOID)
Definition: pchw.c:105
VOID DetectBiosDisks(PCONFIGURATION_COMPONENT_DATA SystemKey, PCONFIGURATION_COMPONENT_DATA BusKey)
Definition: pchw.c:342
GET_HARDDISK_CONFIG_DATA GetHarddiskConfigurationData
Definition: pchw.c:45
_In_ ULONG BusNumber
Definition: pciidex.h:65
#define CmResourceTypeMemory
Definition: restypes.h:106
#define CmResourceTypeDeviceSpecific
Definition: restypes.h:108
#define CmResourceTypePort
Definition: restypes.h:104
@ ControllerClass
Definition: arc.h:103
@ AdapterClass
Definition: arc.h:102
@ MultiFunctionAdapter
Definition: arc.h:125
@ DisplayController
Definition: arc.h:132
@ ConsoleOut
Definition: arc.h:92
@ Output
Definition: arc.h:94
struct _CM_FRAMEBUF_DEVICE_DATA * PCM_FRAMEBUF_DEVICE_DATA
void __cdecl _disable(void)
Definition: intrin_arm.h:365
#define TRACE(s)
Definition: solgame.cpp:4
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
ReactOS Framebuffer-specific video device configuration data.
Definition: framebuf.h:35
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@486::@495 DeviceSpecificData
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@486::@488 Port
union _CM_PARTIAL_RESOURCE_DESCRIPTOR::@486 u
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@486::@491 Memory
CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1]
Definition: restypes.h:100
CONFIGURATION_COMPONENT ComponentEntry
Definition: arc.h:287
struct _CONFIGURATION_COMPONENT_DATA * Sibling
Definition: arc.h:286
struct _CONFIGURATION_COMPONENT_DATA * Child
Definition: arc.h:285
CONFIGURATION_TYPE Type
Definition: arc.h:161
CONFIGURATION_CLASS Class
Definition: arc.h:160
Definition: disk.h:24
ULONG BytesPerSector
Number of bytes per sector.
Definition: disk.h:28
ULONG Cylinders
Number of cylinders on the disk.
Definition: disk.h:25
ULONG SectorsPerTrack
Number of sectors per track.
Definition: disk.h:27
ULONG Heads
Number of heads on the disk.
Definition: disk.h:26
struct _PCI_TYPE1_CFG_BITS::@154::@155 bits
union _PCI_TYPE1_CFG_BITS::@154 u
VOID(* VideoGetPaletteColor)(UCHAR Color, UCHAR *Red, UCHAR *Green, UCHAR *Blue)
Definition: machine.h:56
VIDEODISPLAYMODE(* VideoSetDisplayMode)(PCSTR DisplayMode, BOOLEAN Init)
Definition: machine.h:46
VOID(* GetExtendedBIOSData)(PULONG ExtendedBIOSDataArea, PULONG ExtendedBIOSDataSize)
Definition: machine.h:64
int(* ConsGetCh)(VOID)
Definition: machine.h:43
VOID(* PrepareForReactOS)(VOID)
Definition: machine.h:59
VOID(* VideoSetPaletteColor)(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue)
Definition: machine.h:55
BOOLEAN(* InitializeBootDevices)(VOID)
Definition: machine.h:76
VOID(* VideoCopyOffScreenBufferToVRAM)(PVOID Buffer)
Definition: machine.h:53
BOOLEAN(* ConsKbHit)(VOID)
Definition: machine.h:42
VOID(* VideoHideShowTextCursor)(BOOLEAN Show)
Definition: machine.h:51
TIMEINFO *(* GetTime)(VOID)
Definition: machine.h:72
UCHAR(* GetFloppyCount)(VOID)
Definition: machine.h:66
BOOLEAN(* DiskGetDriveGeometry)(UCHAR DriveNumber, PGEOMETRY DriveGeometry)
Definition: machine.h:68
BOOLEAN(* DiskReadLogicalSectors)(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer)
Definition: machine.h:67
PFREELDR_MEMORY_DESCRIPTOR(* GetMemoryMap)(PULONG MaxMemoryMapSize)
Definition: machine.h:63
VOID(* VideoGetFontsFromFirmware)(PULONG RomFontPointers)
Definition: machine.h:49
VOID(* Beep)(VOID)
Definition: machine.h:58
VOID(* VideoSetTextCursorPosition)(UCHAR X, UCHAR Y)
Definition: machine.h:50
ULONG(* VideoGetBufferSize)(VOID)
Definition: machine.h:48
VOID(* VideoPutChar)(int Ch, UCHAR Attr, unsigned X, unsigned Y)
Definition: machine.h:52
ULONG(* DiskGetCacheableBlockCount)(UCHAR DriveNumber)
Definition: machine.h:69
VOID(* VideoGetDisplaySize)(PULONG Width, PULONG Height, PULONG Depth)
Definition: machine.h:47
VOID(* VideoClearScreen)(UCHAR Attr)
Definition: machine.h:45
VOID(* HwIdle)(VOID)
Definition: machine.h:78
VOID(* VideoSync)(VOID)
Definition: machine.h:57
BOOLEAN(* VideoIsPaletteFixed)(VOID)
Definition: machine.h:54
PCONFIGURATION_COMPONENT_DATA(* HwDetect)(_In_opt_ PCSTR Options)
Definition: machine.h:77
VOID(* ConsPutChar)(int Ch)
Definition: machine.h:41
#define LPC_CONFIG_DEVICE_NUMBER
Definition: superio.h:30
#define LPC_CONFIG_DEVICE_ACTIVATE
Definition: superio.h:31
FORCEINLINE ULONG LpcGetIoBase(VOID)
Definition: superio.h:96
#define LPC_DEVICE_SERIAL_PORT_2
Definition: superio.h:24
FORCEINLINE ULONG LpcGetIrqPrimary(VOID)
Definition: superio.h:126
FORCEINLINE UCHAR LpcReadRegister(UCHAR Register)
Definition: superio.h:59
#define LPC_DEVICE_SERIAL_PORT_1
Definition: superio.h:23
FORCEINLINE VOID LpcWriteRegister(UCHAR Register, UCHAR Value)
Definition: superio.h:67
FORCEINLINE VOID LpcExitConfig(VOID)
Definition: superio.h:51
FORCEINLINE VOID LpcEnterConfig(VOID)
Definition: superio.h:43
uint32_t * PULONG
Definition: typedefs.h:59
unsigned char UCHAR
Definition: typedefs.h:53
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
const char * PCSTR
Definition: typedefs.h:52
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define IN
Definition: typedefs.h:39
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
#define TAG_HW_RESOURCE_LIST
Definition: uefidisk.c:15
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
_In_ WDFCOLLECTION _In_ ULONG Index
_In_ PWDFDEVICE_INIT _In_ PWDF_REMOVE_LOCK_OPTIONS Options
Definition: wdfdevice.h:3540
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4539
BOOLEAN XboxConsKbHit(VOID)
Definition: xboxcons.c:72
VOID XboxConsPutChar(int c)
Definition: xboxcons.c:29
int XboxConsGetCh(void)
Definition: xboxcons.c:79
BOOLEAN XboxDiskReadLogicalSectors(IN UCHAR DriveNumber, IN ULONGLONG SectorNumber, IN ULONG SectorCount, OUT PVOID Buffer)
Definition: xboxdisk.c:123
ULONG XboxDiskGetCacheableBlockCount(UCHAR DriveNumber)
Definition: xboxdisk.c:166
BOOLEAN XboxDiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY Geometry)
Definition: xboxdisk.c:146
void XboxSetLED(PCSTR pattern)
Definition: xboxi2c.c:198
PFREELDR_MEMORY_DESCRIPTOR XboxMemGetMemoryMap(ULONG *MemoryMapSize)
Definition: xboxmem.c:228
VOID XboxMemInit(VOID)
Definition: xboxmem.c:117
TIMEINFO * XboxGetTime(VOID)
Definition: xboxrtc.c:46
VOID XboxVideoGetPaletteColor(UCHAR Color, UCHAR *Red, UCHAR *Green, UCHAR *Blue)
Definition: xboxvideo.c:205
VOID XboxVideoInit(VOID)
Definition: xboxvideo.c:96
VOID XboxVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y)
Definition: xboxvideo.c:43
VOID XboxVideoPrepareForReactOS(VOID)
Definition: xboxvideo.c:217
VOID XboxVideoSetTextCursorPosition(UCHAR X, UCHAR Y)
Definition: xboxvideo.c:175
VOID XboxVideoSetPaletteColor(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue)
Definition: xboxvideo.c:199
VOID XboxVideoCopyOffScreenBufferToVRAM(PVOID Buffer)
Definition: xboxvideo.c:187
VOID XboxVideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth)
Definition: xboxvideo.c:157
ULONG XboxVideoGetBufferSize(VOID)
Definition: xboxvideo.c:163
VOID XboxVideoSync(VOID)
Definition: xboxvideo.c:211
VOID XboxVideoHideShowTextCursor(BOOLEAN Show)
Definition: xboxvideo.c:181
BOOLEAN XboxVideoIsPaletteFixed(VOID)
Definition: xboxvideo.c:193
VOID XboxVideoClearScreen(UCHAR Attr)
Definition: xboxvideo.c:37
VIDEODISPLAYMODE XboxVideoSetDisplayMode(PCSTR DisplayMode, BOOLEAN Init)
Definition: xboxvideo.c:150
VOID XboxVideoGetFontsFromFirmware(PULONG RomFontPointers)
Definition: xboxvideo.c:169
struct _CM_DISK_GEOMETRY_DEVICE_DATA * PCM_DISK_GEOMETRY_DEVICE_DATA
@ CmResourceShareDeviceExclusive
Definition: cmtypes.h:241
@ CmResourceShareUndetermined
Definition: cmtypes.h:240