[freeldr] When creating a component, provide at the same time its configuration data
[reactos.git] / reactos / boot / freeldr / freeldr / arch / i386 / hwacpi.c
index ddcca2d..a15e31a 100644 (file)
@@ -67,16 +67,6 @@ DetectAcpiBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber)
         AcpiPresent = TRUE;
         LoaderBlock.Flags |= MB_FLAGS_ACPI_TABLE;
 
-        /* Create new bus key */
-        FldrCreateComponentKey(SystemKey,
-                               AdapterClass,
-                               MultiFunctionAdapter,
-                               0x0,
-                               0x0,
-                               0xFFFFFFFF,
-                               "ACPI BIOS",
-                               &BiosKey);
-
         /* Get BIOS memory map */
         RtlZeroMemory(BiosMemoryMap, sizeof(BIOS_MEMORY_MAP) * 32);
         BiosMemoryMapEntryCount = PcMemGetMemoryMap(BiosMemoryMap,
@@ -109,10 +99,17 @@ DetectAcpiBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber)
         DPRINTM(DPRINT_HWDETECT, "RSDT %p, data size %x\n", Rsdp->rsdt_physical_address,
             TableSize);
 
-        FldrSetConfigurationData(BiosKey,
-                                 PartialResourceList,
-                                 sizeof(CM_PARTIAL_RESOURCE_LIST) + TableSize
-                                 );
+        /* Create new bus key */
+        FldrCreateComponentKey(SystemKey,
+                               AdapterClass,
+                               MultiFunctionAdapter,
+                               0x0,
+                               0x0,
+                               0xFFFFFFFF,
+                               "ACPI BIOS",
+                               PartialResourceList,
+                               sizeof(CM_PARTIAL_RESOURCE_LIST) + TableSize,
+                               &BiosKey);
 
         /* Increment bus number */
         (*BusNumber)++;