* [Qemu-devel] 4xx wrtee instructions
@ 2009-01-14 0:04 Andrew May
2009-01-14 19:40 ` Aurelien Jarno
2009-01-16 20:24 ` Hollis Blanchard
0 siblings, 2 replies; 3+ messages in thread
From: Andrew May @ 2009-01-14 0:04 UTC (permalink / raw)
To: qemu-devel
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
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] 4xx wrtee instructions
2009-01-14 0:04 [Qemu-devel] 4xx wrtee instructions Andrew May
@ 2009-01-14 19:40 ` Aurelien Jarno
2009-01-16 20:24 ` Hollis Blanchard
1 sibling, 0 replies; 3+ messages in thread
From: Aurelien Jarno @ 2009-01-14 19:40 UTC (permalink / raw)
To: qemu-devel; +Cc: Andrew May
On Tue, Jan 13, 2009 at 04:04:18PM -0800, Andrew May wrote:
> 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
> }
>
Thanks, applied.
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] 4xx wrtee instructions
2009-01-14 0:04 [Qemu-devel] 4xx wrtee instructions Andrew May
2009-01-14 19:40 ` Aurelien Jarno
@ 2009-01-16 20:24 ` Hollis Blanchard
1 sibling, 0 replies; 3+ messages in thread
From: Hollis Blanchard @ 2009-01-16 20:24 UTC (permalink / raw)
To: qemu-devel
On Tue, 2009-01-13 at 16:04 -0800, Andrew May wrote:
> 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"
By the way, how did you load the kernel? The last time I tried to use
the 405 emulation, I was told I needed a u-boot binary as the ROM, but
couldn't find any that worked.
--
Hollis Blanchard
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-01-16 20:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-14 0:04 [Qemu-devel] 4xx wrtee instructions Andrew May
2009-01-14 19:40 ` Aurelien Jarno
2009-01-16 20:24 ` Hollis Blanchard
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).