| 47cf5d3f | 08-Dec-2019 |
Etienne Carriere <etienne.carriere@st.com> |
stm32mp1: introduce shared resources support
STM32MP1 SoC includes peripheral interfaces that can be assigned to the secure world, or that can be opened to the non-secure world.
This change introdu
stm32mp1: introduce shared resources support
STM32MP1 SoC includes peripheral interfaces that can be assigned to the secure world, or that can be opened to the non-secure world.
This change introduces the basics of a driver that manages such resources which assignation is done at run time. It currently offers API functions that state whether a service exposed to non-secure world has permission to access a targeted clock or reset controller.
Change-Id: Iff20028f41586bc501085488c03546ffe31046d8 Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
show more ...
|
| 7b3a46f0 | 10-Apr-2020 |
Etienne Carriere <etienne.carriere@st.com> |
plat/stm32mp1: sp_min relies on etzpc driver
Use ETZPC driver to configure secure aware interfaces to assign them to non-secure world. Sp_min also configures BootROM resources and SYSRAM to assign b
plat/stm32mp1: sp_min relies on etzpc driver
Use ETZPC driver to configure secure aware interfaces to assign them to non-secure world. Sp_min also configures BootROM resources and SYSRAM to assign both to secure world only.
Define stm32mp15 SoC identifiers for the platform specific DECPROT instances.
Change-Id: I3bec9f47b04bcba3929e4df886ddb1d5ff843089 Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
show more ...
|
| ec29ce67 | 01-Jun-2020 |
Mark Dykes <mardyk01@review.trustedfirmware.org> |
Merge "drivers: stm32_reset adapt interface to timeout argument" into integration |
| 45c70e68 | 08-Dec-2019 |
Etienne Carriere <etienne.carriere@st.com> |
drivers: stm32_reset adapt interface to timeout argument
Changes stm32mp1 reset driver to API to add a timeout argument to stm32mp_reset_assert() and stm32mp_reset_deassert() and a return value.
Wi
drivers: stm32_reset adapt interface to timeout argument
Changes stm32mp1 reset driver to API to add a timeout argument to stm32mp_reset_assert() and stm32mp_reset_deassert() and a return value.
With a supplied timeout, the functions wait the target reset state is reached before returning. With a timeout of zero, the functions simply load target reset state in SoC interface and return without waiting.
Helper functions stm32mp_reset_set() and stm32mp_reset_release() use a zero timeout and return without a return code.
This change updates few stm32 drivers and plat/stm32mp1 blé_plat_setup.c accordingly without any functional change. functional change.
Change-Id: Ia1a73a15125d3055fd8739c125b70bcb9562c27f Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
show more ...
|
| ccc199ed | 25-Apr-2020 |
Etienne Carriere <etienne.carriere@st.com> |
plat/stm32mp1: fdt helpers for secure aware gpio bank
New helper functions to get GPIO banks configuration from the FDT.
stm32_get_gpio_bank_pinctrl_node() allows stm32mp platforms to differentiate
plat/stm32mp1: fdt helpers for secure aware gpio bank
New helper functions to get GPIO banks configuration from the FDT.
stm32_get_gpio_bank_pinctrl_node() allows stm32mp platforms to differentiate specific GPIO banks when these are defined with a specific path in the FDT.
fdt_get_gpio_bank_pin_count() returns the number of pins in a GPIO bank as it depends on the SoC variant.
Change-Id: I4481774152b3c6bf35bf986f58e357c2f9c19176 Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
show more ...
|
| c0ea3b1b | 02-Dec-2019 |
Etienne Carriere <etienne.carriere@st.com> |
plat/st: move GPIO bank helper function to platform source files
Relation between GPIO banks and their base address and offset address if platform dependent. This change moves helper functions stm32
plat/st: move GPIO bank helper function to platform source files
Relation between GPIO banks and their base address and offset address if platform dependent. This change moves helper functions stm32_get_gpio_bank_base() and stm32_get_gpio_bank_offset() from plat/st/common to plat/st/stm32mp1/.
Change-Id: Id3d03e585746aa5509c6fab7d88183a92d561e3f Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
show more ...
|
| 7a61114d | 09-Apr-2020 |
Andre Przywara <andre.przywara@arm.com> |
plat/stm32: Use generic fdt_get_stdout_node_offset()
Now that we have an implementation for getting the node offset of the stdout-path property in the generic fdt_wrappers code, use that to replace
plat/stm32: Use generic fdt_get_stdout_node_offset()
Now that we have an implementation for getting the node offset of the stdout-path property in the generic fdt_wrappers code, use that to replace the current ST platform specific implementation.
Change-Id: I5dd05684e7ca3cb563b5f71c885e1066393e057e Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| 7ad6d362 | 26-Mar-2020 |
Andre Przywara <andre.przywara@arm.com> |
plat/stm32: Use generic fdt_get_reg_props_by_name()
The STM32 platform port parse DT nodes to find base address to peripherals. It does this by using its own implementation, even though this functio
plat/stm32: Use generic fdt_get_reg_props_by_name()
The STM32 platform port parse DT nodes to find base address to peripherals. It does this by using its own implementation, even though this functionality is generic and actually widely useful outside of the STM32 code.
Re-implement fdt_get_reg_props_by_name() on top of the newly introduced fdt_get_reg_props_by_index() function, and move it to fdt_wrapper.c. This is removes the assumption that #address-cells and #size-cells are always one.
Change-Id: I6d584930262c732b6e0356d98aea50b2654f789d Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| be858cff | 26-Mar-2020 |
Andre Przywara <andre.przywara@arm.com> |
plat/stm32: Implement fdt_read_uint32_default() as a wrapper
The STM32 platform code uses its own set of FDT helper functions, although some of them are fairly generic.
Remove the implementation of
plat/stm32: Implement fdt_read_uint32_default() as a wrapper
The STM32 platform code uses its own set of FDT helper functions, although some of them are fairly generic.
Remove the implementation of fdt_read_uint32_default() and implement it on top of the newly introduced fdt_read_uint32() function, then convert all users over.
This also fixes two callers, which were slightly abusing the "default" semantic.
Change-Id: I570533362b4846e58dd797a92347de3e0e5abb75 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| 52a616b4 | 26-Mar-2020 |
Andre Przywara <andre.przywara@arm.com> |
plat/stm32: Use generic fdt_read_uint32_array() implementation
The device tree parsing code for the STM32 platform is using its own FDT helper functions, some of them being rather generic. In partic
plat/stm32: Use generic fdt_read_uint32_array() implementation
The device tree parsing code for the STM32 platform is using its own FDT helper functions, some of them being rather generic. In particular the existing fdt_read_uint32_array() implementation is now almost identical to the new generic code in fdt_wrappers.c, so we can remove the ST specific version and adjust the existing callers.
Compared to the original ST implementation the new version takes a pointer to the DTB as the first argument, and also swaps the order of the number of cells and the pointer.
Change-Id: Id06b0f1ba4db1ad1f733be40e82c34f46638551a Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| 5813e6ed | 26-Feb-2020 |
Yann Gautier <yann.gautier@st.com> |
stm32mp1: use stm32mp_get_ddr_ns_size() function
Instead of using dt_get_ddr_size() and withdrawing the secure and shared memory areas, use stm32mp_get_ddr_ns_size() function.
Change-Id: I5608fd787
stm32mp1: use stm32mp_get_ddr_ns_size() function
Instead of using dt_get_ddr_size() and withdrawing the secure and shared memory areas, use stm32mp_get_ddr_ns_size() function.
Change-Id: I5608fd7873589ea0e1262ba7d2ee3e52b53d9a7d Signed-off-by: Yann Gautier <yann.gautier@st.com>
show more ...
|
| 9c52e69f | 17-Dec-2019 |
Yann Gautier <yann.gautier@st.com> |
stm32mp1: set XN attribute for some areas in BL2
DTB and BL32 area should not be set as executable in MMU during BL2 execution, hence set those areas as MT_RO_DATA.
Change-Id: I87c47a1e7fda761e541e
stm32mp1: set XN attribute for some areas in BL2
DTB and BL32 area should not be set as executable in MMU during BL2 execution, hence set those areas as MT_RO_DATA.
Change-Id: I87c47a1e7fda761e541ec98a5b294588384d31db Signed-off-by: Yann Gautier <yann.gautier@st.com>
show more ...
|
| 84686ba3 | 10-Jan-2020 |
Yann Gautier <yann.gautier@st.com> |
stm32mp1: dynamically map DDR later and non-cacheable during its test
A speculative accesses to DDR could be done whereas it was not reachable and could lead to bus stall. To correct this the dynami
stm32mp1: dynamically map DDR later and non-cacheable during its test
A speculative accesses to DDR could be done whereas it was not reachable and could lead to bus stall. To correct this the dynamic mapping in MMU is used. A first mapping is done for DDR tests with MT_NON_CACHEABLE attribute, once DDR access is setup. It is then unmapped and a new mapping DDR is done with cacheable attribute (through MT_MEMORY) to speed-up BL33 (or OP-TEE) load.
The disabling of cache during DDR tests is also removed, as now useless. A call to new functions stm32mp_{,un}map_ddr_non_cacheable() is done instead.
PLAT_XLAT_TABLES_DYNAMIC is activated globally as used in BL2 and BL32.
BL33 max size is also updated to take into account the secure and shared memory areas. Those are used in OP-TEE case.
Change-Id: I22c48b4a48255ee264991c34ecbb15bfe87e67c3 Signed-off-by: Yann Gautier <yann.gautier@st.com>
show more ...
|
| e6cc3ccf | 26-Feb-2020 |
Yann Gautier <yann.gautier@st.com> |
stm32mp1: add a function to get non-secure DDR size
This function gets the DDR size from DT, and withdraws (if defined) the sizes of secure DDR and shared memory areas. This function also checks DT
stm32mp1: add a function to get non-secure DDR size
This function gets the DDR size from DT, and withdraws (if defined) the sizes of secure DDR and shared memory areas. This function also checks DT values fits the default DDR range. This non-secure memory is available for BL33 and non-secure OS.
Change-Id: I162ae5e990a0f9b6b7d07e539de029f1d61a391b Signed-off-by: Yann Gautier <yann.gautier@st.com>
show more ...
|
| e9d1e5af | 18-Mar-2020 |
Yann Gautier <yann.gautier@st.com> |
plat/st: correctly check pwr-regulators node
This warning was issued by cppcheck in our downstream code: [plat/st/common/stm32mp_dt.c:629] -> [plat/st/common/stm32mp_dt.c:634]: (warning) Identical
plat/st: correctly check pwr-regulators node
This warning was issued by cppcheck in our downstream code: [plat/st/common/stm32mp_dt.c:629] -> [plat/st/common/stm32mp_dt.c:634]: (warning) Identical condition 'node<0', second condition is always false
The second test has to check variable pwr_regulators_node.
Change-Id: I4a20c4a3ac0ef0639c2df36309d90a61c02b511f Signed-off-by: Yann Gautier <yann.gautier@st.com>
show more ...
|
| cd4941de | 11-Mar-2020 |
Yann Gautier <yann.gautier@st.com> |
plat/st: correct static analysis tool warning
Correct the following sparse warnings: plat/st/common/stm32mp_dt.c:103:5: warning: symbol 'fdt_get_node_parent_address_cells' was not declared. Should
plat/st: correct static analysis tool warning
Correct the following sparse warnings: plat/st/common/stm32mp_dt.c:103:5: warning: symbol 'fdt_get_node_parent_address_cells' was not declared. Should it be static? plat/st/common/stm32mp_dt.c:123:5: warning: symbol 'fdt_get_node_parent_size_cells' was not declared. Should it be static?
As those 2 functions are only used by assert(), put them under ENABLE_ASSERTIONS flag.
Change-Id: Iad721f12128df83a3de3f53e7920a9c1dce64c56 Signed-off-by: Yann Gautier <yann.gautier@st.com>
show more ...
|
| 1d4fb1e7 | 11-Mar-2020 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Merge changes from topic "stm32mp1-multi-image" into integration
* changes: stm32mp1: platform.mk: support generating multiple images in one build stm32mp1: platform.mk: migrate to implicit rule
Merge changes from topic "stm32mp1-multi-image" into integration
* changes: stm32mp1: platform.mk: support generating multiple images in one build stm32mp1: platform.mk: migrate to implicit rules stm32mp1: platform.mk: derive map file name from target name stm32mp1: platform.mk: generate linker script with fixed name stm32mp1: platform.mk: use PHONY for the appropriate targets
show more ...
|
| e772a6d1 | 29-Jan-2020 |
Ahmad Fatoum <a.fatoum@pengutronix.de> |
stm32mp1: platform.mk: support generating multiple images in one build
Board Support for the stm32mp1 platform is contained in the device tree, so if we remove hardcoding of board name from the Make
stm32mp1: platform.mk: support generating multiple images in one build
Board Support for the stm32mp1 platform is contained in the device tree, so if we remove hardcoding of board name from the Makefile, we can build the intermediary objects once and generate one new tf-a-*.stm32 binary for every device tree specified. All in one go.
With implicit rules implemented, we only need to change the top level target to support multi-image builds on the stm32mp1.
Change-Id: I4cae7d32a4c03a3c29c559dc5332e002223902c1 Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
show more ...
|
| a3db33fd | 29-Jan-2020 |
Ahmad Fatoum <a.fatoum@pengutronix.de> |
stm32mp1: platform.mk: migrate to implicit rules
Board Support for the stm32mp1 platform is contained in the device tree, so if we remove hardcoding of board name from the Makefile, we can build the
stm32mp1: platform.mk: migrate to implicit rules
Board Support for the stm32mp1 platform is contained in the device tree, so if we remove hardcoding of board name from the Makefile, we can build the intermediary objects once and generate one new tf-a-*.stm32 binary for every device tree specified. All in one go.
Prepare for this by employing implicit rules.
Change-Id: I5a022a89eb12696cd8cee7bf28ac6be54849901f Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
show more ...
|
| 1a0b5a57 | 29-Jan-2020 |
Ahmad Fatoum <a.fatoum@pengutronix.de> |
stm32mp1: platform.mk: derive map file name from target name
Doing this allows us in the next commit to use implicit rules (%-patterns) to cover all the images we generate during a stm32mp1 build.
stm32mp1: platform.mk: derive map file name from target name
Doing this allows us in the next commit to use implicit rules (%-patterns) to cover all the images we generate during a stm32mp1 build.
Change-Id: Ibde59d10ccce42566f82820117d7fd0d77345e6c Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
show more ...
|
| fc4fdf71 | 29-Jan-2020 |
Ahmad Fatoum <a.fatoum@pengutronix.de> |
stm32mp1: platform.mk: generate linker script with fixed name
The linker script has no board-specific information that necessitates it having a name derived from the board name. Give it a fixed name
stm32mp1: platform.mk: generate linker script with fixed name
The linker script has no board-specific information that necessitates it having a name derived from the board name. Give it a fixed name, so we can later reuse the same linker script for multiple boards.
Change-Id: Ie6650f00389f4ab8577ae82a36c620af9c64101e Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
show more ...
|
| 17abf947 | 25-Feb-2020 |
Ahmad Fatoum <a.fatoum@pengutronix.de> |
stm32mp1: platform.mk: use PHONY for the appropriate targets
Currently, building TF-A for STM32MP1 triggers a full rebuild, avoid this by removing the .PHONY: specification for the final image and r
stm32mp1: platform.mk: use PHONY for the appropriate targets
Currently, building TF-A for STM32MP1 triggers a full rebuild, avoid this by removing the .PHONY: specification for the final image and replace it by specifying PHONYness for the targets that don't actually produce file output.
This will come in handy in follow-up commits, when implicit rules are introduced, as implicit rule search is skipped for .PHONY targets.
Change-Id: Ib9966479032b081a54123b99f889760e85639f19 Fixes: f74cbc93a ("stm32mp1: Link BL2, BL32 and DTB in one binary") Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
show more ...
|
| c10db6de | 25-Jan-2020 |
Andre Przywara <andre.przywara@arm.com> |
stm32: Use generic console_t data structure
Since now the generic console_t structure holds the UART base address as well, let's use that generic location and drop the UART driver specific data stru
stm32: Use generic console_t data structure
Since now the generic console_t structure holds the UART base address as well, let's use that generic location and drop the UART driver specific data structure at all.
Change-Id: Iea6ca26ff4903c33f0fad27fec96fdbabd4e0a91 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| ca661a00 | 23-Dec-2019 |
Madhukar Pappireddy <madhukar.pappireddy@arm.com> |
Enable -Wredundant-decls warning check
This flag warns if anything is declared more than once in the same scope, even in cases where multiple declaration is valid and changes nothing.
Consequently,
Enable -Wredundant-decls warning check
This flag warns if anything is declared more than once in the same scope, even in cases where multiple declaration is valid and changes nothing.
Consequently, this patch also fixes the issues reported by this flag. Consider the following two lines of code from two different source files(bl_common.h and bl31_plat_setup.c):
IMPORT_SYM(uintptr_t, __RO_START__, BL_CODE_BASE); IMPORT_SYM(unsigned long, __RO_START__, BL2_RO_BASE);
The IMPORT_SYM macro which actually imports a linker symbol as a C expression. The macro defines the __RO_START__ as an extern variable twice, one for each instance. __RO_START__ symbol is defined by the linker script to mark the start of the Read-Only area of the memory map.
Essentially, the platform code redefines the linker symbol with a different (relevant) name rather than using the standard symbol. A simple solution to fix this issue in the platform code for redundant declarations warning is to remove the second IMPORT_SYM and replace it with following assignment
static const unsigned long BL2_RO_BASE = BL_CODE_BASE;
Change-Id: If4835d1ee462d52b75e5afd2a59b64828707c5aa Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
show more ...
|
| f4f1d88d | 13-Dec-2019 |
Deepika Bhavnani <deepika.bhavnani@arm.com> |
st: Unify Platform specific defines for PSCI module
PLATFORM_CORE_COUNT - Unsigned int PLATFORM_CLUSTER_COUNT - Unsigned int PLATFORM_MAX_CPUS_PER_CLUSTER - Unsigned int PLATFORM_CORE_COUNT_PER_CLUS
st: Unify Platform specific defines for PSCI module
PLATFORM_CORE_COUNT - Unsigned int PLATFORM_CLUSTER_COUNT - Unsigned int PLATFORM_MAX_CPUS_PER_CLUSTER - Unsigned int PLATFORM_CORE_COUNT_PER_CLUSTER - Unsigned int
Signed-off-by: Deepika Bhavnani <deepika.bhavnani@arm.com> Change-Id: I3421336230981d4cda301fa2cef24b94b08353b1
show more ...
|