Skip to contentSkip to conversation

kvm: bios: fix SMBIOS end address range reporting

PATCH In review Alex Williamson 1 participant 1 message Sep 25, 2008 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 3/4 kvm: bios: fix SMBIOS end address range reporting

kvm: bios: fix SMBIOS end address range reporting

The -1 seems to be in the wrong place here.

---

 bios/rombios32.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
bios/rombios32.c +2 -2
index be4c25f..f8edf18 100755
@@ -1950,7 +1950,7 @@ smbios_type_19_init(void *start, uint32_t memory_size_mb)
     p->header.handle = 0x1300;
 
     p->starting_address = 0;
-    p->ending_address = (memory_size_mb-1) * 1024;
+    p->ending_address = (memory_size_mb * 1024) - 1;
     p->memory_array_handle = 0x1000;
     p->partition_width = 1;
 
@@ -1971,7 +1971,7 @@ smbios_type_20_init(void *start, uint32_t memory_size_mb)
     p->header.handle = 0x1400;
 
     p->starting_address = 0;
-    p->ending_address = (memory_size_mb-1)*1024;
+    p->ending_address = (memory_size_mb * 1024) - 1;
     p->memory_device_handle = 0x1100;
     p->memory_array_mapped_address_handle = 0x1300;
     p->partition_row_position = 1;