From: Ian Campbell Subject: [PATCH] Correct fseg allocation for SMBIOS tables. Date: Tue, 14 Jun 2011 15:22:09 +0100 Message-ID: <1308061329-18930-1-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: seabios@seabios.org, xen-devel@lists.xensource.com Cc: Ian Campbell List-Id: xen-devel@lists.xenproject.org Anthony Perard noticed that grub was unhappy because it sees no low memory and that his e820 table was missing the first entry. He then pointed out this rather glaring error in the allocation of space for the SMBIOS tables. I've no idea why I didn't see this failure. Signed-off-by: Ian Campbell Tested-by: Anthony Perard --- src/biostables.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/biostables.c b/src/biostables.c index 761b260..d8b5067 100644 --- a/src/biostables.c +++ b/src/biostables.c @@ -95,7 +95,7 @@ copy_smbios(void *pos) return; if (checksum(pos+0x10, p->length-0x10) != 0) return; - struct smbios_entry_point *newpos = malloc_fseg(sizeof(p->length)); + struct smbios_entry_point *newpos = malloc_fseg(p->length); if (!newpos) { warn_noalloc(); return; -- 1.7.2.5