From: Helge Deller <deller@kernel.org>
To: qemu-devel@nongnu.org
Cc: Keith Monahan <keith@techtravels.org>,
Richard Henderson <richard.henderson@linaro.org>,
Helge Deller <deller@gmx.de>,
"Kirill A . Korinsky" <kirill@korins.ky>
Subject: [PULL v2 2/9] target/hppa: Use 15 bit protection IDs on PA1.1 CPUs
Date: Wed, 28 Oct 2026 20:06:54 +0100 [thread overview]
Message-ID: <20261028190701.17272-3-deller@kernel.org> (raw)
In-Reply-To: <20261028190701.17272-1-deller@kernel.org>
From: Keith Monahan <keith@techtravels.org>
HP-UX 9.05 only supports 15-bit protection IDs and gets a protection
fault on its own interrupt stack when allowing 18-bits.
Since the architecture manual states that if smaller than 18-bit access IDs
are physically implemented in the CPU, only the appropriate number of
rightmost bits of GR[r]{13..30} are stored in the TLB.
PA7100 and PA7100LC only support 15 bit protection IDs, so use this
amount of bits here.
Signed-off-by: Keith Monahan <keith@techtravels.org>
Signed-off-by: Helge Deller <deller@gmx.de>
---
target/hppa/mem_helper.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/target/hppa/mem_helper.c b/target/hppa/mem_helper.c
index a5da0bc851..7a316f59ea 100644
--- a/target/hppa/mem_helper.c
+++ b/target/hppa/mem_helper.c
@@ -538,7 +538,15 @@ void HELPER(itlba_pa11)(CPUHPPAState *env, target_ulong addr, target_ulong reg)
static void set_access_bits_pa11(CPUHPPAState *env, HPPATLBEntry *ent,
target_ulong reg)
{
- ent->access_id = extract32(reg, 1, 18);
+ /*
+ * The architecture manual states that if smaller than 18-bit access IDs
+ * are physically implemented in the CPU, only the appropriate number of
+ * rightmost bits of GR[r]{13..30} are stored in the TLB. Older parisc
+ * chips (PCXS, PCXT, PCXL, PCXL2) only support 15 bit protection IDs.
+ * PCXT' (pa7200) has 18 bit protection IDs, but only 16 bit spaceids.
+ * We currently emulate PA7100 and PA7100LC CPUs, so use 15 bits here.
+ */
+ ent->access_id = extract32(reg, 1, 15); /* 15-bit PA1.1 PIDs */
ent->u = extract32(reg, 19, 1);
ent->ar_pl2 = extract32(reg, 20, 2);
ent->ar_pl1 = extract32(reg, 22, 2);
--
2.54.0
next prev parent reply other threads:[~2026-10-28 19:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 19:06 [PULL v2 0/9] Hppa 715 2 patches Helge Deller
2026-10-28 19:06 ` [PULL v2 1/9] target/hppa: restore lazy FPU context isolation Helge Deller
2026-10-28 19:06 ` Helge Deller [this message]
2026-10-28 19:06 ` [PULL v2 3/9] target/hppa: Only allow 8 BTLB entries for HP-UX 9.05 Helge Deller
2026-10-28 19:06 ` [PULL v2 4/9] target/hppa: Implement local broadcast I/O space Helge Deller
2026-10-28 19:06 ` [PULL v2 5/9] target/hppa: Preload I/O-space BTLB entries for LASI and the central bus Helge Deller
2026-10-28 19:06 ` [PULL v2 6/9] artist: Redraw screen on colormap changes Helge Deller
2026-10-28 19:06 ` [PULL v2 7/9] hw/misc/lasi: LASI Harmony Audio presence emulation Helge Deller
2026-10-28 19:07 ` [PULL v2 8/9] target/hppa: Map CPUs at same addresses as on physical machines Helge Deller
2026-10-28 19:07 ` [PULL v2 9/9] target/hppa: Update SeaBIOS-hppa to version 27 Helge Deller
2026-10-29 11:43 ` [PULL v2 0/9] Hppa 715 2 patches Richard Henderson
2026-10-29 18:18 ` Helge Deller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261028190701.17272-3-deller@kernel.org \
--to=deller@kernel.org \
--cc=deller@gmx.de \
--cc=keith@techtravels.org \
--cc=kirill@korins.ky \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.