fix smbios memory device length boundary condition
PATCH 1/1 fix smbios memory device length boundary condition
dev_memsize ends up 0 when it shouldn't be on 16G boundary conditions.
Signed-off-by Bill Rieske <[email protected]
tools/firmware/hvmloader/smbios.c Fri Jan 09 16:40:58 2009 -0700 renamed from tools/firmware/hvmloader/smbios.c Thu Jan 08 11:19:38 2009 +0000 +1 -1
@@ -119,7 +119,7 @@ write_smbios_tables(void *start, for ( i = 0; i < nr_mem_devs; i++ ) { uint32_t dev_memsize = ((i == (nr_mem_devs - 1)) - ? (memsize & 0x3fff) : 0x4000); + ? (((memsize-1) & 0x3fff)+1) : 0x4000); do_struct(smbios_type_17_init(p, dev_memsize, i)); do_struct(smbios_type_19_init(p, dev_memsize, i)); do_struct(smbios_type_20_init(p, dev_memsize, i));