On Fri, Sep 9, 2011 at 2:16 AM, Nathan Kunkee nkunkee42@hotmail.com wrote:
On 06/15/11 01:48 PM, Blue Swirl wrote:
[...snip...] Shouldn't be very difficult. Since on Sparc32 it's not possible to give ASI in a register, a switch or hand assembly would be needed.
I've had occasion to rebuild both openbios and QEMU-0.15 on my new machine :-), and can now follow up on this: the additions for the MMU breakpoint action register that Bob talked about have not made a difference for where my boot stalls. For an added bonus, I turned on the DEBUG_ASI in QEMU and so have more information about where it is looping. When I try and boot now, I get the following in an infinite loop:
ASI: read 00000400 asi 0x04 = f5901000 ASI: read 00000300 asi 0x04 = 000003a6 ASI: read f5901400 asi 0x03 = 00000000 ASI: read 00000300 asi 0x04 = 00000000 ASI: read 00000400 asi 0x04 = f5901000 ASI: read 00000300 asi 0x04 = 000003a6 ASI: read f5901400 asi 0x03 = 00000000 ASI: read 00000300 asi 0x04 = 00000000 ASI: read 00000400 asi 0x04 = f5901000
The OS reads MMU fault status and address registers and then performs MMU probe for the address. The address is not found, so maybe a mapping is missing.
I don't know enough about SPARC32 architecture to know if that gives more useful information... I don't see the 0x4c value in my log file. I tried turning on DEBUG_MMU, but stopped when my log file hit 4GB and I hadn't hit the stopping point yet.
Any ideas for other things to try or set for more debugging?
Since this is repeatable, you could try something like this (untested): diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c index d1a8dd9..2594bbd 100644 --- a/target-sparc/op_helper.c +++ b/target-sparc/op_helper.c @@ -1836,6 +1836,11 @@ uint64_t helper_ld_asi(target_ulong addr, int asi, int size, int sign) ret = mmu_probe(env, addr, mmulev); DPRINTF_MMU("mmu_probe: 0x%08x (lev %d) -> 0x%08" PRIx64 "\n", addr, mmulev, ret); + if (addr == 0xf5901400) { + printf("mmu_probe: 0x%08x (lev %d) -> 0x%08" PRIx64 "\n", + addr, mmulev, ret); + dump_mmu(stdout, fprintf, env); + } } break; case 4: /* read MMU regs */