mbox series

[v2,00/10] hw/arm/raspi: Add thermal/timer, improve multicore address space

Message ID 20191017225800.6946-1-f4bug@amsat.org (mailing list archive)
Headers show
Series hw/arm/raspi: Add thermal/timer, improve multicore address space | expand

Message

Philippe Mathieu-Daudé Oct. 17, 2019, 10:57 p.m. UTC
From: PhilMD <f4bug@amsat.org>

Hi,

Some patches from v1 are already merged. This v2 addresses the
review comment from v1, and add patches to clean the memory
space when using multiple cores.

Laurent, if you test U-Boot with this patchset again, do you mind
replying with a "Tested-by:" tag?

The next patchset is probably about the interrupt controller blocks,
then will come another one about the MBox/Properties.

The last patch is unrelated to the series, but since I cleaned this
for the raspi and the highbank is the only board with the same issue,
I included the patch in this series.

Please review.

Regards,

Phil.

Philippe Mathieu-Daudé (10):
  hw/misc/bcm2835_thermal: Add a dummy BCM2835 thermal sensor
  hw/arm/bcm2835_peripherals: Use the thermal sensor block
  hw/timer/bcm2835: Add the BCM2835 SYS_timer
  hw/arm/bcm2835_peripherals: Use the SYS_timer
  hw/arm/bcm2836: Make the SoC code modular
  hw/arm/bcm2836: Create VideoCore address space in the SoC
  hw/arm/bcm2836: Use per CPU address spaces
  hw/arm/raspi: Use AddressSpace when using
    arm_boot::write_secondary_boot
  hw/arm/raspi: Make the board code modular
  hw/arm/highbank: Use AddressSpace when using write_secondary_boot()

 hw/arm/bcm2835_peripherals.c         |  73 +++++++-----
 hw/arm/bcm2836.c                     |  91 ++++++++++++---
 hw/arm/highbank.c                    |   3 +-
 hw/arm/raspi.c                       | 123 ++++++++++++++++----
 hw/misc/Makefile.objs                |   1 +
 hw/misc/bcm2835_thermal.c            | 135 ++++++++++++++++++++++
 hw/timer/Makefile.objs               |   1 +
 hw/timer/bcm2835_systmr.c            | 166 +++++++++++++++++++++++++++
 hw/timer/trace-events                |   5 +
 include/hw/arm/bcm2835_peripherals.h |   9 +-
 include/hw/arm/bcm2836.h             |  11 ++
 include/hw/arm/raspi_platform.h      |   1 +
 include/hw/misc/bcm2835_thermal.h    |  27 +++++
 include/hw/timer/bcm2835_systmr.h    |  33 ++++++
 14 files changed, 610 insertions(+), 69 deletions(-)
 create mode 100644 hw/misc/bcm2835_thermal.c
 create mode 100644 hw/timer/bcm2835_systmr.c
 create mode 100644 include/hw/misc/bcm2835_thermal.h
 create mode 100644 include/hw/timer/bcm2835_systmr.h

Comments

no-reply@patchew.org Oct. 18, 2019, 11:28 a.m. UTC | #1
Patchew URL: https://patchew.org/QEMU/20191017225800.6946-1-f4bug@amsat.org/



Hi,

This series failed the docker-quick@centos7 build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
make docker-image-centos7 V=1 NETWORK=1
time make docker-test-quick@centos7 SHOW_ENV=1 J=14 NETWORK=1
=== TEST SCRIPT END ===

  TEST    check-qtest-aarch64: tests/device-introspect-test
  TEST    iotest-qcow2: 060
**
ERROR:/tmp/qemu-test/src/tests/device-introspect-test.c:135:test_one_device: assertion failed (qtree_start == qtree_end): ("bus: main-system-bus\r\n  type System\r\n" == "bus: main-system-bus\r\n  type System\r\n  dev: bcm2835-peripherals, id \"\"\r\n    mmio ffffffffffffffff/0000000001000000\r\n  dev: bcm2835_gpio, id \"\"\r\n    gpio-out \"\" 54\r\n    mmio ffffffffffffffff/0000000000001000\r\n    bus: sd-bus\r\n      type sd-bus\r\n  dev: bcm2835-thermal, id \"\"\r\n  dev: bcm2835-dma, id \"\"\r\n    gpio-out \"sysbus-irq\" 16\r\n    mmio ffffffffffffffff/0000000000001000\r\n    mmio ffffffffffffffff/0000000000000100\r\n  dev: bcm2835-sdhost, id \"\"\r\n    gpio-out \"sysbus-irq\" 1\r\n    mmio ffffffffffffffff/0000000000001000\r\n    bus: sd-bus\r\n      type bcm2835-sdhost-bus\r\n  dev: generic-sdhci, id \"\"\r\n    sd-spec-version = 2 (0x2)\r\n    uhs = 0 (0x0)\r\n    capareg = 91763892 (0x57834b4)\r\n    maxcurr = 0 (0x0)\r\n    pending-insert-quirk = false\r\n    dma = \"\"\r\n    bus: sd-bus\r\n      type sdhci-bus\r\n  dev: bcm2835-rng, id \"\"\r\n    mmio ffffffffffffffff/0000000000000010\r\n  dev: bcm2835-property, id \"\"\r\n    gpio-out \"sysbus-irq\" 1\r\n    board-rev = 0 (0x0)\r\n    mmio ffffffffffffffff/0000000000000010\r\n  dev: bcm2835-fb, id \"\"\r\n    gpio-out \"sysbus-irq\" 1\r\n    vcram-base = 0 (0x0)\r\n    vcram-size = 67108864 (0x4000000)\r\n    xres = 640 (0x280)\r\n    yres = 480 (0x1e0)\r\n    bpp = 16 (0x10)\r\n    pixo = 1 (0x1)\r\n    alpha = 2 (0x2)\r\n    mmio ffffffffffffffff/0000000000000010\r\n  dev: bcm2835-mbox, id \"\"\r\n    gpio-in \"\" 9\r\n    gpio-out \"sysbus-irq\" 1\r\n    mmio ffffffffffffffff/0000000000000400\r\n  dev: bcm2835-aux, id \"\"\r\n    gpio-out \"sysbus-irq\" 1\r\n    chardev = \"\"\r\n    mmio ffffffffffffffff/0000000000000100\r\n  dev: pl011, id \"\"\r\n    gpio-out \"sysbus-irq\" 6\r\n    chardev = \"\"\r\n    mmio ffffffffffffffff/0000000000001000\r\n  dev: bcm2835-sys-timer, id \"\"\r\n  dev: bcm2835-ic, id \"\"\r\n    gpio-out \"sysbus-irq\" 2\r\n    gpio-in \"arm-irq\" 8\r\n    gpio-in \"gpu-irq\" 64\r\n    mmio ffffffffffffffff/0000000000000200\r\n  dev: bcm2836-control, id \"\"\r\n    gpio-out \"fiq\" 4\r\n    gpio-out \"irq\" 4\r\n    gpio-in \"gpu-fiq\" 1\r\n    gpio-in \"gpu-irq\" 1\r\n    gpio-in \"cntvirq\" 4\r\n    gpio-in \"cnthpirq\" 4\r\n    gpio-in \"cntpnsirq\" 4\r\n    gpio-in \"cntpsirq\" 4\r\n    mmio ffffffffffffffff/0000000000000100\r\n  dev: bcm2835-peripherals, id \"\"\r\n    mmio ffffffffffffffff/0000000001000000\r\n  dev: bcm2835_gpio, id \"\"\r\n    gpio-out \"\" 54\r\n    mmio ffffffffffffffff/0000000000001000\r\n    bus: sd-bus\r\n      type sd-bus\r\n  dev: bcm2835-thermal, id \"\"\r\n  dev: bcm2835-dma, id \"\"\r\n    gpio-out \"sysbus-irq\" 16\r\n    mmio ffffffffffffffff/0000000000001000\r\n    mmio ffffffffffffffff/0000000000000100\r\n  dev: bcm2835-sdhost, id \"\"\r\n    gpio-out \"sysbus-irq\" 1\r\n    mmio ffffffffffffffff/0000000000001000\r\n    bus: sd-bus\r\n      type bcm2835-sdhost-bus\r\n  dev: generic-sdhci, id \"\"\r\n    sd-spec-version = 2 (0x2)\r\n    uhs = 0 (0x0)\r\n    capareg = 91763892 (0x57834b4)\r\n    maxcurr = 0 (0x0)\r\n    pending-insert-quirk = false\r\n    dma = \"\"\r\n    bus: sd-bus\r\n      type sdhci-bus\r\n  dev: bcm2835-rng, id \"\"\r\n    mmio ffffffffffffffff/0000000000000010\r\n  dev: bcm2835-property, id \"\"\r\n    gpio-out \"sysbus-irq\" 1\r\n    board-rev = 0 (0x0)\r\n    mmio ffffffffffffffff/0000000000000010\r\n  dev: bcm2835-fb, id \"\"\r\n    gpio-out \"sysbus-irq\" 1\r\n    vcram-base = 0 (0x0)\r\n    vcram-size = 67108864 (0x4000000)\r\n    xres = 640 (0x280)\r\n    yres = 480 (0x1e0)\r\n    bpp = 16 (0x10)\r\n    pixo = 1 (0x1)\r\n    alpha = 2 (0x2)\r\n    mmio ffffffffffffffff/0000000000000010\r\n  dev: bcm2835-mbox, id \"\"\r\n    gpio-in \"\" 9\r\n    gpio-out \"sysbus-irq\" 1\r\n    mmio ffffffffffffffff/0000000000000400\r\n  dev: bcm2835-aux, id \"\"\r\n    gpio-out \"sysbus-irq\" 1\r\n    chardev = \"\"\r\n    mmio ffffffffffffffff/0000000000000100\r\n  dev: pl011, id \"\"\r\n    gpio-out \"sysbus-irq\" 6\r\n    chardev = \"\"\r\n    mmio ffffffffffffffff/0000000000001000\r\n  dev: bcm2835-sys-timer, id \"\"\r\n  dev: bcm2835-ic, id \"\"\r\n    gpio-out \"sysbus-irq\" 2\r\n    gpio-in \"arm-irq\" 8\r\n    gpio-in \"gpu-irq\" 64\r\n    mmio ffffffffffffffff/0000000000000200\r\n  dev: bcm2836-control, id \"\"\r\n    gpio-out \"fiq\" 4\r\n    gpio-out \"irq\" 4\r\n    gpio-in \"gpu-fiq\" 1\r\n    gpio-in \"gpu-irq\" 1\r\n    gpio-in \"cntvirq\" 4\r\n    gpio-in \"cnthpirq\" 4\r\n    gpio-in \"cntpnsirq\" 4\r\n    gpio-in \"cntpsirq\" 4\r\n    mmio ffffffffffffffff/0000000000000100\r\n")
ERROR - Bail out! ERROR:/tmp/qemu-test/src/tests/device-introspect-test.c:135:test_one_device: assertion failed (qtree_start == qtree_end): ("bus: main-system-bus\r\n  type System\r\n" == "bus: main-system-bus\r\n  type System\r\n  dev: bcm2835-peripherals, id \"\"\r\n    mmio ffffffffffffffff/0000000001000000\r\n  dev: bcm2835_gpio, id \"\"\r\n    gpio-out \"\" 54\r\n    mmio ffffffffffffffff/0000000000001000\r\n    bus: sd-bus\r\n      type sd-bus\r\n  dev: bcm2835-thermal, id \"\"\r\n  dev: bcm2835-dma, id \"\"\r\n    gpio-out \"sysbus-irq\" 16\r\n    mmio ffffffffffffffff/0000000000001000\r\n    mmio ffffffffffffffff/0000000000000100\r\n  dev: bcm2835-sdhost, id \"\"\r\n    gpio-out \"sysbus-irq\" 1\r\n    mmio ffffffffffffffff/0000000000001000\r\n    bus: sd-bus\r\n      type bcm2835-sdhost-bus\r\n  dev: generic-sdhci, id \"\"\r\n    sd-spec-version = 2 (0x2)\r\n    uhs = 0 (0x0)\r\n    capareg = 91763892 (0x57834b4)\r\n    maxcurr = 0 (0x0)\r\n    pending-insert-quirk = false\r\n    dma = \"\"\r\n    bus: sd-bus\r\n      type sdhci-bus\r\n  dev: bcm2835-rng, id \"\"\r\n    mmio ffffffffffffffff/0000000000000010\r\n  dev: bcm2835-property, id \"\"\r\n    gpio-out \"sysbus-irq\" 1\r\n    board-rev = 0 (0x0)\r\n    mmio ffffffffffffffff/0000000000000010\r\n  dev: bcm2835-fb, id \"\"\r\n    gpio-out \"sysbus-irq\" 1\r\n    vcram-base = 0 (0x0)\r\n    vcram-size = 67108864 (0x4000000)\r\n    xres = 640 (0x280)\r\n    yres = 480 (0x1e0)\r\n    bpp = 16 (0x10)\r\n    pixo = 1 (0x1)\r\n    alpha = 2 (0x2)\r\n    mmio ffffffffffffffff/0000000000000010\r\n  dev: bcm2835-mbox, id \"\"\r\n    gpio-in \"\" 9\r\n    gpio-out \"sysbus-irq\" 1\r\n    mmio ffffffffffffffff/0000000000000400\r\n  dev: bcm2835-aux, id \"\"\r\n    gpio-out \"sysbus-irq\" 1\r\n    chardev = \"\"\r\n    mmio ffffffffffffffff/0000000000000100\r\n  dev: pl011, id \"\"\r\n    gpio-out \"sysbus-irq\" 6\r\n    chardev = \"\"\r\n    mmio ffffffffffffffff/0000000000001000\r\n  dev: bcm2835-sys-timer, id \"\"\r\n  dev: bcm2835-ic, id \"\"\r\n    gpio-out \"sysbus-irq\" 2\r\n    gpio-in \"arm-irq\" 8\r\n    gpio-in \"gpu-irq\" 64\r\n    mmio ffffffffffffffff/0000000000000200\r\n  dev: bcm2836-control, id \"\"\r\n    gpio-out \"fiq\" 4\r\n    gpio-out \"irq\" 4\r\n    gpio-in \"gpu-fiq\" 1\r\n    gpio-in \"gpu-irq\" 1\r\n    gpio-in \"cntvirq\" 4\r\n    gpio-in \"cnthpirq\" 4\r\n    gpio-in \"cntpnsirq\" 4\r\n    gpio-in \"cntpsirq\" 4\r\n    mmio ffffffffffffffff/0000000000000100\r\n  dev: bcm2835-peripherals, id \"\"\r\n    mmio ffffffffffffffff/0000000001000000\r\n  dev: bcm2835_gpio, id \"\"\r\n    gpio-out \"\" 54\r\n    mmio ffffffffffffffff/0000000000001000\r\n    bus: sd-bus\r\n      type sd-bus\r\n  dev: bcm2835-thermal, id \"\"\r\n  dev: bcm2835-dma, id \"\"\r\n    gpio-out \"sysbus-irq\" 16\r\n    mmio ffffffffffffffff/0000000000001000\r\n    mmio ffffffffffffffff/0000000000000100\r\n  dev: bcm2835-sdhost, id \"\"\r\n    gpio-out \"sysbus-irq\" 1\r\n    mmio ffffffffffffffff/0000000000001000\r\n    bus: sd-bus\r\n      type bcm2835-sdhost-bus\r\n  dev: generic-sdhci, id \"\"\r\n    sd-spec-version = 2 (0x2)\r\n    uhs = 0 (0x0)\r\n    capareg = 91763892 (0x57834b4)\r\n    maxcurr = 0 (0x0)\r\n    pending-insert-quirk = false\r\n    dma = \"\"\r\n    bus: sd-bus\r\n      type sdhci-bus\r\n  dev: bcm2835-rng, id \"\"\r\n    mmio ffffffffffffffff/0000000000000010\r\n  dev: bcm2835-property, id \"\"\r\n    gpio-out \"sysbus-irq\" 1\r\n    board-rev = 0 (0x0)\r\n    mmio ffffffffffffffff/0000000000000010\r\n  dev: bcm2835-fb, id \"\"\r\n    gpio-out \"sysbus-irq\" 1\r\n    vcram-base = 0 (0x0)\r\n    vcram-size = 67108864 (0x4000000)\r\n    xres = 640 (0x280)\r\n    yres = 480 (0x1e0)\r\n    bpp = 16 (0x10)\r\n    pixo = 1 (0x1)\r\n    alpha = 2 (0x2)\r\n    mmio ffffffffffffffff/0000000000000010\r\n  dev: bcm2835-mbox, id \"\"\r\n    gpio-in \"\" 9\r\n    gpio-out \"sysbus-irq\" 1\r\n    mmio ffffffffffffffff/0000000000000400\r\n  dev: bcm2835-aux, id \"\"\r\n    gpio-out \"sysbus-irq\" 1\r\n    chardev = \"\"\r\n    mmio ffffffffffffffff/0000000000000100\r\n  dev: pl011, id \"\"\r\n    gpio-out \"sysbus-irq\" 6\r\n    chardev = \"\"\r\n    mmio ffffffffffffffff/0000000000001000\r\n  dev: bcm2835-sys-timer, id \"\"\r\n  dev: bcm2835-ic, id \"\"\r\n    gpio-out \"sysbus-irq\" 2\r\n    gpio-in \"arm-irq\" 8\r\n    gpio-in \"gpu-irq\" 64\r\n    mmio ffffffffffffffff/0000000000000200\r\n  dev: bcm2836-control, id \"\"\r\n    gpio-out \"fiq\" 4\r\n    gpio-out \"irq\" 4\r\n    gpio-in \"gpu-fiq\" 1\r\n    gpio-in \"gpu-irq\" 1\r\n    gpio-in \"cntvirq\" 4\r\n    gpio-in \"cnthpirq\" 4\r\n    gpio-in \"cntpnsirq\" 4\r\n    gpio-in \"cntpsirq\" 4\r\n    mmio ffffffffffffffff/0000000000000100\r\n")
make: *** [check-qtest-aarch64] Error 1
make: *** Waiting for unfinished jobs....
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: failed to initialize KVM: No such file or directory
---
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=92383140a09d4fbca2233e2841d5852e', '-u', '1001', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=1', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-nmtjk1iu/src/docker-src.2019-10-18-07.15.26.25682:/var/tmp/qemu:z,ro', 'qemu:centos7', '/var/tmp/qemu/run', 'test-quick']' returned non-zero exit status 2.
filter=--filter=label=com.qemu.instance.uuid=92383140a09d4fbca2233e2841d5852e
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-nmtjk1iu/src'
make: *** [docker-run-test-quick@centos7] Error 2

real    12m33.047s
user    0m8.541s


The full log is available at
http://patchew.org/logs/20191017225800.6946-1-f4bug@amsat.org/testing.docker-quick@centos7/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com