ARM GIC / PL061 error on uni-processor system

Bug #1409246 reported by Christopher Horler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Invalid
Undecided
Unassigned

Bug Description

chorler@linux-foxtrot:~/projects/src/qemu> git describe
v2.2.0-369-gab0302e

When booting Linux 3.19.1 (default buildroot), configured for realview-pb-a8 on qemu from git (as above).

The following message appears (line 253/ 254 of attached log):
"GIC CPU mask not found - kernel will fail to boot."

The kernel does boot - so perhaps this is a misleading error message?
(though temporarily tweaking commit 6b9680bb does remove the message)

later the following three lines appear when pl061 is probed (resulting in ENODEV):
pl061_gpio dev:gpio0: invalid IRQ base in pdata
pl061_gpio dev:gpio1: invalid IRQ base in pdata
pl061_gpio dev:gpio2: invalid IRQ base in pdata

(from linux-3.18.1/drivers/gpio/gpio-pl061.c line 253)

qemu/hw/arm/realview.c
has some code that suggests to me pl061 is required for the MMC.

Where should I look to see how to initialise the irq_base member of the platform data in QEmu?

Revision history for this message
Christopher Horler (cshorler) wrote :
Revision history for this message
Christopher Horler (cshorler) wrote :
Revision history for this message
Christopher Horler (cshorler) wrote :

now I look further I notice that the pl061_platform_data structures are not fully initialised in the kernel

linux-3.18.1/arch/arm/mach-realview/realview_pba8.c

so this probably isn't a qemu bug

Revision history for this message
Christopher Horler (cshorler) wrote :

confirmed - not a bug, patching the kernel fixes the problem.

Changed in qemu:
status: New → Invalid
Revision history for this message
Christopher Horler (cshorler) wrote :

In arch/arm/mach-realview/realview_*.c pl061_platform_data irq_base members are statically (default) initialised to 0 (whereas for versatile they are explicitly set via defines in the platform headers).

In pl061_probe, -ENODEV is returned for irq_base <= 0.

Changing this to < 0, results in irq_domain_add_simple dynamically allocating irqs - and in the case of qemu resolves booting from MMC / SD, where pl061 is linked to pl181 in realview.c

I assume this is also valid for real hardware, but have no way to test.

I have not figured out what stops the 2.6 kernel booting, which is what I actually need... (seems to be coupled to mmci.c, or possibly the ext2 filesystem)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.