[PATCH] ARM: imx: Enable kaslrseed command on DH i.MX8M Plus DHCOM
Marek Vasut
marex at denx.de
Thu Apr 18 19:33:01 CEST 2024
On 4/18/24 6:21 PM, Tim Harvey wrote:
> On Fri, Jan 19, 2024 at 4:36 PM Marek Vasut <marex at denx.de> wrote:
>>
>> Linux 6.6.y with KASLR enabled would print the following message on boot:
>> "
>> KASLR disabled due to lack of seed
>> "
>> Enable the 'kaslrseed' command so a random number seed can be pulled
>> from CAAM and inserted into the /chosen node 'kaslr-seed' property of
>> Linux kernel DT before boot, thus letting KASLR work properly.
>>
>> Signed-off-by: Marek Vasut <marex at denx.de>
>> ---
>> Cc: Fabio Estevam <festevam at denx.de>
>> Cc: Stefano Babic <sbabic at denx.de>
>> Cc: u-boot at dh-electronics.com
>> ---
>> configs/imx8mp_dhcom_pdk2_defconfig | 2 ++
>> configs/imx8mp_dhcom_pdk3_defconfig | 2 ++
>> 2 files changed, 4 insertions(+)
>>
>> diff --git a/configs/imx8mp_dhcom_pdk2_defconfig b/configs/imx8mp_dhcom_pdk2_defconfig
>> index 4f907ce00d0..23fb6272ad5 100644
>> --- a/configs/imx8mp_dhcom_pdk2_defconfig
>> +++ b/configs/imx8mp_dhcom_pdk2_defconfig
>> @@ -117,6 +117,7 @@ CONFIG_CMD_BOOTCOUNT=y
>> CONFIG_CMD_CACHE=y
>> CONFIG_CMD_TIME=y
>> CONFIG_CMD_GETTIME=y
>> +CONFIG_CMD_KASLRSEED=y
>> CONFIG_CMD_SYSBOOT=y
>> CONFIG_CMD_UUID=y
>> CONFIG_CMD_PMIC=y
>> @@ -223,6 +224,7 @@ CONFIG_DM_REGULATOR_PCA9450=y
>> CONFIG_SPL_DM_REGULATOR_PCA9450=y
>> CONFIG_DM_REGULATOR_FIXED=y
>> CONFIG_DM_REGULATOR_GPIO=y
>> +CONFIG_DM_RNG=y
>> CONFIG_DM_RTC=y
>> CONFIG_RTC_M41T62=y
>> CONFIG_CONS_INDEX=2
>> diff --git a/configs/imx8mp_dhcom_pdk3_defconfig b/configs/imx8mp_dhcom_pdk3_defconfig
>> index 9972e2d96b6..0d47c12b1f9 100644
>> --- a/configs/imx8mp_dhcom_pdk3_defconfig
>> +++ b/configs/imx8mp_dhcom_pdk3_defconfig
>> @@ -119,6 +119,7 @@ CONFIG_CMD_BOOTCOUNT=y
>> CONFIG_CMD_CACHE=y
>> CONFIG_CMD_TIME=y
>> CONFIG_CMD_GETTIME=y
>> +CONFIG_CMD_KASLRSEED=y
>> CONFIG_CMD_SYSBOOT=y
>> CONFIG_CMD_UUID=y
>> CONFIG_CMD_PMIC=y
>> @@ -228,6 +229,7 @@ CONFIG_DM_REGULATOR_PCA9450=y
>> CONFIG_SPL_DM_REGULATOR_PCA9450=y
>> CONFIG_DM_REGULATOR_FIXED=y
>> CONFIG_DM_REGULATOR_GPIO=y
>> +CONFIG_DM_RNG=y
>> CONFIG_DM_RTC=y
>> CONFIG_RTC_M41T62=y
>> CONFIG_CONS_INDEX=2
>> --
>> 2.43.0
>>
>
> Hi Marek,
>
> Sorry to respond to an old thread but I ran across this when enabling
> KALSR on my boards.
>
> I have noticed when you enable DM_RNG on IMX8M that SPL fails to bind
> the driver:
> Couldn't bind rng driver (-96)
> SEC0: RNG instantiated
>
> sec_init failed!
Did you enable CAAM and ARCH_MISC_INIT on your machine, to initialize
CAAM in SPL ?
> Didn't you encounter this as well? It seems to me that we may need to
> add the ability to disable DM_RNG in the SPL unless I'm missing
> something.
No, but see above, I suspect that might be it, see also
1f908b1898bd ("ARM: imx8m: Deduplicate CAAM init with arch_misc_init()
call")
More information about the U-Boot
mailing list