mbox series

[0/2] add support for hs bootflows on am62 devices

Message ID 20230302141047.3175114-1-kamlesh@ti.com
Headers show
Series add support for hs bootflows on am62 devices | expand

Message

Kamlesh Gurudasani March 2, 2023, 2:10 p.m. UTC
From: Kamlesh Gurudasani <kamlesh@ti.com>

Add support for high security bootflow on am62 devices.

On HS devices, ROM and TIFS will protect the RAM regions with
firewalls. This means the wakeup domain's SPL will need to move the
stack and heap to HSM RAM to ensure it stays within its allotted
memory regions.

Kamlesh Gurudasani (2):
  arm: mach-k3: am62: move scratch board area to HSM RAM
  configs: am62: move stack and heap to HSM RAM

 arch/arm/mach-k3/include/mach/am62_hardware.h |  3 +--
 configs/am62x_evm_r5_defconfig                | 16 +++++++++++-----
 2 files changed, 12 insertions(+), 7 deletions(-)

Comments

Bryan Brattlof March 3, 2023, 1:21 a.m. UTC | #1
Hi Kamlesh!

On March  2, 2023 thus sayeth kamlesh@ti.com:
> From: Kamlesh Gurudasani <kamlesh@ti.com>
> 
> Add support for high security bootflow on am62 devices.
> 
> On HS devices, ROM and TIFS will protect the RAM regions with
> firewalls. This means the wakeup domain's SPL will need to move the
> stack and heap to HSM RAM to ensure it stays within its allotted
> memory regions.
> 
> Kamlesh Gurudasani (2):
>   arm: mach-k3: am62: move scratch board area to HSM RAM
>   configs: am62: move stack and heap to HSM RAM
> 
>  arch/arm/mach-k3/include/mach/am62_hardware.h |  3 +--
>  configs/am62x_evm_r5_defconfig                | 16 +++++++++++-----
>  2 files changed, 12 insertions(+), 7 deletions(-)

Thanks for getting this fixed! Does TIFS drop the On Chip SRAM firewall 
completely once it's started? or only for the r5?

Reviewed-by: Bryan Brattlof <bb@ti.com>

~Bryan
Kamlesh Gurudasani March 3, 2023, 9:09 a.m. UTC | #2
Bryan Brattlof <bb@ti.com> writes:

> Hi Kamlesh!
>
> On March  2, 2023 thus sayeth kamlesh@ti.com:
>> From: Kamlesh Gurudasani <kamlesh@ti.com>
>> 
>> Add support for high security bootflow on am62 devices.
>> 
>> On HS devices, ROM and TIFS will protect the RAM regions with
>> firewalls. This means the wakeup domain's SPL will need to move the
>> stack and heap to HSM RAM to ensure it stays within its allotted
>> memory regions.
...

>
> Thanks for getting this fixed! Does TIFS drop the On Chip SRAM firewall 
> completely once it's started? or only for the r5?
It is open completely after TIFS drops it.

It is generic RAM, should be available for use to
all cores. Ideally, it should have been opened up by ROM only, then we
wouldn't have run in to this issue. (r5 accessing it before TIFS opens
it up)

Thanks for the review.

> Reviewed-by: Bryan Brattlof <bb@ti.com>
>
> ~Bryan
Kamlesh Gurudasani March 16, 2023, 10:35 a.m. UTC | #3
Bryan Brattlof <bb@ti.com> writes:

> Hi Kamlesh!
>
> On March  2, 2023 thus sayeth kamlesh@ti.com:
>> From: Kamlesh Gurudasani <kamlesh@ti.com>
>> 
>> Add support for high security bootflow on am62 devices.
>> 
>> On HS devices, ROM and TIFS will protect the RAM regions with
>> firewalls. This means the wakeup domain's SPL will need to move the
>> stack and heap to HSM RAM to ensure it stays within its allotted
>> memory regions.
>> 
>> Kamlesh Gurudasani (2):
>>   arm: mach-k3: am62: move scratch board area to HSM RAM
>>   configs: am62: move stack and heap to HSM RAM
>> 
>>  arch/arm/mach-k3/include/mach/am62_hardware.h |  3 +--
>>  configs/am62x_evm_r5_defconfig                | 16 +++++++++++-----
>>  2 files changed, 12 insertions(+), 7 deletions(-)
>
> Thanks for getting this fixed! Does TIFS drop the On Chip SRAM firewall 
> completely once it's started? or only for the r5?
>
> Reviewed-by: Bryan Brattlof <bb@ti.com>
>
> ~Bryan
Hi Tom,

Could you please review and merge this patches as these are bug fixes to
get HS devices working.

Thanks.

~Kamlesh
Tom Rini March 16, 2023, 6:15 p.m. UTC | #4
On Thu, Mar 16, 2023 at 04:05:06PM +0530, Kamlesh Gurudasani wrote:
> Bryan Brattlof <bb@ti.com> writes:
> 
> > Hi Kamlesh!
> >
> > On March  2, 2023 thus sayeth kamlesh@ti.com:
> >> From: Kamlesh Gurudasani <kamlesh@ti.com>
> >> 
> >> Add support for high security bootflow on am62 devices.
> >> 
> >> On HS devices, ROM and TIFS will protect the RAM regions with
> >> firewalls. This means the wakeup domain's SPL will need to move the
> >> stack and heap to HSM RAM to ensure it stays within its allotted
> >> memory regions.
> >> 
> >> Kamlesh Gurudasani (2):
> >>   arm: mach-k3: am62: move scratch board area to HSM RAM
> >>   configs: am62: move stack and heap to HSM RAM
> >> 
> >>  arch/arm/mach-k3/include/mach/am62_hardware.h |  3 +--
> >>  configs/am62x_evm_r5_defconfig                | 16 +++++++++++-----
> >>  2 files changed, 12 insertions(+), 7 deletions(-)
> >
> > Thanks for getting this fixed! Does TIFS drop the On Chip SRAM firewall 
> > completely once it's started? or only for the r5?
> >
> > Reviewed-by: Bryan Brattlof <bb@ti.com>
> >
> > ~Bryan
> Hi Tom,
> 
> Could you please review and merge this patches as these are bug fixes to
> get HS devices working.

Is this a regression fix vs v2023.01 or new feature support? Thanks.
Kamlesh Gurudasani March 17, 2023, 8:51 a.m. UTC | #5
Tom Rini <trini@konsulko.com> writes:
...
>> Hi Tom,
>> 
>> Could you please review and merge this patches as these are bug fixes to
>> get HS devices working.
>
> Is this a regression fix vs v2023.01 or new feature support? Thanks.
Its regression fix vs 2023.01 for HS devices. Thanks.

~Kamlesh
>
> -- 
> Tom
Tom Rini March 17, 2023, 2:37 p.m. UTC | #6
On Fri, Mar 17, 2023 at 02:21:16PM +0530, Kamlesh Gurudasani wrote:
> Tom Rini <trini@konsulko.com> writes:
> ...
> >> Hi Tom,
> >> 
> >> Could you please review and merge this patches as these are bug fixes to
> >> get HS devices working.
> >
> > Is this a regression fix vs v2023.01 or new feature support? Thanks.
> Its regression fix vs 2023.01 for HS devices. Thanks.

To be clear, when did HS support work on am62, upstream?
Kamlesh Gurudasani March 20, 2023, 8:34 a.m. UTC | #7
Tom Rini <trini@konsulko.com> writes:

> On Fri, Mar 17, 2023 at 02:21:16PM +0530, Kamlesh Gurudasani wrote:
>> Tom Rini <trini@konsulko.com> writes:
>> ...
>> >> Hi Tom,
>> >> 
>> >> Could you please review and merge this patches as these are bug fixes to
>> >> get HS devices working.
>> >
>> > Is this a regression fix vs v2023.01 or new feature support? Thanks.
>> Its regression fix vs 2023.01 for HS devices. Thanks.
>
> To be clear, when did HS support work on am62, upstream?
We have three devices GP, HS-FS and HS-SE
GP and HS-FS works with same r5 spl config.

With recent changes in system firmware update it broke HS-FS, beacuse
firewall condition were overlooked while adding r5-spl config.
This series make sure that those firewall conditions are satisfied.

Once HS-FS is working it needs small change in r5-spl config to get HS-SE working.
Changes needed for HS-SE to work will be sent in another patch.  

~Kamlesh
>
> -- 
> Tom