qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/7] ppc: pnv ChipTOD and various timebase fixes
@ 2023-11-24  6:39 Nicholas Piggin
  2023-11-24  6:39 ` [PATCH v2 1/7] target/ppc: Rename TBL to TB on 64-bit Nicholas Piggin
                   ` (6 more replies)
  0 siblings, 7 replies; 18+ messages in thread
From: Nicholas Piggin @ 2023-11-24  6:39 UTC (permalink / raw)
  To: qemu-ppc
  Cc: Nicholas Piggin, Daniel Henrique Barboza, Cédric Le Goater,
	Frédéric Barrat, qemu-devel

The chiptod/TFMR/state machine is not really tied to the other
time register fixes, but they touch some of the same code, and
logically same facility.

Changes since v1 of chiptod patches:
- Split hackish ChipTOD<->TFMR/TBST interface into its own patch
- Fix multi-socket addressing on P9 / chip ID mode (P10 works)
- Change chiptod primary/secondary setting to use class properties
- Add more comments to explain TOD overview and timebase state
  machine.
- SMT support for TFMR, some functionality is limited to thread 0.
- FIRMWARE_CONTROL_ERROR bit implemented in TFMR.
- Misc cleanups and bug fixes.

Since v1 of combined chiptod+timebase fixes series (most improvements
thanks to Cedric):
- Cut down unused ChipTOD FSM states, documented it, and added more
  state/transition checking.
- Only return running status if TOD FSM is RUNNING.
- Add reset function that sets TOD to ERROR state as per workbook.
- Put "TTYPE" broadcasting to other chip TODs into a class function.
- Put TOD-to-core TTYPE addressing into a class function.
- Move hacky addressing helpers private to pnv_chiptod.c
- Small changelog improvements.
- Minor changelog and comment typos and improvements, variable and
  function name improvements, format string fixes.

The hacky part, addressing core from chiptod, is still hacky. Is
there strong objection to it?

This successfully runs skiboot chiptod initialisation code with
POWER9 and POWER10 multi-socket, multi-core, SMT. That requires
skiboot 7.1 (not in-tree), otherwise chiptod init is skipped on
QEMU machines.

Thanks,
Nick

Nicholas Piggin (7):
  target/ppc: Rename TBL to TB on 64-bit
  target/ppc: Improve timebase register defines naming
  target/ppc: Fix move-to timebase SPR access permissions
  pnv/chiptod: Add POWER9/10 chiptod model
  pnv/chiptod: Implement the ChipTOD to Core transfer
  target/ppc: Implement core timebase state machine and TFMR
  target/ppc: Add SMT support to time facilities

 include/hw/ppc/pnv.h         |   2 +
 include/hw/ppc/pnv_chip.h    |   3 +
 include/hw/ppc/pnv_chiptod.h |  54 ++++
 include/hw/ppc/pnv_xscom.h   |   9 +
 target/ppc/cpu.h             |  50 ++-
 hw/ppc/pnv.c                 |  45 +++
 hw/ppc/pnv_chiptod.c         | 611 +++++++++++++++++++++++++++++++++++
 target/ppc/helper_regs.c     |  39 ++-
 target/ppc/ppc-qmp-cmds.c    |   4 +
 target/ppc/timebase_helper.c | 309 +++++++++++++++++-
 target/ppc/translate.c       |  42 ++-
 hw/ppc/meson.build           |   1 +
 hw/ppc/trace-events          |   4 +
 13 files changed, 1148 insertions(+), 25 deletions(-)
 create mode 100644 include/hw/ppc/pnv_chiptod.h
 create mode 100644 hw/ppc/pnv_chiptod.c

-- 
2.42.0



^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2023-11-24 12:53 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-24  6:39 [PATCH v2 0/7] ppc: pnv ChipTOD and various timebase fixes Nicholas Piggin
2023-11-24  6:39 ` [PATCH v2 1/7] target/ppc: Rename TBL to TB on 64-bit Nicholas Piggin
2023-11-24  7:11   ` Cédric Le Goater
2023-11-24  6:39 ` [PATCH v2 2/7] target/ppc: Improve timebase register defines naming Nicholas Piggin
2023-11-24  7:12   ` Cédric Le Goater
2023-11-24  6:39 ` [PATCH v2 3/7] target/ppc: Fix move-to timebase SPR access permissions Nicholas Piggin
2023-11-24  7:12   ` Cédric Le Goater
2023-11-24  6:39 ` [PATCH v2 4/7] pnv/chiptod: Add POWER9/10 chiptod model Nicholas Piggin
2023-11-24  6:46   ` Nicholas Piggin
2023-11-24  7:12   ` Cédric Le Goater
2023-11-24  7:16   ` Cédric Le Goater
2023-11-24 11:40     ` Nicholas Piggin
2023-11-24 12:10       ` Cédric Le Goater
2023-11-24  6:39 ` [PATCH v2 5/7] pnv/chiptod: Implement the ChipTOD to Core transfer Nicholas Piggin
2023-11-24  7:18   ` Cédric Le Goater
2023-11-24 12:52   ` Cédric Le Goater
2023-11-24  6:40 ` [PATCH v2 6/7] target/ppc: Implement core timebase state machine and TFMR Nicholas Piggin
2023-11-24  6:40 ` [PATCH v2 7/7] target/ppc: Add SMT support to time facilities Nicholas Piggin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).