All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Ceresoli <luca@lucaceresoli.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC v2 0/2] arm64: zynqmp: pass a PMUFW config object
Date: Thu, 21 Mar 2019 16:48:55 +0100	[thread overview]
Message-ID: <20190321154857.29892-1-luca@lucaceresoli.net> (raw)

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

             reply	other threads:[~2019-03-21 15:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-21 15:48 Luca Ceresoli [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190321154857.29892-1-luca@lucaceresoli.net \
    --to=luca@lucaceresoli.net \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.