universalisos/microkernel/test/mps2_tick_test.c
Fábio Coutada 62e8454f91 build: add UEFI ISO builder, test boot scripts, EIM config
- make-uefi-iso.sh: UEFI ISO image builder
- test_boot.S, test_boot.ld: test boot assembly and linker script
- eim_config.toml: EIM (External Interface Module) configuration
- edk2-ovmf RPM for UEFI firmware
- GAP_ANALYSIS_PIKEOS_PARITY.md: PikeOS parity gap analysis
2026-07-15 15:33:07 +01:00

22 lines
779 B
C

#include <stdint.h>
static void uart_putc(char c) {
volatile uint32_t* uart = (volatile uint32_t*)0x40004000;
while (uart[1] & 1);
uart[0] = c;
}
static void uart_puts(const char* s) { while (*s) uart_putc(*s++); }
void Reset_Handler(void) {
*(volatile uint32_t*)0xE000ED88 |= (0xF << 20);
volatile uint32_t* uart = (volatile uint32_t*)0x40004000;
uart[2] = 0x03;
*(volatile uint32_t*)0xE000E014 = 24999;
*(volatile uint32_t*)0xE000E018 = 0;
*(volatile uint32_t*)0xE000E010 = 7;
uart_puts("SysTick OK\n");
for (volatile int i = 0; i < 1000000; i++);
uart_puts("Done\n");
for(;;);
}
__attribute__((section(".isr_vector")))
const uint32_t vectors[] = { 0x20080000, (uint32_t)Reset_Handler,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };