Source-Changes-HG archive

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

[src/netbsd-8]: src/sys/arch/x68k/x68k Pull up following revision(s) (request...



details:   https://anonhg.NetBSD.org/src/rev/4e76a2213a9f
branches:  netbsd-8
changeset: 952000:4e76a2213a9f
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Feb 11 13:04:01 2021 +0000

description:
Pull up following revision(s) (requested by tsutsui in ticket #1654):

        sys/arch/x68k/x68k/machdep.c: revision 1.204

Restore fixes for PR/51663 lost in r1.195 (uvm_hotplug(9) merge).

The kernel crashdump and savecore(8) on NetBSD/x68k have been broken
(even without EXTNEDED_MEMORY) since NetBSD 8.0. Oops.

Should be pulled up to netbsd-9 and netbsd-8.

diffstat:

 sys/arch/x68k/x68k/machdep.c |  40 +++++++++++++++++++---------------------
 1 files changed, 19 insertions(+), 21 deletions(-)

diffs (69 lines):

diff -r ea117433c8f5 -r 4e76a2213a9f sys/arch/x68k/x68k/machdep.c
--- a/sys/arch/x68k/x68k/machdep.c      Thu Feb 11 12:59:38 2021 +0000
+++ b/sys/arch/x68k/x68k/machdep.c      Thu Feb 11 13:04:01 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.196 2017/04/03 17:37:29 christos Exp $   */
+/*     $NetBSD: machdep.c,v 1.196.6.1 2021/02/11 13:04:01 martin Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.196 2017/04/03 17:37:29 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.196.6.1 2021/02/11 13:04:01 martin Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -554,7 +554,10 @@
 {
        cpu_kcore_hdr_t *h = &cpu_kcore_hdr;
        struct m68k_kcore_hdr *m = &h->un._m68k;
-       uvm_physseg_t i;
+       psize_t size;
+#ifdef EXTENDED_MEMORY
+       int i, seg;
+#endif
 
        memset(&cpu_kcore_hdr, 0, sizeof(cpu_kcore_hdr));
 
@@ -603,25 +606,20 @@
        /*
         * X68k has multiple RAM segments on some models.
         */
-       m->ram_segs[0].start = lowram;
-       m->ram_segs[0].size = mem_size - lowram;
-
-       i = uvm_physseg_get_first();
-       
-        for (uvm_physseg_get_next(i); uvm_physseg_valid_p(i); i = uvm_physseg_get_next(i)) {
-               if (uvm_physseg_valid_p(i) == false)
-                       break;
-
-               const paddr_t startpfn = uvm_physseg_get_start(i);
-               const paddr_t endpfn = uvm_physseg_get_end(i);
-
-               KASSERT(startpfn != -1 && endpfn != -1);
-
-               m->ram_segs[i].start = 
-                   ctob(startpfn);
-               m->ram_segs[i].size  =                  
-                   ctob(endpfn - startpfn);
+       size = phys_basemem_seg.end - phys_basemem_seg.start;
+       m->ram_segs[0].start = phys_basemem_seg.start;
+       m->ram_segs[0].size  = size;
+#ifdef EXTENDED_MEMORY
+       seg = 1;
+       for (i = 0; i < EXTMEM_SEGS; i++) {
+               size = phys_extmem_seg[i].end - phys_extmem_seg[i].start;
+               if (size == 0)
+                       continue;
+               m->ram_segs[seg].start = phys_extmem_seg[i].start;
+               m->ram_segs[seg].size  = size;
+               seg++;
        }
+#endif
 }
 
 /*



Home | Main Index | Thread Index | Old Index