qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] Booting a standalone with qemu-microblaze


From: Peter Maydell
Subject: Re: [Qemu-discuss] Booting a standalone with qemu-microblaze
Date: Wed, 17 Dec 2014 20:12:06 +0000

On 17 December 2014 at 17:23, Jakob Bohm <address@hidden> wrote:
> On 17/12/2014 14:36, Kevin Grandemange wrote:
>>
>> I am trying to boot my own "kernel" with qemu-microblaze but I can't get
>> it running.
>> I tried the following cmdline:
>>
>> qemu-system-microblaze img.elf
>> qemu-system-microblaze -M petalogix-s3adsp1800 -kernel img.elf  -net none
>> -s -S
>>
>> img.elf: ELF 32-bit MSB executable, version 1 (SYSV), statically linked,
>> not stripped
>> Base adress is  0x0.

Are you sure this is the right load address for this hardware?
Looking at the machine model source code the DRAM base address
is 0x90000000 (though there is 128K of RAM at 0 I think).

>> I get the following error:
>>
>> IN: PC=0
>> rmsr=0 resr=0 rear=0 debug=0 imm=0 iflags=0 fsr=0
>> btaken=0 btarget=0 mode=kernel(saved=kernel) eip=0 ie=0
>> r00=00000000 r01=00000000 r02=00000000 r03=00000000
>> r04=00000000 r05=00000000 r06=00000000 r07=00000000
>> r08=00000000 r09=00000000 r10=00000000 r11=00000000
>> r12=00000000 r13=00000000 r14=00000000 r15=00000000
>> r16=00000000 r17=00000000 r18=00000000 r19=00000000
>> r20=00000000 r21=00000000 r22=00000000 r23=00000000
>> r24=00000000 r25=00000000 r26=00000000 r27=00000000
>> r28=00000000 r29=00000000 r30=00000000 r31=00000000
>> qemu: fatal: fetching nop sequence
>>
>> IN: PC=0
>> rmsr=0 resr=0 rear=0 debug=0 imm=0 iflags=0 fsr=0
>> btaken=0 btarget=0 mode=kernel(saved=kernel) eip=0 ie=0
>> r00=00000000 r01=00000000 r02=00000000 r03=00000000
>> r04=00000000 r05=00000000 r06=00000000 r07=00000000
>> r08=00000000 r09=00000000 r10=00000000 r11=00000000
>> r12=00000000 r13=00000000 r14=00000000 r15=00000000
>> r16=00000000 r17=00000000 r18=00000000 r19=00000000
>> r20=00000000 r21=00000000 r22=00000000 r23=00000000
>> r24=00000000 r25=00000000 r26=00000000 r27=00000000
>> r28=00000000 r29=00000000 r30=00000000 r31=00000000
>>
>>
>> Aborted
>>
>> How can I get the code of my elf to be emulated ?
>>
>>
>>
> I believe the "-kernel" option expects the file to be invoked
> according to the conventions for invoking a Linux kernel.

Semantics for this option vary by guest architecture. On some
at least, you can use it for "load me this ELF file" as well
as for loading Linux kernels.

In this case it seems to have started execution at address
0, at least. If you use the gdbstub you should be able to
figure out whether it's really loaded the code you expect
at address zero.

My first guess would be that you've made an error in the
linking of your image somehow and you don't really have
code starting at address 0 in it.

QEMU's -d debug logging options are probably helpful for
figuring out what the emulated CPU is actually doing in
this kind of "falls over immediately" situation.

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]