summaryrefslogtreecommitdiff
path: root/arch
AgeCommit message (Collapse)Author
2021-04-08ARM: imx: udoo: Convert block devices to DMPeter Robinson
Enable DM block, DM MMC and DM SATA support on iMX6 Udoo convert board code to match the DM support. Signed-off-by: Peter Robinson <[email protected]> Cc: Fabio Estevam <[email protected]> Cc: Stefano Babic <[email protected]>
2021-04-08ARM: board: udoo: Import UDOO dts filesPeter Robinson
Import the i.MX6 based UDOO dts files from Linux 5.12-rc1. Signed-off-by: Peter Robinson <[email protected]> Cc: Fabio Estevam <[email protected]> Cc: Stefano Babic <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2021-04-08ARM: embestmx6boards: convert the mars/riot boards to DM_MMCPeter Robinson
Convert the two Embest boards to use DM MMC. Signed-off-by: Peter Robinson <[email protected]> Cc: "Eric Bénard" <[email protected]> Cc: Fabio Estevam <[email protected]> Cc: Stefano Babic <[email protected]>
2021-04-08ARM: embestmx6boards: Import the marsboard/riotboard. dts filesPeter Robinson
Import the iMX6 based marsboard and riotboard. dts files from Linux 5.12-rc1 Signed-off-by: Peter Robinson <[email protected]> Cc: Fabio Estevam <[email protected]> Cc: Stefano Babic <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2021-04-08arm: dts: imx8mn, imx8mn-beacon: Sync dts files with Kernel 5.12-rc5Adam Ford
There have been a few updates including flexspi, so it's necessary to re-sync. Signed-off-by: Adam Ford <[email protected]>
2021-04-08ARM: board: usbarmory: Import the usbarmory dts filePeter Robinson
Import the iMX53 based usbarmory dts files from Linux 5.12-rc1 Signed-off-by: Peter Robinson <[email protected]> Cc: Andrej Rosano <[email protected]> Cc: Fabio Estevam <[email protected]> Cc: Stefano Babic <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2021-04-08imx: ventana: enable dm support for MMC and SATATim Harvey
Enable driver model support for MMC and SATA. Note that DM_MMC requires aliases for your mmc devices so they are added to the dts. Linux does not support enumerating mmc devices by alias so these are not present in the Linux dts. Note that we still need board_mmc_init() and board_mmc_getcd() for not DM SPL to support MMC. Signed-off-by: Tim Harvey <[email protected]>
2021-04-08arm: dts: imx6qdl-gw*: add dr_mode prop to dt to avoid errorTim Harvey
The fsl-usb dt bindings in Linux default dr_mode to 'host' for backward compatibility however U-Boot prints an error if this property does not exist. Declare it in the Gateworks Ventana device-trees to avoid the error. Signed-off-by: Tim Harvey <[email protected]>
2021-04-08imx: ventana: add Gateworks Ventana dtsTim Harvey
Add Gateworks Ventana dts/dtsi files from Linux 5.11 in preparation for conversion to driver-model. Signed-off-by: Tim Harvey <[email protected]>
2021-04-08ARM: imx: Add OCRAM_S into iMX8M MMU tablesMarek Vasut
The OCRAM_S is regular memory, just like the OCRAM, add it to the MMU tables so it can be used and cached. Signed-off-by: Marek Vasut <[email protected]> Cc: Fabio Estevam <[email protected]> Cc: Peng Fan <[email protected]> Cc: Stefano Babic <[email protected]>
2021-04-08imx8mp-evk: switch to use binmanPeng Fan
Use binman to pack images Signed-off-by: Peng Fan <[email protected]>
2021-04-08imx8mn-evk: switch to use binmanPeng Fan
Use binman to pack images. Signed-off-by: Peng Fan <[email protected]>
2021-04-08imx8mn-ddr4-evk: switch to use binmanPeng Fan
Use binman to pack images Signed-off-by: Peng Fan <[email protected]>
2021-04-08imx8mm_evk: switch to use binman to pack imagesPeng Fan
Use binman to pack images Signed-off-by: Peng Fan <[email protected]>
2021-04-08imx8: Add DEK blob encapsulationClement Faure
Add DEK encapsulation support for imx8. The DEK blob is generated by the SECO through the SCFW API. Signed-off-by: Clement Faure <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2021-04-08imx8m: Add DEK blob encapsulation for imx8mClement Faure
Add DEK blob encapsulation support for IMX8M through "dek_blob" command. On ARMv8, u-boot runs in non-secure, thus cannot encapsulate a DEK blob for encrypted boot. The DEK blob is encapsulated by OP-TEE through a trusted application call. U-boot sends and receives the DEK and the DEK blob binaries through OP-TEE dynamic shared memory. To enable the DEK blob encapsulation, add to the defconfig: CONFIG_SECURE_BOOT=y CONFIG_FAT_WRITE=y CONFIG_CMD_DEKBLOB=y Signed-off-by: Clement Faure <[email protected]> Reviewed-by: Ye Li <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2021-04-08imx: caam: new u-boot command to set PRIBLOB bitfield from CAAM SCFGR ↵Clement Le Marquis
register to 0x3 It is highly recommended to set the PRIBLOB bitfield to 0x3 once your encrypted boot image has booted up, this prevents the generation of new blobs that can be used to decrypt an encrypted boot image. The PRIBLOB is a sticky type bit and cannot be changed until the next power on reset. Add the set_priblob_bitfield U-Boot command to prevent the generation of new blobs. Signed-off-by: Clement Le Marquis <[email protected]> Acked-by: Ye Li <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2021-04-08Merge https://source.denx.de/u-boot/custodians/u-boot-riscvTom Rini
- Watchdog, Unleashed and Icicle improvements
2021-04-08arm: socfpga: smc: Add function to get usercodeSiew Chin Lim
Add function to send mailbox command via SMC to get usercode from SDM. Signed-off-by: Siew Chin Lim <[email protected]> Reviewed-by: Ley Foon Tan <[email protected]>
2021-04-08arm: socfpga: Enable FIT signature with crc32 for SOC64 devicesSiew Chin Lim
Add signature with crc32 value for all images in binman node for FIT image in device tree. And, enable FIT signature checking for Stratix10 and Agilex ATF and VAB sdmmc boot. Signed-off-by: Siew Chin Lim <[email protected]>
2021-04-08arm: socfpga: Changed to store QSPI reference clock in kHzSiew Chin Lim
Changed to store QSPI reference clock in kHz instead of Hz in boot scratch cold0 register for Stratix10 and Agilex. This patch is in preparation for Intel N5X SDRAM driver support. Reserved 4 bits for Intel N5X SDRAM driver, and there will be 28 bits to store QSPI reference clock. Due to limited bits, QSPI reference clock frequency is converted to kHz from Hz. Signed-off-by: Siew Chin Lim <[email protected]> Signed-off-by: Tien Fong Chee <[email protected]>
2021-04-08arm: socfpga: Move Stratix10 and Agilex clock manager common codeSiew Chin Lim
Move duplicated function cm_get_qspi_controller_clk_hz to clock_manager.c. Signed-off-by: Siew Chin Lim <[email protected]> Signed-off-by: Tien Fong Chee <[email protected]> Reviewed-by: Ley Foon Tan <[email protected]>
2021-04-08arm: socfpga: Restructure Stratix10 and Agilex handoff codeSiew Chin Lim
Restructure Stratix10 and Agilex handoff code to used by all SOC64 devices, in preparation to support handoff for Diamond Mesa. Remove wrap_pinmux_config_s10.c. Add wrap_handoff_soc64.c which contains the generic function to parse the handoff data. Update system_manager_soc64.c to use generic handoff function in wrap_handoff_soc64.c. Signed-off-by: Siew Chin Lim <[email protected]> Reviewed-by: Ley Foon Tan <[email protected]>
2021-04-08arm: socfpga: Rearrange sequence of macros in handoff_soc64.hSiew Chin Lim
Rearrange sequence of macros in handoff_soc64.h without any functionality change. In preparation for Stratix10 and Agilex handoff function restructuring. Signed-off-by: Siew Chin Lim <[email protected]>
2021-04-08arm: socfpga: Changed system_manager_s10.c to system_manager_soc64.cSiew Chin Lim
Rename to common file name to used by all SOC64 devices. No functionality change. Signed-off-by: Siew Chin Lim <[email protected]>
2021-04-08arm: socfpga: Changed wrap_pll_config_s10.c to wrap_pll_config_soc64.cSiew Chin Lim
Rename to common file name to used by all SOC64 devices. Signed-off-by: Siew Chin Lim <[email protected]>
2021-04-08arm: socfpga: Rename Stratix10 and Agilex handoff common macrosSiew Chin Lim
Rename handoff_s10.h to handoff_soc64.h. Changed macros prefix from S10_HANDOFF to SOC64_HANDOFF. Signed-off-by: Siew Chin Lim <[email protected]>
2021-04-08arm: socfpga: Move Stratix10 and Agilex SPL common codeSiew Chin Lim
Move Stratix10 and Agilex SPL common code to spl_soc64.c. We are in preparation for new n5x device support. No functional change in this patch. Signed-off-by: Siew Chin Lim <[email protected]> Reviewed-by: Ley Foon Tan <[email protected]>
2021-04-08riscv: dts: mpfs-icicle-kit: Drop 'clock-frequency' in the uart nodesBin Meng
The uart nodes already provide <clocks> property for the driver to dynamically calculate the correct clock frequency. There is no need to keep the hard-coded <clock-frequency> property. Signed-off-by: Bin Meng <[email protected]> Reviewed-by: Padmarao Begari <[email protected]> Tested-by: Padmarao Begari <[email protected]>
2021-04-08riscv: assembler versions of memcpy, memmove, memsetHeinrich Schuchardt
Provide optimized versions of memcpy(), memmove(), memset() copied from the Linux kernel. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>
2021-04-08riscv: simplify longjmpHeinrich Schuchardt
The value returned by setjmp must be nonzero. If zero is passed as parameter it must be replaced by 1. This patch reduces the code size a bit. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Sean Anderson <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>
2021-04-08riscv: sifive: Rename fu540 board to unleashedBin Meng
In preparation to add SiFive Unmatched board support, let's rename the existing fu540 board to unleashed. Signed-off-by: Bin Meng <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>
2021-04-08riscv: Add watchdog bindings for the k210Sean Anderson
This adds the necessary bindings. Most of them are already there. Signed-off-by: Sean Anderson <[email protected]> Acked-by: Rick Chen <[email protected]>
2021-04-08crypto: caam: Add CAAM support to i.MX8M platformsAymen Sghaier
This patch enable CAAM support for i.MX8M platforms. Signed-off-by: Aymen Sghaier <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2021-04-08caam: enable support for iMX7ULPFranck LENORMAND
Signed-off-by: Franck LENORMAND <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2021-04-08mx6dq: hab: Fix chip version in hab.h codeBreno Lima
Since commit 8891410c729b ("MLK-19848 mx6dq: Fix chip version issue for rev1.3") it's not possible to call the HAB API functions on i.MX6DQ SoC Rev 1.3: Authenticate image from DDR location 0x12000000... undefined instruction pc : [<412c00dc>] lr : [<8ff560bc>] reloc pc : [<c8b6d0dc>] lr : [<178030bc>] sp : 8ef444a8 ip : 126e8068 fp : 8ff59aa8 r10: 8ffd51e4 r9 : 8ef50eb0 r8 : 006e8000 r7 : 00000000 r6 : 126ea01f r5 : 0000002b r4 : 126e8000 r3 : 412c00dd r2 : 00000001 r1 : 00000001 r0 : 00000063 Flags: nzCv IRQs off FIQs off Mode SVC_32 Resetting CPU ... resetting ... The hab.h code is defining the HAB API base address according to the old SoC revision number, thus failing when calling the HAB API authenticate_image() function. Fix this issue by using mx6dq rev 1.3 instead of mx6dq rev 1.5. Signed-off-by: Breno Lima <[email protected]> Reviewed-by: Ye Li <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2021-04-08imx: cmd_dek: Enable DEK only for chips supporting CAAMYe Li
Since cmd_dek is using CAAM JR, so enable the CMD_DEK only when HAS_CAAM is set Signed-off-by: Ye Li <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2021-04-08iMX8M: Add support to enable CONFIG_IMX_HABYe Li
Add some SOC level codes and build configurations to use HAB lib for CONFIG_IMX_HAB (secure boot), like adding the SEC_CONFIG fuse, enable fuse driver, CAAM clock function, and add CAAM secure RAM to MMU table. The FSL_CAAM is temporally not enabled for iMX8M when CONFIG_IMX_HAB is set, because we don't need the CAAM driver for SPL. Signed-off-by: Ye Li <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2021-04-08imx: HAB: Add support for iMX8MMYe Li
The imx8mm has changed the address of rvt_hab, use new address for imx8mm. The authentication procedure is same as imx8mq. In u-boot, the authentication uses SIP call to trap ATF to run HAB authenticate. Users need to add CONFIG_SECURE_BOOT=y to defconfig to enable the feature. Signed-off-by: Ye Li <[email protected]> Acked-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2021-04-08imx: hab: Fix build warnings in 32-bit targetsBreno Lima
When building 32-bit targets with CONFIG_SECURE_BOOT and DEBUG enabled the following warnings are displayed: arch/arm/mach-imx/hab.c:840:41: warning: format '%lx' expects argument \ of type 'long unsigned int', but argument 3 has type 'uint32_t \ {aka unsigned int}' [-Wformat=] printf("HAB check target 0x%08x-0x%08lx fail\n", ~~~~^ %08x ddr_start, ddr_start + bytes); arch/arm/mach-imx/hab.c:845:45: warning: format '%x' expects argument \ of type 'unsigned int', but argument 3 has type 'ulong \ {aka long unsigned int}' [-Wformat=] printf("\nivt_offset = 0x%x, ivt addr = 0x%x\n", ivt_offset, ivt_addr); ~^ %lx Fix warnings by providing the correct data type. Reviewed-by: Ye Li <[email protected]> Signed-off-by: Breno Lima <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2021-04-08mx7ulp: hab: Add hab_status command for HABv4 M4 bootBreno Lima
When booting in low power or dual boot modes the M4 binary is authenticated by the M4 ROM code. Add an option in hab_status command so users can retrieve M4 HAB failure and warning events. => hab_status m4 Secure boot disabled HAB Configuration: 0xf0, HAB State: 0x66 No HAB Events Found! Add command documentation in mx6_mx7_secure_boot.txt guide. As HAB M4 API cannot be called from A7 core the code is parsing the M4 HAB persistent memory region. The HAB persistent memory stores HAB events, public keys and others HAB related information. The HAB persistent memory region addresses and sizes can be found in AN12263 "HABv4 RVT Guidelines and Recommendations". Reviewed-by: Utkarsh Gupta <[email protected]> Reviewed-by: Ye Li <[email protected]> Signed-off-by: Breno Lima <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2021-04-08imx: hab: Check if IVT header is HABv4Breno Lima
The HABv4 implementation in ROM checks if HAB major version in IVT header is 4.x. The current implementation in hab.c code is only validating HAB v4.0 and HAB v4.1 and may be incompatible with newer HABv4 versions. Modify verify_ivt_header() function to align with HABv4 implementation in ROM code. Signed-off-by: Breno Lima <[email protected]> Reviewed-by: Ye Li <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2021-04-08imx: hab: Display All HAB events via hab_status commandUtkarsh Gupta
Add ability for hab_status command to show All HAB events and not just HAB failure events Signed-off-by: Utkarsh Gupta <[email protected]> Reviewed-by: Ye Li <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2021-04-08imx: hab: Enable hab.c to authenticate additional images in open configurationBreno Lima
Currently it's not possible to authenticate additional boot images in HAB open configuration. The hab.c code is checking if the SEC_CONFIG[1] fuse is programmed prior to calling the hab_authenticate_image() API function. Users cannot check if their additional boot images has been correctly signed prior to closing their device. Enable hab.c to authenticate additional boot images in open mode so HAB events can be retrieved through get_hab_status() function. Signed-off-by: Breno Lima <[email protected]> Reviewed-by: Ye Li <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2021-04-08hab: Change calling to ROM API failsafeYe Li
Modify to use hab_rvt_failsafe function for failsafe ROM API, not directly call its ROM address. This function will wrap the sip call for iMX8M platforms. Signed-off-by: Ye Li <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2021-04-08imx: HAB: Validate IVT before authenticating imageUtkarsh Gupta
Calling csf_is_valid() with an un-signed image may lead to data abort as the CSF pointer could be pointing to a garbage address when accessed in HAB_HDR_LEN(*(const struct hab_hdr *)(ulong)ivt_initial->csf). Authenticate image from DDR location 0x80800000... Check CSF for Write Data command before authenticating image data abort pc : [<fff5494c>] lr : [<fff54910>] reloc pc : [<8780294c>] lr : [<87802910>] sp : fdf45dc8 ip : 00000214 fp : 00000000 r10: fffb6170 r9 : fdf4fec0 r8 : 00722020 r7 : 80f20000 r6 : 80800000 r5 : 80800000 r4 : 00720000 r3 : 17a5aca3 r2 : 00000000 r1 : 80f2201f r0 : 00000019 Flags: NzcV IRQs off FIQs off Mode SVC_32 Resetting CPU ... resetting ... To avoid such errors during authentication process, validate IVT structure by calling validate_ivt function which checks the following values in an IVT: IVT_HEADER = 0x4X2000D1 ENTRY != 0x0 RES1 = 0x0 DCD = 0x0 /* Recommended */ SELF != 0x0 /* Absoulute address of IVT */ CSF != 0x0 RES2 = 0x0 This commit also checks if Image's start address is 4 byte aligned. commit "0088d127 MLK-14945 HAB: Check if IVT valid before authenticating image" removed as this patch addresses the issue. Signed-off-by: Utkarsh Gupta <[email protected]> Signed-off-by: Ye Li <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2021-04-08imx: HAB: Update hab codes to support ARM64 and i.MX8MPeng Fan
There are some changes to support ARM64 i.MX8M platform in this patches: 1. The hab_rvt base and function vectors are different as i.MX6/7 2. Need to bypass an workaround for i.MX6 to fix problem in MMU. 3. The x18 register needed save & restore before calling any HAB API. According to ARM procedure call spec, the x18 is caller saved when it is used as temporary register. So calling HAB API may scratch this register, and cause crash once accessing the gd pointer. On ARMv7, the r9 is callee saved when it is used as variable register. So no need to save & restore it. 4. Add SEC_CONFIG fuse for iMX8M When current EL is not EL3, the direct calling to HAB will fail because CAAM/SNVS can't initialize at non-secure mode. In this case, we use SIP call to run the HAB in ATF. Signed-off-by: Ye Li <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2021-04-08imx: hab: Add function to authenticate kernel imageYe Li
When loading kernel image, the image size is parsed from header, so it does not include the CSF and IVT. Add back the authenticate_image function to wrap the imx_hab_authenticate_image with calculating IVT offset and full image size. Signed-off-by: Ye Li <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2021-04-08imx: Avoid hardcoded Job Ring Max sizeBreno Lima
Prior instantiating RNG we have to ensure if the CAAM job rings are available. Avoid hardcoded job ring max size and use the definition at fsl_sec.h Signed-off-by: Breno Lima <[email protected]> Reviewed-by: Ye Li <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2021-04-08imx: Ensure CAAM clock is enabled prior getting out_jr_sizeBreno Lima
Prior calling sec_in32() we have to ensure CAAM clock is enabled, the function sec_in32() is reading CAAM registers and if CAAM clock is disabled the system will hang. Signed-off-by: Breno Lima <[email protected]> Reviewed-by: Ye Li <[email protected]> Signed-off-by: Peng Fan <[email protected]>