Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions api/src/uvisor-input.S
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ uvisor_config:
/* Debug driver pointer */
.long __uvisor_debug_driver

/* Stack limit for public box MSPLIM_NS, accessed by public_box_stack_limit */
.long __StackLimit

/* uVisor mode of operation
* Modes available: UVISOR_ENABLED, UVISOR_DISABLED, UVISOR_PERMISSIVE. */
__uvisor_mode:
Expand Down
3 changes: 3 additions & 0 deletions core/system/inc/linker.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ typedef struct {
UvisorLibHooks const * const lib_hooks;

TUvisorDebugDriver const * const debug_driver;

/* Stack limit for public box MSPNS_LIM*/
uint32_t public_box_stack_limit;
} UVISOR_PACKED UvisorConfig;

extern UvisorConfig const __uvisor_config;
Expand Down
3 changes: 3 additions & 0 deletions core/system/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ void main_init(void)
/* NS P stack pointer, for the RTOS and the uVisor-ns. */
__TZ_set_MSP_NS(original_sp);

/* NS P limit, for the RTOS and the uVisor-ns. */
__TZ_set_MSPLIM_NS(__uvisor_config.public_box_stack_limit);

/* S NP stack pointer, for the SDSs and the transition gateways. */
__set_PSP((uint32_t) &__uvisor_stack_top_np__);
#else /* defined(ARCH_CORE_ARMv8M) */
Expand Down