diff --git a/core/arch/arm/kernel/boot.c b/core/arch/arm/kernel/boot.c index dd34173e838..e02c02b6097 100644 --- a/core/arch/arm/kernel/boot.c +++ b/core/arch/arm/kernel/boot.c @@ -1502,11 +1502,17 @@ struct ns_entry_context *boot_core_hpen(void) #if defined(CFG_DT) unsigned long __weak get_aslr_seed(void *fdt) { - int rc = fdt_check_header(fdt); + int rc = 0; const uint64_t *seed = NULL; int offs = 0; int len = 0; + if (!fdt) { + DMSG("No fdt"); + goto err; + } + + rc = fdt_check_header(fdt); if (rc) { DMSG("Bad fdt: %d", rc); goto err; diff --git a/core/arch/arm/kernel/entry_a64.S b/core/arch/arm/kernel/entry_a64.S index 4c6e9d75ca4..047ae1f25cc 100644 --- a/core/arch/arm/kernel/entry_a64.S +++ b/core/arch/arm/kernel/entry_a64.S @@ -143,21 +143,20 @@ .endm FUNC _start , : -#if defined(CFG_CORE_SEL1_SPMC) /* - * With OP-TEE as SPMC at S-EL1 the SPMD (SPD_spmd) in TF-A passes - * the DTB in x0, pagaeble part in x1 and the rest of the registers - * are unused + * If CFG_CORE_FFA is enabled, then x0 if non-NULL holds the TOS FW + * config [1] address, else x0 if non-NULL holds the pagable part + * address. + * + * [1] A TF-A concept: TOS_FW_CONFIG - Trusted OS Firmware + * configuration file. Used by Trusted OS (BL32), that is, OP-TEE + * here. */ - mov x19, x1 /* Save pagable part */ - mov x20, x0 /* Save DT address */ -#else - mov x19, x0 /* Save pagable part address */ + mov x19, x0 #if defined(CFG_DT_ADDR) ldr x20, =CFG_DT_ADDR #else mov x20, x2 /* Save DT address */ -#endif #endif adr x0, reset_vect_table