WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] hvmloader: Fix SMBIOS memory device lengt

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] hvmloader: Fix SMBIOS memory device length boundary condition.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 16 Jan 2009 02:50:44 -0800
Delivery-date: Fri, 16 Jan 2009 02:52:43 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1231755835 0
# Node ID 95d8788bf4be2e8b8d2b984e290f5e19eef1a16c
# Parent  59d511c4a8d8ba451afc6ebd88e049fa2addf9f5
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@xxxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/firmware/hvmloader/smbios.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff -r 59d511c4a8d8 -r 95d8788bf4be tools/firmware/hvmloader/smbios.c
--- a/tools/firmware/hvmloader/smbios.c Mon Jan 12 10:17:12 2009 +0000
+++ b/tools/firmware/hvmloader/smbios.c Mon Jan 12 10:23:55 2009 +0000
@@ -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));

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] hvmloader: Fix SMBIOS memory device length boundary condition., Xen patchbot-unstable <=