mirror of https://github.com/ARMmbed/mbed-os.git
Add secure gateway functions SYS_LockReg_S/SYS_UnlockReg_S
parent
c91f71b0dc
commit
18ce2e1b6b
|
@ -181,6 +181,22 @@ void CLK_DisableModuleClock_S(uint32_t u32ModuleIndex)
|
|||
CLK_DisableModuleClock(u32ModuleIndex);
|
||||
}
|
||||
|
||||
__NONSECURE_ENTRY
|
||||
void SYS_LockReg_S(void)
|
||||
{
|
||||
/* Allow non-secure domain to lock/unlock locked registers without check.
|
||||
* Guard access to locked registers is done through other related secure functions. */
|
||||
SYS_LockReg();
|
||||
}
|
||||
|
||||
__NONSECURE_ENTRY
|
||||
void SYS_UnlockReg_S(void)
|
||||
{
|
||||
/* Allow non-secure domain to lock/unlock locked registers without check.
|
||||
* Guard access to locked registers is done through other related secure functions. */
|
||||
SYS_UnlockReg();
|
||||
}
|
||||
|
||||
static bool check_mod_ns(int modclass, uint32_t modidx)
|
||||
{
|
||||
const nu_modidx_ns_t *modidx_ns = modidx_ns_tab;
|
||||
|
|
|
@ -51,6 +51,20 @@ void CLK_EnableModuleClock_S(uint32_t u32ModuleIndex);
|
|||
*/
|
||||
void CLK_DisableModuleClock_S(uint32_t u32ModuleIndex);
|
||||
|
||||
/* Secure SYS_LockReg
|
||||
*
|
||||
* Guard access to secure module from non-secure domain before SYS_LockReg.
|
||||
* Its synopsis is the same as SYS_LockReg.
|
||||
*/
|
||||
void SYS_LockReg_S(void);
|
||||
|
||||
/* Secure SYS_UnlockReg
|
||||
*
|
||||
* Guard access to secure module from non-secure domain before SYS_UnlockReg.
|
||||
* Its synopsis is the same as SYS_UnlockReg.
|
||||
*/
|
||||
void SYS_UnlockReg_S(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue