summaryrefslogtreecommitdiff
path: root/drivers/core
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2022-05-02 19:02:44 -0400
committerTom Rini <[email protected]>2022-05-02 19:02:44 -0400
commitedb6982b5800603a67ff3710ef074ff7ac86e5ea (patch)
treefc34fe0a38d6f3884c60993ce06fb0f58536d60a /drivers/core
parent2406a91734eb4eeeb50fdfaeff65d0b7f464dba9 (diff)
parenta31eff3015afc80429e2734781eaf52e48ab6663 (diff)
Merge branch '2022-05-02-add-verifying-program-loader'
To quote the author: U-Boot provides a verified-boot feature based around FIT, but there is no standard way of implementing it for a board. At present the various required pieces must be built up separately, to produce a working implementation. In particular, there is no built-in support for selecting A/B boot or recovery mode. This series introduces VPL, a verified program loader phase for U-Boot. Its purpose is to run the verified-boot process and decide which SPL binary should be run. It is critical that this decision happens before SPL runs, since SPL sets up SDRAM and we need to be able to update the SDRAM-init code in the field. Adding VPL into the boot flow provides a standard place to implement verified boot. This series includes the phase itself, some useful Kconfig options and a sandbox_vpl build for sandbox. No verfied-boot support is provided in this series. Most of the patches in this series are fixes and improvements to docs and various Kconfig conditions for SPL.
Diffstat (limited to 'drivers/core')
-rw-r--r--drivers/core/Kconfig54
-rw-r--r--drivers/core/Makefile2
2 files changed, 54 insertions, 2 deletions
diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig
index 5c3400417f9..408a8d8e28b 100644
--- a/drivers/core/Kconfig
+++ b/drivers/core/Kconfig
@@ -35,6 +35,16 @@ config TPL_DM
CONFIG_SPL_SYS_MALLOC_F_LEN for more details on how to enable it.
Disable this for very small implementations.
+config VPL_DM
+ bool "Enable Driver Model for VPL"
+ depends on DM && VPL
+ default y if SPL_DM
+ help
+ Enable driver model in VPL. You will need to provide a
+ suitable malloc() implementation. If you are not using the
+ full malloc() enabled by CONFIG_SYS_SPL_MALLOC_START,
+ consider using CONFIG_SYS_MALLOC_SIMPLE.
+
config DM_WARN
bool "Enable warnings in driver model"
depends on DM
@@ -121,6 +131,15 @@ config SPL_DM_SEQ_ALIAS
numbered devices (e.g. serial0 = &serial0). This feature can be
disabled if it is not required, to save code space in SPL.
+config VPL_DM_SEQ_ALIAS
+ bool "Support numbered aliases in device tree in VPL"
+ depends on VPL_DM
+ default y
+ help
+ Most boards will have a '/aliases' node containing the path to
+ numbered devices (e.g. serial0 = &serial0). This feature can be
+ disabled if it is not required, to save code space in VPL.
+
config SPL_DM_INLINE_OFNODE
bool "Inline some ofnode functions which are seldom used in SPL"
depends on SPL_DM
@@ -176,6 +195,16 @@ config TPL_REGMAP
support any bus type (I2C, SPI) but so far this only supports
direct memory access.
+config VPL_REGMAP
+ bool "Support register maps in VPL"
+ depends on VPL_DM
+ help
+ Hardware peripherals tend to have one or more sets of registers
+ which can be accessed to control the hardware. A register map
+ models this with a simple read/write interface. It can in principle
+ support any bus type (I2C, SPI) but so far this only supports
+ direct memory access.
+
config SYSCON
bool "Support system controllers"
depends on REGMAP
@@ -196,7 +225,16 @@ config SPL_SYSCON
config TPL_SYSCON
bool "Support system controllers in TPL"
- depends on TPL_REGMAP
+ depends on SPL_REGMAP
+ help
+ Many SoCs have a number of system controllers which are dealt with
+ as a group by a single driver. Some common functionality is provided
+ by this uclass, including accessing registers via regmap and
+ assigning a unique number to each.
+
+config VPL_SYSCON
+ bool "Support system controllers in VPL"
+ depends on VPL_REGMAP
help
Many SoCs have a number of system controllers which are dealt with
as a group by a single driver. Some common functionality is provided
@@ -292,6 +330,20 @@ config SPL_OF_TRANSLATE
used for the address translation. This function is faster and
smaller in size than fdt_translate_address().
+config VPL_OF_TRANSLATE
+ bool "Translate addresses using fdt_translate_address in SPL"
+ depends on SPL_DM && VPL_OF_CONTROL
+ help
+ If this option is enabled, the reg property will be translated
+ using the fdt_translate_address() function. This is necessary
+ on some platforms (e.g. MVEBU) using complex "ranges"
+ properties in many nodes. As this translation is not handled
+ correctly in the default simple_bus_translate() function.
+
+ If this option is not enabled, simple_bus_translate() will be
+ used for the address translation. This function is faster and
+ smaller in size than fdt_translate_address().
+
config TRANSLATION_OFFSET
bool "Platforms specific translation offset"
depends on DM && OF_CONTROL
diff --git a/drivers/core/Makefile b/drivers/core/Makefile
index 7099073a533..bce0a3f65cb 100644
--- a/drivers/core/Makefile
+++ b/drivers/core/Makefile
@@ -5,7 +5,7 @@
obj-y += device.o fdtaddr.o lists.o root.o uclass.o util.o tag.o
obj-$(CONFIG_$(SPL_TPL_)ACPIGEN) += acpi.o
obj-$(CONFIG_$(SPL_TPL_)DEVRES) += devres.o
-obj-$(CONFIG_$(SPL_)DM_DEVICE_REMOVE) += device-remove.o
+obj-$(CONFIG_$(SPL_TPL_)DM_DEVICE_REMOVE) += device-remove.o
obj-$(CONFIG_$(SPL_)SIMPLE_BUS) += simple-bus.o
obj-$(CONFIG_SIMPLE_PM_BUS) += simple-pm-bus.o
obj-$(CONFIG_DM) += dump.o