From: Alex Williamson Subject: [PATCH 4/5] bios: fix SMBIOS end address range reporting Date: Tue, 23 Sep 2008 10:42:27 -0600 Message-ID: <1222188147.8138.105.camel@2710p.home> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: Avi Kivity To: kvm-devel Return-path: Received: from g5t0006.atlanta.hp.com ([15.192.0.43]:46130 "EHLO g5t0006.atlanta.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752177AbYIWQmc (ORCPT ); Tue, 23 Sep 2008 12:42:32 -0400 Sender: kvm-owner@vger.kernel.org List-ID: kvm: bios: fix SMBIOS end address range reporting The -1 seems to be in the wrong place here. Signed-off-by: Alex Williamson --- bios/rombios32.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bios/rombios32.c b/bios/rombios32.c index c515d4a..965ebb5 100755 --- a/bios/rombios32.c +++ b/bios/rombios32.c @@ -1951,7 +1951,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; @@ -1972,7 +1972,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;