Skip to contentSkip to conversation

arm: mach-k3: am62a7_init: Open up FSS_DAT_REG3 firewall

PATCH In review Vignesh Raghavendra 2 participants 2 messages Jul 2, 2023 – Jul 21, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: mach-k3: am62a7_init: Open up FSS_DAT_REG3 firewall

On security enforced (HS-SE) devices ROM firewalls OSPI data region3 that is present in above 64bit region. Open this up in bootloader to allow Linux to access OSPI flashes in mmap mode.

Without this kernel will crash when accessing this region due to firewall violations on HS-SE devices.

---
 arch/arm/mach-k3/am62a7_init.c | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/mach-k3/am62a7_init.c +7 -0
index 1f51b0408969..8ac834cffdf9 100644
@@ -14,6 +14,10 @@
 #include <dm/uclass-internal.h>
 #include <dm/pinctrl.h>
 
+struct fwl_data cbass_main_fwls[] = {
+       { "FSS_DAT_REG3", 7, 8 },
+};
+
 /*
  * This uninitialized global variable would normal end up in the .bss section,
  * but the .bss is cleared between writing and reading this variable, so move
@@ -166,6 +170,9 @@ void board_init_f(ulong dummy)
 	/* Output System Firmware version info */
 	k3_sysfw_print_ver();
 
+       /* Disable ROM configured firewalls right after loading sysfw */
+       remove_fwl_configs(cbass_main_fwls, ARRAY_SIZE(cbass_main_fwls));
+
 #if defined(CONFIG_K3_AM62A_DDRSS)
 	ret = uclass_get_device(UCLASS_RAM, 0, &dev);
 	if (ret)
Signature · 1 line
2.40.1
#1 lore raw
Quoted 8 lines · Vignesh Raghavendra

On security enforced (HS-SE) devices ROM firewalls OSPI data region3 that is present in above 64bit region. Open this up in bootloader to allow Linux to access OSPI flashes in mmap mode.

Without this kernel will crash when accessing this region due to firewall violations on HS-SE devices.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom