
Some more details: EFI on QEMU v2.9.0 works as well, it's v2.10.0 where some incompatibilities are introduced.
The last stable tag of u-boot that works (under qemu <= v2.9.0) as BIOS for me is v2015.07. Starting from v2015.10 when I run
qemu-system-x86_64 --bios u-boot.rom -nographic
I get the following dump:
Invalid Opcode (Undefined Opcode) EIP: 0010:[<07f56583>] EFLAGS: 00000006 Original EIP :[<fff00583>] EAX: 000000aa EBX: 07fab61c ECX: 0000006a EDX: 0000006b ESI: 00000000 EDI: 00000003 EBP: 00000000 ESP: 07d52620 DS: 0018 ES: 0018 FS: 0020 GS: 0018 SS: 0018 CR0: 00000033 CR2: 00000000 CR3: 00000000 CR4: 00000000 DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000 DR6: ffff0ff0 DR7: 00000400 Stack: 0x07d52660 : 0x07f58460 0x07d5265c : 0x07f77947 0x07d52658 : 0x00000000 0x07d52654 : 0x00000000 0x07d52650 : 0x00000001 0x07d5264c : 0x07fab61c 0x07d52648 : 0x00000000 0x07d52644 : 0x07fa319c 0x07d52640 : 0x00000000 0x07d5263c : 0x07f8ba2f 0x07d52638 : 0x07d52780 0x07d52634 : 0x07fab61c 0x07d52630 : 0x07fcf200 0x07d5262c : 0x07f77cb2 0x07d52628 : 0x00000202 0x07d52624 : 0x00000010 --->0x07d52620 : 0x07f77bdc 0x07d5261c : 0x00000006 0x07d52618 : 0x00000010 0x07d52614 : 0x07f56583 ### ERROR ### Please RESET the board ###
Debugging with gdb shows that it happens after transferring control to RAM (board_f.c:1027 in v2015.10), but couldn't get more details so far, so any help is appreciated.
Best regards, Anton Gerasimov
On 11/03/2017 03:07 PM, Anton Gerasimov wrote:
Hi all,
I'm trying to use u-boot (v2017.01) with qemu-system-x86_64 v2.10.0 and run into a "trying to execute code outside of RAM or ROM at xxxxx" issue. It happens both when I build and use u-boot as a bios and as EFI payload, just the addresses in the error message are different. On qemu v2.5.0 at least EFI option works fine.
I understand that it can be (and probably is) a QEMU issue, but maybe someone on the list already encountered it and knows a workaround or has successfully used u-boot with QEMU >=2.10.0 and can share their experience.
Thanks in advance.
Best regards, Anton Gerasimov