NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: port-x68k/51663 (crash dump related bugs in x68k/machdep.c)
The following reply was made to PR port-x68k/51663; it has been noted by GNATS.
From: Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost>
To: rokuyama%rk.phys.keio.ac.jp@localhost
Cc: gnats-bugs%NetBSD.org@localhost, tsutsui%ceres.dti.ne.jp@localhost
Subject: Re: port-x68k/51663 (crash dump related bugs in x68k/machdep.c)
Date: Thu, 1 Dec 2016 06:49:02 +0900
I slightly modified your patch and have confirmed it on my X68030
(which has no highmem, so it just means "no bad side effect").
Changes are:
- use psize_t (instead of int) for "size" of memory regions
- explicitly calculate size of basemem_seg (for future readers)
even though phys_basemem_seg.start (== lowram) is zero on x68k
Could you also confirm? (sorry I'm so lazy not to setup XM6i)
---
Index: x68k/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/x68k/x68k/machdep.c,v
retrieving revision 1.193
diff -u -p -d -r1.193 machdep.c
--- x68k/machdep.c 14 Jun 2016 07:51:10 -0000 1.193
+++ x68k/machdep.c 30 Nov 2016 21:47:54 -0000
@@ -553,7 +553,10 @@ cpu_init_kcore_hdr(void)
{
cpu_kcore_hdr_t *h = &cpu_kcore_hdr;
struct m68k_kcore_hdr *m = &h->un._m68k;
- int i;
+ psize_t size;
+#ifdef EXTENDED_MEMORY
+ int i, seg;
+#endif
memset(&cpu_kcore_hdr, 0, sizeof(cpu_kcore_hdr));
@@ -602,14 +605,20 @@ cpu_init_kcore_hdr(void)
/*
* X68k has multiple RAM segments on some models.
*/
- m->ram_segs[0].start = lowram;
- m->ram_segs[0].size = mem_size - lowram;
- for (i = 1; i < vm_nphysseg; i++) {
- m->ram_segs[i].start =
- ctob(VM_PHYSMEM_PTR(i)->start);
- m->ram_segs[i].size =
- ctob(VM_PHYSMEM_PTR(i)->end - VM_PHYSMEM_PTR(i)->start);
+ 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
}
/*
---
Izumi Tsutsui
Home |
Main Index |
Thread Index |
Old Index