NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: port-pmax/55715: pmax testbed panics with "assertion "asid == curcpu()->ci_pmap_asid_cur" failed"
The following reply was made to PR port-pmax/55715; it has been noted by GNATS.
From: Nick Hudson <nick.hudson%gmx.co.uk@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: port-pmax/55715: pmax testbed panics with "assertion "asid ==
curcpu()->ci_pmap_asid_cur" failed"
Date: Mon, 11 Jan 2021 10:12:45 +0000
This is a multi-part message in MIME format.
--------------AD1B6B882B3079477D4474C8
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
This seems to work for pmax (untested on MMU{4,10)K
Nick
--------------AD1B6B882B3079477D4474C8
Content-Type: text/x-patch; charset=UTF-8;
name="cpu_mips_instr_loadstore.cc.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="cpu_mips_instr_loadstore.cc.diff"
--- src/cpus/cpu_mips_instr_loadstore.cc.orig 2021-01-10 19:36:56.594877971 +0000
+++ src/cpus/cpu_mips_instr_loadstore.cc 2021-01-11 10:08:47.671788344 +0000
@@ -58,6 +58,31 @@
/* Check alignment: */
if (addr & (LS_SIZE - 1)) {
#if 1
+ uint64_t vaddr_vpn2=0, vaddr_asid=0;
+
+ int exc_model = cpu->cd.mips.cpu_type.exc_model;
+ struct mips_coproc *cp0 = cpu->cd.mips.coproc[0];
+
+ if (exc_model == EXC3K) {
+ vaddr_asid = (cp0->reg[COP0_ENTRYHI] &
+ R2K3K_ENTRYHI_ASID_MASK) >>
+ R2K3K_ENTRYHI_ASID_SHIFT;
+ vaddr_vpn2 = (addr & R2K3K_ENTRYHI_VPN_MASK) >>
+ R2K3K_ENTRYHI_VPN_SHIFT;
+ } else {
+ vaddr_asid = cp0->reg[COP0_ENTRYHI] & ENTRYHI_ASID;
+
+ if (cpu->cd.mips.cpu_type.mmu_model == MMU10K) {
+ vaddr_vpn2 = (addr &
+ ENTRYHI_VPN2_MASK_R10K) >>
+ ENTRYHI_VPN2_SHIFT;
+ } else {
+ vaddr_vpn2 = (addr &
+ ENTRYHI_VPN2_MASK) >>
+ ENTRYHI_VPN2_SHIFT;
+ }
+ }
+
/* Cause an address alignment exception: */
mips_cpu_exception(cpu,
#ifdef LS_LOAD
@@ -65,7 +90,7 @@
#else
EXCEPTION_ADES,
#endif
- 0, addr, 0, 0, 0, 0);
+ 0, addr, 0, vaddr_vpn2, vaddr_asid, 0);
#else
fatal("{ mips dyntrans alignment exception, size = %i,"
" addr = %016"PRIx64", pc = %016"PRIx64" }\n", LS_SIZE,
--------------AD1B6B882B3079477D4474C8--
Home |
Main Index |
Thread Index |
Old Index