mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 20:56:04 +00:00
[FREELDR] Add display controller detection for Xbox
Also add system identifier here. [BOOTDATA] Fix some typos CORE-16216
This commit is contained in:
parent
9f6442ffbe
commit
415c737cc3
2 changed files with 56 additions and 2 deletions
|
@ -266,7 +266,7 @@ ntoskrnl.exe = 1,,,,,,,2,,,,1,2
|
||||||
hal.dll = 1,,,,,,,2,,,,1,2
|
hal.dll = 1,,,,,,,2,,,,1,2
|
||||||
|
|
||||||
[Display]
|
[Display]
|
||||||
;<id> = <user friendly name>,<spare>,<service key name>,<height>,<width>,<bpp>
|
;<id> = <user friendly name>,<spare>,<service key name>,<width>,<height>,<bpp>
|
||||||
vga = "VGA Display (640x480x4)",,Vga,640,480,4
|
vga = "VGA Display (640x480x4)",,Vga,640,480,4
|
||||||
vbe_640x480x8 = "VESA Display (640x480x8)",,VBE,640,480,8
|
vbe_640x480x8 = "VESA Display (640x480x8)",,VBE,640,480,8
|
||||||
vbe_640x480x16 = "VESA Display (640x480x16)",,VBE,640,480,16
|
vbe_640x480x16 = "VESA Display (640x480x16)",,VBE,640,480,16
|
||||||
|
@ -298,7 +298,7 @@ xbox = "Original Xbox NV2A Framebuffer (640x480x32)",,XboxVmp,640,48
|
||||||
;<id> = <pnp id string>
|
;<id> = <pnp id string>
|
||||||
vga = "VGA Display"
|
vga = "VGA Display"
|
||||||
vbe = "VBE Display"
|
vbe = "VBE Display"
|
||||||
xboxvmp = "NV2A Framebuffer"
|
xbox = "NV2A Framebuffer"
|
||||||
|
|
||||||
[Keyboard]
|
[Keyboard]
|
||||||
Default = "XT-, AT- or extended keyboard (83-105 keys)"
|
Default = "XT-, AT- or extended keyboard (83-105 keys)"
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
DBG_DEFAULT_CHANNEL(HWDETECT);
|
DBG_DEFAULT_CHANNEL(HWDETECT);
|
||||||
|
|
||||||
|
extern PVOID FrameBuffer;
|
||||||
|
extern ULONG FrameBufferSize;
|
||||||
|
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
XboxFindPciBios(PPCI_REGISTRY_INFO BusData)
|
XboxFindPciBios(PPCI_REGISTRY_INFO BusData)
|
||||||
|
@ -160,6 +162,56 @@ XboxGetHarddiskConfigurationData(UCHAR DriveNumber, ULONG* pSize)
|
||||||
return PartialResourceList;
|
return PartialResourceList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static VOID
|
||||||
|
DetectDisplayController(PCONFIGURATION_COMPONENT_DATA BusKey)
|
||||||
|
{
|
||||||
|
CHAR Buffer[80];
|
||||||
|
PCONFIGURATION_COMPONENT_DATA ControllerKey;
|
||||||
|
PCM_PARTIAL_RESOURCE_LIST PartialResourceList;
|
||||||
|
PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor;
|
||||||
|
ULONG Size;
|
||||||
|
|
||||||
|
if (FrameBufferSize == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
strcpy(Buffer, "NV2A Framebuffer");
|
||||||
|
|
||||||
|
Size = sizeof(CM_PARTIAL_RESOURCE_LIST);
|
||||||
|
PartialResourceList = FrLdrHeapAlloc(Size, TAG_HW_RESOURCE_LIST);
|
||||||
|
if (PartialResourceList == NULL)
|
||||||
|
{
|
||||||
|
ERR("Failed to allocate resource descriptor\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
memset(PartialResourceList, 0, Size);
|
||||||
|
|
||||||
|
/* Initialize resource descriptor */
|
||||||
|
PartialResourceList->Version = 1;
|
||||||
|
PartialResourceList->Revision = 1;
|
||||||
|
PartialResourceList->Count = 1;
|
||||||
|
|
||||||
|
/* Set Memory */
|
||||||
|
PartialDescriptor = &PartialResourceList->PartialDescriptors[0];
|
||||||
|
PartialDescriptor->Type = CmResourceTypeMemory;
|
||||||
|
PartialDescriptor->ShareDisposition = CmResourceShareDeviceExclusive;
|
||||||
|
PartialDescriptor->Flags = CM_RESOURCE_MEMORY_READ_WRITE;
|
||||||
|
PartialDescriptor->u.Memory.Start.LowPart = (ULONG_PTR)FrameBuffer & 0x0FFFFFFF;
|
||||||
|
PartialDescriptor->u.Memory.Length = FrameBufferSize;
|
||||||
|
|
||||||
|
FldrCreateComponentKey(BusKey,
|
||||||
|
ControllerClass,
|
||||||
|
DisplayController,
|
||||||
|
0x0,
|
||||||
|
0x0,
|
||||||
|
0xFFFFFFFF,
|
||||||
|
Buffer,
|
||||||
|
PartialResourceList,
|
||||||
|
Size,
|
||||||
|
&ControllerKey);
|
||||||
|
|
||||||
|
TRACE("Created key: DisplayController\\0\n");
|
||||||
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
VOID
|
VOID
|
||||||
DetectIsaBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber)
|
DetectIsaBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber)
|
||||||
|
@ -202,6 +254,7 @@ DetectIsaBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber)
|
||||||
/* Detect ISA/BIOS devices */
|
/* Detect ISA/BIOS devices */
|
||||||
DetectBiosDisks(SystemKey, BusKey);
|
DetectBiosDisks(SystemKey, BusKey);
|
||||||
DetectSerialPorts(BusKey, XboxGetSerialPort, MAX_XBOX_COM_PORTS);
|
DetectSerialPorts(BusKey, XboxGetSerialPort, MAX_XBOX_COM_PORTS);
|
||||||
|
DetectDisplayController(BusKey);
|
||||||
|
|
||||||
/* FIXME: Detect more ISA devices */
|
/* FIXME: Detect more ISA devices */
|
||||||
}
|
}
|
||||||
|
@ -232,6 +285,7 @@ XboxHwDetect(VOID)
|
||||||
|
|
||||||
/* Create the 'System' key */
|
/* Create the 'System' key */
|
||||||
FldrCreateSystemKey(&SystemKey);
|
FldrCreateSystemKey(&SystemKey);
|
||||||
|
FldrSetIdentifier(SystemKey, "Original Xbox (PC/AT like)");
|
||||||
|
|
||||||
GetHarddiskConfigurationData = XboxGetHarddiskConfigurationData;
|
GetHarddiskConfigurationData = XboxGetHarddiskConfigurationData;
|
||||||
FindPciBios = XboxFindPciBios;
|
FindPciBios = XboxFindPciBios;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue