- 16 Jul, 2020 1 commit
-
-
Etienne Carriere authored
This change implements platform services for stm32mp1 to expose clock and reset controllers over SCMI clock and reset domain protocols in sp_min firmware. Requests execution use a fastcall SMC context using a SiP function ID. The setup allows the create SCMI channels by assigning a specific SiP SMC function ID for each channel/agent identifier defined. In this change, stm32mp1 exposes a single channel and hence expects single agent at a time. The input payload in copied in secure memory before the message in passed through the SCMI server drivers. BL32/sp_min is invoked for a single SCMI message processing and always returns with a synchronous response message passed back to the caller agent. This change fixes and updates STM32_COMMON_SIP_NUM_CALLS that was previously wrongly set 4 whereas only 1 SiP SMC function ID was to be counted. STM32_COMMON_SIP_NUM_CALLS is now set to 3 since the 2 added SiP SMC function IDs for SCMI services. Change-Id: Icb428775856b9aec00538172aea4cf11e609b033 Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
-
- 13 Jul, 2020 1 commit
-
-
Manish Pandey authored
while mapping SPMC manifest page in the SPMD translation regime the mapped size was resolved to zero if SPMC manifest base address is PAGE aligned, causing SPMD to abort. To fix the problem change mapped size to PAGE_SIZE if manifest base is PAGE aligned. Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: I06cd39dbefaf492682d9bbb0c82b950dd31fb416
-
- 10 Jul, 2020 8 commits
-
-
Manish V Badarkhe authored
BL2 size gets increased due to the libfdt library update and that eventually cause no-optimization build failure for BL2 as below: aarch64-none-elf-ld.bfd: BL2 image has exceeded its limit. aarch64-none-elf-ld.bfd: region `RAM' overflowed by 4096 bytes Makefile:1070: recipe for target 'build/fvp/debug/bl2/bl2.elf' failed make: *** [build/fvp/debug/bl2/bl2.elf] Error 1 Fixed build failure by increasing BL2 image size limit by 4Kb. Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com> Change-Id: I92a57eb4db601561a98e254b64994bb921a88db3
-
Grzegorz Jaszczyk authored
There is no need to open tree different IO window when there is possibility of having one covering required range. Change-Id: I9feae1fc583df1f7d97d28161cf7601f43513856 Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com>
-
Marcin Wojtas authored
Update missing code releated to the BL32 payload. Change-Id: I5cbe71921467c53c45be5510f950cefdacc110e1 Signed-off-by: Marcin Wojtas <mw@semihalf.com>
-
Konstantin Porotchkin authored
The LLC SRAM will be enabled in OP-TEE OS for usage as secure storage. The CCU have to prepare SRAM window, but point to the DRAM-0 target until the SRAM is actually enabled. This patch changes CCU SRAM window target to DRAM-0 Remove dependence between LLC_SRAM and LLC_ENABLE and update the build documentation. The SRAМ base moved to follow the OP-TEE SHMEM area (0x05400000) Change-Id: I85c2434a3d515ec37da5ae8eb729e3280f91c456 Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
-
Konstantin Porotchkin authored
Area used as trusted DRAM is 12MB in Marvell OP-TEE OS module. It is followed by 4MB of shared memory. Change-Id: If8edeeec5861b529408baca25f78c06a0a440d8c Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
-
Grzegorz Jaszczyk authored
Now when mg_conf_cm3 driver is present - move all relevant code there. Change-Id: I444d9e877c450d6ee69ca3a49b547e4c3aeac0be Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com>
-
Grzegorz Jaszczyk authored
Implement function which will allow to start AP FW. Change-Id: Ie0fc8ad138bf56b10809cdc92d1e5e96a2aaf33f Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com>
-
Manish V Badarkhe authored
Included cot_descriptors.dtsi in platform device tree (fvp_tb_fw_config.dts). Also, updated the maximum size of tb_fw_config to 0x1800 in order to accomodate the device tree for CoT descriptors. Follow up patch will parse the device tree for these CoT descriptors and fill the CoT descriptor structures at runtime instead of using static CoT descriptor structures in the code base. Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com> Change-Id: I90122bc713f6842b82fb019b04caf42629b4f45a
-
- 09 Jul, 2020 3 commits
-
-
Andre Przywara authored
The memory layout for the FPGA is fairly uniform for most of the FPGA images, and we already assume that DRAM starts at 2GB by default. Prepopulate PRELOADED_BL33_BASE and FPGA_PRELOADED_DTB_BASE to some sane default values, to simplify building some stock image. If people want to deviate from that, they can always override those addresses on the make command line. Change-Id: I2238fafb3f8253a01ad2d88d45827c141d9b29dd Signed-off-by: Andre Przywara <andre.przywara@arm.com>
-
Andre Przywara authored
To support FPGAs with those cores as well, as the respective cpulib files to the Makefile. Change-Id: I1a60867d5937be88b32b210c7817be4274554a76 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
-
Andre Przywara authored
The maximum number of clusters is currently set to 2, which is quite limiting. As there are FPGA images with 4 clusters, let's increase the limit to 4. Change-Id: I9a85ca07ebbd2a018ad9668536d867ad6b75e537 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
-
- 08 Jul, 2020 6 commits
-
-
Etienne Carriere authored
Introduce helper functions stm32mp_register_secure_gpio() and stm32mp_register_non_secure_gpio() for drivers to register a GPIO pin as secure or non-secure. These functions are stubbed when shared resource driver is not embedded in the BL image so that drivers do not bother whether they shall register or not their resources. Change-Id: I1fe98576c072ae31f75427c9ac5c9f6c4f1b6ed1 Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
-
Etienne Carriere authored
Introduce helper functions stm32mp_register_secure_periph_iomem() and stm32mp_register_non_secure_periph_iomem() for drivers to register a resource as secure or non-secure based on its SoC interface registers base address. These functions are stubbed when shared resources driver is not embedded (!STM32MP_SHARED_RESOURCES) so that drivers embedded in other BL stages do not bother whether they shall register or not their resources. Change-Id: Icebd05a930afc5964bc4677357da5d1b23666066 Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
-
Etienne Carriere authored
Update implementation of stm32mp_nsec_can_access_reset() based on the registering of the shared resources. Querying registering state locks further registration of peripherals. Change-Id: I5f38f2a3481780b9a71939d95984c4821c537aa4 Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
-
Etienne Carriere authored
Update implementation of stm32mp_nsec_can_access_clock() based on the registering of the shared resources. Querying registering state locks further registration of peripherals. Change-Id: If68f6d4a52c4742ba66244c6ea2d9afa08404137 Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
-
Etienne Carriere authored
Define helper functions stm32mp_register_secure_periph() and stm32mp_register_non_secure_periph() for platform drivers to register a shared resource assigned to respectively secure or non-secure world. Some resources are related to clock resources. When a resource is registered as secure, ensure its clock dependencies are also registered as secure. Registering a non-secure resource does not mandate its clock dependencies are also registered as non-secure. Change-Id: I74975be8976b8d3bf18dcc807541a072803af6e3 Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
-
Etienne Carriere authored
Define from helper functions to get a human readable string identifier from a shared resource enumerated ID. Use them to make debug traces more friendly peripheral registering functions. Change-Id: I9e207b8ce1d1e9250e242ca7e15461b9a1532f40 Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
-
- 06 Jul, 2020 1 commit
-
-
Abdellatif El Khlifi authored
This patch performs the following: - Creating two corstone700 platforms under corstone700 board: fvp and fpga - Since the FVP and FPGA have IP differences, this commit provides a specific DTS for each platform - The platform can be specified using the TARGET_PLATFORM Makefile variable (possible values are: fvp or fpga) - Allowing to use u-boot by: - Enabling NEED_BL33 option - Fixing non-secure image base: For no preloaded bl33 we want to have the NS base set on shared ram. Setup a memory map region for NS in shared map and set the bl33 address in the area. - Setting the SYS_COUNTER_FREQ_IN_TICKS based on the selected platform - Setting ARM_MAP_SHARED_RAM and ARM_MAP_NS_SHARED_RAM to use MT_MEMORY Change-Id: I4c8ac3387acb1693ab617bcccab00d80e340c163 Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
-
- 29 Jun, 2020 2 commits
-
-
Manish V Badarkhe authored
Added assert in the code to check valid address of dtb information structure retrieved from fw_config device tree. This patch fixes coverity defect:360213. Also, removed conditional calling of "fconf_populate" as "fconf_populate" function already checks the validity of the device tree address received and go to panic in case of address is NULL. Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com> Change-Id: Ib83e4e84a95e2456a12c7a2bb3fe70461d882cba
-
Samuel Holland authored
The non-secure world has no business accessing the CPU power switches in the PRCM; those are handled by TF-A or the SCP. Only allow access to the clock control part of the PRCM. Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: I657b97f4ea8a0073448ad3343fbc66ba168ed89e
-
- 27 Jun, 2020 1 commit
-
-
Madhukar Pappireddy authored
This version corresponds to the following commit <7be250b> libfdt: Correct condition for reordering blocks Also, updated the Juno romlib jumptable with fdt APIs. Change-Id: Ib6d28c1aea81c2144a263958f0792cc4daea7a1f Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
-
- 26 Jun, 2020 2 commits
-
-
Andre Przywara authored
The plat_core_pos_by_mpidr() implementation for the Arm FPGA port has some issues, which leads to problems when matching GICv3 redistributors with cores: - The power domain tree was not taking multithreading into account, so we ended up with the wrong mapping between MPIDRs and core IDs. - Before even considering an MPIDR, we try to make sure Aff2 is 0. Unfortunately this is the cluster ID when the MT bit is set. - We mask off the MT bit in MPIDR, before basing decisions on it. - When detecting the MT bit, we are properly calculating the thread ID, but don't account for the shift in the core and cluster ID checks. Those problems lead to early rejections of MPIDRs values, in particular when called from the GIC code. As a result, CPU_ON for secondary cores was failing for most of the cores. Fix this by properly handling the MT bit in plat_core_pos_by_mpidr(), also pulling in FPGA_MAX_PE_PER_CPU when populating the power domain tree. Change-Id: I71b2255fc0d27bfe5806511df479ab38e4e33fc4 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
-
Manish V Badarkhe authored
Passed the address of fw_config instead of soc_fw_config as arg1 to BL31 from BL2 for ARM fvp platform. BL31 then retrieve load-address of other device trees from fw_config device tree. Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com> Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com> Change-Id: Ib7e9581cd765d76111dcc3b7e0dafc12503c83c1
-
- 25 Jun, 2020 2 commits
-
-
Manish V Badarkhe authored
Increased the size of firmware configuration area to accommodate all configs. Updated maximum size of following bootloaders due to increase in firmware configs size and addition of the code in the BL2. 1. Increased maximum size of BL2 for Juno platform in no optimisation case. 2. Reduced maximum size of BL31 for fvp and Juno platform. 3. Reduced maximum size of BL32 for Juno platform. Change-Id: Ifba0564df0d1fe86175bed9fae87fdcf013b1831 Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
-
Manish V Badarkhe authored
Modified the code to do below changes: 1. Load tb_fw_config along with fw_config by BL1. 2. Populate fw_config device tree information in the BL1 to load tb_fw_config. 3. In BL2, populate fw_config information to retrieve the address of tb_fw_config and then tb_fw_config gets populated using retrieved address. 4. Avoid processing of configuration file in case of error value returned from "fw_config_load" function. 5. Updated entrypoint information for BL2 image so that it's arg0 should point to fw_config address. Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com> Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com> Change-Id: Ife6f7b673a074e7f544ee3d1bda7645fd5b2886c
-
- 24 Jun, 2020 6 commits
-
-
laurenw-arm authored
Query clock frequency in runtime using FCONF getter API Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com> Change-Id: Ie6a8a62d8d190b9994feffb167a1d48829913e9b
-
laurenw-arm authored
Extract Timer clock frequency from the timer node in HW_CONFIG dtb. The first timer is a per-core architected timer attached to a GIC to deliver its per-processor interrupts via PPIs. Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com> Change-Id: I2f4b27c48e4c79208dab9f03c768d9221ba6ca86
-
Manish V Badarkhe authored
Modified the code to do below changes: 1. Migrates the Arm platforms to the API changes introduced in the previous patches by fixing the fconf_load_config() call. 2. Retrieve dynamically the address of tb_fw_config using fconf getter api which is subsequently used to write mbedTLS heap address and BL2 hash data in the tb_fw_config DTB. Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com> Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com> Change-Id: I3c9d9345dcbfb99127c61d5589b4aa1532fbf4be
-
Manish V Badarkhe authored
Cleaned up confused naming between TB_FW and FW_CONFIG. Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com> Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com> Change-Id: I9e9f6e6ca076d38fee0388f97d370431ae067f08
-
Louis Mayencourt authored
fw_config image is authenticated using secure boot framework by adding it into the single root and dual root chain of trust. The COT for fw_config image looks as below: +------------------+ +-------------------+ | ROTPK/ROTPK Hash |------>| Trusted Boot fw | +------------------+ | Certificate | | (Auth Image) | /+-------------------+ / | / | / | / | L v +------------------+ +-------------------+ | fw_config hash |------>| fw_config | | | | (Data Image) | +------------------+ +-------------------+ Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com> Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com> Change-Id: I08fc8ee95c29a95bb140c807dd06e772474c7367
-
Manish V Badarkhe authored
Moved BL2 configuration nodes from fw_config to newly created tb_fw_config device tree. fw_config device tree's main usage is to hold properties shared across all BLx images. An example is the "dtb-registry" node, which contains the information about the other device tree configurations (load-address, size). Also, Updated load-address of tb_fw_config which is now located after fw_config in SRAM. Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com> Change-Id: Ic398c86a4d822dacd55b5e25fd41d4fe3888d79a
-
- 23 Jun, 2020 7 commits
-
-
Sheetal Tigadoli authored
Signed-off-by: Sheetal Tigadoli <sheetal.tigadoli@broadcom.com> Change-Id: Ic387630c096361ea9a963cde0018a0efb63e3bd2
-
Etienne Carriere authored
Embed Arch Architecture SMCCC services in stm32mp1 SP_MIN. This service is needed by Linux kernel to setup the SMCCC conduit used by its SCMI SMC transport driver. Change-Id: I454a7ef3048a77ab73fff945e8115b60445d5841 Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
-
Etienne Carriere authored
SCMI shared memory is used to exchange message payloads between secure SCMI services and non-secure SCMI agents. It is mapped uncached (device) mainly to conform to existing support in the Linux kernel. Note that executive messages are mostly short (few 32bit words) hence not using cache will not penalize much performances. Platform stm32mp1 shall configure ETZPC to harden properly the secure and non-secure areas of the SYSRAM address space, that before CPU accesses the shared memory when mapped non-secure. This change defines STM32MP_SEC_SYSRAM_BASE/STM32MP_SEC_SYSRAM_SIZE and STM32MP_NS_SYSRAM_BASE/STM32MP_NS_SYSRAM_SIZE. Change-Id: I71ff02a359b9668ae1c5a71b5f102cf3d310f289 Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
-
Etienne Carriere authored
When using SP_min as monitor, only sp_min_warm_entrypoint() is a valid secure entry point. Change-Id: I440cec798e901b11a34dd482c33b2e378a8328ab Signed-off-by: Etienne Carriere <etienne.carriere@st.com> Signed-off-by: Nicolas Toromanoff <nicolas.toromanoff@st.com>
-
Etienne Carriere authored
Disable use of Neon VFP support for platform stm32mp1 when building with SP_MIN runtime services as these can conflict with non-secure world use of NEON support. This is preferred over a systematic backup/restore of NEON context when switching between non-secure and secure worlds. When NEON support is disabled, this is done for both BL2 and BL32 as build process uses common libraries built once for both binaries. Change-Id: I4e8808dcb6ef58fc839e6f85fd6e45cfbaa34be0 Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
-
Etienne Carriere authored
BL32/SP_MIN configures platform security hardening from the shared resources driver. At the end of SP_MIN initialization, all shared resources shall be assigned to secure or non-secure world by drivers. A lock prevent from further change on the resource assignation. By definition, resources not registered are assign to non-secure world since not claimed by any component on the BL. No functional change as all resources are currently in state SHRES_UNREGISTERED hence assigned to non-secure world as prior this change in stm32mp1_etzpc_early_setup() and sp_min_platform_setup(). Change-Id: Ic41fab47216c3b8b7a6a75b8358cfcec411ed941 Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
-
Etienne Carriere authored
Get number of pins in the GPIOZ bank with helper function fdt_get_gpio_bank_pin_count(). Save the value in RAM to prevent parsing the FDT several time for the same information. Change-Id: Ie68e300804461ffce09914100a7d2962116023b5 Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
-