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

[Xen-changelog] [xen-unstable] [HVM] Sync the base memory reported by ROMBIOS with the e820 map.



# HG changeset patch
# User Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
# Date 1168014522 0
# Node ID e4aef8507b132e8b70c64c146726c42f4acc4a6b
# Parent  e81c9fc5b431c3667ce87e245768032d59ffc28a
[HVM] Sync the base memory reported by ROMBIOS with the e820 map.
This stops Etherboot relocating itself onto the SMBIOS tables.
Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
---
 tools/firmware/rombios/rombios.c |    7 +++++++
 1 files changed, 7 insertions(+)

diff -r e81c9fc5b431 -r e4aef8507b13 tools/firmware/rombios/rombios.c
--- a/tools/firmware/rombios/rombios.c  Fri Jan 05 16:11:49 2007 +0000
+++ b/tools/firmware/rombios/rombios.c  Fri Jan 05 16:28:42 2007 +0000
@@ -1435,10 +1435,17 @@ copy_e820_table()
 copy_e820_table()
 {
   Bit8u nr_entries = read_byte(0x9000, 0x1e8);
+  Bit32u base_mem;
   if (nr_entries > 32)
        nr_entries = 32;
   write_word(0xe000, 0x8, nr_entries);
   memcpyb(0xe000, 0x10, 0x9000, 0x2d0, nr_entries * 0x14);
+  /* Report the proper base memory size at address 0x0413: otherwise
+   * non-e820 code will clobber things if BASE_MEM_IN_K is bigger than
+   * the first e820 entry.  Get the size by reading the second 64bit 
+   * field of the first e820 slot. */ 
+  base_mem = read_dword(0x9000, 0x2d0 + 8);
+  write_word(0x40, 0x13, base_mem >> 10);
 }
 #endif /* HVMASSIST */
 

_______________________________________________
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®.