All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [RFC v2 0/2] arm64: zynqmp: pass a PMUFW config object
@ 2019-03-21 15:48 Luca Ceresoli
  2019-03-21 15:48 ` [U-Boot] [RFC v2 1/2] zynqmp: add minimal include files to build a pm_cfg_obj.c Luca Ceresoli
  2019-03-21 15:48 ` [U-Boot] [RFC v2 2/2] arm64: zynqmp: spl: install a PMU firmware config object at runtime Luca Ceresoli
  0 siblings, 2 replies; 17+ messages in thread
From: Luca Ceresoli @ 2019-03-21 15:48 UTC (permalink / raw)
  To: u-boot

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

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

end of thread, other threads:[~2019-04-04 10:05 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-21 15:48 [U-Boot] [RFC v2 0/2] arm64: zynqmp: pass a PMUFW config object Luca Ceresoli
2019-03-21 15:48 ` [U-Boot] [RFC v2 1/2] zynqmp: add minimal include files to build a pm_cfg_obj.c Luca Ceresoli
2019-03-27 15:10   ` Michal Simek
2019-03-29 12:23     ` Luca Ceresoli
2019-03-29 16:47       ` Michal Simek
2019-03-21 15:48 ` [U-Boot] [RFC v2 2/2] arm64: zynqmp: spl: install a PMU firmware config object at runtime Luca Ceresoli
2019-03-27 15:03   ` Michal Simek
2019-03-29 12:22     ` Luca Ceresoli
2019-03-29 16:45       ` Michal Simek
2019-04-03 11:24       ` Mike Looijmans
2019-04-03 11:28         ` Michal Simek
2019-04-03 21:18         ` Luca Ceresoli
2019-04-04  5:38           ` Mike Looijmans
2019-04-04  6:49             ` Michal Simek
2019-04-04  7:52               ` Luca Ceresoli
2019-04-04  7:56                 ` Michal Simek
2019-04-04 10:05                   ` Mike Looijmans

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.