Minor - move ACPI_HPET_ADDRESS definition to config.h.
authorKevin O'Connor <kevin@koconnor.net>
Tue, 20 Sep 2011 23:40:28 +0000 (19:40 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Tue, 20 Sep 2011 23:40:28 +0000 (19:40 -0400)
Move ACPI_HPET_ADDRESS to BUILD_HPET_ADDRESS in config.h so that it
is listed with similar hardcoded addresses.

Also, organize the BUILD_*_ADDRESS definitions in config.h.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
src/acpi.c
src/config.h

index 6bb6ff632e819daafaab0ede748bb6550b119835..3d8b7c8f2ea2825f27ad465bcca2a937a9929f89 100644 (file)
@@ -156,7 +156,6 @@ struct acpi_20_hpet {
     u16           min_tick;
     u8            page_protect;
 } PACKED;
-#define ACPI_HPET_ADDRESS 0xFED00000UL
 
 #define HPET_ID         0x000
 #define HPET_PERIOD     0x004
@@ -468,7 +467,7 @@ static void*
 build_hpet(void)
 {
     struct acpi_20_hpet *hpet;
-    const void *hpet_base = (void *)ACPI_HPET_ADDRESS;
+    const void *hpet_base = (void *)BUILD_HPET_ADDRESS;
     u32 hpet_vendor = readl(hpet_base + HPET_ID) >> 16;
     u32 hpet_period = readl(hpet_base + HPET_PERIOD);
 
@@ -487,7 +486,7 @@ build_hpet(void)
      * emulated hpet
      */
     hpet->timer_block_id = cpu_to_le32(0x8086a201);
-    hpet->addr.address = cpu_to_le32(ACPI_HPET_ADDRESS);
+    hpet->addr.address = cpu_to_le32(BUILD_HPET_ADDRESS);
     build_header((void*)hpet, HPET_SIGNATURE, sizeof(*hpet), 1);
 
     return hpet;
index d182b13884d3f15081c2de215d1b3f091fa1f4b3..b0187a4fc96375eaa8f45955500df5e65f1da570 100644 (file)
@@ -22,6 +22,8 @@
 #define CONFIG_MAX_HIGHTABLE (64*1024)
 // Largest supported externaly facing drive id
 #define CONFIG_MAX_EXTDRIVE 16
+// Number of bytes the smbios may be and still live in the f-segment
+#define BUILD_MAX_SMBIOS_FSEG     600
 
 #define CONFIG_MODEL_ID      0xFC
 #define CONFIG_SUBMODEL_ID   0x00
 #define BUILD_BIOS_SIZE           0x10000
 // 32KB for shadow ram copying (works around emulator deficiencies)
 #define BUILD_BIOS_TMP_ADDR       0x30000
+#define BUILD_SMM_INIT_ADDR       0x38000
+#define BUILD_SMM_ADDR            0xa8000
+#define BUILD_SMM_SIZE            0x8000
 #define BUILD_MAX_HIGHMEM         0xe0000000
 
 #define BUILD_PCIMEM_START        0xe0000000
-#define BUILD_PCIMEM_SIZE         (BUILD_PCIMEM_END - BUILD_PCIMEM_START)
 #define BUILD_PCIMEM_END          0xfec00000    /* IOAPIC is mapped at */
 
-#define BUILD_APIC_ADDR           0xfee00000
 #define BUILD_IOAPIC_ADDR         0xfec00000
-
-#define BUILD_SMM_INIT_ADDR       0x38000
-#define BUILD_SMM_ADDR            0xa8000
-#define BUILD_SMM_SIZE            0x8000
-
-#define BUILD_MAX_SMBIOS_FSEG     600
+#define BUILD_HPET_ADDRESS        0xfed00000
+#define BUILD_APIC_ADDR           0xfee00000
 
 // Important real-mode segments
 #define SEG_IVT      0x0000