hvmloader: 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 <brieske@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
This commit is contained in:
Keir Fraser committed 2009-01-12 10:23:55 +00:00
1 parent bef2c17dbc
commit 4ef2a41a2d
1 file changed
+3 -2
+3 -2
View File
@@ -118,8 +118,9 @@ write_smbios_tables(void *start,
do_struct(smbios_type_16_init(p, memsize, nr_mem_devs));
for ( i = 0; i < nr_mem_devs; i++ )
{
uint32_t dev_memsize = ((i == (nr_mem_devs - 1))
? (memsize & 0x3fff) : 0x4000);
uint32_t dev_memsize = 0x4000; /* all but last covers 16GB */
if ( (i == (nr_mem_devs - 1)) && ((memsize & 0x3fff) != 0) )
dev_memsize = memsize & 0x3fff; /* last dev is <16GB */
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));
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.