Module Name:    src
Committed By:   manu
Date:           Thu Jan 30 01:49:44 UTC 2020

Modified Files:
        src/sys/arch/x86/x86: multiboot2.c

Log Message:
Insert memory map with its real size, not the maximum possible.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/x86/x86/multiboot2.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/x86/multiboot2.c
diff -u src/sys/arch/x86/x86/multiboot2.c:1.3 src/sys/arch/x86/x86/multiboot2.c:1.4
--- src/sys/arch/x86/x86/multiboot2.c:1.3	Tue Dec 10 02:06:07 2019
+++ src/sys/arch/x86/x86/multiboot2.c	Thu Jan 30 01:49:44 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: multiboot2.c,v 1.3 2019/12/10 02:06:07 manu Exp $	*/
+/*	$NetBSD: multiboot2.c,v 1.4 2020/01/30 01:49:44 manu Exp $	*/
 
 /*-
  * Copyright (c) 2005, 2006 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: multiboot2.c,v 1.3 2019/12/10 02:06:07 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: multiboot2.c,v 1.4 2020/01/30 01:49:44 manu Exp $");
 
 #include "opt_multiboot.h"
 
@@ -565,7 +565,7 @@ mbi_mmap(struct multiboot_tag_mmap *mbt)
 	}
 
 	bootinfo_add((struct btinfo_common *)bim, BTINFO_MEMMAP,
-	    sizeof(bimbuf));
+	    (char*)&bim->entry[bim->num] - (char *)bim);
 
 	return;
 }

Reply via email to