tcg-arm: fix qemu_ld64
[qemu/mini2440/sniper_sniper_test.git] / pc-bios / bios-pq / 0005_kvm-bios-fix-smbios-memory-device-length-boundary--condition.patch
blobe4ec229baecc497b691d08254f531878e3147e9a
1 fix smbios memory device length boundary condition (Bill Rieske)
3 dev_memsize ends up 0 when it shouldn't be on 16G boundary conditions.
5 Signed-off-by: Bill Rieske <brieske@novell.com>
6 Signed-off-by: Avi Kivity <avi@redhat.com>
7 Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
9 Index: bochs/bios/rombios32.c
10 ===================================================================
11 --- bochs.orig/bios/rombios32.c
12 +++ bochs/bios/rombios32.c
13 @@ -2218,7 +2218,7 @@ void smbios_init(void)
14 for ( i = 0; i < nr_mem_devs; i++ )
16 uint32_t dev_memsize = ((i == (nr_mem_devs - 1))
17 - ? (memsize & 0x3fff) : 0x4000);
18 + ? (((memsize-1) & 0x3fff)+1) : 0x4000);
19 add_struct(smbios_type_17_init(p, dev_memsize, i));
20 add_struct(smbios_type_19_init(p, dev_memsize, i));
21 add_struct(smbios_type_20_init(p, dev_memsize, i));