Skip to contentSkip to conversation

HPPA fixes for NetBSD/hppa emulation

PATCH In review Nick Hudson 2 participants 4 messages Apr 23, 2019

lore
Share & tools
lore
#0 lore raw

v3 cover HPPA fixes for NetBSD/hppa emulation

v3 changes:
- Don't use C99 comments and fix a typo in the comment

v2 changes:
- remove old debug code

*** BLURB HERE ***

Nick Hudson (2):
Implement the pcxl and pcxl2 Fast TLB Insert instructions as used by
NetBSD (and OpenBSD)
Always return EXCP_DMAR for protection id trap as EXCP_DMP is
considered legacy.

 target/hppa/insns.decode |  3 +++
 target/hppa/mem_helper.c |  3 +--
 target/hppa/translate.c  | 52 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 56 insertions(+), 2 deletions(-)

--
2.17.1

#1 lore raw

PATCH v3 1/2 Implement the pcxl and pcxl2 Fast TLB Insert instructions as used by NetBSD (and OpenBSD)

From: Nick Hudson <[email protected]>

See

     https://parisc.wiki.kernel.org/images-parisc/a/a9/Pcxl2_ers.pdf
     page 13-9 (195/206)
---
 target/hppa/insns.decode |  3 +++
 target/hppa/translate.c  | 52 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+)
target/hppa/insns.decode +3 -0
index 098370c2f0..f0dd71dd08 100644
@@ -133,6 +133,9 @@ ixtlbx          000001 b:5 r:5 sp:2 0100000 addr:1 0 00000      data=1
 ixtlbx          000001 b:5 r:5 ... 000000 addr:1 0 00000        \
                 sp=%assemble_sr3x data=0
 
+# pcxl and pcxl2 Fast TLB Insert instructions
+ixtlbxf         000001 00000 r:5 00 0 data:1 01000 addr:1 0 00000
+
 pxtlbx          000001 b:5 x:5 sp:2 0100100 local:1 m:1 -----   data=1
 pxtlbx          000001 b:5 x:5 ... 000100 local:1 m:1 -----     \
                 sp=%assemble_sr3x data=0
target/hppa/translate.c +52 -0

58 lines not on this page · raw message

--
2.17.1

#2 lore raw

PATCH v3 2/2 Always return EXCP_DMAR for protection id trap as EXCP_DMP is considered legacy.

In reply to Nick Hudson

From: Nick Hudson <[email protected]>

"In PA-RISC 1.1 (Second Edition) and later revisions, processors must use traps 26, 27,and 28 which provide equivalent functionality"

---
 target/hppa/mem_helper.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
target/hppa/mem_helper.c +1 -2
index c9b57d07c3..77fb544838 100644
@@ -154,8 +154,7 @@ int hppa_get_physical_address(CPUHPPAState *env, vaddr addr, int mmu_idx,
 
     if (unlikely(!(prot & type))) {
         /* The access isn't allowed -- Inst/Data Memory Protection Fault.  */
-        ret = (type & PAGE_EXEC ? EXCP_IMP :
-               prot & PAGE_READ ? EXCP_DMP : EXCP_DMAR);
+        ret = (type & PAGE_EXEC) ? EXCP_IMP : EXCP_DMAR;
         goto egress;
     }
 

--
2.17.1