Skip to content

loader: fix qemu GIC addresses#279

Merged
Ivan-Velickovic merged 1 commit intoseL4:mainfrom
midnightveil:qemu-fix-gic-base-address
Feb 13, 2025
Merged

loader: fix qemu GIC addresses#279
Ivan-Velickovic merged 1 commit intoseL4:mainfrom
midnightveil:qemu-fix-gic-base-address

Conversation

@midnightveil
Copy link
Contributor

Running qemu with -d guest_errors would previously print out

LDR|INFO: Setting all interrupts to Group 1
LDR|INFO: GICv2 ITLinesNumber: 0x00000000
gic_cpu_write: Bad offset 80
gicv2m_write: Bad offset 4

The first write is supposed to be into the GIC_DIST region, then the second into the GIC_CPU region. Cross referencing to QEMU 1, the GIC addresses in loader.c are incorrect. Now microkit prints:

LDR|INFO: Setting all interrupts to Group 1
LDR|INFO: GICv2 ITLinesNumber: 0x00000008

The generated seL4 devices_gen.h from the DTS is correct, this is purely a microkit issue.

Running qemu with -d guest_errors would previously print out

    LDR|INFO: Setting all interrupts to Group 1
    LDR|INFO: GICv2 ITLinesNumber: 0x00000000
    gic_cpu_write: Bad offset 80
    gicv2m_write: Bad offset 4

The first write is supposed to be into the GIC_DIST region, then the
second into the GIC_CPU region. Cross referencing to QEMU [1], the GIC
addresses in loader.c are incorrect. Now microkit prints:

    LDR|INFO: Setting all interrupts to Group 1
    LDR|INFO: GICv2 ITLinesNumber: 0x00000008

The generated seL4 devices_gen.h from the DTS is correct, this is purely
a microkit issue.

[1]: https://github.com/qemu/qemu/blame/de278e54/hw/arm/virt.c#L164-L165

Signed-off-by: julia <git.ts@trainwit.ch>
@Ivan-Velickovic Ivan-Velickovic merged commit d2c4397 into seL4:main Feb 13, 2025
11 checks passed
@midnightveil midnightveil deleted the qemu-fix-gic-base-address branch February 13, 2025 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants