[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] AArch64 ELF File Loading
From: |
Christopher Covington |
Subject: |
Re: [Qemu-devel] AArch64 ELF File Loading |
Date: |
Fri, 25 Jul 2014 11:05:06 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 |
Hi Peter,
On 07/25/2014 10:41 AM, Peter Maydell wrote:
> On 25 July 2014 15:35, Christopher Covington <address@hidden> wrote:
>> qemu-system-aarch64 -nodefaults -nographic -monitor none -M virt \
>> -cpu cortex-a57 -m 3G -semihosting -kernel hello
>>
>> qemu: fatal: Trying to execute code outside RAM or ROM at 0x0000000000000000
>
> This means your code took an exception (and there's
> no RAM at the low address where the vector table is
> by default). Try "-d in_asm,exec,int" to get a better idea
> of what's being executed.
qemu-system-aarch64 -nodefaults -nographic -monitor none \
-M virt -cpu cortex-a57 -m 3G -semihosting -kernel hello \
-d in_asm,exec,int
qemu: fatal: Trying to execute code outside RAM or ROM at 0x0000000000000000
PC=0000000000000000 SP=0000000000000000
X00=0000000000000000 X01=0000000000000000 X02=0000000000000000 ...
The binary runs fine on at least one other simulator.
> Also, where do you expect the output from that printf
> to be going? Does your gcc/bare metal libc write to
> the UART? How does it know what address the UART is?
> If it's expecting to do semihosting for output, then you're
> running into the fact that we don't implement semihosting
> for AArch64 yet.
I have local patches adding semihosting for AArch64. I hope eventually be able
to share them and other changes, but the approvals will likely take a while
longer. Here is an example that doesn't use semihosting.
wget
http://releases.linaro.org/14.06/components/toolchain/binaries/gcc-linaro-aarch64-none-elf-4.9-2014.06-02_linux.tar.xz
tar xf gcc-linaro-aarch64-none-elf-4.9-2014.06-02_linux.tar.xz
echo '.global _start
_start:
mrs x0, midr_el1
b _start' > hello.S
gcc-linaro-aarch64-none-elf-4.9-2014.06-02_linux/bin/aarch64-none-elf-gcc \
-nostdlib -Ttext=0x40000000 hello.S -o hello
qemu-system-aarch64 -nodefaults -nographic -monitor none -M virt \
-cpu cortex-a57 -m 3G -semihosting -kernel hello -d in_asm,exec,int
qemu: fatal: Trying to execute code outside RAM or ROM at 0x0000000000000000
Thanks,
Christopher
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by the Linux Foundation.