Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86/x86 x86_add_cluster() takes the end of the segm...



details:   https://anonhg.NetBSD.org/src/rev/dd85f2102642
branches:  trunk
changeset: 372734:dd85f2102642
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Fri Dec 23 16:05:44 2022 +0000

description:
x86_add_cluster() takes the end of the segment, not the size.
Should fix PR port-xen/57121

diffstat:

 sys/arch/x86/x86/x86_machdep.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (34 lines):

diff -r 8499ec902ab4 -r dd85f2102642 sys/arch/x86/x86/x86_machdep.c
--- a/sys/arch/x86/x86/x86_machdep.c    Fri Dec 23 10:44:25 2022 +0000
+++ b/sys/arch/x86/x86/x86_machdep.c    Fri Dec 23 16:05:44 2022 +0000
@@ -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.153 2022/12/23 16:05:44 bouyer 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.153 2022/12/23 16:05:44 bouyer Exp $");
 
 #include "opt_modular.h"
 #include "opt_physmem.h"
@@ -870,11 +870,13 @@
                        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;
                        }
                }



Home | Main Index | Thread Index | Old Index