[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] hvmloader: Relocate the etherboot ROM to be near the end of VGA



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1227525464 0
# Node ID 612218519cb5f27d6bcd967ddbe0c93236de5c05
# Parent  285f8635f5738260e85d780f9171a7af8a88fa79
hvmloader: Relocate the etherboot ROM to be near the end of VGA
BIOS. Current Xen hard coded VGA ROM at 0xC0000 and etherboot ROM
at 0xD0000. This makes the space in [0xC0000 - 0xDFFFF] to be
fragments, which makes it hard to find enough space to hold another
Option ROM.

Signed-off-by: Shan Haitao <haitao.shan@xxxxxxxxx>
---
 tools/firmware/hvmloader/config.h    |    1 -
 tools/firmware/hvmloader/hvmloader.c |   11 +++++++----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff -r 285f8635f573 -r 612218519cb5 tools/firmware/hvmloader/config.h
--- a/tools/firmware/hvmloader/config.h Mon Nov 24 11:12:20 2008 +0000
+++ b/tools/firmware/hvmloader/config.h Mon Nov 24 11:17:44 2008 +0000
@@ -23,7 +23,6 @@
 /* Memory map. */
 #define HYPERCALL_PHYSICAL_ADDRESS    0x00080000
 #define VGABIOS_PHYSICAL_ADDRESS      0x000C0000
-#define ETHERBOOT_PHYSICAL_ADDRESS    0x000D0000
 #define SMBIOS_PHYSICAL_ADDRESS       0x000E9000
 #define SMBIOS_MAXIMUM_SIZE           0x00001000
 #define ACPI_PHYSICAL_ADDRESS         0x000EA000
diff -r 285f8635f573 -r 612218519cb5 tools/firmware/hvmloader/hvmloader.c
--- a/tools/firmware/hvmloader/hvmloader.c      Mon Nov 24 11:12:20 2008 +0000
+++ b/tools/firmware/hvmloader/hvmloader.c      Mon Nov 24 11:17:44 2008 +0000
@@ -462,7 +462,7 @@ int main(void)
 int main(void)
 {
     int vgabios_sz = 0, etherboot_sz = 0, rombios_sz, smbios_sz;
-    uint32_t vga_ram = 0;
+    uint32_t etherboot_phys_addr, vga_ram = 0;
     uint16_t xen_pfiob;
 
     printf("HVM Loader\n");
@@ -516,7 +516,10 @@ int main(void)
         printf("VGA RAM at %08x\n", vga_ram);
     }
 
-    etherboot_sz = scan_etherboot_nic((void*)ETHERBOOT_PHYSICAL_ADDRESS);
+    /* Ethernet ROM is placed after VGA ROM, on next 2kB boundary. */
+    etherboot_phys_addr =
+        (VGABIOS_PHYSICAL_ADDRESS + vgabios_sz + 2047) & ~2047;
+    etherboot_sz = scan_etherboot_nic((void *)etherboot_phys_addr);
 
     if ( get_acpi_enabled() )
     {
@@ -533,8 +536,8 @@ int main(void)
                VGABIOS_PHYSICAL_ADDRESS + vgabios_sz - 1);
     if ( etherboot_sz )
         printf(" %05x-%05x: Etherboot ROM\n",
-               ETHERBOOT_PHYSICAL_ADDRESS,
-               ETHERBOOT_PHYSICAL_ADDRESS + etherboot_sz - 1);
+               etherboot_phys_addr,
+               etherboot_phys_addr + etherboot_sz - 1);
     if ( smbios_sz )
         printf(" %05x-%05x: SMBIOS tables\n",
                SMBIOS_PHYSICAL_ADDRESS,

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.