qemu-linuxboot: ASSERT error when running linuxboot.rom in QEMU
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 1.6k
- Forks
- 211
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 6
Description
I get the following ASSERT error when trying to run qemu-linuxboot built using HEADS with kernel version 4.14.62:
```
[...]
+--------------------+
| |
| Starting LinuxBoot |
| |
+--------------------+
num tables=0005
49AA7D31FC1BCDB0
42146F0205AD34BA
FvLoader: adding firmware volume 0xFF500000
FvLoader: error rc=0000000A
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
InstallProtocolInterface: 665E3FF6-46CC-11D4-9A38-0090273FC14D 7B2E408
LinuxBoot: waiting for BDS callback
[...]
--------
Transfering control to BDS 7B2E408
Entry Point 7B2C280 (7B2C280)
--------
LinuxBoot: BDS time has arrived
LinuxBoot: connect pci root brdiges
efi_visit_handles 2F707EBB
handle_count=00000001
PCI Bus First Scanning
PciBus: Discovered PCI @ [00|00|00]
PciBus: Discovered PCI @ [00|01|00]
BAR[0]: Type = PMem32; Alignment = 0xFFFFFF; Length = 0x1000000; Offset = 0x10
BAR[2]: Type = Mem32; Alignment = 0xFFF; Length = 0x1000; Offset = 0x18
PciBus: Discovered PCI @ [00|02|00]
ASSERT [PciHostBridgeDxe] /linuxboot/edk2/MdePkg/Library/BasePciCf8Lib/PciCf8Lib.c(1114): ((Address) & (~0xffff0ff | (3))) == 0
```
It also occurs when running `make BOARD=qemu` in the LinuxBoot project itself and using the bzImage and initrd artifacts from the HEADS build.
It looks like the assertion is made during the call to `gBS->ConnectController()` in `efi_connect_controllers()` on line 170 of dxe/linuxboot.c
Has anyone else run into this problem before?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce with `make BOARD=qemu` using the HEADS bzImage and initrd artifacts, then start at `edk2/MdePkg/Library/BasePciCf8Lib/PciCf8Lib.c:1114` and the `gBS->ConnectController()` call in `dxe/linuxboot.c:170`. Trace the PCI controller connection that triggers the assertion and verify that the qemu-linuxboot path completes without it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100