Author: fireball Date: Fri Jan 25 15:22:51 2008 New Revision: 31987
URL: http://svn.reactos.org/svn/reactos?rev=31987&view=rev Log: - Make HwDetect routine return a pointer to the root of a configuration tree (instead of directly referencing a global variable).
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c trunk/reactos/boot/freeldr/freeldr/arch/powerpc/prep.c trunk/reactos/boot/freeldr/freeldr/include/arch/i386/machpc.h trunk/reactos/boot/freeldr/freeldr/include/arch/i386/machxbox.h trunk/reactos/boot/freeldr/freeldr/include/machine.h trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c trunk/reactos/boot/freeldr/freeldr/reactos/setupldr.c
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/i... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c Fri Jan 25 15:22:51 2008 @@ -1861,7 +1861,7 @@ }
-VOID +PCONFIGURATION_COMPONENT_DATA PcHwDetect(VOID) { PCONFIGURATION_COMPONENT_DATA SystemKey; @@ -1886,6 +1886,8 @@ DetectAcpiBios(SystemKey, &BusNumber);
DbgPrint((DPRINT_HWDETECT, "DetectHardware() Done\n")); + + return SystemKey; }
/* EOF */
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/i... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c Fri Jan 25 15:22:51 2008 @@ -349,7 +349,7 @@ /* FIXME: Detect more ISA devices */ }
-VOID +PCONFIGURATION_COMPONENT_DATA XboxHwDetect(VOID) { PCONFIGURATION_COMPONENT_DATA SystemKey; @@ -370,6 +370,7 @@ DetectIsaBios(SystemKey, &BusNumber);
DbgPrint((DPRINT_HWDETECT, "DetectHardware() Done\n")); + return SystemKey; }
/* EOF */
Modified: trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/p... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c Fri Jan 25 15:22:51 2008 @@ -446,7 +446,7 @@ } }
-VOID PpcHwDetect() { +PCONFIGURATION_COMPONENT_DATA PpcHwDetect() { PCONFIGURATION_COMPONENT_DATA RootKey; ULONG BusNumber = 0, DiskController = 0, DiskNumber = 0; int node = ofw_finddevice("/"); @@ -456,6 +456,7 @@ FldrSetComponentInformation(RootKey, 0, 0, (ULONG)-1);
OfwCopyDeviceTree(RootKey,"/",node,&BusNumber,&DiskController,&DiskNumber); + return RootKey; }
BOOLEAN PpcDiskNormalizeSystemPath(char *SystemPath, unsigned Size) {
Modified: trunk/reactos/boot/freeldr/freeldr/arch/powerpc/prep.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/p... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/powerpc/prep.c (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/powerpc/prep.c Fri Jan 25 15:22:51 2008 @@ -108,7 +108,7 @@
/* Most PReP hardware is in standard locations, based on the corresponding * hardware on PCs. */ -VOID PpcPrepHwDetect() { +PCONFIGURATION_COMPONENT_DATA PpcPrepHwDetect() { PCONFIGURATION_COMPONENT_DATA SystemKey;
/* Create the 'System' key */ @@ -121,6 +121,7 @@ 0xFFFFFFFF);
printf("DetectHardware() Done\n"); + return SystemKey; }
void PpcPrepInit()
Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/i386/machpc.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/includ... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/arch/i386/machpc.h (original) +++ trunk/reactos/boot/freeldr/freeldr/include/arch/i386/machpc.h Fri Jan 25 15:22:51 2008 @@ -55,7 +55,7 @@
VOID PcRTCGetCurrentDateTime(PULONG Year, PULONG Month, PULONG Day, PULONG Hour, PULONG Minute, PULONG Second);
-VOID PcHwDetect(VOID); +PCONFIGURATION_COMPONENT_DATA PcHwDetect(VOID);
#endif /* __I386_MACHPC_H_ */
Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/i386/machxbox.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/includ... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/arch/i386/machxbox.h (original) +++ trunk/reactos/boot/freeldr/freeldr/include/arch/i386/machxbox.h Fri Jan 25 15:22:51 2008 @@ -58,7 +58,7 @@
VOID XboxRTCGetCurrentDateTime(PULONG Year, PULONG Month, PULONG Day, PULONG Hour, PULONG Minute, PULONG Second);
-VOID XboxHwDetect(VOID); +PCONFIGURATION_COMPONENT_DATA XboxHwDetect(VOID);
VOID XboxSetLED(PCSTR Pattern);
Modified: trunk/reactos/boot/freeldr/freeldr/include/machine.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/includ... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/machine.h (original) +++ trunk/reactos/boot/freeldr/freeldr/include/machine.h Fri Jan 25 15:22:51 2008 @@ -69,7 +69,7 @@
VOID (*RTCGetCurrentDateTime)(PULONG Year, PULONG Month, PULONG Day, PULONG Hour, PULONG Minute, PULONG Second);
- VOID (*HwDetect)(VOID); + PCONFIGURATION_COMPONENT_DATA (*HwDetect)(VOID); } MACHVTBL, *PMACHVTBL;
VOID MachInit(const char *CmdLine);
Modified: trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/reacto... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c (original) +++ trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c Fri Jan 25 15:22:51 2008 @@ -604,7 +604,6 @@ LoaderBlock.ModsCount = 0; LoaderBlock.ModsAddr = reactos_modules; LoaderBlock.DrivesAddr = reactos_arc_disk_info; - LoaderBlock.ArchExtra = (ULONG)reactos_arc_hardware_data; LoaderBlock.MmapLength = (unsigned long)MachGetMemoryMap((PBIOS_MEMORY_MAP)reactos_memory_map, 32) * sizeof(memory_map_t); if (LoaderBlock.MmapLength) { @@ -700,7 +699,7 @@ /* * Detect hardware */ - MachHwDetect(); + LoaderBlock.ArchExtra = (ULONG)MachHwDetect(); UiDrawProgressBarCenter(5, 100, szLoadingMsg);
if (AcpiPresent) LoaderBlock.Flags |= MB_FLAGS_ACPI_TABLE;
Modified: trunk/reactos/boot/freeldr/freeldr/reactos/setupldr.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/reacto... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/reactos/setupldr.c (original) +++ trunk/reactos/boot/freeldr/freeldr/reactos/setupldr.c Fri Jan 25 15:22:51 2008 @@ -187,7 +187,6 @@ LoaderBlock.PageDirectoryEnd = (ULONG)&PageDirectoryEnd; LoaderBlock.ModsCount = 0; 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); if (LoaderBlock.MmapLength) { @@ -232,7 +231,7 @@
/* Detect hardware */ UiDrawStatusText("Detecting hardware..."); - MachHwDetect(); + LoaderBlock.ArchExtra = (ULONG)MachHwDetect(); UiDrawStatusText("");
/* set boot device */