arm: K3: Disable ROM configured firewalls
authorAndrew F. Davis <afd@ti.com>
Fri, 10 Jan 2020 19:35:21 +0000 (14:35 -0500)
committerLokesh Vutla <lokeshvutla@ti.com>
Mon, 20 Jan 2020 04:40:28 +0000 (10:10 +0530)
commitea70da142c711c0e8fd9c18e725015b32c5c9357
tree6a61f19a157ba0558083e10c899442d6fe7d6094
parent9b322dbd527bda6e51fd8ea0992b46c50da239f1
arm: K3: Disable ROM configured firewalls

ROM configures certain firewalls based on its usage, which includes
the one in front of boot peripherals. In specific case of boot
peripherals, ROM does not open up the full address space corresponding
to the peripherals. Like in OSPI, ROM only configures the firewall region
for 32 bit address space and mark 64bit address space flash regions
as in-accessible.

When security-cfg is initialized by sysfw, all the non-configured
firewalls are kept in bypass state using a global setting. Since ROM
configured firewalls for certain peripherals, these will not be touched.
So when bootloader touches any of the address space that ROM marked as
in-accessible, system raises a firewall exception causing boot hang.

It would have been ideal if sysfw cleans up the ROM configured boot
peripheral firewalls. Given the memory overhead to store this
information provided by ROM and the boot time increase in re configuring
the firewalls, it is concluded to clean this up in bootloaders.

So disable all the firewalls that ROM doesn't open up the full address
space.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Venkateswara Rao Mandela <venkat.mandela@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
arch/arm/mach-k3/am6_init.c
arch/arm/mach-k3/common.c
arch/arm/mach-k3/common.h
arch/arm/mach-k3/j721e_init.c