From: Helge Deller <deller@kernel.org>
To: qemu-devel@nongnu.org
Cc: Richard Henderson <richard.henderson@linaro.org>,
Keith Monahan <keith@techtravels.org>,
"Kirill A . Korinsky" <kirill@korins.ky>,
Helge Deller <deller@gmx.de>
Subject: [PATCH 5/8] target/hppa: Preload I/O-space BTLB entries for LASI and the central bus
Date: Tue, 27 Oct 2026 22:52:06 +0100 [thread overview]
Message-ID: <20261027215209.21150-6-deller@kernel.org> (raw)
In-Reply-To: <20261027215209.21150-1-deller@kernel.org>
From: Keith Monahan <keith@techtravels.org>
Set up the BTLB to allow operating systems to access LASI and central
bus addresses.
Signed-off-by: Keith Monahan <keith@techtravels.org>
Signed-off-by: Helge Deller <deller@gmx.de>
---
hw/hppa/machine.c | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
index 8d378385b2..e403ae5fc9 100644
--- a/hw/hppa/machine.c
+++ b/hw/hppa/machine.c
@@ -896,6 +896,38 @@ static void hppa_machine_reset(MachineState *ms, ResetType type)
cpu[i]->env.gr[5] = CPU_HPA + i * 0x1000;
}
+ /*
+ * BTLB equivalence maps for the I/O ranges HP-UX 9 uses
+ * without creating page directory entries: the LASI block and the
+ * central bus (CPU HPA, broadcast). Must not cover other I/O space, as
+ * HP-UX probes with LPA and skips pdir setup for already mapped pages.
+ */
+ if (!hppa_is_pa20(&cpu[0]->env)) {
+ static const struct { uint32_t start, last; } io_btlb[] = {
+ { 0xf0100000, 0xf01fffff }, /* LASI */
+ { 0xfff80000, 0xffffffff }, /* central bus */
+ };
+ CPUHPPAState *env = &cpu[0]->env;
+
+ for (i = 0; i < ARRAY_SIZE(io_btlb); i++) {
+ HPPATLBEntry *ent = &env->tlb[HPPA_BTLB_ENTRIES(env) - 1 - i];
+
+ ent->itree.start = io_btlb[i].start;
+ ent->itree.last = io_btlb[i].last;
+ ent->pa = io_btlb[i].start;
+ ent->access_id = 0;
+ ent->u = 1;
+ ent->ar_pl2 = 0;
+ ent->ar_pl1 = 0;
+ ent->ar_type = 1;
+ ent->b = 0;
+ ent->d = 1;
+ ent->t = 0;
+ ent->entry_valid = 1;
+ interval_tree_insert(&ent->itree, &env->tlb_root);
+ }
+ }
+
cpu[0]->env.gr[26] = ms->ram_size;
cpu[0]->env.gr[25] = cpu[0]->env.kernel_entry;
cpu[0]->env.gr[24] = cpu[0]->env.cmdline_or_bootorder;
--
2.54.0
next prev parent reply other threads:[~2026-10-27 21:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-27 21:52 [PATCH 0/8] HPPA architecture patches for HP-UX 9 and 715 machine Helge Deller
2026-10-27 21:52 ` [PATCH 1/8] target/hppa: restore lazy FPU context isolation Helge Deller
2026-10-27 21:52 ` [PATCH 2/8] target/hppa: Use 15 bit protection IDs on PA1.1 CPUs Helge Deller
2026-10-27 21:52 ` [PATCH 3/8] target/hppa: Only allow 8 BTLB entries for HP-UX 9.05 Helge Deller
2026-10-27 21:52 ` [PATCH 4/8] target/hppa: Implement local broadcast I/O space Helge Deller
2026-10-27 21:52 ` Helge Deller [this message]
2026-10-27 21:52 ` [PATCH 6/8] artist: Redraw screen on colormap changes Helge Deller
2026-10-27 21:52 ` [PATCH 7/8] hw/misc/lasi: LASI Harmony Audio presence emulation Helge Deller
2026-10-27 21:52 ` [PATCH 8/8] target/hppa: Map CPUs at same addresses as on physical machines 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=20261027215209.21150-6-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.