aboutsummaryrefslogtreecommitdiff
path: root/pc-bios/bios-pq/0002_kvm-bios-update-smbios-table-to-report-memory-above-4g.patch
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-21 21:46:20 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-21 21:46:20 +0000
commit9a717b55df29b2b0dd0553ccfa656671bad043d1 (patch)
tree2539f6e29cd358372e0f5cd5729596fedbfc0fa4 /pc-bios/bios-pq/0002_kvm-bios-update-smbios-table-to-report-memory-above-4g.patch
parent9043b62d4c3a13e8a47ddfc027fa96c93e7176a5 (diff)
Add BIOS fixes from KVM tree
See each patch for individual Signed-off-by's/commit logs git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6392 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'pc-bios/bios-pq/0002_kvm-bios-update-smbios-table-to-report-memory-above-4g.patch')
-rw-r--r--pc-bios/bios-pq/0002_kvm-bios-update-smbios-table-to-report-memory-above-4g.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/pc-bios/bios-pq/0002_kvm-bios-update-smbios-table-to-report-memory-above-4g.patch b/pc-bios/bios-pq/0002_kvm-bios-update-smbios-table-to-report-memory-above-4g.patch
new file mode 100644
index 0000000000..d84c49f8ed
--- /dev/null
+++ b/pc-bios/bios-pq/0002_kvm-bios-update-smbios-table-to-report-memory-above-4g.patch
@@ -0,0 +1,33 @@
+update SMBIOS table to report memory above 4G (Alex Williamson)
+
+Signed-off-by: Alex Williamson <alex.williamson@hp.com>
+Signed-off-by: Avi Kivity <avi@redhat.com>
+Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
+
+Index: bochs/bios/rombios32.c
+===================================================================
+--- bochs.orig/bios/rombios32.c
++++ bochs/bios/rombios32.c
+@@ -2081,7 +2081,8 @@ void smbios_init(void)
+ {
+ unsigned cpu_num, nr_structs = 0, max_struct_size = 0;
+ char *start, *p, *q;
+- int memsize = ram_size / (1024 * 1024);
++ int memsize = (ram_end == ram_size) ? ram_size / (1024 * 1024) :
++ (ram_end - (1ull << 32) + ram_size) / (1024 * 1024);
+
+ #ifdef BX_USE_EBDA_TABLES
+ ebda_cur_addr = align(ebda_cur_addr, 16);
+@@ -2108,8 +2109,8 @@ void smbios_init(void)
+ add_struct(smbios_type_4_init(p, cpu_num));
+ add_struct(smbios_type_16_init(p, memsize));
+ add_struct(smbios_type_17_init(p, memsize));
+- add_struct(smbios_type_19_init(p, memsize));
+- add_struct(smbios_type_20_init(p, memsize));
++ add_struct(smbios_type_19_init(p, ram_end / (1024 * 1024)));
++ add_struct(smbios_type_20_init(p, ram_end / (1024 * 1024)));
+ add_struct(smbios_type_32_init(p));
+ add_struct(smbios_type_127_init(p));
+
+
+