Skip to contentSkip to conversation

HPPA fixes for NetBSD/hppa emulation

PATCH Superseded Nick Hudson 2 participants 4 messages Apr 22, 2019

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover HPPA fixes for NetBSD/hppa emulation

From: Nick Hudson <[email protected]>

Here are the required changes to allow qemu to emulate NetBSD/hppa.

v2 changes:
- remove old debug code

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 v2 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 v2 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

#3 lore raw
In reply to Nick Hudson
Patchew URL: https://patchew.org/QEMU/[email protected]/

Patchew URL: https://patchew.org/QEMU/[email protected]/

Hi,

This series seems to have some coding style problems. See output below for more information:

Type: series
Message-id: [email protected]
Subject: [Qemu-devel] [PATCH v2 0/2] HPPA fixes for NetBSD/hppa emulation

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
* [new tag] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'
a6b41a65f4 Always return EXCP_DMAR for protection id trap as EXCP_DMP is considered legacy. 5894d61641 Implement the pcxl and pcxl2 Fast TLB Insert instructions as used by NetBSD (and OpenBSD)

=== OUTPUT BEGIN ===
1/2 Checking commit 5894d6164109 (Implement the pcxl and pcxl2 Fast TLB Insert instructions as used by NetBSD (and OpenBSD))
WARNING: Block comments use a leading /* on a separate line
#36: FILE: target/hppa/translate.c:2521:
+/* Implement the pcxl and pcxl2 Fast TLB Insert instructions.

WARNING: Block comments use a trailing */ on a separate line #39: FILE: target/hppa/translate.c:2524:
+ * page 13-9 (195/206) */

ERROR: do not use C99 // comments
#51: FILE: target/hppa/translate.c:2536:
+// if (not (pcx or pcxl2))

ERROR: do not use C99 // comments
#52: FILE: target/hppa/translate.c:2537:
+// return gen_illegal(ctx);

total: 2 errors, 2 warnings, 67 lines checked

Patch 1/2 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

2/2 Checking commit a6b41a65f4d3 (Always return EXCP_DMAR for protection id trap as EXCP_DMP is considered legacy.) === OUTPUT END ===

Test command exited with code: 1

The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]