Commit Graph

7 Commits

Author SHA1 Message Date
karina 6dd68f8162 fix: plug memory map leak, save sp_el0, dynamic UART, kill loop
- Bootloader: reallocate memory map buffer when ExitBootServices fails,
  so GetMemoryMap doesn't scribble past the old allocation on retry.
- vectors.S: actually store sp_el0 into the exception frame. Previously
  it was read into x24 and then… vanished. EL0 tasks would wake up with
  a corrupted stack pointer. Not great.
- Serial: split hardcoded 0x09000000 into a fallback default; add
  SerialUpdate() so the DTB-parsed UART address actually gets used.
- DTB: add bounds check on reserved[] with PMM's 3 extra slots accounted
  for, so malformed/overstuffed DTBs don't silently corrupt memory.
- PMM.h: bump kVMMaxReservedRegions 128→256, define kPMMReservedRegionCount.
- Types.h: remove `#define loop while(1)`. while(true) is fine.
- Rename IOSerial* → Serial* — the IO prefix was redundant, Serial.c
  already lives under IO/.
2026-05-03 00:32:30 +04:00
karina 78dcfdd662 feat: formatter and oslog() 2026-04-24 16:30:02 +04:00
karina f469da7e0b refactor(kernel): minor refactor. Changed naming convention 2026-04-23 22:22:13 +04:00
karina 502413b9ab feat(kernel): add PL011 UART console and arch I/O helpers
- Add IOSerial: PL011 (0x0900_0000) TX with FIFO-full polling, yield while waiting
- Add Arch/IO.h (32-bit MMIO with DSB) and Arch/CPU.h (yield, WFI)
- Extend types.h (e.g. ASCII, Address, Int/UInt aliases)
- Wire KernelMain to IOSerialPutString for early boot output
- Drop .sourcekit-lsp config; note IO glob in CMake (commented)
2026-04-23 21:25:15 +04:00
karina bfa84040b8 wip: bare bones for C in kernel 2026-04-22 23:12:06 +04:00
sonya 350776d5d1 fix: added arc4random_buf stub
this fixes linking error on aarch64
also _seralPutchar was made public to prevent mangling
2026-04-20 21:30:23 +09:00
karina 635052c8dc feat: added UART support with a basic kprint in kernel
wip: DTB
2026-04-20 16:20:31 +04:00