Skip to content

RFC OPAL V4

Nicholas Piggin linuxppc-dev oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest10 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10kallsyms: architecture specific symbol lookupsinclude/linux/kallsyms.h kernel/kallsyms.c lib/Kconfig+35 -10 replies
2/10powerpc/powernv: Wire up OPAL address lookupsarch/powerpc/Kconfig arch/powerpc/include/asm/opal-api.h arch/powerpc/include/asm/opal.h +2 more+49 -10 replies
3/10powerpc/powernv: Use OPAL_REPORT_TRAP to cope with trap interrupts from OPALarch/powerpc/include/asm/opal-api.h arch/powerpc/include/asm/opal.h arch/powerpc/kernel/traps.c +1 more+37 -120 replies
4/10powerpc/powernv: avoid polling in opal_get_charsarch/powerpc/platforms/powernv/opal.c+1 -40 replies
5/10powerpc/powernv: Don't translate kernel addresses to real addresses for OPALarch/powerpc/perf/imc-pmu.c arch/powerpc/platforms/powernv/npu-dma.c arch/powerpc/platforms/powernv/opal-dump.c +13 more+29 -300 replies
6/10powerpc/powernv: opal use new opal call entry point if it existsarch/powerpc/boot/opal.c arch/powerpc/platforms/powernv/opal-call.c arch/powerpc/platforms/powernv/opal.c+60 -111 reply
7/10powerpc/powernv: Add OPAL_FIND_VM_AREA APIarch/powerpc/include/asm/opal-api.h arch/powerpc/include/asm/opal.h arch/powerpc/platforms/powernv/opal-call.c+17 -10 replies
8/10powerpc/powernv: Set up an mm context to call OPAL inarch/powerpc/platforms/powernv/opal-call.c arch/powerpc/platforms/powernv/opal.c+137 -30 replies
9/10powerpc/powernv: OPAL V4 OS servicesarch/powerpc/include/asm/opal-api.h arch/powerpc/include/asm/opal.h arch/powerpc/platforms/powernv/opal-call.c +1 more+44 -10 replies
10/10powerpc/powernv: OPAL V4 Implement vm_map/unmap servicearch/powerpc/include/asm/opal-api.h arch/powerpc/platforms/powernv/opal.c+59 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 00/10] OPAL V4

"OPAL V4" is a proposed new approach to running and calling PowerNV OPAL firmware.

OPAL calls use the caller's (kernel) stack, which vastly simplifies re-entrancy concerns around doing things like idle and machine check OPAL drivers.

The OS can get at symbol and assert metadata to help with debugging firmware.

OPAL may be called (and will run in) virtual mode in its own address space.

And the operating system provides some services to the firmware, message logging, for example.

This fairly close to the point where we could run OPAL in user-mode with a few services (scv could be used to call back to the OS) for privileged instructions, we may yet do this, but one thing that's stopped me is it would require a slower API. As it is now with LE skiboot and LE Linux, the OPAL call is basically a shared-library function call, which is fast enough that it's feasible to implement a performant CPU idle driver, which is a significant motivation.

Anyway this is up and running, coming together pretty well just needs a bit of polishing and more documentation. I'll post the skiboot patches on the skiboot list.

Nicholas Piggin (10):
kallsyms: architecture specific symbol lookups powerpc/powernv: Wire up OPAL address lookups powerpc/powernv: Use OPAL_REPORT_TRAP to cope with trap interrupts
from OPAL
powerpc/powernv: avoid polling in opal_get_chars powerpc/powernv: Don't translate kernel addresses to real addresses
for OPAL
powerpc/powernv: opal use new opal call entry point if it exists powerpc/powernv: Add OPAL_FIND_VM_AREA API powerpc/powernv: Set up an mm context to call OPAL in powerpc/powernv: OPAL V4 OS services
powerpc/powernv: OPAL V4 Implement vm_map/unmap service

 arch/powerpc/Kconfig                          |   1 +
 arch/powerpc/boot/opal.c                      |   5 +
 arch/powerpc/include/asm/opal-api.h           |  29 +-
 arch/powerpc/include/asm/opal.h               |   8 +
 arch/powerpc/kernel/traps.c                   |  39 ++-
 arch/powerpc/perf/imc-pmu.c                   |   4 +-
 arch/powerpc/platforms/powernv/npu-dma.c      |   2 +-
 arch/powerpc/platforms/powernv/opal-call.c    |  58 ++++
 arch/powerpc/platforms/powernv/opal-dump.c    |   2 +-
 arch/powerpc/platforms/powernv/opal-elog.c    |   4 +-
 arch/powerpc/platforms/powernv/opal-flash.c   |   6 +-
 arch/powerpc/platforms/powernv/opal-hmi.c     |   2 +-
 arch/powerpc/platforms/powernv/opal-nvram.c   |   4 +-
 .../powerpc/platforms/powernv/opal-powercap.c |   2 +-
 arch/powerpc/platforms/powernv/opal-psr.c     |   2 +-
 arch/powerpc/platforms/powernv/opal-xscom.c   |   2 +-
 arch/powerpc/platforms/powernv/opal.c         | 289 ++++++++++++++++--
 arch/powerpc/platforms/powernv/pci-ioda.c     |   2 +-
 arch/powerpc/sysdev/xive/native.c             |   2 +-
 drivers/char/powernv-op-panel.c               |   3 +-
 drivers/i2c/busses/i2c-opal.c                 |  12 +-
 drivers/mtd/devices/powernv_flash.c           |   4 +-
 include/linux/kallsyms.h                      |  20 ++
 kernel/kallsyms.c                             |  13 +-
 lib/Kconfig                                   |   3 +
 25 files changed, 461 insertions(+), 57 deletions(-)
Signature · 1 line
2.23.0