diff options
author | 2019-09-13 13:03:45 +0000 | |
---|---|---|
committer | 2019-09-13 13:03:45 +0000 | |
commit | 718cd17aadda36edf3dff761e55a580e54e355df (patch) | |
tree | 855d9442a20d9cec496925f4c664e702ad106e06 /asm.s | |
parent | b4d2e9ed192fd289adff440d26641cadf274a940 (diff) | |
parent | 3d1fd33d4b387732a0878f356c8346e1e6c30368 (diff) | |
download | cortex-m-718cd17aadda36edf3dff761e55a580e54e355df.tar.gz cortex-m-718cd17aadda36edf3dff761e55a580e54e355df.tar.zst cortex-m-718cd17aadda36edf3dff761e55a580e54e355df.zip |
Merge #164
164: Allow writing to the CONTROL register r=adamgreig a=jonas-schievink
This allows entering unprivileged mode.
Part of https://github.com/rust-embedded/cortex-m/issues/58
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Diffstat (limited to 'asm.s')
-rw-r--r-- | asm.s | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -5,13 +5,21 @@ __bkpt: bkpt bx lr - .section .text.__control - .global __control + .section .text.__control_r + .global __control_r .thumb_func -__control: +__control_r: mrs r0, CONTROL bx lr + .section .text.__control_w + .global __control_w + .thumb_func +__control_w: + msr CONTROL, r0 + bx lr + + .section .text.__cpsid .global __cpsid .thumb_func |