WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 01 of 11] tools: hvmloader: move ROMBIOS configuratio

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 01 of 11] tools: hvmloader: move ROMBIOS configuration into tools/firmware/rombios/
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Tue, 05 Apr 2011 16:46:26 +0100
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Tue, 05 Apr 2011 08:52:01 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1302018385@xxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1302018385@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.6.4
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1302013751 -3600
# Node ID fb358af97eebe1eb7536fc2812357c9d936eb792
# Parent  4d9049a0c347cb8ce4842de7b17a5fa41971fa58
tools: hvmloader: move ROMBIOS configuration into tools/firmware/rombios/

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@xxxxxxxxxx>

diff -r 4d9049a0c347 -r fb358af97eeb tools/firmware/hvmloader/config.h
--- a/tools/firmware/hvmloader/config.h Wed Mar 30 18:54:28 2011 +0100
+++ b/tools/firmware/hvmloader/config.h Tue Apr 05 15:29:11 2011 +0100
@@ -23,44 +23,11 @@ extern unsigned long pci_mem_start, pci_
 #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
-
-/* 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
+#include "../rombios/config.h"
 
 #endif /* __HVMLOADER_CONFIG_H__ */
diff -r 4d9049a0c347 -r fb358af97eeb tools/firmware/rombios/32bit/pmm.c
--- a/tools/firmware/rombios/32bit/pmm.c        Wed Mar 30 18:54:28 2011 +0100
+++ b/tools/firmware/rombios/32bit/pmm.c        Tue Apr 05 15:29:11 2011 +0100
@@ -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 -r 4d9049a0c347 -r fb358af97eeb tools/firmware/rombios/config.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/firmware/rombios/config.h   Tue Apr 05 15:29:11 2011 +0100
@@ -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 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
+
+/* 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
+
diff -r 4d9049a0c347 -r fb358af97eeb tools/firmware/rombios/rombios.c
--- a/tools/firmware/rombios/rombios.c  Wed Mar 30 18:54:28 2011 +0100
+++ b/tools/firmware/rombios/rombios.c  Tue Apr 05 15:29:11 2011 +0100
@@ -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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>