[EXTERNAL] Re: [PATCH 1/1] configs: KASLR OPTEE RNG support for K3 devices

Gokul Praveen g-praveen at ti.com
Wed Jul 9 13:14:19 CEST 2025


On 09/07/25 05:01, Tom Rini wrote:
> On Mon, Jun 30, 2025 at 10:50:09AM +0530, Gokul Praveen wrote:
>> Hi Manorit,
>>
>> On 27/06/25 15:52, Manorit Chawdhry wrote:
>>> Hi Gokul,
>>>
>>> On 14:52-20250627, Gokul wrote:
>>>> From: Gokul Praveen <g-praveen at ti.com>
>>>>
>>>> Add KASLR OPTEE RNG support across K3 devices by enabling the required
>>>> configs.
>>>>
>>>> Signed-off-by: Gokul Praveen <g-praveen at ti.com>
>>>> ---
>>>>    arch/arm/Kconfig | 3 +++
>>>>    1 file changed, 3 insertions(+)
>>>>
>>>> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
>>>> index 7282c4123b0..cd27e5a5422 100644
>>>> --- a/arch/arm/Kconfig
>>>> +++ b/arch/arm/Kconfig
>>>> @@ -805,6 +805,9 @@ config ARCH_K3
>>>>    	select REGEX
>>>>    	select FIT_SIGNATURE if ARM64
>>>>    	imply TI_SECURE_DEVICE
>>>> +	imply DM_RNG
>>>> +	imply TEE
>>>> +	imply OPTEE
>>>
>>> Does it get enabled for R5 based defconfigs too in .config? ARCH_K3 is
>>> enabled for both R5 and ARM64 cores so wondering if we are ending up
>>> enabling it for R5 too which might not be required ( or is it? )
>>>
>>> Regards,
>>> Manorit
>>>
>> No,it does not get enabled for R5 actually.
> 
> That's not what the size growth on R5 platforms I see reflects:
>                 u-boot: add: 11/-2, grow: 8/-2 bytes: 1584/-692 (892)
>                   function                                   old     new   delta
>                   try_load_entry                               -     596    +596
>                   static.fdt_kaslrseed                         -     200    +200
>                   handle_random_req                            -     180    +180
>                   getrng                                       -     120    +120
>                   rng_getinfo                                  -      80     +80
>                   _u_boot_list_2_uclass_driver_2_rng           -      72     +72
>                   efi_init_obj_list                         2304    2368     +64
>                   static.uclass_get_device                     -      56     +56
>                   label_boot                                1316    1372     +56
>                   _rproc_name_is_unique                        -      52     +52
>                   gen_rand_uuid_str                          108     144     +36
>                   efi_guid_rng_protocol                        -      16     +16
>                   dm_rng_read                                  -      16     +16
>                   static.env_do_env_set                      272     280      +8
>                   fdt_chosen                                 172     180      +8
>                   efi_rng_protocol                             -       8      +8
>                   cli_readline_into_buffer                  1716    1724      +8
>                   parse_pxefile_top                          928     932      +4
>                   bootflow_scan_next                         272     276      +4
>                   vbe_req_aslr_rand                            8       4      -4
>                   serial_init                                316     276     -40
>                   static._rproc_name_is_unique                52       -     -52
>                   static.try_load_entry                      596       -    -596
> 
Hi Tom,

Actually, the CONFIG_DM_RNG gets enabled in R5. Sorry about that.

I will send a v2 patch which fixes that.

Regards

Gokul


More information about the U-Boot mailing list