ppc/pnv: Add POWER9/10 chiptod model
commit9a69950feb0983cde8a97f8c7d1623e81b912412
authorNicholas Piggin <npiggin@gmail.com>
Thu, 11 Aug 2022 12:08:34 +0000 (11 22:08 +1000)
committerNicholas Piggin <npiggin@gmail.com>
Fri, 23 Feb 2024 13:24:43 +0000 (23 23:24 +1000)
treeb14bbf87f8beab39197cc47909462d14e0d84755
parentf6940474fa0db83e1e56a8d0ab955750815e2ccb
ppc/pnv: Add POWER9/10 chiptod model

The ChipTOD (for Time-Of-Day) is a chip pervasive facility in IBM POWER
(powernv) processors that keeps a time of day clock.

In particular for this model are facilities that initialise and start
the time of day clock, and that synchronise that clock to cores on the
chip, and to other chips. In this way, all cores on all chips can
synchronise timebase (TB).

This model implements functionality sufficient to run the skiboot
chiptod synchronisation procedure (with the following core timebase
state machine implementation). It does not modify the TB in the cores
where the real hardware would, because the QEMU ppc timebase
implementation is always synchronised acros all cores.

Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
hw/ppc/meson.build
hw/ppc/pnv_chiptod.c [new file with mode: 0644]
hw/ppc/trace-events
include/hw/ppc/pnv_chiptod.h [new file with mode: 0644]
include/hw/ppc/pnv_xscom.h