mbox series

[0/6] Add Nuvoton NPCM730/NPCM750 SoCs and two BMC machines

Message ID 20200521192133.127559-1-hskinnemoen@google.com (mailing list archive)
Headers show
Series Add Nuvoton NPCM730/NPCM750 SoCs and two BMC machines | expand

Message

Havard Skinnemoen May 21, 2020, 7:21 p.m. UTC
This patch series models enough of the Nuvoton NPCM730 and NPCM750 SoCs to boot
a minimal Linux kernel. This includes device models for:

  - Global Configuration Registers
  - Clock Control
  - Timers

These modules, along with the existing Cortex A9 CPU cores and built-in
peripherals, are integrated into a NPCM730 or NPCM750 SoC, which in turn form
the foundation for the quanta-gsj and npcm750-evb machines, respectively. The
two SoCs are very similar; the only difference is that NPCM730 is missing some
peripherals that NPCM750 has, and which are not considered essential for
datacenter use (e.g. graphics controllers). For more information, see

https://www.nuvoton.com/products/cloud-computing/ibmc/

Both quanta-gsj and npcm750-evb correspond to real boards supported by OpenBMC.
While this initial series uses a stripped-down kernel for testing, future
series will be tested using OpenBMC images built from public sources. I'm
currently putting the finishing touches on flash controller support, which is
necessary to boot a full OpenBMC image, and will be enabled by the next series.

The patches in this series were developed by Google and reviewed by Nuvoton. We
will be maintaining the machine and peripheral support together.

The data sheet for these SoCs is not generally available. Please let me know if
more comments are needed to understand the device behavior.

Thanks for reviewing,

Havard

Havard Skinnemoen (6):
  npcm7xx: Add config symbol
  hw/misc: Add NPCM7xx System Global Control Registers device model
  hw/misc: Add NPCM7xx Clock Controller device model
  hw/timer: Add NPCM7xx Timer device model
  hw/arm: Add NPCM730 and NPCM750 SoC models
  hw/arm: Add two NPCM7xx-based machines

 MAINTAINERS                      |  12 +
 default-configs/arm-softmmu.mak  |   1 +
 hw/arm/Kconfig                   |   8 +
 hw/arm/Makefile.objs             |   1 +
 hw/arm/npcm7xx.c                 | 328 +++++++++++++++++++++++
 hw/arm/npcm7xx_boards.c          | 108 ++++++++
 hw/misc/Makefile.objs            |   2 +
 hw/misc/npcm7xx_clk.c            | 210 +++++++++++++++
 hw/misc/npcm7xx_gcr.c            | 160 +++++++++++
 hw/misc/trace-events             |   8 +
 hw/timer/Makefile.objs           |   1 +
 hw/timer/npcm7xx_timer.c         | 437 +++++++++++++++++++++++++++++++
 hw/timer/trace-events            |   5 +
 include/hw/arm/npcm7xx.h         |  98 +++++++
 include/hw/misc/npcm7xx_clk.h    |  65 +++++
 include/hw/misc/npcm7xx_gcr.h    |  74 ++++++
 include/hw/timer/npcm7xx_timer.h |  95 +++++++
 17 files changed, 1613 insertions(+)
 create mode 100644 hw/arm/npcm7xx.c
 create mode 100644 hw/arm/npcm7xx_boards.c
 create mode 100644 hw/misc/npcm7xx_clk.c
 create mode 100644 hw/misc/npcm7xx_gcr.c
 create mode 100644 hw/timer/npcm7xx_timer.c
 create mode 100644 include/hw/arm/npcm7xx.h
 create mode 100644 include/hw/misc/npcm7xx_clk.h
 create mode 100644 include/hw/misc/npcm7xx_gcr.h
 create mode 100644 include/hw/timer/npcm7xx_timer.h

Comments

no-reply@patchew.org May 22, 2020, 4:57 a.m. UTC | #1
Patchew URL: https://patchew.org/QEMU/20200521192133.127559-1-hskinnemoen@google.com/



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 ===

Broken pipe
/tmp/qemu-test/src/tests/qtest/libqtest.c:166: kill_qemu() tried to terminate QEMU process but encountered exit status 1 (expected 0)
  TEST    iotest-qcow2: 089
ERROR - too few tests run (expected 68, got 21)
make: *** [check-qtest-aarch64] Error 1
make: *** Waiting for unfinished jobs....
  TEST    iotest-qcow2: 090
  TEST    iotest-qcow2: 097
---
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=935cc7f201a94a2e865cf081636a2cf4', '-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-evkby52n/src/docker-src.2020-05-22-00.39.52.17361:/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=935cc7f201a94a2e865cf081636a2cf4
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-evkby52n/src'
make: *** [docker-run-test-quick@centos7] Error 2

real    17m34.256s
user    0m9.006s


The full log is available at
http://patchew.org/logs/20200521192133.127559-1-hskinnemoen@google.com/testing.docker-quick@centos7/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Havard Skinnemoen June 8, 2020, 10:14 p.m. UTC | #2
On Thu, May 21, 2020 at 12:21 PM Havard Skinnemoen <hskinnemoen@google.com>
wrote:

> This patch series models enough of the Nuvoton NPCM730 and NPCM750 SoCs to
> boot
> a minimal Linux kernel. This includes device models for:
>

Does anyone have comments on this series? I'm currently finishing up a
second patch series that adds flash support and a few other things so qemu
can boot a full OpenBMC flash image built for npcm7xx.

If you prefer, I can combine them both into one series and send it to the
list.

This series can be found here:
https://patchwork.kernel.org/project/qemu-devel/list/?series=291809

Thanks,

Havard
Joel Stanley June 9, 2020, 1:39 a.m. UTC | #3
On Mon, 8 Jun 2020 at 22:15, Havard Skinnemoen <hskinnemoen@google.com> wrote:
>
> On Thu, May 21, 2020 at 12:21 PM Havard Skinnemoen <hskinnemoen@google.com> wrote:
>>
>> This patch series models enough of the Nuvoton NPCM730 and NPCM750 SoCs to boot
>> a minimal Linux kernel. This includes device models for:
>
>
> Does anyone have comments on this series? I'm currently finishing up a second patch series that adds flash support and a few other things so qemu can boot a full OpenBMC flash image built for npcm7xx.

I had a look and they appear good to me. Note that I'm less in to the
gory details of Qemu than some of our other reviewers, so you should
seek  a more detailed review from someone else.

I look forward further support so I can test the OpenBMC kernel
against Nuvoton boards in the same way as the Aspeed ones.

Cheers,

Joel

>
> If you prefer, I can combine them both into one series and send it to the list.
>
> This series can be found here: https://patchwork.kernel.org/project/qemu-devel/list/?series=291809
>
> Thanks,
>
> Havard
Cédric Le Goater June 9, 2020, 7:31 a.m. UTC | #4
On 6/9/20 12:14 AM, Havard Skinnemoen wrote:
> On Thu, May 21, 2020 at 12:21 PM Havard Skinnemoen <hskinnemoen@google.com <mailto:hskinnemoen@google.com>> wrote:
> 
>     This patch series models enough of the Nuvoton NPCM730 and NPCM750 SoCs to boot
>     a minimal Linux kernel. This includes device models for:
> 
> 
> Does anyone have comments on this series? I'm currently finishing up a second patch series that adds flash support and a few other things so qemu can boot a full OpenBMC flash image built for npcm7xx.
> 
> If you prefer, I can combine them both into one series and send it to the list.

The first series was nicely presented I think, but you can extend it in v2.
Documentation needs an update in :

  docs/system/target-arm.rst

Thanks,

C.
Peter Maydell June 9, 2020, 9:38 a.m. UTC | #5
On Tue, 9 Jun 2020 at 08:31, Cédric Le Goater <clg@kaod.org> wrote:
> The first series was nicely presented I think, but you can extend it in v2.
> Documentation needs an update in :
>
>   docs/system/target-arm.rst

To expand on that: the new boards should have at least some basic
documentation in a new docs/system/arm/something.rst (we have
one .rst file usually for each "family" of boards which are
similar enough to make sense to document as a group), which is
added to the toctree in target-arm.rst (note that it is supposed
to be kept in alpha-order-of-document-title-text). aspeed.rst should
give an idea of what ought to be documented: a basic summary of
what the machine is, what is supported, what is not implemented,
any machine options that the board has, that sort of thing.

thanks
-- PMM
Havard Skinnemoen June 9, 2020, 4:30 p.m. UTC | #6
On Tue, Jun 9, 2020 at 2:38 AM Peter Maydell <peter.maydell@linaro.org>
wrote:

> On Tue, 9 Jun 2020 at 08:31, Cédric Le Goater <clg@kaod.org> wrote:
> > The first series was nicely presented I think, but you can extend it in
> v2.
> > Documentation needs an update in :
> >
> >   docs/system/target-arm.rst
>
> To expand on that: the new boards should have at least some basic
> documentation in a new docs/system/arm/something.rst (we have
> one .rst file usually for each "family" of boards which are
> similar enough to make sense to document as a group), which is
> added to the toctree in target-arm.rst (note that it is supposed
> to be kept in alpha-order-of-document-title-text). aspeed.rst should
> give an idea of what ought to be documented: a basic summary of
> what the machine is, what is supported, what is not implemented,
> any machine options that the board has, that sort of thing.
>

Thanks for the feedback. I will include documentation in v2 of this
patchset, and also address your other comments.

Havard
Havard Skinnemoen June 9, 2020, 4:36 p.m. UTC | #7
On Mon, Jun 8, 2020 at 6:39 PM Joel Stanley <joel@jms.id.au> wrote:

> I had a look and they appear good to me. Note that I'm less in to the
> gory details of Qemu than some of our other reviewers, so you should
> seek  a more detailed review from someone else.
>
> I look forward further support so I can test the OpenBMC kernel
> against Nuvoton boards in the same way as the Aspeed ones.
>

Great to hear that, and thanks for your review. I hope to post an updated
patchset soon.

Havard