mirror of
https://github.com/reactos/reactos.git
synced 2024-07-11 07:05:12 +00:00
- Pass ARC Hardware Tree in SetupLDR too.
- Zero-initialize memory from the Hardware Heap, just to be sure. - Don't set the Version/Key/Affinity when creating the system node, let the caller do this. - Fix the way components were added in the tree, it was busted. - Enable setting of component information for the APM and ACPI component nodes. This was #if'ed out because it crashed the kernel while PnP was getting bus information for ATAPI/SCSIPORT, since the nodes had no component data. Add some component data to remove the crash, and then enable component information. - The Real Mode IRQ Routing Table is a Peripheral Class, not a System Class. - Enable the code to create component nodes for each PCI Bus, it was #if'ed out ages ago. - Don't create any component data for the PCI BIOS, it doesn't have any. - Create component data for the first PCI Bus component node based on the PCI_REGISTRY_INFO strucutre. - Fix the way the BIOS Hard disk Peripheral nodes are created. - Always create the DiskController node with floppy disk information, but don't do actual floppy detection if no floppies are there. - Fix flags for Floppy Peripheral nodes. - Fix vector for Floppy Peripheral node. - Set component information for each BIOS hard disk peripheral node. - Fix component information for Serial Peripherals, they were being created on the Serial Controller node instead. - Set empty component information for the system node. - TODO: Setup ACPI and APM Bios descriptor information. - TODO: Setup ROM BIOS Block descriptor information. svn path=/trunk/; revision=31131
This commit is contained in:
parent
82b5e2eb8b
commit
a1c2403f66
|
@ -508,119 +508,6 @@ SetHarddiskIdentifier(PCONFIGURATION_COMPONENT_DATA DiskKey,
|
||||||
FldrSetIdentifier(DiskKey, Identifier);
|
FldrSetIdentifier(DiskKey, Identifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static VOID
|
|
||||||
DetectBiosDisks(PCONFIGURATION_COMPONENT_DATA SystemKey,
|
|
||||||
PCONFIGURATION_COMPONENT_DATA BusKey)
|
|
||||||
{
|
|
||||||
PCM_FULL_RESOURCE_DESCRIPTOR FullResourceDescriptor;
|
|
||||||
PCM_INT13_DRIVE_PARAMETER Int13Drives;
|
|
||||||
GEOMETRY Geometry;
|
|
||||||
PCONFIGURATION_COMPONENT_DATA DiskKey;
|
|
||||||
ULONG DiskCount;
|
|
||||||
ULONG Size;
|
|
||||||
ULONG i;
|
|
||||||
BOOLEAN Changed;
|
|
||||||
|
|
||||||
/* Count the number of visible drives */
|
|
||||||
DiskReportError(FALSE);
|
|
||||||
DiskCount = 0;
|
|
||||||
|
|
||||||
/* There are some really broken BIOSes out there. There are even BIOSes
|
|
||||||
* that happily report success when you ask them to read from non-existent
|
|
||||||
* harddisks. So, we set the buffer to known contents first, then try to
|
|
||||||
* read. If the BIOS reports success but the buffer contents haven't
|
|
||||||
* changed then we fail anyway */
|
|
||||||
memset((PVOID) DISKREADBUFFER, 0xcd, 512);
|
|
||||||
while (MachDiskReadLogicalSectors(0x80 + DiskCount, 0ULL, 1, (PVOID)DISKREADBUFFER))
|
|
||||||
{
|
|
||||||
Changed = FALSE;
|
|
||||||
for (i = 0; ! Changed && i < 512; i++)
|
|
||||||
{
|
|
||||||
Changed = ((PUCHAR)DISKREADBUFFER)[i] != 0xcd;
|
|
||||||
}
|
|
||||||
if (! Changed)
|
|
||||||
{
|
|
||||||
DbgPrint((DPRINT_HWDETECT, "BIOS reports success for disk %d but data didn't change\n",
|
|
||||||
(int)DiskCount));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
DiskCount++;
|
|
||||||
memset((PVOID) DISKREADBUFFER, 0xcd, 512);
|
|
||||||
}
|
|
||||||
DiskReportError(TRUE);
|
|
||||||
DbgPrint((DPRINT_HWDETECT, "BIOS reports %d harddisk%s\n",
|
|
||||||
(int)DiskCount, (DiskCount == 1) ? "": "s"));
|
|
||||||
|
|
||||||
/* Allocate resource descriptor */
|
|
||||||
Size = sizeof(CM_FULL_RESOURCE_DESCRIPTOR) +
|
|
||||||
sizeof(CM_INT13_DRIVE_PARAMETER) * DiskCount;
|
|
||||||
FullResourceDescriptor = MmAllocateMemory(Size);
|
|
||||||
if (FullResourceDescriptor == NULL)
|
|
||||||
{
|
|
||||||
DbgPrint((DPRINT_HWDETECT,
|
|
||||||
"Failed to allocate resource descriptor\n"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Initialize resource descriptor */
|
|
||||||
memset(FullResourceDescriptor, 0, Size);
|
|
||||||
FullResourceDescriptor->InterfaceType = InterfaceTypeUndefined;
|
|
||||||
FullResourceDescriptor->BusNumber = -1;
|
|
||||||
FullResourceDescriptor->PartialResourceList.Version = 1;
|
|
||||||
FullResourceDescriptor->PartialResourceList.Revision = 1;
|
|
||||||
FullResourceDescriptor->PartialResourceList.Count = 1;
|
|
||||||
FullResourceDescriptor->PartialResourceList.PartialDescriptors[0].Type =
|
|
||||||
CmResourceTypeDeviceSpecific;
|
|
||||||
// FullResourceDescriptor->PartialResourceList.PartialDescriptors[0].ShareDisposition =
|
|
||||||
// FullResourceDescriptor->PartialResourceList.PartialDescriptors[0].Flags =
|
|
||||||
FullResourceDescriptor->PartialResourceList.PartialDescriptors[0].u.DeviceSpecificData.DataSize =
|
|
||||||
sizeof(CM_INT13_DRIVE_PARAMETER) * DiskCount;
|
|
||||||
|
|
||||||
/* Get harddisk Int13 geometry data */
|
|
||||||
Int13Drives = (PVOID)(((ULONG_PTR)FullResourceDescriptor) + sizeof(CM_FULL_RESOURCE_DESCRIPTOR));
|
|
||||||
for (i = 0; i < DiskCount; i++)
|
|
||||||
{
|
|
||||||
if (MachDiskGetDriveGeometry(0x80 + i, &Geometry))
|
|
||||||
{
|
|
||||||
Int13Drives[i].DriveSelect = 0x80 + i;
|
|
||||||
Int13Drives[i].MaxCylinders = Geometry.Cylinders - 1;
|
|
||||||
Int13Drives[i].SectorsPerTrack = Geometry.Sectors;
|
|
||||||
Int13Drives[i].MaxHeads = Geometry.Heads - 1;
|
|
||||||
Int13Drives[i].NumberDrives = DiskCount;
|
|
||||||
|
|
||||||
DbgPrint((DPRINT_HWDETECT,
|
|
||||||
"Disk %x: %u Cylinders %u Heads %u Sectors %u Bytes\n",
|
|
||||||
0x80 + i,
|
|
||||||
Geometry.Cylinders - 1,
|
|
||||||
Geometry.Heads -1,
|
|
||||||
Geometry.Sectors,
|
|
||||||
Geometry.BytesPerSector));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set 'Configuration Data' value */
|
|
||||||
FldrSetConfigurationData(SystemKey, FullResourceDescriptor, Size);
|
|
||||||
MmFreeMemory(FullResourceDescriptor);
|
|
||||||
|
|
||||||
/* Create and fill subkey for each harddisk */
|
|
||||||
for (i = 0; i < DiskCount; i++)
|
|
||||||
{
|
|
||||||
/* Create disk key */
|
|
||||||
FldrCreateComponentKey(BusKey,
|
|
||||||
L"DiskController\\0\\DiskPeripheral",
|
|
||||||
i,
|
|
||||||
PeripheralClass,
|
|
||||||
DiskPeripheral,
|
|
||||||
&DiskKey);
|
|
||||||
|
|
||||||
/* Set disk values */
|
|
||||||
SetHarddiskConfigurationData(DiskKey, 0x80 + i);
|
|
||||||
SetHarddiskIdentifier(DiskKey, 0x80 + i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static ULONG
|
static ULONG
|
||||||
GetFloppyCount(VOID)
|
GetFloppyCount(VOID)
|
||||||
{
|
{
|
||||||
|
@ -694,7 +581,7 @@ DetectBiosFloppyPeripheral(PCONFIGURATION_COMPONENT_DATA ControllerKey)
|
||||||
|
|
||||||
/* Set 'ComponentInformation' value */
|
/* Set 'ComponentInformation' value */
|
||||||
FldrSetComponentInformation(PeripheralKey,
|
FldrSetComponentInformation(PeripheralKey,
|
||||||
0x0,
|
Input | Output,
|
||||||
FloppyNumber,
|
FloppyNumber,
|
||||||
0xFFFFFFFF);
|
0xFFFFFFFF);
|
||||||
|
|
||||||
|
@ -743,12 +630,11 @@ DetectBiosFloppyPeripheral(PCONFIGURATION_COMPONENT_DATA ControllerKey)
|
||||||
|
|
||||||
|
|
||||||
static VOID
|
static VOID
|
||||||
DetectBiosFloppyController(PCONFIGURATION_COMPONENT_DATA SystemKey,
|
DetectBiosFloppyController(PCONFIGURATION_COMPONENT_DATA BusKey,
|
||||||
PCONFIGURATION_COMPONENT_DATA BusKey)
|
PCONFIGURATION_COMPONENT_DATA ControllerKey)
|
||||||
{
|
{
|
||||||
PCM_FULL_RESOURCE_DESCRIPTOR FullResourceDescriptor;
|
PCM_FULL_RESOURCE_DESCRIPTOR FullResourceDescriptor;
|
||||||
PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor;
|
PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor;
|
||||||
PCONFIGURATION_COMPONENT_DATA ControllerKey;
|
|
||||||
ULONG Size;
|
ULONG Size;
|
||||||
ULONG FloppyCount;
|
ULONG FloppyCount;
|
||||||
|
|
||||||
|
@ -757,23 +643,6 @@ DetectBiosFloppyController(PCONFIGURATION_COMPONENT_DATA SystemKey,
|
||||||
"Floppy count: %u\n",
|
"Floppy count: %u\n",
|
||||||
FloppyCount));
|
FloppyCount));
|
||||||
|
|
||||||
if (FloppyCount == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
FldrCreateComponentKey(SystemKey,
|
|
||||||
L"DiskController",
|
|
||||||
0,
|
|
||||||
ControllerClass,
|
|
||||||
DiskController,
|
|
||||||
&ControllerKey);
|
|
||||||
DbgPrint((DPRINT_HWDETECT, "Created key: DiskController\\0\n"));
|
|
||||||
|
|
||||||
/* Set 'ComponentInformation' value */
|
|
||||||
FldrSetComponentInformation(ControllerKey,
|
|
||||||
Output | Input | Removable,
|
|
||||||
0,
|
|
||||||
0xFFFFFFFF);
|
|
||||||
|
|
||||||
Size = sizeof(CM_FULL_RESOURCE_DESCRIPTOR) +
|
Size = sizeof(CM_FULL_RESOURCE_DESCRIPTOR) +
|
||||||
2 * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR);
|
2 * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR);
|
||||||
FullResourceDescriptor = MmAllocateMemory(Size);
|
FullResourceDescriptor = MmAllocateMemory(Size);
|
||||||
|
@ -807,7 +676,7 @@ DetectBiosFloppyController(PCONFIGURATION_COMPONENT_DATA SystemKey,
|
||||||
PartialDescriptor->ShareDisposition = CmResourceShareUndetermined;
|
PartialDescriptor->ShareDisposition = CmResourceShareUndetermined;
|
||||||
PartialDescriptor->Flags = CM_RESOURCE_INTERRUPT_LATCHED;
|
PartialDescriptor->Flags = CM_RESOURCE_INTERRUPT_LATCHED;
|
||||||
PartialDescriptor->u.Interrupt.Level = 6;
|
PartialDescriptor->u.Interrupt.Level = 6;
|
||||||
PartialDescriptor->u.Interrupt.Vector = 0;
|
PartialDescriptor->u.Interrupt.Vector = 6;
|
||||||
PartialDescriptor->u.Interrupt.Affinity = 0xFFFFFFFF;
|
PartialDescriptor->u.Interrupt.Affinity = 0xFFFFFFFF;
|
||||||
|
|
||||||
/* Set DMA channel */
|
/* Set DMA channel */
|
||||||
|
@ -822,9 +691,140 @@ DetectBiosFloppyController(PCONFIGURATION_COMPONENT_DATA SystemKey,
|
||||||
FldrSetConfigurationData(ControllerKey, FullResourceDescriptor, Size);
|
FldrSetConfigurationData(ControllerKey, FullResourceDescriptor, Size);
|
||||||
MmFreeMemory(FullResourceDescriptor);
|
MmFreeMemory(FullResourceDescriptor);
|
||||||
|
|
||||||
DetectBiosFloppyPeripheral(ControllerKey);
|
if (FloppyCount) DetectBiosFloppyPeripheral(ControllerKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static VOID
|
||||||
|
DetectBiosDisks(PCONFIGURATION_COMPONENT_DATA SystemKey,
|
||||||
|
PCONFIGURATION_COMPONENT_DATA BusKey)
|
||||||
|
{
|
||||||
|
PCM_FULL_RESOURCE_DESCRIPTOR FullResourceDescriptor;
|
||||||
|
PCM_INT13_DRIVE_PARAMETER Int13Drives;
|
||||||
|
GEOMETRY Geometry;
|
||||||
|
PCONFIGURATION_COMPONENT_DATA DiskKey, ControllerKey;
|
||||||
|
ULONG DiskCount;
|
||||||
|
ULONG Size;
|
||||||
|
ULONG i;
|
||||||
|
BOOLEAN Changed;
|
||||||
|
|
||||||
|
/* Count the number of visible drives */
|
||||||
|
DiskReportError(FALSE);
|
||||||
|
DiskCount = 0;
|
||||||
|
|
||||||
|
/* There are some really broken BIOSes out there. There are even BIOSes
|
||||||
|
* that happily report success when you ask them to read from non-existent
|
||||||
|
* harddisks. So, we set the buffer to known contents first, then try to
|
||||||
|
* read. If the BIOS reports success but the buffer contents haven't
|
||||||
|
* changed then we fail anyway */
|
||||||
|
memset((PVOID) DISKREADBUFFER, 0xcd, 512);
|
||||||
|
while (MachDiskReadLogicalSectors(0x80 + DiskCount, 0ULL, 1, (PVOID)DISKREADBUFFER))
|
||||||
|
{
|
||||||
|
Changed = FALSE;
|
||||||
|
for (i = 0; ! Changed && i < 512; i++)
|
||||||
|
{
|
||||||
|
Changed = ((PUCHAR)DISKREADBUFFER)[i] != 0xcd;
|
||||||
|
}
|
||||||
|
if (! Changed)
|
||||||
|
{
|
||||||
|
DbgPrint((DPRINT_HWDETECT, "BIOS reports success for disk %d but data didn't change\n",
|
||||||
|
(int)DiskCount));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
DiskCount++;
|
||||||
|
memset((PVOID) DISKREADBUFFER, 0xcd, 512);
|
||||||
|
}
|
||||||
|
DiskReportError(TRUE);
|
||||||
|
DbgPrint((DPRINT_HWDETECT, "BIOS reports %d harddisk%s\n",
|
||||||
|
(int)DiskCount, (DiskCount == 1) ? "": "s"));
|
||||||
|
|
||||||
|
FldrCreateComponentKey(BusKey,
|
||||||
|
L"DiskController",
|
||||||
|
0,
|
||||||
|
ControllerClass,
|
||||||
|
DiskController,
|
||||||
|
&ControllerKey);
|
||||||
|
DbgPrint((DPRINT_HWDETECT, "Created key: DiskController\\0\n"));
|
||||||
|
|
||||||
|
/* Set 'ComponentInformation' value */
|
||||||
|
FldrSetComponentInformation(ControllerKey,
|
||||||
|
Output | Input | Removable,
|
||||||
|
0,
|
||||||
|
0xFFFFFFFF);
|
||||||
|
|
||||||
|
DetectBiosFloppyController(BusKey, ControllerKey);
|
||||||
|
|
||||||
|
/* Allocate resource descriptor */
|
||||||
|
Size = sizeof(CM_FULL_RESOURCE_DESCRIPTOR) +
|
||||||
|
sizeof(CM_INT13_DRIVE_PARAMETER) * DiskCount;
|
||||||
|
FullResourceDescriptor = MmAllocateMemory(Size);
|
||||||
|
if (FullResourceDescriptor == NULL)
|
||||||
|
{
|
||||||
|
DbgPrint((DPRINT_HWDETECT,
|
||||||
|
"Failed to allocate resource descriptor\n"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Initialize resource descriptor */
|
||||||
|
memset(FullResourceDescriptor, 0, Size);
|
||||||
|
FullResourceDescriptor->InterfaceType = InterfaceTypeUndefined;
|
||||||
|
FullResourceDescriptor->BusNumber = -1;
|
||||||
|
FullResourceDescriptor->PartialResourceList.Version = 1;
|
||||||
|
FullResourceDescriptor->PartialResourceList.Revision = 1;
|
||||||
|
FullResourceDescriptor->PartialResourceList.Count = 1;
|
||||||
|
FullResourceDescriptor->PartialResourceList.PartialDescriptors[0].Type = CmResourceTypeDeviceSpecific;
|
||||||
|
FullResourceDescriptor->PartialResourceList.PartialDescriptors[0].ShareDisposition = 0;
|
||||||
|
FullResourceDescriptor->PartialResourceList.PartialDescriptors[0].Flags = 0;
|
||||||
|
FullResourceDescriptor->PartialResourceList.PartialDescriptors[0].u.DeviceSpecificData.DataSize =
|
||||||
|
sizeof(CM_INT13_DRIVE_PARAMETER) * DiskCount;
|
||||||
|
|
||||||
|
/* Get harddisk Int13 geometry data */
|
||||||
|
Int13Drives = (PVOID)(((ULONG_PTR)FullResourceDescriptor) + sizeof(CM_FULL_RESOURCE_DESCRIPTOR));
|
||||||
|
for (i = 0; i < DiskCount; i++)
|
||||||
|
{
|
||||||
|
if (MachDiskGetDriveGeometry(0x80 + i, &Geometry))
|
||||||
|
{
|
||||||
|
Int13Drives[i].DriveSelect = 0x80 + i;
|
||||||
|
Int13Drives[i].MaxCylinders = Geometry.Cylinders - 1;
|
||||||
|
Int13Drives[i].SectorsPerTrack = Geometry.Sectors;
|
||||||
|
Int13Drives[i].MaxHeads = Geometry.Heads - 1;
|
||||||
|
Int13Drives[i].NumberDrives = DiskCount;
|
||||||
|
|
||||||
|
DbgPrint((DPRINT_HWDETECT,
|
||||||
|
"Disk %x: %u Cylinders %u Heads %u Sectors %u Bytes\n",
|
||||||
|
0x80 + i,
|
||||||
|
Geometry.Cylinders - 1,
|
||||||
|
Geometry.Heads -1,
|
||||||
|
Geometry.Sectors,
|
||||||
|
Geometry.BytesPerSector));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Set 'Configuration Data' value */
|
||||||
|
FldrSetConfigurationData(SystemKey, FullResourceDescriptor, Size);
|
||||||
|
MmFreeMemory(FullResourceDescriptor);
|
||||||
|
|
||||||
|
/* Create and fill subkey for each harddisk */
|
||||||
|
for (i = 0; i < DiskCount; i++)
|
||||||
|
{
|
||||||
|
/* Create disk key */
|
||||||
|
FldrCreateComponentKey(ControllerKey,
|
||||||
|
L"DiskPeripheral",
|
||||||
|
i,
|
||||||
|
PeripheralClass,
|
||||||
|
DiskPeripheral,
|
||||||
|
&DiskKey);
|
||||||
|
|
||||||
|
/* Set 'ComponentInformation' value */
|
||||||
|
FldrSetComponentInformation(DiskKey,
|
||||||
|
Output | Input,
|
||||||
|
0,
|
||||||
|
0xFFFFFFFF);
|
||||||
|
|
||||||
|
/* Set disk values */
|
||||||
|
SetHarddiskConfigurationData(DiskKey, 0x80 + i);
|
||||||
|
SetHarddiskIdentifier(DiskKey, 0x80 + i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static VOID
|
static VOID
|
||||||
InitializeSerialPort(ULONG Port,
|
InitializeSerialPort(ULONG Port,
|
||||||
|
@ -1483,7 +1483,7 @@ DetectKeyboardPeripheral(PCONFIGURATION_COMPONENT_DATA ControllerKey)
|
||||||
DbgPrint((DPRINT_HWDETECT, "Created key: KeyboardPeripheral\\0\n"));
|
DbgPrint((DPRINT_HWDETECT, "Created key: KeyboardPeripheral\\0\n"));
|
||||||
|
|
||||||
/* Set 'ComponentInformation' value */
|
/* Set 'ComponentInformation' value */
|
||||||
FldrSetComponentInformation(ControllerKey,
|
FldrSetComponentInformation(PeripheralKey,
|
||||||
Input | ConsoleIn,
|
Input | ConsoleIn,
|
||||||
0,
|
0,
|
||||||
0xFFFFFFFF);
|
0xFFFFFFFF);
|
||||||
|
@ -1911,8 +1911,6 @@ DetectIsaBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber)
|
||||||
/* Detect ISA/BIOS devices */
|
/* Detect ISA/BIOS devices */
|
||||||
DetectBiosDisks(SystemKey, BusKey);
|
DetectBiosDisks(SystemKey, BusKey);
|
||||||
|
|
||||||
DetectBiosFloppyController(SystemKey, BusKey);
|
|
||||||
|
|
||||||
DetectSerialPorts(BusKey);
|
DetectSerialPorts(BusKey);
|
||||||
|
|
||||||
DetectParallelPorts(BusKey);
|
DetectParallelPorts(BusKey);
|
||||||
|
@ -1938,6 +1936,12 @@ PcHwDetect(VOID)
|
||||||
/* Create the 'System' key */
|
/* Create the 'System' key */
|
||||||
FldrCreateSystemKey(&SystemKey);
|
FldrCreateSystemKey(&SystemKey);
|
||||||
|
|
||||||
|
/* Set empty component information */
|
||||||
|
FldrSetComponentInformation(SystemKey,
|
||||||
|
0x0,
|
||||||
|
0x0,
|
||||||
|
0xFFFFFFFF);
|
||||||
|
|
||||||
/* Detect buses */
|
/* Detect buses */
|
||||||
DetectPciBios(SystemKey, &BusNumber);
|
DetectPciBios(SystemKey, &BusNumber);
|
||||||
DetectApmBios(SystemKey, &BusNumber);
|
DetectApmBios(SystemKey, &BusNumber);
|
||||||
|
|
|
@ -52,6 +52,7 @@ VOID
|
||||||
DetectAcpiBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber)
|
DetectAcpiBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber)
|
||||||
{
|
{
|
||||||
PCONFIGURATION_COMPONENT_DATA BiosKey;
|
PCONFIGURATION_COMPONENT_DATA BiosKey;
|
||||||
|
CM_FULL_RESOURCE_DESCRIPTOR FullResourceDescriptor;
|
||||||
|
|
||||||
if (FindAcpiBios())
|
if (FindAcpiBios())
|
||||||
{
|
{
|
||||||
|
@ -65,13 +66,23 @@ DetectAcpiBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber)
|
||||||
MultiFunctionAdapter,
|
MultiFunctionAdapter,
|
||||||
&BiosKey);
|
&BiosKey);
|
||||||
|
|
||||||
#if 0
|
|
||||||
/* Set 'Component Information' */
|
/* Set 'Component Information' */
|
||||||
FldrSetComponentInformation(BiosKey,
|
FldrSetComponentInformation(BiosKey,
|
||||||
0x0,
|
0x0,
|
||||||
0x0,
|
0x0,
|
||||||
0xFFFFFFFF);
|
0xFFFFFFFF);
|
||||||
#endif
|
|
||||||
|
/* Set 'Configuration Data' value */
|
||||||
|
memset(&FullResourceDescriptor, 0, sizeof(CM_FULL_RESOURCE_DESCRIPTOR));
|
||||||
|
FullResourceDescriptor.InterfaceType = Internal;
|
||||||
|
FullResourceDescriptor.BusNumber = *BusNumber;
|
||||||
|
FullResourceDescriptor.PartialResourceList.Version = 0;
|
||||||
|
FullResourceDescriptor.PartialResourceList.Revision = 0;
|
||||||
|
FullResourceDescriptor.PartialResourceList.Count = 0;
|
||||||
|
FldrSetConfigurationData(BiosKey,
|
||||||
|
&FullResourceDescriptor,
|
||||||
|
sizeof(CM_FULL_RESOURCE_DESCRIPTOR) -
|
||||||
|
sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR));
|
||||||
|
|
||||||
/* Increment bus number */
|
/* Increment bus number */
|
||||||
(*BusNumber)++;
|
(*BusNumber)++;
|
||||||
|
|
|
@ -57,6 +57,7 @@ VOID
|
||||||
DetectApmBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber)
|
DetectApmBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber)
|
||||||
{
|
{
|
||||||
PCONFIGURATION_COMPONENT_DATA BiosKey;
|
PCONFIGURATION_COMPONENT_DATA BiosKey;
|
||||||
|
CM_FULL_RESOURCE_DESCRIPTOR FullResourceDescriptor;
|
||||||
|
|
||||||
if (FindApmBios())
|
if (FindApmBios())
|
||||||
{
|
{
|
||||||
|
@ -68,13 +69,23 @@ DetectApmBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber)
|
||||||
MultiFunctionAdapter,
|
MultiFunctionAdapter,
|
||||||
&BiosKey);
|
&BiosKey);
|
||||||
|
|
||||||
#if 0
|
|
||||||
/* Set 'Component Information' */
|
/* Set 'Component Information' */
|
||||||
FldrSetComponentInformation(BiosKey,
|
FldrSetComponentInformation(BiosKey,
|
||||||
0x0,
|
0x0,
|
||||||
0x0,
|
0x0,
|
||||||
0xFFFFFFFF);
|
0xFFFFFFFF);
|
||||||
#endif
|
|
||||||
|
/* Set 'Configuration Data' value */
|
||||||
|
memset(&FullResourceDescriptor, 0, sizeof(CM_FULL_RESOURCE_DESCRIPTOR));
|
||||||
|
FullResourceDescriptor.InterfaceType = Internal;
|
||||||
|
FullResourceDescriptor.BusNumber = *BusNumber;
|
||||||
|
FullResourceDescriptor.PartialResourceList.Version = 0;
|
||||||
|
FullResourceDescriptor.PartialResourceList.Revision = 0;
|
||||||
|
FullResourceDescriptor.PartialResourceList.Count = 0;
|
||||||
|
FldrSetConfigurationData(BiosKey,
|
||||||
|
&FullResourceDescriptor,
|
||||||
|
sizeof(CM_FULL_RESOURCE_DESCRIPTOR) -
|
||||||
|
sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR));
|
||||||
|
|
||||||
/* Increment bus number */
|
/* Increment bus number */
|
||||||
(*BusNumber)++;
|
(*BusNumber)++;
|
||||||
|
|
|
@ -54,13 +54,13 @@ typedef struct _PCI_IRQ_ROUTING_TABLE
|
||||||
ROUTING_SLOT Slot[1];
|
ROUTING_SLOT Slot[1];
|
||||||
} __attribute__((packed)) PCI_IRQ_ROUTING_TABLE, *PPCI_IRQ_ROUTING_TABLE;
|
} __attribute__((packed)) PCI_IRQ_ROUTING_TABLE, *PPCI_IRQ_ROUTING_TABLE;
|
||||||
|
|
||||||
typedef struct _CM_PCI_BUS_DATA
|
typedef struct _PCI_REGISTRY_INFO
|
||||||
{
|
{
|
||||||
UCHAR BusCount;
|
UCHAR MajorRevision;
|
||||||
USHORT PciVersion;
|
UCHAR MinorRevision;
|
||||||
UCHAR HardwareMechanism;
|
UCHAR NoBuses;
|
||||||
} __attribute__((packed)) CM_PCI_BUS_DATA, *PCM_PCI_BUS_DATA;
|
UCHAR HardwareMechanism;
|
||||||
|
} PCI_REGISTRY_INFO, *PPCI_REGISTRY_INFO;
|
||||||
|
|
||||||
static PPCI_IRQ_ROUTING_TABLE
|
static PPCI_IRQ_ROUTING_TABLE
|
||||||
GetPciIrqRoutingTable(VOID)
|
GetPciIrqRoutingTable(VOID)
|
||||||
|
@ -106,7 +106,7 @@ GetPciIrqRoutingTable(VOID)
|
||||||
|
|
||||||
|
|
||||||
static BOOLEAN
|
static BOOLEAN
|
||||||
FindPciBios(PCM_PCI_BUS_DATA BusData)
|
FindPciBios(PPCI_REGISTRY_INFO BusData)
|
||||||
{
|
{
|
||||||
REGS RegsIn;
|
REGS RegsIn;
|
||||||
REGS RegsOut;
|
REGS RegsOut;
|
||||||
|
@ -125,8 +125,9 @@ FindPciBios(PCM_PCI_BUS_DATA BusData)
|
||||||
DbgPrint((DPRINT_HWDETECT, "BL: %x\n", RegsOut.b.bl));
|
DbgPrint((DPRINT_HWDETECT, "BL: %x\n", RegsOut.b.bl));
|
||||||
DbgPrint((DPRINT_HWDETECT, "CL: %x\n", RegsOut.b.cl));
|
DbgPrint((DPRINT_HWDETECT, "CL: %x\n", RegsOut.b.cl));
|
||||||
|
|
||||||
BusData->BusCount = RegsOut.b.cl + 1;
|
BusData->NoBuses = RegsOut.b.cl + 1;
|
||||||
BusData->PciVersion = RegsOut.w.bx;
|
BusData->MajorRevision = RegsOut.b.bh;
|
||||||
|
BusData->MinorRevision = RegsOut.b.bl;
|
||||||
BusData->HardwareMechanism = RegsOut.b.cl;
|
BusData->HardwareMechanism = RegsOut.b.cl;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -156,7 +157,7 @@ DetectPciIrqRoutingTable(PCONFIGURATION_COMPONENT_DATA BusKey)
|
||||||
FldrCreateComponentKey(BusKey,
|
FldrCreateComponentKey(BusKey,
|
||||||
L"RealModeIrqRoutingTable",
|
L"RealModeIrqRoutingTable",
|
||||||
0,
|
0,
|
||||||
SystemClass,
|
PeripheralClass,
|
||||||
RealModeIrqRoutingTable,
|
RealModeIrqRoutingTable,
|
||||||
&TableKey);
|
&TableKey);
|
||||||
|
|
||||||
|
@ -214,14 +215,13 @@ VOID
|
||||||
DetectPciBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber)
|
DetectPciBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber)
|
||||||
{
|
{
|
||||||
PCM_FULL_RESOURCE_DESCRIPTOR FullResourceDescriptor;
|
PCM_FULL_RESOURCE_DESCRIPTOR FullResourceDescriptor;
|
||||||
CM_PCI_BUS_DATA BusData;
|
PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor;
|
||||||
|
PCI_REGISTRY_INFO BusData;
|
||||||
PCONFIGURATION_COMPONENT_DATA BiosKey;
|
PCONFIGURATION_COMPONENT_DATA BiosKey;
|
||||||
ULONG Size;
|
ULONG Size;
|
||||||
#if 0
|
|
||||||
PCONFIGURATION_COMPONENT_DATA BusKey;
|
PCONFIGURATION_COMPONENT_DATA BusKey;
|
||||||
ULONG i;
|
ULONG i;
|
||||||
WCHAR szPci[] = L"PCI";
|
WCHAR szPci[] = L"PCI";
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Report the PCI BIOS */
|
/* Report the PCI BIOS */
|
||||||
if (FindPciBios(&BusData))
|
if (FindPciBios(&BusData))
|
||||||
|
@ -247,26 +247,23 @@ DetectPciBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber)
|
||||||
FldrSetIdentifier(BiosKey, L"PCI BIOS");
|
FldrSetIdentifier(BiosKey, L"PCI BIOS");
|
||||||
|
|
||||||
/* Set 'Configuration Data' value */
|
/* Set 'Configuration Data' value */
|
||||||
Size = sizeof(CM_FULL_RESOURCE_DESCRIPTOR);
|
Size = FIELD_OFFSET(CM_FULL_RESOURCE_DESCRIPTOR,
|
||||||
|
PartialResourceList.PartialDescriptors);
|
||||||
FullResourceDescriptor = MmAllocateMemory(Size);
|
FullResourceDescriptor = MmAllocateMemory(Size);
|
||||||
if (FullResourceDescriptor == NULL)
|
if (FullResourceDescriptor == NULL)
|
||||||
{
|
{
|
||||||
DbgPrint((DPRINT_HWDETECT,
|
DbgPrint((DPRINT_HWDETECT,
|
||||||
"Failed to allocate resource descriptor\n"));
|
"Failed to allocate resource descriptor\n"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize resource descriptor */
|
/* Initialize resource descriptor */
|
||||||
memset(FullResourceDescriptor, 0, Size);
|
memset(FullResourceDescriptor, 0, Size);
|
||||||
FullResourceDescriptor->InterfaceType = PCIBus;
|
FullResourceDescriptor->InterfaceType = PCIBus;
|
||||||
FullResourceDescriptor->BusNumber = 0;
|
FullResourceDescriptor->BusNumber = 0;
|
||||||
FullResourceDescriptor->PartialResourceList.Version = 1;
|
FullResourceDescriptor->PartialResourceList.Version = 0;
|
||||||
FullResourceDescriptor->PartialResourceList.Revision = 1;
|
FullResourceDescriptor->PartialResourceList.Revision = 0;
|
||||||
FullResourceDescriptor->PartialResourceList.Count = 1;
|
FullResourceDescriptor->PartialResourceList.Count = 0;
|
||||||
FullResourceDescriptor->PartialResourceList.PartialDescriptors[0].Type = CmResourceTypeBusNumber;
|
|
||||||
FullResourceDescriptor->PartialResourceList.PartialDescriptors[0].ShareDisposition = CmResourceShareDeviceExclusive;
|
|
||||||
FullResourceDescriptor->PartialResourceList.PartialDescriptors[0].u.BusNumber.Start = 0;
|
|
||||||
FullResourceDescriptor->PartialResourceList.PartialDescriptors[0].u.BusNumber.Length = 1;
|
|
||||||
|
|
||||||
/* Set 'Configuration Data' value */
|
/* Set 'Configuration Data' value */
|
||||||
FldrSetConfigurationData(BiosKey, FullResourceDescriptor, Size);
|
FldrSetConfigurationData(BiosKey, FullResourceDescriptor, Size);
|
||||||
|
@ -274,22 +271,16 @@ DetectPciBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber)
|
||||||
|
|
||||||
DetectPciIrqRoutingTable(BiosKey);
|
DetectPciIrqRoutingTable(BiosKey);
|
||||||
|
|
||||||
#if 0
|
|
||||||
/*
|
|
||||||
* FIXME:
|
|
||||||
* Enabling this piece of code will corrupt the boot sequence!
|
|
||||||
* This is probably caused by a bug in the registry code!
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Report PCI buses */
|
/* Report PCI buses */
|
||||||
for (i = 0; i < (ULONG)BusData.BusCount; i++)
|
for (i = 0; i < (ULONG)BusData.NoBuses; i++)
|
||||||
{
|
{
|
||||||
|
/* Create the bus key */
|
||||||
FldrCreateComponentKey(SystemKey,
|
FldrCreateComponentKey(SystemKey,
|
||||||
L"MultifunctionAdapter",
|
L"MultifunctionAdapter",
|
||||||
*BusNumber,
|
*BusNumber,
|
||||||
AdapterClass,
|
AdapterClass,
|
||||||
MultiFunctionAdapter,
|
MultiFunctionAdapter,
|
||||||
&BiosKey);
|
&BusKey);
|
||||||
|
|
||||||
/* Set 'Component Information' */
|
/* Set 'Component Information' */
|
||||||
FldrSetComponentInformation(BusKey,
|
FldrSetComponentInformation(BusKey,
|
||||||
|
@ -297,13 +288,73 @@ DetectPciBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber)
|
||||||
0x0,
|
0x0,
|
||||||
0xFFFFFFFF);
|
0xFFFFFFFF);
|
||||||
|
|
||||||
|
/* Check if this is the first bus */
|
||||||
|
if (i == 0)
|
||||||
|
{
|
||||||
|
/* Set 'Configuration Data' value */
|
||||||
|
Size = FIELD_OFFSET(CM_FULL_RESOURCE_DESCRIPTOR,
|
||||||
|
PartialResourceList.PartialDescriptors) +
|
||||||
|
sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR) +
|
||||||
|
sizeof(PCI_REGISTRY_INFO);
|
||||||
|
FullResourceDescriptor = MmAllocateMemory(Size);
|
||||||
|
if (!FullResourceDescriptor)
|
||||||
|
{
|
||||||
|
DbgPrint((DPRINT_HWDETECT,
|
||||||
|
"Failed to allocate resource descriptor\n"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Initialize resource descriptor */
|
||||||
|
memset(FullResourceDescriptor, 0, Size);
|
||||||
|
FullResourceDescriptor->InterfaceType = PCIBus;
|
||||||
|
FullResourceDescriptor->BusNumber = i;
|
||||||
|
FullResourceDescriptor->PartialResourceList.Version = 1;
|
||||||
|
FullResourceDescriptor->PartialResourceList.Revision = 1;
|
||||||
|
FullResourceDescriptor->PartialResourceList.Count = 1;
|
||||||
|
PartialDescriptor = &FullResourceDescriptor->PartialResourceList.PartialDescriptors[0];
|
||||||
|
PartialDescriptor->Type = CmResourceTypeDeviceSpecific;
|
||||||
|
PartialDescriptor->ShareDisposition = CmResourceShareUndetermined;
|
||||||
|
PartialDescriptor->u.DeviceSpecificData.DataSize = sizeof(PCI_REGISTRY_INFO);
|
||||||
|
memcpy(&FullResourceDescriptor->PartialResourceList.PartialDescriptors[1],
|
||||||
|
&BusData,
|
||||||
|
sizeof(PCI_REGISTRY_INFO));
|
||||||
|
|
||||||
|
/* Set 'Configuration Data' value */
|
||||||
|
FldrSetConfigurationData(BusKey, FullResourceDescriptor, Size);
|
||||||
|
MmFreeMemory(FullResourceDescriptor);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Set 'Configuration Data' value */
|
||||||
|
Size = FIELD_OFFSET(CM_FULL_RESOURCE_DESCRIPTOR,
|
||||||
|
PartialResourceList.PartialDescriptors);
|
||||||
|
FullResourceDescriptor = MmAllocateMemory(Size);
|
||||||
|
if (!FullResourceDescriptor)
|
||||||
|
{
|
||||||
|
DbgPrint((DPRINT_HWDETECT,
|
||||||
|
"Failed to allocate resource descriptor\n"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Initialize resource descriptor */
|
||||||
|
memset(FullResourceDescriptor, 0, Size);
|
||||||
|
FullResourceDescriptor->InterfaceType = PCIBus;
|
||||||
|
FullResourceDescriptor->BusNumber = i;
|
||||||
|
FullResourceDescriptor->PartialResourceList.Version = 0;
|
||||||
|
FullResourceDescriptor->PartialResourceList.Revision = 0;
|
||||||
|
FullResourceDescriptor->PartialResourceList.Count = 0;
|
||||||
|
|
||||||
|
/* Set 'Configuration Data' value */
|
||||||
|
FldrSetConfigurationData(BusKey, FullResourceDescriptor, Size);
|
||||||
|
MmFreeMemory(FullResourceDescriptor);
|
||||||
|
}
|
||||||
|
|
||||||
/* Increment bus number */
|
/* Increment bus number */
|
||||||
(*BusNumber)++;
|
(*BusNumber)++;
|
||||||
|
|
||||||
/* Set 'Identifier' value */
|
/* Set 'Identifier' value */
|
||||||
FldrSetIdentifier(BiosKey, szPci);
|
FldrSetIdentifier(BusKey, szPci);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,9 @@ FldrpHwHeapAlloc(IN ULONG Size)
|
||||||
/* Return a block of memory from the ARC Hardware Heap */
|
/* Return a block of memory from the ARC Hardware Heap */
|
||||||
Buffer = &reactos_arc_hardware_data[FldrpHwHeapLocation];
|
Buffer = &reactos_arc_hardware_data[FldrpHwHeapLocation];
|
||||||
|
|
||||||
|
/* Clear it */
|
||||||
|
RtlZeroMemory(Buffer, Size);
|
||||||
|
|
||||||
/* Increment the heap location */
|
/* Increment the heap location */
|
||||||
FldrpHwHeapLocation += Size;
|
FldrpHwHeapLocation += Size;
|
||||||
if (FldrpHwHeapLocation > HW_MAX_ARC_HEAP_SIZE) Buffer = NULL;
|
if (FldrpHwHeapLocation > HW_MAX_ARC_HEAP_SIZE) Buffer = NULL;
|
||||||
|
@ -118,9 +121,6 @@ FldrCreateSystemKey(OUT PCONFIGURATION_COMPONENT_DATA *SystemNode)
|
||||||
Component = &FldrArcHwTreeRoot->ComponentEntry;
|
Component = &FldrArcHwTreeRoot->ComponentEntry;
|
||||||
Component->Class = SystemClass;
|
Component->Class = SystemClass;
|
||||||
Component->Type = MaximumType;
|
Component->Type = MaximumType;
|
||||||
Component->Version = 0;
|
|
||||||
Component->Key = 0;
|
|
||||||
Component->AffinityMask = 0;
|
|
||||||
Component->ConfigurationDataLength = 0;
|
Component->ConfigurationDataLength = 0;
|
||||||
Component->Identifier = 0;
|
Component->Identifier = 0;
|
||||||
Component->IdentifierLength = 0;
|
Component->IdentifierLength = 0;
|
||||||
|
@ -139,6 +139,36 @@ FldrCreateSystemKey(OUT PCONFIGURATION_COMPONENT_DATA *SystemNode)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
NTAPI
|
||||||
|
FldrLinkToParent(IN PCONFIGURATION_COMPONENT_DATA Parent,
|
||||||
|
IN PCONFIGURATION_COMPONENT_DATA Child)
|
||||||
|
{
|
||||||
|
PCONFIGURATION_COMPONENT_DATA Sibling;
|
||||||
|
|
||||||
|
/* Get the first sibling */
|
||||||
|
Sibling = Parent->Child;
|
||||||
|
|
||||||
|
/* If no sibling exists, then we are the first child */
|
||||||
|
if (!Sibling)
|
||||||
|
{
|
||||||
|
/* Link us in */
|
||||||
|
Parent->Child = Child;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Loop each sibling */
|
||||||
|
do
|
||||||
|
{
|
||||||
|
/* This is now the parent */
|
||||||
|
Parent = Sibling;
|
||||||
|
} while ((Sibling = Sibling->Sibling));
|
||||||
|
|
||||||
|
/* Found the lowest sibling; mark us as its sibling too */
|
||||||
|
Parent->Sibling = Child;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
FldrCreateComponentKey(IN PCONFIGURATION_COMPONENT_DATA SystemNode,
|
FldrCreateComponentKey(IN PCONFIGURATION_COMPONENT_DATA SystemNode,
|
||||||
|
@ -160,17 +190,8 @@ FldrCreateComponentKey(IN PCONFIGURATION_COMPONENT_DATA SystemNode,
|
||||||
/* Now save our parent */
|
/* Now save our parent */
|
||||||
ComponentData->Parent = SystemNode;
|
ComponentData->Parent = SystemNode;
|
||||||
|
|
||||||
/* Now we need to figure out if the parent already has a child entry */
|
/* Link us to the parent */
|
||||||
if (SystemNode->Child)
|
FldrLinkToParent(SystemNode, ComponentData);
|
||||||
{
|
|
||||||
/* It does, so we'll be a sibling of the child instead */
|
|
||||||
SystemNode->Child->Sibling = ComponentData;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* It doesn't, so we will be the first child */
|
|
||||||
SystemNode->Child = ComponentData;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set us up */
|
/* Set us up */
|
||||||
Component = &ComponentData->ComponentEntry;
|
Component = &ComponentData->ComponentEntry;
|
||||||
|
|
|
@ -30,6 +30,7 @@ char reactos_kernel_cmdline[255]; // Command line passed to kernel
|
||||||
LOADER_MODULE reactos_modules[64]; // Array to hold boot module info loaded for the kernel
|
LOADER_MODULE reactos_modules[64]; // Array to hold boot module info loaded for the kernel
|
||||||
char reactos_module_strings[64][256]; // Array to hold module names
|
char reactos_module_strings[64][256]; // Array to hold module names
|
||||||
reactos_mem_data_t reactos_mem_data;
|
reactos_mem_data_t reactos_mem_data;
|
||||||
|
extern char reactos_arc_hardware_data[HW_MAX_ARC_HEAP_SIZE];
|
||||||
char szBootPath[256];
|
char szBootPath[256];
|
||||||
char szHalName[256];
|
char szHalName[256];
|
||||||
CHAR SystemRoot[255];
|
CHAR SystemRoot[255];
|
||||||
|
@ -186,6 +187,7 @@ VOID RunLoader(VOID)
|
||||||
LoaderBlock.PageDirectoryEnd = (ULONG)&PageDirectoryEnd;
|
LoaderBlock.PageDirectoryEnd = (ULONG)&PageDirectoryEnd;
|
||||||
LoaderBlock.ModsCount = 0;
|
LoaderBlock.ModsCount = 0;
|
||||||
LoaderBlock.ModsAddr = reactos_modules;
|
LoaderBlock.ModsAddr = reactos_modules;
|
||||||
|
LoaderBlock.ArchExtra = (ULONG)reactos_arc_hardware_data;
|
||||||
LoaderBlock.MmapLength = (unsigned long)MachGetMemoryMap((PBIOS_MEMORY_MAP)reactos_memory_map, 32) * sizeof(memory_map_t);
|
LoaderBlock.MmapLength = (unsigned long)MachGetMemoryMap((PBIOS_MEMORY_MAP)reactos_memory_map, 32) * sizeof(memory_map_t);
|
||||||
if (LoaderBlock.MmapLength)
|
if (LoaderBlock.MmapLength)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue