AM64x MCU+ SDK  08.05.00

Introduction

This module contains APIs to program and use the firewall module. The APIs can be used by others to get access to firewall module.

Files

file  firewall/v0/firewall.h
 Firewall Driver API/interface file.
 

Data Structures

struct  Firewall_RegionCfg
 Firewall Region Cfg specifies the MMR configuration for the specified firewall ID. More...
 
struct  Firewall_Attrs
 Firewall atributes. More...
 
struct  Firewall_Object
 Firewall driver Object. More...
 
struct  Firewall_Config
 Firewall Instance Configuration. Pointer to this object is returned as handle by driver open. More...
 

Functions

void Firewall_init (void)
 This function initializes the firewall module. More...
 
void Firewall_deinit (void)
 This function de-initializes the firewall module. More...
 
int32_t Firewall_open (Firewall_Handle handle)
 This function opens a given Firewall peripheral. More...
 
void Firewall_close (Firewall_Handle handle)
 Function to close Firewall peripheral specified by firewall handle. More...
 
int32_t Firewall_configureRegion (Firewall_Handle handle, Firewall_Attrs *attrs)
 Intialize a firewall with multiple regions. More...
 

Typedefs

typedef void * Firewall_Handle
 A handle that is initialized in Firewall_open() call. More...
 

Macros

#define FWL_MAX_PRIVID_SLOTS   (3U)
 Maximun number of privilege ID slots. More...
 

Master Privilege ID's

Privilege ID's of Master

#define PRIVID_NONE   (0U)
 
#define PRIVID_EVERYONE   (195U)
 
#define PRIVID_DMSC   (202U)
 
#define PRIVID_BLOCK_EVERYONE   (197U)
 
#define PRIVID_SPROXY_PRIVATE   (11U)
 
#define PRIVID_A53_NON_SECURE   (1U)
 
#define PRIVID_A53_SECURE   (1U)
 
#define PRIVID_M4_0_NON_SECURE   (100U)
 
#define PRIVID_MAIN_0_R5_0_NONSECURE   (212U)
 
#define PRIVID_MAIN_0_R5_0_SECURE   (212U)
 
#define PRIVID_MAIN_0_R5_1_NONSECURE   (213U)
 
#define PRIVID_MAIN_0_R5_1_SECURE   (213U)
 
#define PRIVID_MAIN_1_R5_0_NONSECURE   (214U)
 
#define PRIVID_MAIN_1_R5_0_SECURE   (214U)
 
#define PRIVID_MAIN_1_R5_1_NONSECURE   (215U)
 
#define PRIVID_MAIN_1_R5_1_SECURE   (215U)
 
#define PRIVID_MAIN_0_ICSSG_0   (136U)
 

Firewall Control Mask

Control mask of word of Firewall

#define FWL_CONTROL_ENABLE_MASK   (0xFU)
 
#define FWL_CONTROL_DISABLE   (0x0U)
 
#define FWL_CONTROL_ENABLE   (0xAU)
 
#define FWL_CONTROL_LOCK   (0x10U)
 
#define FWL_CONTROL_BG   (0x100U)
 
#define FWL_CONTROL_CACHE_MODE   (0x200U)
 

Firewall Permission Mask

Permission mask of Firewall

#define FWL_PERM_SEC_MASK   (0x00FFU)
 
#define FWL_PERM_NSEC_MASK   (0xFF00U)
 
#define FWL_PERM_PRIV_MASK   (0x0F0FU)
 
#define FWL_PERM_USER_MASK   (0xF0F0U)
 
#define FWL_PERM_WRITE_MASK   (0x1111U)
 
#define FWL_PERM_READ_MASK   (0x2222U)
 
#define FWL_PERM_CACHE_MASK   (0x4444U)
 
#define FWL_PERM_DEBUG_MASK   (0x8888U)
 
#define FWL_PERM_DENY_ALL   (0x0000U)
 

Macros for Firewall Permission's

Macros for Firewall permission's

#define FWL_PERM_RW_ALL
 
#define FWL_PERM_RO_ALL
 
#define FWL_PERM_WO_ALL
 
#define FWL_PERM_SEC_RW
 
#define FWL_PERM_NSEC_RW
 
#define FWL_PERM_PRIV_RW
 
#define FWL_PERM_USER_RW
 
#define FWL_PERM_SEC_RO
 
#define FWL_PERM_NSEC_RO
 
#define FWL_PERM_PRIV_RO
 
#define FWL_PERM_USER_RO
 

Macro Definition Documentation

◆ FWL_MAX_PRIVID_SLOTS

#define FWL_MAX_PRIVID_SLOTS   (3U)

Maximun number of privilege ID slots.

◆ PRIVID_NONE

#define PRIVID_NONE   (0U)

◆ PRIVID_EVERYONE

#define PRIVID_EVERYONE   (195U)

◆ PRIVID_DMSC

#define PRIVID_DMSC   (202U)

◆ PRIVID_BLOCK_EVERYONE

#define PRIVID_BLOCK_EVERYONE   (197U)

◆ PRIVID_SPROXY_PRIVATE

#define PRIVID_SPROXY_PRIVATE   (11U)

◆ PRIVID_A53_NON_SECURE

#define PRIVID_A53_NON_SECURE   (1U)

◆ PRIVID_A53_SECURE

#define PRIVID_A53_SECURE   (1U)

◆ PRIVID_M4_0_NON_SECURE

#define PRIVID_M4_0_NON_SECURE   (100U)

◆ PRIVID_MAIN_0_R5_0_NONSECURE

#define PRIVID_MAIN_0_R5_0_NONSECURE   (212U)

◆ PRIVID_MAIN_0_R5_0_SECURE

#define PRIVID_MAIN_0_R5_0_SECURE   (212U)

◆ PRIVID_MAIN_0_R5_1_NONSECURE

#define PRIVID_MAIN_0_R5_1_NONSECURE   (213U)

◆ PRIVID_MAIN_0_R5_1_SECURE

#define PRIVID_MAIN_0_R5_1_SECURE   (213U)

◆ PRIVID_MAIN_1_R5_0_NONSECURE

#define PRIVID_MAIN_1_R5_0_NONSECURE   (214U)

◆ PRIVID_MAIN_1_R5_0_SECURE

#define PRIVID_MAIN_1_R5_0_SECURE   (214U)

◆ PRIVID_MAIN_1_R5_1_NONSECURE

#define PRIVID_MAIN_1_R5_1_NONSECURE   (215U)

◆ PRIVID_MAIN_1_R5_1_SECURE

#define PRIVID_MAIN_1_R5_1_SECURE   (215U)

◆ PRIVID_MAIN_0_ICSSG_0

#define PRIVID_MAIN_0_ICSSG_0   (136U)

◆ FWL_CONTROL_ENABLE_MASK

#define FWL_CONTROL_ENABLE_MASK   (0xFU)

◆ FWL_CONTROL_DISABLE

#define FWL_CONTROL_DISABLE   (0x0U)

◆ FWL_CONTROL_ENABLE

#define FWL_CONTROL_ENABLE   (0xAU)

◆ FWL_CONTROL_LOCK

#define FWL_CONTROL_LOCK   (0x10U)

◆ FWL_CONTROL_BG

#define FWL_CONTROL_BG   (0x100U)

◆ FWL_CONTROL_CACHE_MODE

#define FWL_CONTROL_CACHE_MODE   (0x200U)

◆ FWL_PERM_SEC_MASK

#define FWL_PERM_SEC_MASK   (0x00FFU)

◆ FWL_PERM_NSEC_MASK

#define FWL_PERM_NSEC_MASK   (0xFF00U)

◆ FWL_PERM_PRIV_MASK

#define FWL_PERM_PRIV_MASK   (0x0F0FU)

◆ FWL_PERM_USER_MASK

#define FWL_PERM_USER_MASK   (0xF0F0U)

◆ FWL_PERM_WRITE_MASK

#define FWL_PERM_WRITE_MASK   (0x1111U)

◆ FWL_PERM_READ_MASK

#define FWL_PERM_READ_MASK   (0x2222U)

◆ FWL_PERM_CACHE_MASK

#define FWL_PERM_CACHE_MASK   (0x4444U)

◆ FWL_PERM_DEBUG_MASK

#define FWL_PERM_DEBUG_MASK   (0x8888U)

◆ FWL_PERM_DENY_ALL

#define FWL_PERM_DENY_ALL   (0x0000U)

◆ FWL_PERM_RW_ALL

#define FWL_PERM_RW_ALL
Value:
FWL_PERM_READ_MASK | \
FWL_PERM_CACHE_MASK | \
FWL_PERM_DEBUG_MASK)

◆ FWL_PERM_RO_ALL

#define FWL_PERM_RO_ALL
Value:
FWL_PERM_CACHE_MASK | \
FWL_PERM_DEBUG_MASK)

◆ FWL_PERM_WO_ALL

#define FWL_PERM_WO_ALL
Value:
FWL_PERM_CACHE_MASK | \
FWL_PERM_DEBUG_MASK)

◆ FWL_PERM_SEC_RW

#define FWL_PERM_SEC_RW
Value:
FWL_PERM_RW_ALL)

◆ FWL_PERM_NSEC_RW

#define FWL_PERM_NSEC_RW
Value:
FWL_PERM_RW_ALL)

◆ FWL_PERM_PRIV_RW

#define FWL_PERM_PRIV_RW
Value:
FWL_PERM_RW_ALL)

◆ FWL_PERM_USER_RW

#define FWL_PERM_USER_RW
Value:
FWL_PERM_RW_ALL)

◆ FWL_PERM_SEC_RO

#define FWL_PERM_SEC_RO
Value:
FWL_PERM_RO_ALL)

◆ FWL_PERM_NSEC_RO

#define FWL_PERM_NSEC_RO
Value:
FWL_PERM_RO_ALL)

◆ FWL_PERM_PRIV_RO

#define FWL_PERM_PRIV_RO
Value:
FWL_PERM_RO_ALL)

◆ FWL_PERM_USER_RO

#define FWL_PERM_USER_RO
Value:
FWL_PERM_RO_ALL)

Typedef Documentation

◆ Firewall_Handle

typedef void* Firewall_Handle

A handle that is initialized in Firewall_open() call.

Function Documentation

◆ Firewall_init()

void Firewall_init ( void  )

This function initializes the firewall module.

◆ Firewall_deinit()

void Firewall_deinit ( void  )

This function de-initializes the firewall module.

◆ Firewall_open()

int32_t Firewall_open ( Firewall_Handle  handle)

This function opens a given Firewall peripheral.

Precondition
Firewall controlled has been initialized using Firewall_init()
Parameters
handleFirewall_Handle initialized in Firewall_open()
Returns
SystemP_SUCCESS on success, SystemP_FAILURE otherwise

◆ Firewall_close()

void Firewall_close ( Firewall_Handle  handle)

Function to close Firewall peripheral specified by firewall handle.

Precondition
Firewall_open() has to be called first
Parameters
handleFirewall_Handle initialized in Firewall_open()

◆ Firewall_configureRegion()

int32_t Firewall_configureRegion ( Firewall_Handle  handle,
Firewall_Attrs attrs 
)

Intialize a firewall with multiple regions.

Parameters
handleFirewall_Handle initialized in Firewall_open()
attrsFirewall configuration parameters
Returns
SystemP_SUCCESS on success, SystemP_FAILURE otherwise
FWL_PERM_SEC_MASK
#define FWL_PERM_SEC_MASK
Definition: firewall/v0/firewall.h:125
FWL_PERM_PRIV_MASK
#define FWL_PERM_PRIV_MASK
Definition: firewall/v0/firewall.h:127
FWL_PERM_NSEC_MASK
#define FWL_PERM_NSEC_MASK
Definition: firewall/v0/firewall.h:126
FWL_PERM_READ_MASK
#define FWL_PERM_READ_MASK
Definition: firewall/v0/firewall.h:131
FWL_PERM_WRITE_MASK
#define FWL_PERM_WRITE_MASK
Definition: firewall/v0/firewall.h:130
FWL_PERM_USER_MASK
#define FWL_PERM_USER_MASK
Definition: firewall/v0/firewall.h:128