[Pdbg] [PATCH v5 00/19] Add sbefifo backend
Amitay Isaacs
amitay at ozlabs.org
Thu Apr 30 12:34:21 AEST 2020
This patch set adds per backend support of hardware drivers. The drivers
for targets in the system device tree which can be matched to the same
compatible string (e.g. ibm,power-thread) are assigned to specific
backend. When looking up a driver for a target in device tree, first
lookup the specific backend and then the default backend.
All targets in backend device tree, use compatible properties that
describe the hardware access (e.g. ibm,bmcfsi). There must be only
single compatible string assigned to targets in backend device trees.
All targets in system device tree, use compatible properties that describe
the hardware (ibm,power9-adu) and can have multiple compatible properties
(e.g. ibm,power-thread and ibm,power9-thread) to load different drivers
based on the backend.
For openbmc, all the hardware access is required to go via sbefifo.
Currently some of the operations are hacked in to go via sbefifo
(e.g. all thread operations). This patchset removes temporary hacks
and adds infrastructure to create sbefifo backend.
Also fix couple of bugs in libsbefifo.
V2 changes:
- Rebased on top of latest master
(resolved conflicts and add missing code due to upstream changes)
V3 changes:
- Compatible properties in system device tree updated as per defined
convetion (mentioned above)
V4 changes:
- When matching compatible property, search all strings at once
- All backend drivers are registered to default backend
- All system drivers with specific compatible string
(e.g. ibm,power9-thread) are registered to default backend
- Only system drivers with generic compatible string
(e.g. ibm,power-thread) are registered to specific backend
- Do not assume specific parent/child relationship for sbefifo, find
the sbefifo target based on pib index
V5 changes:
- Move parsing of PDBG_BACKEND_DRIVER along with backend detection
Amitay Isaacs (19):
libsbefifo: Fix compilation error for undefined variable
libsbefifo: Use the correct sized pointer
libpdbg: Add a private api to get current backend
libpdbg: Register hwunit drivers per backend
libpdbg: Use PDBG_BACKEND_DRIVER to specify drivers to load
libpdbg: Use const char * for filenames
dts: Backend device trees must use specific driver
dts: Rename ibm,processor -> ibm,power-proc
dts: Add a generic compatible string for core and thread
libpdbg: Add sbefifo backend
libpdbg: Add pib driver using sbefifo
libpdbg: Add thread driver using sbefifo
libpdbg: Add all thread procedures to pib target
libpdbg: Implement all thread procedures using sbefifo
libpdbg: Remove special case thread procedures using sbefifo
libpdbg: Drop thread procedures from chipop target
dts: Add sbefifo backend device tree
libpdbg: Enable sbefifo backend
main: Add sbefifo backend
Makefile.am | 1 +
libpdbg/adu.c | 4 +-
libpdbg/bmcfsi.c | 2 +-
libpdbg/cfam.c | 8 +-
libpdbg/chip.c | 64 ++---
libpdbg/cronus.c | 6 +-
libpdbg/device.c | 15 +-
libpdbg/dtb.c | 53 ++++-
libpdbg/fake.c | 8 +-
libpdbg/host.c | 2 +-
libpdbg/htm.c | 6 +-
libpdbg/hwunit.c | 51 +++-
libpdbg/hwunit.h | 13 +-
libpdbg/i2c.c | 2 +-
libpdbg/kernel.c | 4 +-
libpdbg/libpdbg.h | 7 +-
libpdbg/p8chip.c | 4 +-
libpdbg/p9_fapi_targets.c | 52 ++--
libpdbg/p9chip.c | 4 +-
libpdbg/sbefifo.c | 181 ++++++++++++--
libpdbg/target.h | 1 +
libsbefifo/cmd_scom.c | 4 +-
libsbefifo/operation.c | 5 +-
p8-fsi.dts.m4 | 6 +-
p8-i2c.dts.m4 | 4 +-
p8-kernel.dts.m4 | 4 +-
p8.dts.m4 | 2 +-
p9-fsi.dtsi.m4 | 4 +-
p9-sbefifo.dts.m4 | 86 +++++++
p9.dts | 484 +++++++++++++++++++-------------------
src/main.c | 3 +
31 files changed, 683 insertions(+), 407 deletions(-)
create mode 100644 p9-sbefifo.dts.m4
--
2.25.4
More information about the Pdbg
mailing list