assertion failure on gpio.c line 108 for PowerPC e500 machine
Host environment
- Operating system: Linux Ubuntu VERSION="22.04.4 LTS (Jammy Jellyfish)"
- OS/kernel version: Linux ccu-TensorBook-2022 6.8.0-83-generic #83~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Sep 9 18:19:47 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
- Architecture: x86_64
- QEMU flavor: qemu-system-ppc
- QEMU version: QEMU emulator version 10.1.1 (v10.1.1-dirty) Main Branch Pulled Oct-9
- QEMU command line:
qemu-system-ppc --machine ppce500 --cpu e200z5 -m 2g -nographic
Emulated/Virtualized environment
- Operating system: None
- OS/kernel version: None
- Architecture: PowerPC
Description of problem
Assertion failure when starting:
qemu-system-ppc: ../hw/core/gpio.c:108: qdev_get_gpio_in_named: Assertion `n >= 0 && n < gpio_list->num_in' failed.
Aborted (core dumped)
Steps to reproduce
When I run this command:
qemu-system-ppc --machine ppce500 --cpu e200z5 -m 2g -nographic
I get this error:
qemu-system-ppc: ../hw/core/gpio.c:108: qdev_get_gpio_in_named: Assertion `n >= 0 && n < gpio_list->num_in' failed.
Aborted (core dumped)
But this command works:
qemu-system-ppc --machine ppce500 -m 2g -nographic
I get some U-boot text.
My goal is to run a bare metal PowerPC e200z5 program with a -kernel option, but it seems to be failing before it even starts my program.
My question is: is this a mistake on my part, or is this a bug in how e200z5 and ppce500 are interacting? Do I need to create my own QEMU machine (instead of using the ppce500), or is this a bug the QEMU developers should address?
I poked around gpio.c and num_in is zero, but the n passed in is 4, so I think some part of QEMU thinks there are 4 GPIO lines, but some other part thinks there are none.
I built my own QEMU from main about a week ago specifically to get the fix for this bug, which I think I hit previously: #2768 (closed)
Additional information
None.