From: Eric DeVolder <eric_devolder@yahoo.com>
To: qemu-devel@nongnu.org
Cc: Eric DeVolder <eric_devolder@yahoo.com>
Subject: [PATCH] target/m68k: Raise ColdFire bus access error
Date: Tue, 10 Nov 2026 09:27:28 -0600 [thread overview]
Message-ID: <20261110152728.481267-1-eric_devolder@yahoo.com> (raw)
In-Reply-To: 20261110152728.481267-1-eric_devolder.ref@yahoo.com
m68k_cpu_transaction_failed() now works for ColdFire
(access error vector 8). Previously it was only 68040.
Signed-off-by: Eric DeVolder <eric_devolder@yahoo.com>
---
target/m68k/op_helper.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/target/m68k/op_helper.c b/target/m68k/op_helper.c
index 65eb69f2b4..580f26a540 100644
--- a/target/m68k/op_helper.c
+++ b/target/m68k/op_helper.c
@@ -237,6 +237,9 @@ static void cf_interrupt_all(CPUM68KState *env, int is_hw)
fmt |= 0x40000000;
fmt |= vector << 16;
+ if (cs->exception_index == EXCP_ACCESS) {
+ fmt |= (env->mmu.ssw & 0xf) << 24;
+ }
fmt |= sr;
env->sr |= SR_S;
@@ -472,6 +475,18 @@ void m68k_cpu_transaction_failed(CPUState *cs, hwaddr physaddr, vaddr addr,
cpu_restore_state(cs, retaddr);
+ if (m68k_feature(env, M68K_FEATURE_CF_ISA_A)) {
+ if (access_type == MMU_INST_FETCH) {
+ env->mmu.ssw = 0x4;
+ } else if (access_type == MMU_DATA_STORE) {
+ env->mmu.ssw = 0x8;
+ } else {
+ env->mmu.ssw = 0xc;
+ }
+ cs->exception_index = EXCP_ACCESS;
+ cpu_loop_exit(cs);
+ }
+
if (m68k_feature(env, M68K_FEATURE_M68040)) {
env->mmu.mmusr = 0;
--
2.53.0
parent reply other threads:[~2026-11-10 15:28 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20261110152728.481267-1-eric_devolder.ref@yahoo.com>]
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=20261110152728.481267-1-eric_devolder@yahoo.com \
--to=eric_devolder@yahoo.com \
--cc=qemu-devel@nongnu.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.