ARM GIC / PL061 error on uni-processor system
Public bug reported:
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 pdatapl061_gpio dev:gpio1: invalid IRQ base in pdatapl061_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?
** Affects: qemu
Importance: Undecided
Status: New
** Attachment added: "Kernel config"
https://bugs.launchpad.net/bugs/1409246/+attachment/4295186/+files/test-realview-config
Signature · 39 lines
You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1409246 Title: ARM GIC / PL061 error on uni-processor system Status in QEMU: New 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? To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1409246/+subscriptions
** Attachment added: "QEmu command line / boot log"
https://bugs.launchpad.net/qemu/+bug/1409246/+attachment/4295187/+files/qemu-console-boot.log
Signature · 39 lines
You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1409246 Title: ARM GIC / PL061 error on uni-processor system Status in QEMU: New 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? To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1409246/+subscriptions
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
Signature · 39 lines
You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1409246 Title: ARM GIC / PL061 error on uni-processor system Status in QEMU: New 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? To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1409246/+subscriptions
confirmed - not a bug, patching the kernel fixes the problem.
** Changed in: qemu
Status: New => Invalid
Signature · 39 lines
You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1409246 Title: ARM GIC / PL061 error on uni-processor system Status in QEMU: Invalid 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? To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1409246/+subscriptions
Hi Christopher,
Quoted 1 line · Christopher Horler
confirmed - not a bug, patching the kernel fixes the problem.
Mind pointing to your patch? I've been seeing the "GIC CPU mask not found - kernel will fail to boot." message for a long time but since it was apparently spurious never found the time to get to the bottom of it.
Thanks,
Chris
Signature · 3 lines
Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Quoted 11 lines · Christopher Covington
Hi Christopher,
Quoted 1 line · Christopher Horler
confirmed - not a bug, patching the kernel fixes the problem.
Mind pointing to your patch? I've been seeing the "GIC CPU mask not found -
kernel will fail to boot." message for a long time but since it was apparently
spurious never found the time to get to the bottom of it.
I didn't fix that message, because it wasn't the cause of the mmc boot failure. In the end what I did fix was a single line in pl061.c
I'll share that patch, when I can download an up to date git tree (probably this evening). It could use a peer reviewing to know it's correct!
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)
** Patch added: "0001-fix-pl061-for-realview-boards-dynamically-allocate-i.patch"
https://bugs.launchpad.net/qemu/+bug/1409246/+attachment/4299488/+files/0001-fix-pl061-for-realview-boards-dynamically-allocate-i.patch
Signature · 39 lines
You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1409246 Title: ARM GIC / PL061 error on uni-processor system Status in QEMU: Invalid 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? To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1409246/+subscriptions