[U-Boot] [RFC v2 0/2] arm64: zynqmp: pass a PMUFW config object
Luca Ceresoli
luca at lucaceresoli.net
Thu Mar 21 15:48:55 UTC 2019
Hi,
a long-standing issue in the ZynqMP users community is the management on
the PMU firmware configuration object when U-Boot SPL is used.
The Platform Management Unit (PMU) needs a configuration object (cfg obj)
to know how to operate the SoC. When using the "Xilinx workflow", the
Xilinx FSBL (First Stage Bootloader) has the SPL role. FSBL has a built-in
cfg obj and passes it to the PMUFW at runtime before jumping to U-Boot
proper.
This is just not implemented in the U-Boot code. The best workaround for
U-Boot SPL users is to patch [0] the PMUFW itself to have the cfg obj
built-in and self-load it. This approach has some drawbacks: among others,
it forces to use a different PMUFW binary for each hardware and hardware
configuation. It also makes it impossible to change the configuration after
boot.
This patchset is a first attempt at filling the gap by allowing U-Boot SPL
to load the cfg obj firmware at runtime. It adds a Kconfig string option to
point to the cfg obj in the form of a C file as produced by Xilinx tools
(usually called pm_cfg_obj.c). If the option is non-empty, code is enabled
to compile that file in U-Boot SPL and send the configuration to PMUFW.
The next development target will be to load the cfg obj from a binary blob
instead of compiling it from a .c file. With that in place, patch 1 will be
removed and patch 2 cleaned up.
These patches are tested on the UltraZed EV board.
Since RFC v1 [1] the loading has been reimplemented in SPL (it was in
U-Boot proper). Now it does not rely on ARM Trusted Firmware but instead
talks directly with the PMU via IPI mailboxes.
[0] https://github.com/topic-embedded-products/meta-topic/blob/master/recipes-bsp/pmu-firmware/pmu-firmware/0001-Load-XPm_ConfigObject-at-boot.patch
[1] https://lists.denx.de/pipermail/u-boot/2019-February/360450.html
Luca
Luca Ceresoli (2):
zynqmp: add minimal include files to build a pm_cfg_obj.c
arm64: zynqmp: spl: install a PMU firmware config object at runtime
board/xilinx/zynqmp/Kconfig | 26 ++++
board/xilinx/zynqmp/Makefile | 5 +
board/xilinx/zynqmp/pm_defs.h | 254 +++++++++++++++++++++++++++++++
board/xilinx/zynqmp/pmu_global.h | 0
board/xilinx/zynqmp/pmu_ipc.c | 116 ++++++++++++++
board/xilinx/zynqmp/pmu_ipc.h | 14 ++
board/xilinx/zynqmp/xil_types.h | 1 +
board/xilinx/zynqmp/zynqmp.c | 11 ++
8 files changed, 427 insertions(+)
create mode 100644 board/xilinx/zynqmp/pm_defs.h
create mode 100644 board/xilinx/zynqmp/pmu_global.h
create mode 100644 board/xilinx/zynqmp/pmu_ipc.c
create mode 100644 board/xilinx/zynqmp/pmu_ipc.h
create mode 100644 board/xilinx/zynqmp/xil_types.h
--
2.17.1
More information about the U-Boot
mailing list