diff options
-rw-r--r-- | arch/arm/cpu/armv8/fsl-layerscape/fdt.c | 4 | ||||
-rw-r--r-- | arch/arm/cpu/armv8/sec_firmware.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c index 4afc046eeaf..fc9de73bcef 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c @@ -414,8 +414,8 @@ void ft_cpu_setup(void *blob, bd_t *bd) ccsr_sec_t __iomem *sec; #ifdef CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT - if (fdt_fixup_kaslr(blob)) - fdt_fixup_remove_jr(blob); + fdt_fixup_remove_jr(blob); + fdt_fixup_kaslr(blob); #endif sec = (void __iomem *)CONFIG_SYS_FSL_SEC_ADDR; diff --git a/arch/arm/cpu/armv8/sec_firmware.c b/arch/arm/cpu/armv8/sec_firmware.c index 6a04eaca3eb..5d2d839feaa 100644 --- a/arch/arm/cpu/armv8/sec_firmware.c +++ b/arch/arm/cpu/armv8/sec_firmware.c @@ -317,9 +317,7 @@ unsigned int sec_firmware_support_psci_version(void) */ bool sec_firmware_support_hwrng(void) { - uint8_t rand[8]; if (sec_firmware_addr & SEC_FIRMWARE_RUNNING) { - if (!sec_firmware_get_random(rand, 8)) return true; } @@ -428,8 +426,10 @@ int fdt_fixup_kaslr(void *fdt) #if defined(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT) /* Check if random seed generation is supported */ - if (sec_firmware_support_hwrng() == false) + if (sec_firmware_support_hwrng() == false) { + printf("WARNING: SEC firmware not running, no kaslr-seed\n"); return 0; + } ret = sec_firmware_get_random(rand, 8); if (ret < 0) { |