-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for NXP QorIQ Layerscape Platform ls1043 #1871
Conversation
Can one of the admins verify this patch? |
This pull request modifies subsystem(s) maintained by @qoriq-open-source. Can you please review the changes? |
You need to modify maintainers.rst to point at your documentation files/folders and update the maintainer if needed. Also, you need to be able to build your platform with |
Add hooks for initialization of NOR and NAND flash attached to IFC controller.NAND driver provided init and read functionality. NOR is XIP memory. The driver provides placeholder for initialization. Signed-off-by: Ruchika Gupta <[email protected]>
Init function is added for QSPI NOR flash. The default configuration of the controller allows XIP read of the flash. The driver adds init function to take care of endianness of read transactions Signed-off-by: Ruchika Gupta <[email protected]>
Signed-off-by: York Sun <[email protected]> Signed-off-by: Ruchika Gupta <[email protected]>
Signed-off-by: York Sun <[email protected]> Signed-off-by: Ruchika Gupta <[email protected]>
Signed-off-by: Ruchika Gupta <[email protected]>
Signed-off-by: Ruchika Gupta <[email protected]>
NXP QorIQ platforms require the bl2.bin to be combined with certain commands and RCW. This tool converts the bl2.bin to the required bl2.pbl format. Signed-off-by: Pankaj Gupta <[email protected]> Signed-off-by: Ruchika Gupta <[email protected]>
QorIQ series have a builtin BL1 or ROM which transfers control to the external bootloader in EL3 mode. The patch series establishes common bootflow across NXP QorIQ Layerscape ARMv8 platforms where ROM loads BL2 in SoC Internal Memory. BL2 binary runs in EL3 mode and further loads BL31, BL32 and BL33. The earlier support added in plat/layerscape is now moved to a common plat/nxp folder removing the BL1 binary. Following feature set are supported: - LS1043 RDB and QDS board - Boot from NOR, QSPI, SD, NAND flash - Support for complete PSCI functionality - OPTEE Boot Signed-off-by: rocket <[email protected]> Signed-off-by: York Sun <[email protected]> Signed-off-by: Pankaj Gupta <[email protected]> Signed-off-by: Ruchika Gupta <[email protected]>
CAAM is the cryptographic accelerator present on QorIQ Layerscape Platforms. Functionality has been added for generating random number, platform specific key and do RSA verification and hash using this accelerator. Signed-off-by: Pankaj Gupta <[email protected]> Signed-off-by: Ruchika Gupta <[email protected]>
On NXP QorIQ devices, for establishing chain of trust a header called CSF header is created for each image. This driver is a parser for the CSF header used in CoT Signed-off-by: Ruchika Gupta <[email protected]>
Platforms Signed-off-by: Ruchika Gupta <[email protected]>
Two flows are supported for TRUSTED BOOT. One is the ARM TBBR flow which uses MBED TLS and other is traditional QorIQ Secure boot methodology using CSF Headers. README.TRUSED_BOOT provides more details on the TRUSTED BOOT supported. Signed-off-by: Ruchika Gupta <[email protected]>
Signed-off-by: Ruchika Gupta <[email protected]>
docs/plat/nxp-layerscape.rst
Outdated
@@ -0,0 +1,175 @@ | |||
NXP SoCs - Overview |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file doesn't render correctly in rst (check http://rst.ninjs.org).
If you don't really want the rst formatting capabilities maybe you could just save it as txt. If you want to use rst, please make sure that it renders properly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file has to be rst formatted as it will enable auto-generation of HTML and other formats easily. This will enable easier migration to trustedfirmware.org later.
* --------------------------------------------- | ||
*/ | ||
|
||
#if MULTI_CONSOLE_API |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are only going to keep the multi console. You shouldn't check for MULTI_CONSOLE_API
in your code, you should assume it is going to be 1 and force it to 1 in the makefile.
/* generate a lsb-based mask for the core | ||
* SoC core = ((cluster * cpu_per_cluster) + core) | ||
* mask = (1 << SoC core) | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, fix the coding style.
#ifndef __ASSEMBLER__ | ||
#include <endian.h> | ||
|
||
#define FETCH_SOC_ID(x) (((x & DCFG_ENDIANNESS_MASK) == NXP_MANUFACTURER_ID) ?\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add parentheses to x
.
#define SCR_FIQ_MASK 0x4 | ||
|
||
#define CPUECTLR_EL1 S3_1_C15_C2_1 | ||
#define CPUACTLR_EL1 S3_1_C15_C2_0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All definitions between lines 46 and 62 look to me like they should be in common files (either lib/cpu headers or arch.h/arch_helpers.h).
int sfp_check_its(void); | ||
int sfp_check_oem_wp(void); | ||
|
||
#ifdef NXP_SFP_BE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add parentheses to a
.
return -1; | ||
} | ||
|
||
fp = fopen(argv[1], "rwb+"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be just rb+
or wb+
depending on what you need. rwb+
doesn't look like it's allowed to me.
/* high voltage bits 2.7 - 3.6 */ | ||
mmc->voltages_caps = MMC_OCR_VDD_FF8; | ||
|
||
#ifdef SD_DMA_CAPABILITY |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the options of this driver should probably be prefixed by NXP_
and documented (at least in the header of the driver).
#define esdhc_out32(a, v) mmio_write_32((uintptr_t)a, bswap32(v)) | ||
#elif defined(NXP_ESDHC_LE) | ||
#define esdhc_in32(a) mmio_read_32((uintptr_t)a) | ||
#define esdhc_out32(a, v) mmio_write_32((uintptr_t)a, v) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add parentheses to a
.
#if defined(PHY_GEN2_FW_IMAGE_BUFFER) && !defined(NXP_DDR_PHY_GEN2) | ||
#error Missing NXP_DDR_PHY_GEN2 | ||
#endif | ||
#ifdef NXP_DDR_PHY_GEN2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The options should be documented somewhere. At least create a list of the available options, even if they don't describe much of what they do. I understand that most DDR drivers are mostly magic code with magic constants.
As part of the migration to trustedfirmware.org ARM-software/tf-issues#681 we have switched the main development repository to Gerrit (https://review.trustedfirmware.org/). It is unfortunate that the switch has happened while your PR was being reviewed, but we don't intend to merge more patches through GitHub to avoid confusion. Could you please follow the instructions in https://github.com/ARM-software/arm-trusted-firmware/blob/master/contributing.rst to continue with the review? We're sorry for the inconvenience. |
In addition to the contribution guidelines, the following Getting starting guide might help in this process. |
The patch series adds basic support for NXP QorIQ Layerscape Platforms. ls1043 platform support has been re-written to start the flow from BL2 binary instead of BL31. Additional boot sources like SD, NAND, QSPI have been added along with TRUSTED BOARD BOOT support.