[PATCH] ARM: imx: Enable kaslrseed command on DH i.MX8M Plus DHCOM

Tim Harvey tharvey at gateworks.com
Thu Apr 18 18:21:29 CEST 2024


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!

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.

Best Regards,

Tim


More information about the U-Boot mailing list