File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -180,9 +180,13 @@ pub unsafe fn semihosting_syscall(nr: u32, arg: u32) -> u32 {
180
180
///
181
181
/// # Safety
182
182
///
183
- /// `psp` and `entry` must point to valid stack memory and executable
184
- /// code, respectively. `psp` must be 8 bytes aligned and point to
185
- /// stack top as stack grows towards lower addresses.
183
+ /// * `psp` and `entry` must point to valid stack memory and executable code,
184
+ /// respectively.
185
+ /// * `psp` must be 8 bytes aligned and point to stack top as stack grows
186
+ /// towards lower addresses.
187
+ /// * The size of the stack provided here must be large enough for your
188
+ /// program - stack overflows are obviously UB. If your processor supports
189
+ /// it, you may wish to set the `PSPLIM` register to guard against this.
186
190
#[ cfg( cortex_m) ]
187
191
#[ inline( always) ]
188
192
pub unsafe fn enter_unprivileged ( psp : * const u32 , entry : fn ( ) -> !) -> ! {
You can’t perform that action at this time.
0 commit comments