]> xenbits.xensource.com Git - xen.git/commitdiff
tools: hvmloader: move ROMBIOS configuration into tools/firmware/rombios/
authorIan Campbell <ian.campbell@citrix.com>
Tue, 12 Apr 2011 12:34:30 +0000 (13:34 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 12 Apr 2011 12:34:30 +0000 (13:34 +0100)
Currently rombios and hvmloader are rather intertwined. Separate the
ROMBIOS configuration options out into a ROMBIOS provided file so that
the dependency can become strictly from hvmloader to rombios.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
tools/firmware/hvmloader/config.h
tools/firmware/rombios/32bit/pmm.c
tools/firmware/rombios/config.h [new file with mode: 0644]
tools/firmware/rombios/rombios.c

index 57e6117b01206e84ba38a51926a22a5c7009d45c..1f8124e0c6823d60afa59f3092170e77a4e1d3e3 100644 (file)
@@ -23,44 +23,13 @@ extern unsigned long pci_mem_start, pci_mem_end;
 #define RESERVED_MEMBASE    0xfc000000
 #define RESERVED_MEMSIZE    0x01000000
 
-#define ROMBIOS_SEG            0xF000
 #define ROMBIOS_BEGIN          0x000F0000
 #define ROMBIOS_SIZE           0x00010000
 #define ROMBIOS_MAXOFFSET      0x0000FFFF
 #define ROMBIOS_END            (ROMBIOS_BEGIN + ROMBIOS_SIZE)
 
-/* Memory map. */
-#define SCRATCH_PHYSICAL_ADDRESS      0x00010000
-#define HYPERCALL_PHYSICAL_ADDRESS    0x00080000
-#define VGABIOS_PHYSICAL_ADDRESS      0x000C0000
-#define OPTIONROM_PHYSICAL_ADDRESS    0x000C8000
-#define OPTIONROM_PHYSICAL_END        0x000EA000
-#define BIOS_INFO_PHYSICAL_ADDRESS    0x000EA000
-#define ACPI_PHYSICAL_ADDRESS         0x000EA020
-#define E820_PHYSICAL_ADDRESS         0x000EA100
-#define SMBIOS_PHYSICAL_ADDRESS       0x000EB000
-#define SMBIOS_MAXIMUM_SIZE           0x00005000
-#define ROMBIOS_PHYSICAL_ADDRESS      0x000F0000
-
-/* Offsets from E820_PHYSICAL_ADDRESS. */
-#define E820_NR_OFFSET                0x0
-#define E820_OFFSET                   0x8
+#include "../rombios/config.h"
 
-/* Xen Platform Device */
-#define XEN_PF_IOBASE   0x10
-#define PFFLAG_ROM_LOCK 1 /* Sets whether ROM memory area is RW or RO */
-
-/* Located at BIOS_INFO_PHYSICAL_ADDRESS. */
-struct bios_info {
-    uint8_t  com1_present:1;    /* 0[0] - System has COM1? */
-    uint8_t  com2_present:1;    /* 0[1] - System has COM2? */
-    uint8_t  lpt1_present:1;    /* 0[2] - System has LPT1? */
-    uint8_t  hpet_present:1;    /* 0[3] - System has HPET? */
-    uint32_t pci_min, pci_len;  /* 4, 8 - PCI I/O hole boundaries */
-    uint32_t madt_csum_addr;    /* 12   - Address of MADT checksum */
-    uint32_t madt_lapic0_addr;  /* 16   - Address of first MADT LAPIC struct */
-    uint32_t bios32_entry;      /* 20   - Entry point for 32-bit BIOS */
-};
-#define BIOSINFO_OFF_bios32_entry 20
+#define VGABIOS_PHYSICAL_ADDRESS      0x000C0000
 
 #endif /* __HVMLOADER_CONFIG_H__ */
index 0e5c5b8799234594b19a4db2fc362146825281ef..3b2c5350bef18aa85eace7d1a45c7e2f7d8e616f 100644 (file)
@@ -65,7 +65,7 @@
 
 #include <stdint.h>
 #include <stddef.h>
-#include <../hvmloader/config.h>
+#include "config.h"
 #include <../hvmloader/e820.h>
 #include "util.h"
 
diff --git a/tools/firmware/rombios/config.h b/tools/firmware/rombios/config.h
new file mode 100644 (file)
index 0000000..4b50179
--- /dev/null
@@ -0,0 +1,39 @@
+#ifndef _ROMBIOS_CONFIG_H
+#define _ROMBIOS_CONFIG_H
+
+/* Memory map. */
+#define SCRATCH_PHYSICAL_ADDRESS      0x00010000
+#define HYPERCALL_PHYSICAL_ADDRESS    0x00080000
+
+#define OPTIONROM_PHYSICAL_ADDRESS    0x000C8000
+#define OPTIONROM_PHYSICAL_END        0x000EA000
+#define BIOS_INFO_PHYSICAL_ADDRESS    0x000EA000
+#define ACPI_PHYSICAL_ADDRESS         0x000EA020
+#define E820_PHYSICAL_ADDRESS         0x000EA100
+#define SMBIOS_PHYSICAL_ADDRESS       0x000EB000
+#define SMBIOS_MAXIMUM_SIZE           0x00005000
+#define ROMBIOS_PHYSICAL_ADDRESS      0x000F0000
+
+/* Offsets from E820_PHYSICAL_ADDRESS. */
+#define E820_NR_OFFSET                0x0
+#define E820_OFFSET                   0x8
+
+/* Xen Platform Device */
+#define XEN_PF_IOBASE   0x10
+#define PFFLAG_ROM_LOCK 1 /* Sets whether ROM memory area is RW or RO */
+
+/* Located at BIOS_INFO_PHYSICAL_ADDRESS. */
+struct bios_info {
+    uint8_t  com1_present:1;    /* 0[0] - System has COM1? */
+    uint8_t  com2_present:1;    /* 0[1] - System has COM2? */
+    uint8_t  lpt1_present:1;    /* 0[2] - System has LPT1? */
+    uint8_t  hpet_present:1;    /* 0[3] - System has HPET? */
+    uint32_t pci_min, pci_len;  /* 4, 8 - PCI I/O hole boundaries */
+    uint32_t madt_csum_addr;    /* 12   - Address of MADT checksum */
+    uint32_t madt_lapic0_addr;  /* 16   - Address of first MADT LAPIC struct */
+    uint32_t bios32_entry;      /* 20   - Entry point for 32-bit BIOS */
+};
+#define BIOSINFO_OFF_bios32_entry 20
+
+#endif
+
index f3363e9f948fec2f89f696dfc7c60513e46669d9..80980b67f8f38e9238cb88c04aad29a6b8c84798 100644 (file)
@@ -29,7 +29,7 @@
 #define uint8_t unsigned char
 #define uint16_t unsigned short
 #define uint32_t unsigned long
-#include "../hvmloader/config.h"
+#include "config.h"
 
 #define HVMASSIST
 #undef HVMTEST