ia64/xen-unstable
changeset 13285:e4aef8507b13
[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@xensource.com>
This stops Etherboot relocating itself onto the SMBIOS tables.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
author | Tim Deegan <Tim.Deegan@xensource.com> |
---|---|
date | Fri Jan 05 16:28:42 2007 +0000 (2007-01-05) |
parents | e81c9fc5b431 |
children | c75883680f28 |
files | tools/firmware/rombios/rombios.c |
line diff
1.1 --- a/tools/firmware/rombios/rombios.c Fri Jan 05 16:11:49 2007 +0000 1.2 +++ b/tools/firmware/rombios/rombios.c Fri Jan 05 16:28:42 2007 +0000 1.3 @@ -1435,10 +1435,17 @@ void 1.4 copy_e820_table() 1.5 { 1.6 Bit8u nr_entries = read_byte(0x9000, 0x1e8); 1.7 + Bit32u base_mem; 1.8 if (nr_entries > 32) 1.9 nr_entries = 32; 1.10 write_word(0xe000, 0x8, nr_entries); 1.11 memcpyb(0xe000, 0x10, 0x9000, 0x2d0, nr_entries * 0x14); 1.12 + /* Report the proper base memory size at address 0x0413: otherwise 1.13 + * non-e820 code will clobber things if BASE_MEM_IN_K is bigger than 1.14 + * the first e820 entry. Get the size by reading the second 64bit 1.15 + * field of the first e820 slot. */ 1.16 + base_mem = read_dword(0x9000, 0x2d0 + 8); 1.17 + write_word(0x40, 0x13, base_mem >> 10); 1.18 } 1.19 #endif /* HVMASSIST */ 1.20