diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2020-11-24 16:41:49 -0700 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2020-11-24 16:41:49 -0700 |
commit | c29e0323020e0f96932d0f9b09747d5b2e28e5a6 (patch) | |
tree | c6100f1a4702d14548f5b82d72afb85340711a68 /include | |
parent | 0c0f5c3d8397ba5168f0cd01b25ba70c238b36e0 (diff) | |
download | stm32l4-c29e0323020e0f96932d0f9b09747d5b2e28e5a6.tar.gz stm32l4-c29e0323020e0f96932d0f9b09747d5b2e28e5a6.tar.bz2 stm32l4-c29e0323020e0f96932d0f9b09747d5b2e28e5a6.zip |
Changes to painic. It now prints the stack at the time of failure (if logging is initialized).
Diffstat (limited to 'include')
-rw-r--r-- | include/arch/arm/arch.h | 5 | ||||
-rw-r--r-- | include/arch/x86_64/arch.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/arch/arm/arch.h b/include/arch/arm/arch.h index 8bd47c2..bf96fae 100644 --- a/include/arch/arm/arch.h +++ b/include/arch/arm/arch.h @@ -10,6 +10,9 @@ #define enable_all_interrupts() \ asm volatile(" cpsie i ") +#define disable_all_interrupts() \ + asm volatile(" cpsid i ") + #define DMA1_BASE (0x40020000) #define DMA2_BASE (0x40020400) @@ -32,6 +35,8 @@ #define SPI1_BASE (0x40013000) #define SPI3_BASE (0x40003C00) +#define STACK_TOP (0x2000c000) + #include <stdint.h> #ifndef DRY_RUN _Static_assert(sizeof(void*) == sizeof(uint32_t), "Pointers must be 32 bits"); diff --git a/include/arch/x86_64/arch.h b/include/arch/x86_64/arch.h index a7ba776..62ef730 100644 --- a/include/arch/x86_64/arch.h +++ b/include/arch/x86_64/arch.h @@ -6,6 +6,7 @@ #define ARCH_PC #define enable_all_interrupts() do {} while(0) +#define disable_all_interrupts() do {} while(0) #define RCC_BASE (load_fake_rcc__()) |