feat(intel): create source file for firewall configuration
Move codes that previously were part of system_manager driver into firewall driver which are more appropriate based on their functionalities. Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com> Change-Id: I35e9d792f35ee7491c2f306781417a0c8faae3fd Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
This commit is contained in:
parent
bc1a573d55
commit
afa0b1a82a
|
@ -48,10 +48,10 @@ BL2_SOURCES += \
|
|||
plat/intel/soc/common/socfpga_image_load.c \
|
||||
plat/intel/soc/common/socfpga_storage.c \
|
||||
plat/intel/soc/common/soc/socfpga_emac.c \
|
||||
plat/intel/soc/common/soc/socfpga_firewall.c \
|
||||
plat/intel/soc/common/soc/socfpga_handoff.c \
|
||||
plat/intel/soc/common/soc/socfpga_mailbox.c \
|
||||
plat/intel/soc/common/soc/socfpga_reset_manager.c \
|
||||
plat/intel/soc/common/soc/socfpga_system_manager.c \
|
||||
plat/intel/soc/common/drivers/qspi/cadence_qspi.c \
|
||||
plat/intel/soc/common/drivers/wdt/watchdog.c \
|
||||
plat/intel/soc/common/drivers/ccu/ncore_ccu.c
|
||||
|
|
|
@ -8,6 +8,13 @@
|
|||
#define SOCFPGA_NOC_H
|
||||
|
||||
/* Macros */
|
||||
#define SCR_AXI_AP_MASK BIT(24)
|
||||
#define SCR_FPGA2SOC_MASK BIT(16)
|
||||
#define SCR_MPU_MASK BIT(0)
|
||||
#define DISABLE_L4_FIREWALL (SCR_AXI_AP_MASK | SCR_FPGA2SOC_MASK \
|
||||
| SCR_MPU_MASK)
|
||||
#define DISABLE_BRIDGE_FIREWALL 0x0ffe0101
|
||||
|
||||
#define SOCFPGA_CCU_NOC(_ctrl, _dev) (SOCFPGA_CCU_NOC_REG_BASE \
|
||||
+ (SOCFPGA_CCU_NOC_##_ctrl##_##_dev))
|
||||
|
||||
|
@ -78,5 +85,10 @@
|
|||
#define SOCFPGA_CCU_NOC_ADMASK_P_MASK BIT(0)
|
||||
#define SOCFPGA_CCU_NOC_ADMASK_NS_MASK BIT(1)
|
||||
|
||||
#endif
|
||||
/* Function Definitions */
|
||||
|
||||
void enable_ns_peripheral_access(void);
|
||||
void enable_ns_bridge_access(void);
|
||||
void enable_ns_ocram_access(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -42,13 +42,6 @@
|
|||
#define IDLE_DATA_SOC2FPGA BIT(4)
|
||||
#define IDLE_DATA_MASK (IDLE_DATA_LWSOC2FPGA | IDLE_DATA_SOC2FPGA)
|
||||
|
||||
#define SCR_AXI_AP_MASK BIT(24)
|
||||
#define SCR_FPGA2SOC_MASK BIT(16)
|
||||
#define SCR_MPU_MASK BIT(0)
|
||||
#define DISABLE_L4_FIREWALL (SCR_AXI_AP_MASK | SCR_FPGA2SOC_MASK \
|
||||
| SCR_MPU_MASK)
|
||||
#define DISABLE_BRIDGE_FIREWALL 0x0ffe0101
|
||||
|
||||
#define SYSMGR_ECC_OCRAM_MASK BIT(1)
|
||||
#define SYSMGR_ECC_DDR0_MASK BIT(16)
|
||||
#define SYSMGR_ECC_DDR1_MASK BIT(17)
|
||||
|
@ -58,8 +51,4 @@
|
|||
#define SOCFPGA_SYSMGR(_reg) (SOCFPGA_SYSMGR_REG_BASE \
|
||||
+ (SOCFPGA_SYSMGR_##_reg))
|
||||
|
||||
|
||||
void enable_ns_peripheral_access(void);
|
||||
void enable_ns_bridge_access(void);
|
||||
|
||||
#endif /* SOCFPGA_SYSTEMMANAGER_H */
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <lib/utils_def.h>
|
||||
|
||||
#include "socfpga_noc.h"
|
||||
#include "socfpga_plat_def.h"
|
||||
#include "socfpga_system_manager.h"
|
||||
|
||||
void enable_nonsecure_access(void)
|
||||
|
@ -93,12 +94,18 @@ void enable_ns_peripheral_access(void)
|
|||
mmio_write_32(SOCFPGA_L4_SYS_SCR(L4_NOC_QOS), DISABLE_L4_FIREWALL);
|
||||
|
||||
#if PLATFORM_MODEL == PLAT_SOCFPGA_STRATIX10
|
||||
enable_ns_ocram_access();
|
||||
mmio_write_32(SOCFPGA_SYSMGR(SDMMC), SYSMGR_SDMMC_DRVSEL(3));
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void enable_ns_ocram_access(void)
|
||||
{
|
||||
mmio_clrbits_32(SOCFPGA_CCU_NOC(CPU0, RAM0),
|
||||
SOCFPGA_CCU_NOC_ADMASK_P_MASK | SOCFPGA_CCU_NOC_ADMASK_NS_MASK);
|
||||
mmio_clrbits_32(SOCFPGA_CCU_NOC(IOM, RAM0),
|
||||
SOCFPGA_CCU_NOC_ADMASK_P_MASK | SOCFPGA_CCU_NOC_ADMASK_NS_MASK);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void enable_ns_bridge_access(void)
|
|
@ -47,10 +47,10 @@ BL2_SOURCES += \
|
|||
plat/intel/soc/common/socfpga_image_load.c \
|
||||
plat/intel/soc/common/socfpga_storage.c \
|
||||
plat/intel/soc/common/soc/socfpga_emac.c \
|
||||
plat/intel/soc/common/soc/socfpga_firewall.c \
|
||||
plat/intel/soc/common/soc/socfpga_handoff.c \
|
||||
plat/intel/soc/common/soc/socfpga_mailbox.c \
|
||||
plat/intel/soc/common/soc/socfpga_reset_manager.c \
|
||||
plat/intel/soc/common/soc/socfpga_system_manager.c \
|
||||
plat/intel/soc/common/drivers/qspi/cadence_qspi.c \
|
||||
plat/intel/soc/common/drivers/wdt/watchdog.c
|
||||
|
||||
|
|
Loading…
Reference in New Issue