From: Andrew May <acmay@acmay.homeip.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] 4xx wrtee instructions
Date: Tue, 13 Jan 2009 16:04:18 -0800 [thread overview]
Message-ID: <20090113160418.225e5362@acmay.homeip.net> (raw)
When I try to boot a PPC 4xx linux kernel it fails somewhere after
expanding the ramdisk with:
"qemu: fatal: Trying to execute code outside RAM or ROM at 0xc007c70c"
It seems that the "wrteei" instruction is unsetting the address
translate bits in the MSR. This patch seems to fix it, and I think it
is correct, to and with the "not" of the bit instead of the bit itself
to disable interrupts.
The qemu log file doesn't display the correct instructions, but that
doesn't seem to be a problem.
====================
IN:
0xc000d0cc: mfmsr r5
0xc000d0d0: mfspr r6,945
0xc000d0d4: .long 0x7c000146
0xc000d0d8: mtspr 945,r4
0xc000d0dc: .long 0x7c601f25
0xc000d0e0: mtspr 945,r6
0xc000d0e4: .long 0x7ca00106
=======================
Please CC me since I am not on the list.
Here is the patch.
==========
diff --git a/trunk/target-ppc/translate.c b/trunk/target-ppc/translate.c
--- a/trunk/target-ppc/translate.c
+++ b/trunk/target-ppc/translate.c
@@ -6050,7 +6050,7 @@ GEN_HANDLER(wrteei, 0x1F, 0x03, 0x05, 0x000EFC01, PPC_WRTEE)
/* Stop translation to have a chance to raise an exception */
gen_stop_exception(ctx);
} else {
- tcg_gen_andi_tl(cpu_msr, cpu_msr, (1 << MSR_EE));
+ tcg_gen_andi_tl(cpu_msr, cpu_msr, ~(1 << MSR_EE));
}
#endif
}
next reply other threads:[~2009-01-14 0:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-14 0:04 Andrew May [this message]
2009-01-14 19:40 ` [Qemu-devel] 4xx wrtee instructions Aurelien Jarno
2009-01-16 20:24 ` Hollis Blanchard
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=20090113160418.225e5362@acmay.homeip.net \
--to=acmay@acmay.homeip.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).