diff options
author | Christian Cunningham <cc@localhost> | 2022-01-20 23:22:42 -0700 |
---|---|---|
committer | Christian Cunningham <cc@localhost> | 2022-01-20 23:22:42 -0700 |
commit | 73a80de4228a498b483c8e10ab317920d978d507 (patch) | |
tree | eea73a138a509d7758ef477d4997cf7147233604 /include/cpu.h | |
parent | c2e52566ed53b53227a6fe577a05170766a1ae4c (diff) |
Moved globals to file
Diffstat (limited to 'include/cpu.h')
-rw-r--r-- | include/cpu.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/include/cpu.h b/include/cpu.h index eb2cdc0..68638a5 100644 --- a/include/cpu.h +++ b/include/cpu.h @@ -1,6 +1,8 @@ #ifndef CPU_H #define CPU_H +extern void _start(void); + static inline unsigned long getmode(void) { unsigned long mode; @@ -10,13 +12,7 @@ static inline unsigned long getmode(void) static inline void setsvc(void) { - unsigned long mode; - asm volatile ( - "mrs %0, cpsr\n" - "bic %0, %0, #0x1F\n" - "orr %0, %0, #0x13\n" - "msr cpsr_c, %0" - : "=r"(mode)); + asm volatile ( "cps #0x13" ); } static inline void setmode(unsigned long mode) |