summaryrefslogtreecommitdiff
path: root/pc-bios
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2009-07-10 14:52:56 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2009-07-16 08:28:13 -0500
commite1e8f35a4f59d82ab9a5361c3990c8dadd2e7678 (patch)
treeb6fe3d766a138a1a18067f747b437dbe1d30b014 /pc-bios
parent84273177f25886b3476138470280890001debcbc (diff)
bios: Fix multiple calls into smbios_load_ex
We're marking the used entry bitmap in smbios_load_external() for each type we check, regardless of whether we loaded anything. This makes subsequent calls behave as if we've already loaded the tables from qemu and can result in missing tables (ex. multiple type4 entries on an SMP guest). Only mark the bitmap if we actually load something. Signed-off-by: Alex Williamson <alex.williamson@hp.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'pc-bios')
-rw-r--r--pc-bios/bios-pq/0019-bios-fix-multiple-calls.patch35
-rw-r--r--pc-bios/bios-pq/series1
-rw-r--r--pc-bios/bios.binbin131072 -> 131072 bytes
3 files changed, 36 insertions, 0 deletions
diff --git a/pc-bios/bios-pq/0019-bios-fix-multiple-calls.patch b/pc-bios/bios-pq/0019-bios-fix-multiple-calls.patch
new file mode 100644
index 0000000000..cfa4c13093
--- /dev/null
+++ b/pc-bios/bios-pq/0019-bios-fix-multiple-calls.patch
@@ -0,0 +1,35 @@
+bios: Fix multiple calls into smbios_load_ex
+
+We're marking the used entry bitmap in smbios_load_external() for each
+type we check, regardless of whether we loaded anything. This makes
+subsequent calls behave as if we've already loaded the tables from qemu
+and can result in missing tables (ex. multiple type4 entries on an SMP
+guest). Only mark the bitmap if we actually load something.
+
+Signed-off-by: Alex Williamson <alex.williamson@hp.com>
+Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
+
+diff --git a/bios/rombios32.c b/bios/rombios32.c
+index f861f81..c869798 100644
+--- a/bios/rombios32.c
++++ b/bios/rombios32.c
+@@ -2554,13 +2554,14 @@ smbios_load_external(int type, char **p, unsigned *nr_structs,
+ *max_struct_size = *p - (char *)header;
+ }
+
+- /* Mark that we've reported on this type */
+- used_bitmap[(type >> 6) & 0x3] |= (1ULL << (type & 0x3f));
++ if (start != *p) {
++ /* Mark that we've reported on this type */
++ used_bitmap[(type >> 6) & 0x3] |= (1ULL << (type & 0x3f));
++ return 1;
++ }
+
+- return (start != *p);
+-#else /* !BX_QEMU */
++#endif /* !BX_QEMU */
+ return 0;
+-#endif
+ }
+
+ void smbios_init(void)
diff --git a/pc-bios/bios-pq/series b/pc-bios/bios-pq/series
index 9e909de1dc..695b148ad6 100644
--- a/pc-bios/bios-pq/series
+++ b/pc-bios/bios-pq/series
@@ -16,3 +16,4 @@
0016-use-correct-mask-to-size-pci-option-rom-bar.patch
0017-bochs-bios-Move-QEMU_CFG-constants-to-rombios.h.patch
0018-bochs-bios-Make-boot-prompt-optional.patch
+0019-bios-fix-multiple-calls.patch
diff --git a/pc-bios/bios.bin b/pc-bios/bios.bin
index 8c016aa56a..1c4dca8b87 100644
--- a/pc-bios/bios.bin
+++ b/pc-bios/bios.bin
Binary files differ