Subject: Fixed SuperSPARC SS10/20 NetBSD-1.2 random core dumps
To: None <abrown@eecs.harvard.edu>
From: Rob Goode <goode@nc3a.nato.int>
List: port-sparc
Date: 02/21/1997 09:58:51
Dear Aaron,
I applied your pmap.c patch to the standard NetBSD-1.2
sparc code (pmap.c.1.60.xx.xx) and rebuilt my kernel
and rebooted. I was then able to compile the entire
NetBSD-1.2 distribution (about 7 hours compiling) without
a random core dump. Before this patch I had had random
core dumps about once an hour.
I think that your patch does indeed fix a problem for
SS10s and SS20s for NetBSD-1.2. Perhaps it should go
into a FAQ or a patch directory somewhere? As a patch
to the standard NetBSD-1.2 for those who don't want
to track current?
N.B. I still got a panic kernel dump shortly after
the system rebuild, so NetBSD-1.2 on a SS20 is not
completely solid yet, perhaps.
Cheers
Rob Goode
> Chris Torek wrote:
> >
> > [supersparc coherency problems]
>
> Very interesting. Good detective work! So, if I understand this correctly,
> then a stopgap measure to fix this problem is to just make sure that page-
> zero and page-copy are done with caching enabled. A diff to implement this
> on the supersparc is attached below; it applies to rev. 1.67 of pmap.c.
> Could someone who has this problem (I've never seen it myself) try this
> patch and let me know what happens?
> -Aaron
>
> Index: pmap.c
> ===================================================================
> RCS file: /cvsroot/src/sys/arch/sparc/sparc/pmap.c,v
> retrieving revision 1.67
> diff -c -r1.67 pmap.c
> *** pmap.c 1996/11/09 23:08:56 1.67
> --- pmap.c 1997/02/17 15:35:40
> ***************
> *** 6185,6192 ****
> if (vactype != VAC_NONE)
> pv_flushcache(pvhead(pa));
> }
> ! pte = ~SRMMU_PG_C & (SRMMU_TEPTE | PPROT_S | PPROT_WRITE |
> ! (atop(pa) << SRMMU_PPNSHIFT));
> va = vpage[0];
> setpte4m((vm_offset_t) va, pte);
> qzero(va, NBPG);
> --- 6185,6197 ----
> if (vactype != VAC_NONE)
> pv_flushcache(pvhead(pa));
> }
> ! pte = (SRMMU_TEPTE | PPROT_S | PPROT_WRITE |
> ! (atop(pa) << SRMMU_PPNSHIFT));
> ! if (mmumod == SUN4M_MMU_SS)
> ! pte |= SRMMU_PG_C;
> ! else
> ! pte &= ~SRMMU_PG_C;
> !
> va = vpage[0];
> setpte4m((vm_offset_t) va, pte);
> qzero(va, NBPG);
> ***************
> *** 6221,6228 ****
> if (vactype != VAC_NONE)
> pv_flushcache(pvhead(dst));
> }
> ! dpte = ~SRMMU_PG_C & (SRMMU_TEPTE | PPROT_S | PPROT_WRITE |
> ! (atop(dst) << SRMMU_PPNSHIFT));
>
> sva = vpage[0];
> dva = vpage[1];
> --- 6226,6237 ----
> if (vactype != VAC_NONE)
> pv_flushcache(pvhead(dst));
> }
> ! dpte = (SRMMU_TEPTE | PPROT_S | PPROT_WRITE |
> ! (atop(dst) << SRMMU_PPNSHIFT));
> ! if (mmumod == SUN4M_MMU_SS)
> ! dpte |= SRMMU_PG_C;
> ! else
> ! dpte &= ~SRMMU_PG_C;
>
> sva = vpage[0];
> dva = vpage[1];
>
>
>