Re: [PATCH 3/7] target/hppa: fix access_id check

2024-03-19 Thread Sven Schnelle
Richard Henderson writes: > On 3/17/24 12:14, Sven Schnelle wrote: >> /* If bits [31:1] match, and bit 0 is set, suppress write. */ >> -int match = ent->access_id * 2 + 1; >> - >> -if (match == env->cr[CR_PID1] || match == env->cr[CR_PID2] || >> -match == env

Re: [PATCH 3/7] target/hppa: fix access_id check

2024-03-18 Thread Richard Henderson
On 3/17/24 12:14, Sven Schnelle wrote: +static bool match_prot_id(CPUHPPAState *env, uint32_t access_id, uint32_t *_pid) +{ +for (int i = 0; i < 8; i++) { +uint32_t pid = get_pid(env, i); There are only 4 pid's for pa1.x. +static uint32_t get_pid(CPUHPPAState *env, int num) +{ +

Re: [PATCH 3/7] target/hppa: fix access_id check

2024-03-18 Thread Helge Deller
On 3/17/24 23:14, Sven Schnelle wrote: PA2.0 provides 8 instead of 4 PID registers. Signed-off-by: Sven Schnelle Reviewed-by: Helge Deller with a few comments below... Helge --- roms/SLOF| 2 +- target/hppa/mem_helper.c | 67 +++- 2

[PATCH 3/7] target/hppa: fix access_id check

2024-03-17 Thread Sven Schnelle
PA2.0 provides 8 instead of 4 PID registers. Signed-off-by: Sven Schnelle --- roms/SLOF| 2 +- target/hppa/mem_helper.c | 67 +++- 2 files changed, 60 insertions(+), 9 deletions(-) diff --git a/roms/SLOF b/roms/SLOF index 3a259df244..6b6c16b4