Skip to content

Commit b7869bf

Browse files
committed
loader: fix qemu GIC addresses
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>
1 parent 87e3e80 commit b7869bf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

loader/src/loader.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ _Static_assert(sizeof(uintptr_t) == 8 || sizeof(uintptr_t) == 4, "Expect uintptr
3232
#define GICD_BASE 0x00F9010000UL
3333
#define GICC_BASE 0x00F9020000UL
3434
#elif defined(BOARD_qemu_virt_aarch64)
35-
#define GICD_BASE 0x8010000UL
36-
#define GICC_BASE 0x8020000UL
35+
#define GICD_BASE 0x8000000UL
36+
#define GICC_BASE 0x8010000UL
3737
#endif
3838

3939
#define REGION_TYPE_DATA 1
@@ -620,7 +620,7 @@ static void configure_gicv2(void)
620620
* must be set appropriately. Only interrupts with priorities less
621621
* than this mask will interrupt the CPU.
622622
*
623-
* seL4 (effectively) sets intererupts to priority 0x80, so it is
623+
* seL4 (effectively) sets interrupts to priority 0x80, so it is
624624
* important to make sure this is greater than 0x80.
625625
*/
626626
*((volatile uint32_t *)(GICC_BASE + 0x4)) = 0xf0;

0 commit comments

Comments
 (0)