RTEMS 6.1-rc2
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Enumerations | Enumerator | Functions | Variables
Xrdc2

Data Structures

struct  _xrdc2_master_domain_assignment
 Domain assignment for the bus master. More...
 
struct  _xrdc2_periph_access_config
 XRDC2 peripheral domain access control configuration. More...
 
struct  _xrdc2_mem_access_config
 XRDC2 memory region domain access control configuration. More...
 
struct  _xrdc2_mem_slot_access_config
 XRDC2 memory slot domain access control configuration. More...
 

Macros

#define FSL_XRDC2_DRIVER_VERSION   (MAKE_VERSION(2, 0, 2))
 Driver version.
 
#define XRDC2_EAL_FORCE_RELEASE_MAGIC_0   0x02000046UL
 
#define XRDC2_EAL_FORCE_RELEASE_MAGIC_1   0x02000052UL
 
#define XRDC2_EAL_DISABLE   (0UL << XRDC2_MSC_MSAC_W1_EAL_SHIFT)
 
#define XRDC2_EAL_DISABLE_UNTIL_RESET   (1UL << XRDC2_MSC_MSAC_W1_EAL_SHIFT)
 
#define XRDC2_EAL_UNLOCKED   (2UL << XRDC2_MSC_MSAC_W1_EAL_SHIFT)
 
#define XRDC2_EAL_LOCKED   (3UL << XRDC2_MSC_MSAC_W1_EAL_SHIFT)
 
#define XRDC2_EAL_MASK   XRDC2_MSC_MSAC_W1_EAL_MASK
 

Typedefs

typedef enum _xrdc2_global_config_lock xrdc2_global_config_lock_t
 Global configuration lock.
 
typedef enum _xrdc2_secure_attr xrdc2_secure_attr_t
 XRDC2 secure attribute, the register bit MDACi_MDAj_W0[SA], secure/nonsecure attribute output on a hit.
 
typedef enum _xrdc2_privilege_attr xrdc2_privilege_attr_t
 XRDC2 privileged attribute, the register bit MDACi_MDAj_W0[PA], defines the privileged/user attribute on a hit.
 
typedef struct _xrdc2_master_domain_assignment xrdc2_master_domain_assignment_t
 Domain assignment for the bus master.
 
typedef enum _xrdc2_access_policy xrdc2_access_policy_t
 XRDC2 domain access control policy.
 
typedef enum _xrdc2_access_config_lock xrdc2_access_config_lock_t
 Access configuration lock mode, the register field PDAC and MRGD LK2.
 
typedef struct _xrdc2_periph_access_config xrdc2_periph_access_config_t
 XRDC2 peripheral domain access control configuration.
 
typedef struct _xrdc2_mem_access_config xrdc2_mem_access_config_t
 XRDC2 memory region domain access control configuration.
 
typedef struct _xrdc2_mem_slot_access_config xrdc2_mem_slot_access_config_t
 XRDC2 memory slot domain access control configuration.
 

Enumerations

enum  _xrdc2_global_config_lock { kXRDC2_GlobalConfigLockDisabled , kXRDC2_GlobalConfigLockDisabledUntilReset , kXRDC2_GlobalConfigLockOwnerOnly , kXRDC2_GlobalConfigLockEnabledUntilReset }
 Global configuration lock. More...
 
enum  _xrdc2_secure_attr { kXRDC2_MasterSecure = 0 , kXRDC2_ForceSecure = 2 , kXRDC2_ForceNonSecure = 3 }
 XRDC2 secure attribute, the register bit MDACi_MDAj_W0[SA], secure/nonsecure attribute output on a hit. More...
 
enum  _xrdc2_privilege_attr { kXRDC2_MasterPrivilege = 0 , kXRDC2_ForceUser = 2 , kXRDC2_ForcePrivilege = 3 }
 XRDC2 privileged attribute, the register bit MDACi_MDAj_W0[PA], defines the privileged/user attribute on a hit. More...
 
enum  _xrdc2_access_policy {
  kXRDC2_AccessPolicyNone = 0U , kXRDC2_AccessPolicyAlt1 = 1U , kXRDC2_AccessPolicyAlt2 = 2U , kXRDC2_AccessPolicyAlt3 = 3U ,
  kXRDC2_AccessPolicyAlt4 = 4U , kXRDC2_AccessPolicyAlt5 = 5U , kXRDC2_AccessPolicyAlt6 = 6U , kXRDC2_AccessPolicyAll = 7U
}
 XRDC2 domain access control policy.
 
enum  _xrdc2_access_config_lock { kXRDC2_AccessConfigLockDisabled = 0U , kXRDC2_AccessConfigLockDisabledUntilReset = 1U , kXRDC2_AccessConfigLockDomainXOnly = 2U , kXRDC2_AccessConfigLockEnabledUntilReset = 3U }
 Access configuration lock mode, the register field PDAC and MRGD LK2. More...
 

Functions

void XRDC2_Init (XRDC2_Type *base)
 Initializes the XRDC2 module.
 
void XRDC2_Deinit (XRDC2_Type *base)
 De-initializes the XRDC2 module.
 

Variables

bool _xrdc2_master_domain_assignment::lock
 
xrdc2_privilege_attr_t _xrdc2_master_domain_assignment::privilegeAttr
 
xrdc2_secure_attr_t _xrdc2_master_domain_assignment::secureAttr
 
uint8_t _xrdc2_master_domain_assignment::domainId
 
uint16_t _xrdc2_master_domain_assignment::mask
 
uint16_t _xrdc2_master_domain_assignment::match
 
xrdc2_access_config_lock_t _xrdc2_periph_access_config::lockMode
 
xrdc2_access_policy_t _xrdc2_periph_access_config::policy [FSL_FEATURE_XRDC2_DOMAIN_COUNT]
 
uint32_t _xrdc2_mem_access_config::startAddr
 
uint32_t _xrdc2_mem_access_config::endAddr
 
xrdc2_access_config_lock_t _xrdc2_mem_access_config::lockMode
 
xrdc2_access_policy_t _xrdc2_mem_access_config::policy [FSL_FEATURE_XRDC2_DOMAIN_COUNT]
 
xrdc2_access_config_lock_t _xrdc2_mem_slot_access_config::lockMode
 
xrdc2_access_policy_t _xrdc2_mem_slot_access_config::policy [FSL_FEATURE_XRDC2_DOMAIN_COUNT]
 

XRDC2 manager (XRDC2)

void XRDC2_SetGlobalValid (XRDC2_Type *base, bool valid)
 Sets the XRDC2 global valid.
 

XRDC2 Master Domain Assignment Controller (XRDC2_MDAC).

void XRDC2_GetDefaultMasterDomainAssignment (xrdc2_master_domain_assignment_t *assignment)
 Gets the default master domain assignment.
 
void XRDC2_SetMasterDomainAssignment (XRDC2_Type *base, xrdc2_master_t master, uint8_t assignIndex, const xrdc2_master_domain_assignment_t *assignment)
 Sets the processor bus master domain assignment.
 

XRDC2 Memory Slot Access Controller (XRDC2_MSC).

void XRDC2_GetMemSlotAccessDefaultConfig (xrdc2_mem_slot_access_config_t *config)
 Gets the default memory slot access configuration.
 
void XRDC2_SetMemSlotAccessConfig (XRDC2_Type *base, xrdc2_mem_slot_t memSlot, const xrdc2_mem_slot_access_config_t *config)
 Sets the memory slot access policy.
 
void XRDC2_SetMemSlotAccessValid (XRDC2_Type *base, xrdc2_mem_slot_t memSlot, bool valid)
 Sets the memory slot descriptor as valid or invalid.
 
void XRDC2_SetMemSlotAccessLockMode (XRDC2_Type *base, xrdc2_mem_slot_t memSlot, xrdc2_access_config_lock_t lockMode)
 Sets the memory slot descriptor lock mode.
 
void XRDC2_SetMemSlotDomainAccessPolicy (XRDC2_Type *base, xrdc2_mem_slot_t memSlot, uint8_t domainId, xrdc2_access_policy_t policy)
 Sets the memory slot access policy for specific domain.
 
void XRDC2_EnableMemSlotExclAccessLock (XRDC2_Type *base, xrdc2_mem_slot_t memSlot, bool enable)
 Enable or disable the memory slot exclusive access lock.
 
uint8_t XRDC2_GetMemSlotExclAccessLockDomainOwner (XRDC2_Type *base, xrdc2_mem_slot_t memSlot)
 Get current memory slot exclusive access lock owner.
 
status_t XRDC2_TryLockMemSlotExclAccess (XRDC2_Type *base, xrdc2_mem_slot_t memSlot)
 Try to lock the memory slot exclusive access.
 
void XRDC2_LockMemSlotExclAccess (XRDC2_Type *base, xrdc2_mem_slot_t memSlot)
 Lock the memory slot exclusive access using blocking method.
 

XRDC2 Memory Region Controller (XRDC2_MRC)

void XRDC2_GetMemAccessDefaultConfig (xrdc2_mem_access_config_t *config)
 Gets the default memory access configuration.
 
void XRDC2_SetMemAccessConfig (XRDC2_Type *base, xrdc2_mem_t mem, const xrdc2_mem_access_config_t *config)
 Sets the memory region access policy.
 
void XRDC2_SetMemAccessValid (XRDC2_Type *base, xrdc2_mem_t mem, bool valid)
 Sets the memory region descriptor as valid or invalid.
 
void XRDC2_SetMemAccessLockMode (XRDC2_Type *base, xrdc2_mem_t mem, xrdc2_access_config_lock_t lockMode)
 Sets the memory descriptor lock mode.
 
void XRDC2_SetMemDomainAccessPolicy (XRDC2_Type *base, xrdc2_mem_t mem, uint8_t domainId, xrdc2_access_policy_t policy)
 Sets the memory region access policy for specific domain.
 
void XRDC2_EnableMemExclAccessLock (XRDC2_Type *base, xrdc2_mem_t mem, bool enable)
 Enable or disable the memory region exclusive access lock.
 
uint8_t XRDC2_GetMemExclAccessLockDomainOwner (XRDC2_Type *base, xrdc2_mem_t mem)
 Get current memory region exclusive access lock owner.
 
status_t XRDC2_TryLockMemExclAccess (XRDC2_Type *base, xrdc2_mem_t mem)
 Try to lock the memory region exclusive access.
 
void XRDC2_LockMemExclAccess (XRDC2_Type *base, xrdc2_mem_t mem)
 Lock the memory region exclusive access using blocking method.
 
void XRDC2_UnlockMemExclAccess (XRDC2_Type *base, xrdc2_mem_t mem)
 Unlock the memory region exclusive access.
 
void XRDC2_ForceMemExclAccessLockRelease (XRDC2_Type *base, xrdc2_mem_t mem)
 Force the memory region exclusive access lock release.
 

XRDC2 Peripheral Access Controller (XRDC2_PAC)

void XRDC2_GetPeriphAccessDefaultConfig (xrdc2_periph_access_config_t *config)
 Gets the default peripheral access configuration.
 
void XRDC2_SetPeriphAccessConfig (XRDC2_Type *base, xrdc2_periph_t periph, const xrdc2_periph_access_config_t *config)
 Sets the peripheral access policy.
 
void XRDC2_SetPeriphAccessValid (XRDC2_Type *base, xrdc2_periph_t periph, bool valid)
 Sets the peripheral descriptor as valid or invalid.
 
void XRDC2_SetPeriphAccessLockMode (XRDC2_Type *base, xrdc2_periph_t periph, xrdc2_access_config_lock_t lockMode)
 Sets the peripheral descriptor lock mode.
 
void XRDC2_SetPeriphDomainAccessPolicy (XRDC2_Type *base, xrdc2_periph_t periph, uint8_t domainId, xrdc2_access_policy_t policy)
 Sets the peripheral access policy for specific domain.
 
void XRDC2_EnablePeriphExclAccessLock (XRDC2_Type *base, xrdc2_periph_t periph, bool enable)
 Disable the peripheral exclusive access lock.
 
uint8_t XRDC2_GetPeriphExclAccessLockDomainOwner (XRDC2_Type *base, xrdc2_periph_t periph)
 Get current peripheral exclusive access lock owner.
 
status_t XRDC2_TryLockPeriphExclAccess (XRDC2_Type *base, xrdc2_periph_t periph)
 Try to lock the peripheral exclusive access.
 
void XRDC2_LockPeriphExclAccess (XRDC2_Type *base, xrdc2_periph_t periph)
 Lock the peripheral exclusive access using blocking method.
 
void XRDC2_UnlockPeriphExclAccess (XRDC2_Type *base, xrdc2_periph_t periph)
 Unlock the peripheral exclusive access.
 
void XRDC2_ForcePeriphExclAccessLockRelease (XRDC2_Type *base, xrdc2_periph_t periph)
 Force the peripheral exclusive access lock release.
 

Detailed Description

Typedef Documentation

◆ xrdc2_master_domain_assignment_t

Domain assignment for the bus master.

XRDC2 compares the bus master match input with the parameter mask and match in this structure. If hit, the domain ID, privilege attribute, and secure attribute are used for the access.

Enumeration Type Documentation

◆ _xrdc2_access_config_lock

Access configuration lock mode, the register field PDAC and MRGD LK2.

Enumerator
kXRDC2_AccessConfigLockDisabled 

Entire PDACn/MRGDn/MSC can be written.

kXRDC2_AccessConfigLockDisabledUntilReset 

Entire PDACn/MRGDn/MSC can be written until next reset.

kXRDC2_AccessConfigLockDomainXOnly 

Domain x only write the DxACP field.

kXRDC2_AccessConfigLockEnabledUntilReset 

PDACn/MRGDn/MSC is read-only until the next reset.

◆ _xrdc2_global_config_lock

Global configuration lock.

Enumerator
kXRDC2_GlobalConfigLockDisabled 

Lock disabled, registers can be written by any domain.

kXRDC2_GlobalConfigLockDisabledUntilReset 

Lock disabled until the next reset.

kXRDC2_GlobalConfigLockOwnerOnly 

Lock enabled, only the lock owner can write.

kXRDC2_GlobalConfigLockEnabledUntilReset 

Lock enabled, all registers are read only until the next reset.

◆ _xrdc2_privilege_attr

XRDC2 privileged attribute, the register bit MDACi_MDAj_W0[PA], defines the privileged/user attribute on a hit.

Enumerator
kXRDC2_MasterPrivilege 

Use the bus master's attribute directly.

kXRDC2_ForceUser 

Force the bus attribute for this master to user.

kXRDC2_ForcePrivilege 

Force the bus attribute for this master to privileged.

◆ _xrdc2_secure_attr

XRDC2 secure attribute, the register bit MDACi_MDAj_W0[SA], secure/nonsecure attribute output on a hit.

Enumerator
kXRDC2_MasterSecure 

Use the bus master's secure/nonsecure attribute directly.

kXRDC2_ForceSecure 

Force the bus attribute for this master to secure.

kXRDC2_ForceNonSecure 

Force the bus attribute for this master to non-secure.

Function Documentation

◆ XRDC2_Deinit()

void XRDC2_Deinit ( XRDC2_Type base)

De-initializes the XRDC2 module.

Parameters
baseXRDC2 peripheral base address.

brief De-initializes the XRDC2 module.

This function disables the XRDC2 clock.

param base XRDC2 peripheral base address.

◆ XRDC2_EnableMemExclAccessLock()

void XRDC2_EnableMemExclAccessLock ( XRDC2_Type base,
xrdc2_mem_t  mem,
bool  enable 
)

Enable or disable the memory region exclusive access lock.

Once disabled, it could not be enabled until reset.

Parameters
baseXRDC2 peripheral base address.
memThe memory region to operate.
enableTrue to enable, false to disable.

brief Disable the memory region exclusive access lock.

Once disabled, it could not be enabled until reset.

param base XRDC2 peripheral base address. param mem The memory region to operate.

◆ XRDC2_EnableMemSlotExclAccessLock()

void XRDC2_EnableMemSlotExclAccessLock ( XRDC2_Type base,
xrdc2_mem_slot_t  memSlot,
bool  enable 
)

Enable or disable the memory slot exclusive access lock.

The lock must be enabled first before use. Once disabled, it could not be enabled until reset.

Parameters
baseXRDC2 peripheral base address.
memSlotThe memory slot to operate.
enableTrue to enable, false to disable.

brief Enable or disable the memory slot exclusive access lock.

The lock must be enabled first before use. Once disabled, it could not be enabled until reset.

param base XRDC2 peripheral base address. param memSlot The memory slot to operate. param enable True to enable, false to disable.

◆ XRDC2_EnablePeriphExclAccessLock()

void XRDC2_EnablePeriphExclAccessLock ( XRDC2_Type base,
xrdc2_periph_t  periph,
bool  enable 
)

Disable the peripheral exclusive access lock.

Once disabled, it could not be enabled until reset.

Parameters
baseXRDC2 peripheral base address.
periphThe peripheral to operate.
enableTrue to enable, false to disable.

brief Disable the peripheral exclusive access lock.

Once disabled, it could not be enabled until reset.

param base XRDC2 peripheral base address. param periph The peripheral to operate. param enable True to enable, false to disable.

◆ XRDC2_ForceMemExclAccessLockRelease()

void XRDC2_ForceMemExclAccessLockRelease ( XRDC2_Type base,
xrdc2_mem_t  mem 
)

Force the memory region exclusive access lock release.

The master does not own the lock could call this function to force release the lock.

Parameters
baseXRDC2 peripheral base address.
memThe memory region to operate.

brief Force the memory region exclusive access lock release.

The master does not own the lock could call this function to force release the lock.

param base XRDC2 peripheral base address. param mem The memory region to operate.

◆ XRDC2_ForcePeriphExclAccessLockRelease()

void XRDC2_ForcePeriphExclAccessLockRelease ( XRDC2_Type base,
xrdc2_periph_t  periph 
)

Force the peripheral exclusive access lock release.

The master does not own the lock could call this function to force release the lock.

Parameters
baseXRDC2 peripheral base address.
periphThe peripheral to operate.

brief Force the peripheral exclusive access lock release.

The master does not own the lock could call this function to force release the lock.

param base XRDC2 peripheral base address. param periph The peripheral to operate.

◆ XRDC2_GetDefaultMasterDomainAssignment()

void XRDC2_GetDefaultMasterDomainAssignment ( xrdc2_master_domain_assignment_t assignment)

Gets the default master domain assignment.

This function sets the assignment as follows:

config->lock = false;
config->privilegeAttr = kXRDC2_MasterPrivilege;
config->domainId = 0U;
config->mask = 0U;
config->match = 0U;
@ kXRDC2_MasterPrivilege
Definition: fsl_xrdc2.h:63
@ kXRDC2_MasterSecure
Definition: fsl_xrdc2.h:52
Definition: deflate.c:114
Parameters
assignmentPointer to the assignment structure.

brief Gets the default master domain assignment.

This function sets the assignment as follows:

code config->lock = false; config->privilegeAttr = kXRDC2_MasterPrivilege; config->secureAttr = kXRDC2_MasterSecure; config->domainId = 0U; config->mask = 0U; config->match = 0U; endcode

param assignment Pointer to the assignment structure.

◆ XRDC2_GetMemAccessDefaultConfig()

void XRDC2_GetMemAccessDefaultConfig ( xrdc2_mem_access_config_t config)

Gets the default memory access configuration.

This function sets the assignment as follows:

config->startAddr = 0U;
config->endAddr = 0xFFFFFFFFU;
config->policy[0] = kXRDC2_AccessPolicyNone;
config->policy[1] = kXRDC2_AccessPolicyNone;
...
@ kXRDC2_AccessConfigLockDisabled
Definition: fsl_xrdc2.h:106
Parameters
configPointer to the configuration.

brief Gets the default memory access configuration.

This function sets the assignment as follows:

code config->startAddr = 0U; config->endAddr = 0xFFFFFFFFU; config->lockMode = kXRDC2_AccessConfigLockDisabled; config->policy[0] = kXRDC2_AccessPolicyNone; config->policy[1] = kXRDC2_AccessPolicyNone; ... endcode

param config Pointer to the configuration.

◆ XRDC2_GetMemExclAccessLockDomainOwner()

uint8_t XRDC2_GetMemExclAccessLockDomainOwner ( XRDC2_Type base,
xrdc2_mem_t  mem 
)

Get current memory region exclusive access lock owner.

Parameters
baseXRDC2 peripheral base address.
memThe memory region to operate.
Returns
The domain ID of the lock owner.

brief Get current memory region exclusive access lock owner.

param base XRDC2 peripheral base address. param mem The memory region to operate. param The domain ID of the lock owner.

◆ XRDC2_GetMemSlotAccessDefaultConfig()

void XRDC2_GetMemSlotAccessDefaultConfig ( xrdc2_mem_slot_access_config_t config)

Gets the default memory slot access configuration.

This function sets the assignment as follows:

config->policy[0] = kXRDC2_AccessPolicyNone;
config->policy[1] = kXRDC2_AccessPolicyNone;
...
Parameters
configPointer to the configuration.

brief Gets the default memory slot access configuration.

This function sets the assignment as follows:

code config->lockMode = kXRDC2_AccessConfigLockDisabled; config->policy[0] = kXRDC2_AccessPolicyNone; config->policy[1] = kXRDC2_AccessPolicyNone; ... endcode

param config Pointer to the configuration.

◆ XRDC2_GetMemSlotExclAccessLockDomainOwner()

uint8_t XRDC2_GetMemSlotExclAccessLockDomainOwner ( XRDC2_Type base,
xrdc2_mem_slot_t  memSlot 
)

Get current memory slot exclusive access lock owner.

Parameters
baseXRDC2 peripheral base address.
memSlotThe memory slot to operate.
Returns
The domain ID of the lock owner.
Parameters
baseXRDC2 peripheral base address.
memSlotThe memory slot to operate.
Returns
The domain ID of the lock owner.

◆ XRDC2_GetPeriphAccessDefaultConfig()

void XRDC2_GetPeriphAccessDefaultConfig ( xrdc2_periph_access_config_t config)

Gets the default peripheral access configuration.

The default configuration is set as follows:

config->lockMode = kXRDC2_AccessConfigLockWritable;
config->policy[0] = kXRDC2_AccessPolicyNone;
config->policy[1] = kXRDC2_AccessPolicyNone;
...
config->policy[15] = kXRDC2_AccessPolicyNone;
Parameters
configPointer to the configuration structure.

brief Gets the default peripheral access configuration.

The default configuration is set as follows: code config->lockMode = kXRDC2_AccessConfigLockWritable; config->policy[0] = kXRDC2_AccessPolicyNone; config->policy[1] = kXRDC2_AccessPolicyNone; ... config->policy[15] = kXRDC2_AccessPolicyNone; endcode

param config Pointer to the configuration structure.

◆ XRDC2_GetPeriphExclAccessLockDomainOwner()

uint8_t XRDC2_GetPeriphExclAccessLockDomainOwner ( XRDC2_Type base,
xrdc2_periph_t  periph 
)

Get current peripheral exclusive access lock owner.

Parameters
baseXRDC2 peripheral base address.
periphThe peripheral to operate.
Returns
The domain ID of the lock owner.

brief Get current peripheral exclusive access lock owner.

param base XRDC2 peripheral base address. param periph The peripheral to operate. param The domain ID of the lock owner.

◆ XRDC2_Init()

void XRDC2_Init ( XRDC2_Type base)

Initializes the XRDC2 module.

Parameters
baseXRDC2 peripheral base address.

brief Initializes the XRDC2 module.

This function enables the XRDC2 clock.

param base XRDC2 peripheral base address.

◆ XRDC2_LockMemExclAccess()

void XRDC2_LockMemExclAccess ( XRDC2_Type base,
xrdc2_mem_t  mem 
)

Lock the memory region exclusive access using blocking method.

Parameters
baseXRDC2 peripheral base address.
memThe memory region to operate.
Note
This function must be called when the lock is not disabled.

brief Lock the memory region exclusive access using blocking method.

param base XRDC2 peripheral base address. param mem The memory region to operate.

note This function must be called when the lock is not disabled.

◆ XRDC2_LockMemSlotExclAccess()

void XRDC2_LockMemSlotExclAccess ( XRDC2_Type base,
xrdc2_mem_slot_t  memSlot 
)

Lock the memory slot exclusive access using blocking method.

Parameters
baseXRDC2 peripheral base address.
memSlotThe memory slot to operate.
Note
This function must be called when the lock is not disabled.

brief Lock the memory slot exclusive access using blocking method.

param base XRDC2 peripheral base address. param memSlot The memory slot to operate.

note This function must be called when the lock is not disabled.

◆ XRDC2_LockPeriphExclAccess()

void XRDC2_LockPeriphExclAccess ( XRDC2_Type base,
xrdc2_periph_t  periph 
)

Lock the peripheral exclusive access using blocking method.

Parameters
baseXRDC2 peripheral base address.
periphThe peripheral to operate.
Note
This function must be called when the lock is not disabled.

brief Lock the peripheral exclusive access using blocking method.

param base XRDC2 peripheral base address. param periph The peripheral to operate.

note This function must be called when the lock is not disabled.

◆ XRDC2_SetGlobalValid()

void XRDC2_SetGlobalValid ( XRDC2_Type base,
bool  valid 
)

Sets the XRDC2 global valid.

This function sets the XRDC2 global valid or invalid. When the XRDC2 is global invalid, all accesses from all bus masters to all slaves are allowed.

Parameters
baseXRDC2 peripheral base address.
validTrue to valid XRDC2.

brief Sets the XRDC2 global valid.

This function sets the XRDC2 global valid or invalid. When the XRDC2 is global invalid, all accesses from all bus masters to all slaves are allowed.

param base XRDC2 peripheral base address. param valid True to valid XRDC2.

◆ XRDC2_SetMasterDomainAssignment()

void XRDC2_SetMasterDomainAssignment ( XRDC2_Type base,
xrdc2_master_t  master,
uint8_t  assignIndex,
const xrdc2_master_domain_assignment_t assignment 
)

Sets the processor bus master domain assignment.

Parameters
baseXRDC2 peripheral base address.
masterWhich master to configure.
assignIndexWhich assignment register to set.
assignmentPointer to the assignment structure.

brief Sets the processor bus master domain assignment.

param base XRDC2 peripheral base address. param master Which master to configure. param assignIndex Which assignment register to set. param assignment Pointer to the assignment structure.

◆ XRDC2_SetMemAccessConfig()

void XRDC2_SetMemAccessConfig ( XRDC2_Type base,
xrdc2_mem_t  mem,
const xrdc2_mem_access_config_t config 
)

Sets the memory region access policy.

Parameters
baseXRDC2 peripheral base address.
memWhich memory region descriptor to set.
configPointer to the access policy configuration structure.

brief Sets the memory region access policy.

param base XRDC2 peripheral base address. param config Pointer to the access policy configuration structure.

◆ XRDC2_SetMemAccessLockMode()

void XRDC2_SetMemAccessLockMode ( XRDC2_Type base,
xrdc2_mem_t  mem,
xrdc2_access_config_lock_t  lockMode 
)

Sets the memory descriptor lock mode.

Parameters
baseXRDC2 peripheral base address.
memWhich memory descriptor to set.
lockModeThe lock mode to set.

brief Sets the memory descriptor lock mode.

param base XRDC2 peripheral base address. param mem Which memory descriptor to set. param lockMode The lock mode to set.

◆ XRDC2_SetMemAccessValid()

void XRDC2_SetMemAccessValid ( XRDC2_Type base,
xrdc2_mem_t  mem,
bool  valid 
)

Sets the memory region descriptor as valid or invalid.

Parameters
baseXRDC2 peripheral base address.
memWhich memory region descriptor to set.
validTrue to set valid, false to set invalid.

brief Sets the memory region descriptor as valid or invalid.

param base XRDC2 peripheral base address. param mem Which memory region descriptor to set. param valid True to set valid, false to set invalid.

◆ XRDC2_SetMemDomainAccessPolicy()

void XRDC2_SetMemDomainAccessPolicy ( XRDC2_Type base,
xrdc2_mem_t  mem,
uint8_t  domainId,
xrdc2_access_policy_t  policy 
)

Sets the memory region access policy for specific domain.

Parameters
baseXRDC2 peripheral base address.
memThe memory region to operate.
domainIdThe ID of the domain whose policy will be changed.
policyThe access policy to set.

brief Sets the memory region access policy for specific domain.

param base XRDC2 peripheral base address. param mem The memory region to operate. param domainId The ID of the domain whose policy will be changed. param policy The access policy to set.

◆ XRDC2_SetMemSlotAccessConfig()

void XRDC2_SetMemSlotAccessConfig ( XRDC2_Type base,
xrdc2_mem_slot_t  memSlot,
const xrdc2_mem_slot_access_config_t config 
)

Sets the memory slot access policy.

Parameters
baseXRDC2 peripheral base address.
memSlotWhich memory slot descriptor to set.
configPointer to the access policy configuration structure.

brief Sets the memory slot access policy.

param base XRDC2 peripheral base address. param config Pointer to the access policy configuration structure.

◆ XRDC2_SetMemSlotAccessLockMode()

void XRDC2_SetMemSlotAccessLockMode ( XRDC2_Type base,
xrdc2_mem_slot_t  memSlot,
xrdc2_access_config_lock_t  lockMode 
)

Sets the memory slot descriptor lock mode.

Parameters
baseXRDC2 peripheral base address.
memSlotWhich memory slot descriptor to set.
lockModeThe lock mode to set.

brief Sets the memory slot descriptor lock mode.

param base XRDC2 peripheral base address. param memSlot Which memory slot descriptor to set. param lockMode The lock mode to set.

◆ XRDC2_SetMemSlotAccessValid()

void XRDC2_SetMemSlotAccessValid ( XRDC2_Type base,
xrdc2_mem_slot_t  memSlot,
bool  valid 
)

Sets the memory slot descriptor as valid or invalid.

Parameters
baseXRDC2 peripheral base address.
memSlotWhich memory slot descriptor to set.
validTrue to set valid, false to set invalid.

brief Sets the memory slot descriptor as valid or invalid.

param base XRDC2 peripheral base address. param memSlot Which memory slot descriptor to set. param valid True to set valid, false to set invalid.

◆ XRDC2_SetMemSlotDomainAccessPolicy()

void XRDC2_SetMemSlotDomainAccessPolicy ( XRDC2_Type base,
xrdc2_mem_slot_t  memSlot,
uint8_t  domainId,
xrdc2_access_policy_t  policy 
)

Sets the memory slot access policy for specific domain.

Parameters
baseXRDC2 peripheral base address.
memSlotThe memory slot to operate.
domainIdThe ID of the domain whose policy will be changed.
policyThe access policy to set.

brief Sets the memory slot access policy for specific domain.

param base XRDC2 peripheral base address. param memSlot The memory slot to operate. param domainId The ID of the domain whose policy will be changed. param policy The access policy to set.

◆ XRDC2_SetPeriphAccessConfig()

void XRDC2_SetPeriphAccessConfig ( XRDC2_Type base,
xrdc2_periph_t  periph,
const xrdc2_periph_access_config_t config 
)

Sets the peripheral access policy.

Parameters
baseXRDC2 peripheral base address.
periphWhich peripheral descriptor to set.
configPointer to the access policy configuration structure.

brief Sets the peripheral access policy.

param base XRDC2 peripheral base address. param config Pointer to the access policy configuration structure.

◆ XRDC2_SetPeriphAccessLockMode()

void XRDC2_SetPeriphAccessLockMode ( XRDC2_Type base,
xrdc2_periph_t  periph,
xrdc2_access_config_lock_t  lockMode 
)

Sets the peripheral descriptor lock mode.

Parameters
baseXRDC2 peripheral base address.
periphWhich peripheral descriptor to set.
lockModeThe lock mode to set.

brief Sets the peripheral descriptor lock mode.

param base XRDC2 peripheral base address. param periph Which peripheral descriptor to set. param lockMode The lock mode to set.

◆ XRDC2_SetPeriphAccessValid()

void XRDC2_SetPeriphAccessValid ( XRDC2_Type base,
xrdc2_periph_t  periph,
bool  valid 
)

Sets the peripheral descriptor as valid or invalid.

Parameters
baseXRDC2 peripheral base address.
periphWhich peripheral descriptor to set.
validTrue to set valid, false to set invalid.

brief Sets the peripheral descriptor as valid or invalid.

param base XRDC2 peripheral base address. param periph Which peripheral descriptor to set. param valid True to set valid, false to set invalid.

◆ XRDC2_SetPeriphDomainAccessPolicy()

void XRDC2_SetPeriphDomainAccessPolicy ( XRDC2_Type base,
xrdc2_periph_t  periph,
uint8_t  domainId,
xrdc2_access_policy_t  policy 
)

Sets the peripheral access policy for specific domain.

Parameters
baseXRDC2 peripheral base address.
periphThe peripheral to operate.
domainIdThe ID of the domain whose policy will be changed.
policyThe access policy to set.

brief Sets the peripheral access policy for specific domain.

param base XRDC2 peripheral base address. param periph The peripheral to operate. param domainId The ID of the domain whose policy will be changed. param policy The access policy to set.

◆ XRDC2_TryLockMemExclAccess()

status_t XRDC2_TryLockMemExclAccess ( XRDC2_Type base,
xrdc2_mem_t  mem 
)

Try to lock the memory region exclusive access.

Parameters
baseXRDC2 peripheral base address.
memThe memory region to operate.
Return values
kStatus_FailFailed to lock.
kStatus_SuccessLocked succussfully.

brief Try to lock the memory region exclusive access.

param base XRDC2 peripheral base address. param mem The memory region to operate. retval kStatus_Fail Failed to lock. retval kStatus_Success Locked succussfully.

◆ XRDC2_TryLockMemSlotExclAccess()

status_t XRDC2_TryLockMemSlotExclAccess ( XRDC2_Type base,
xrdc2_mem_slot_t  memSlot 
)

Try to lock the memory slot exclusive access.

Parameters
baseXRDC2 peripheral base address.
memSlotThe memory slot to operate.
Return values
kStatus_FailFailed to lock.
kStatus_SuccessLocked succussfully.

brief Try to lock the memory slot exclusive access.

param base XRDC2 peripheral base address. param memSlot The memory slot to operate. retval kStatus_Fail Failed to lock. retval kStatus_Success Locked succussfully.

◆ XRDC2_TryLockPeriphExclAccess()

status_t XRDC2_TryLockPeriphExclAccess ( XRDC2_Type base,
xrdc2_periph_t  periph 
)

Try to lock the peripheral exclusive access.

Parameters
baseXRDC2 peripheral base address.
periphThe peripheral to operate.
Return values
kStatus_FailFailed to lock.
kStatus_SuccessLocked succussfully.

brief Try to lock the peripheral exclusive access.

param base XRDC2 peripheral base address. param periph The peripheral to operate. retval kStatus_Fail Failed to lock. retval kStatus_Success Locked succussfully.

◆ XRDC2_UnlockMemExclAccess()

void XRDC2_UnlockMemExclAccess ( XRDC2_Type base,
xrdc2_mem_t  mem 
)

Unlock the memory region exclusive access.

Parameters
baseXRDC2 peripheral base address.
memThe memory region to operate.
Note
This function must be called by the lock owner.

brief Unlock the memory region exclusive access.

param base XRDC2 peripheral base address. param mem The memory region to operate.

note This function must be called by the lock owner.

◆ XRDC2_UnlockPeriphExclAccess()

void XRDC2_UnlockPeriphExclAccess ( XRDC2_Type base,
xrdc2_periph_t  periph 
)

Unlock the peripheral exclusive access.

Parameters
baseXRDC2 peripheral base address.
periphThe peripheral to operate.
Note
This function must be called by the lock owner.

brief Unlock the peripheral exclusive access.

param base XRDC2 peripheral base address. param periph The peripheral to operate.

note This function must be called by the lock owner.

Variable Documentation

◆ domainId

uint8_t _xrdc2_master_domain_assignment::domainId

Domain ID used when this descriptor hit.

◆ endAddr

uint32_t _xrdc2_mem_access_config::endAddr

Memory region end address, (endAddr + 1) should be 4k aligned.

◆ lock

bool _xrdc2_master_domain_assignment::lock

Set true to lock the descriptor.

◆ lockMode [1/3]

xrdc2_access_config_lock_t _xrdc2_periph_access_config::lockMode

PDACn lock configuration.

◆ lockMode [2/3]

xrdc2_access_config_lock_t _xrdc2_mem_access_config::lockMode

MRGDn lock configuration.

◆ lockMode [3/3]

xrdc2_access_config_lock_t _xrdc2_mem_slot_access_config::lockMode

Descriptor lock configuration.

◆ mask

uint16_t _xrdc2_master_domain_assignment::mask

Mask used for descriptor hit.

◆ match

uint16_t _xrdc2_master_domain_assignment::match

Match used for descriptor hit.

◆ policy [1/3]

xrdc2_access_policy_t _xrdc2_periph_access_config::policy[FSL_FEATURE_XRDC2_DOMAIN_COUNT]

Access policy for each domain.

◆ policy [2/3]

xrdc2_access_policy_t _xrdc2_mem_access_config::policy[FSL_FEATURE_XRDC2_DOMAIN_COUNT]

Access policy for each domain.

◆ policy [3/3]

xrdc2_access_policy_t _xrdc2_mem_slot_access_config::policy[FSL_FEATURE_XRDC2_DOMAIN_COUNT]

Access policy for each domain.

◆ privilegeAttr

xrdc2_privilege_attr_t _xrdc2_master_domain_assignment::privilegeAttr

Privilege attribute.

◆ secureAttr

xrdc2_secure_attr_t _xrdc2_master_domain_assignment::secureAttr

Secure attribute.

◆ startAddr

uint32_t _xrdc2_mem_access_config::startAddr

Memory region start address, should be 4k aligned.