x86_64+kvm: int_exception_handler() Exception 13 while executing option rom
From: Vitaly Chikunov vt@altlinux.org
I noticed that u-boot.rom does not boot in qemu-system-x86_64 (8.2.4) with KVM accelerator:
builder@x86_64:~/RPM/BUILD/u-boot-qemu-2024.07$ qemu-system-x86_64 -M accel=kvm -nographic -bios ./u-boot.rom
U-Boot SPL 2024.07 (Jul 04 2024 - 09:26:24 +0000)
int_exception_handler() Exception 13 while executing option rom
<hangs>
The same rom with -M accel=tcg
boots OK[1].
Thanks,
[1] ps. Log of TCG boot:
builder@x86_64:~/RPM/BUILD/u-boot-qemu-2024.07$ qemu-system-x86_64 -M accel=tcg -nographic -bios ./u-boot.rom
U-Boot SPL 2024.07 (Jul 04 2024 - 09:26:24 +0000)
Video: 1024x768x32
alloc_simple() alloc space exhausted
Trying to boot from SPI
Jumping to 64-bit U-Boot: Note many features are missing
U-Boot 2024.07 (Jul 04 2024 - 09:26:24 +0000)
CPU: QEMU Virtual CPU version 2.5+
DRAM: 128 MiB
Core: 20 devices, 13 uclasses, devicetree: separate
Loading Environment from nowhere... OK
Video: 1024x768x0
Model: QEMU x86 (I440FX)
Net: e1000: 52:54:00:12:34:56
eth0: e1000#0
Hit any key to stop autoboot: 0
Scanning for bootflows in all bootdevs
Seq Method State Uclass Part Name Filename
--- ----------- ------ -------- ---- ------------------------ ----------------
Scanning global bootmeth 'efi_mgr':
efi_set_blk_dev_to_system_partition() No EFI system partition
efi_set_blk_dev_to_system_partition() No EFI system partition
efi_var_to_file() Failed to persist EFI variables
Hunting with: nvme
Hunting with: qfw
Hunting with: scsi
scanning bus for devices...
Hunting with: virtio
Scanning bootdev 'qfw_pio.bootdev':
fatal: no kernel available
Hunting with: ide
Bus 0: not available Bus 1: OK
Device 2: Model: QEMU Firm: 2.5+ Ser#: QEMU DVD-ROM
Type: Removable CD ROM
Capacity: not available
Device 3: not available
Hunting with: usb
No USB controllers found
Hunting with: ethernet
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
DHCP client bound to address 10.0.2.15 (1001 ms)
Scanning bootdev 'e1000#0.bootdev':
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
DHCP client bound to address 10.0.2.15 (1000 ms)
*** Warning: no boot file name; using '0A00020F.img'
Using e1000#0 device
TFTP from server 10.0.2.2; our IP address is 10.0.2.15
Filename '0A00020F.img'.
Load address: 0x1000000
Loading: *
TFTP error: 'Access violation' (2)
Not retrying...
No more bootdevs
--- ----------- ------ -------- ---- ------------------------ ----------------
(0 bootflows, 0 valid)
=>
Link: https://lore.kernel.org/all/20240707024125.npvtj43nnddv7uwu@altlinux.org/T/
Edited by Simon Glass