Module Name:    src
Committed By:   martin
Date:           Sat Dec 24 09:26:56 UTC 2022

Modified Files:
        src/sys/arch/x86/x86 [netbsd-10]: x86_machdep.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #21):

        sys/arch/x86/x86/x86_machdep.c: revision 1.153

x86_add_cluster() takes the end of the segment, not the size.

Should fix PR port-xen/57121


To generate a diff of this commit:
cvs rdiff -u -r1.152 -r1.152.4.1 src/sys/arch/x86/x86/x86_machdep.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/x86_machdep.c
diff -u src/sys/arch/x86/x86/x86_machdep.c:1.152 src/sys/arch/x86/x86/x86_machdep.c:1.152.4.1
--- src/sys/arch/x86/x86/x86_machdep.c:1.152	Sat Aug 20 23:48:51 2022
+++ src/sys/arch/x86/x86/x86_machdep.c	Sat Dec 24 09:26:56 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: x86_machdep.c,v 1.152 2022/08/20 23:48:51 riastradh Exp $	*/
+/*	$NetBSD: x86_machdep.c,v 1.152.4.1 2022/12/24 09:26:56 martin Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2006, 2007 YAMAMOTO Takashi,
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.152 2022/08/20 23:48:51 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.152.4.1 2022/12/24 09:26:56 martin Exp $");
 
 #include "opt_modular.h"
 #include "opt_physmem.h"
@@ -870,11 +870,13 @@ x86_add_xen_clusters(void)
 			switch (map_entry[i].type) {
 			case XEN_HVM_MEMMAP_TYPE_RAM:
 				x86_add_cluster(map_entry[i].addr,
-				    map_entry[i].size, BIM_Memory);
+				    map_entry[i].addr + map_entry[i].size,
+				    BIM_Memory);
 				break;
 			case XEN_HVM_MEMMAP_TYPE_ACPI:
 				x86_add_cluster(map_entry[i].addr,
-				    map_entry[i].size, BIM_ACPI);
+				    map_entry[i].addr + map_entry[i].size,
+				    BIM_ACPI);
 				break;
 			}
 		}

Reply via email to