Skip to content

Conversation

@ryanbreen
Copy link
Owner

No description provided.

ryanbreen and others added 2 commits January 27, 2026 09:17
Bring ARM64 to parity with x86_64 for kernel heap allocation and
fix the TTBR0 page table switch needed for userspace execution.

Heap allocator changes:
- Remove 256KB static bump allocator from main_aarch64.rs
- Use unified heap allocator from kernel/src/memory/heap.rs
- ARM64 heap placed in direct-mapped region (0xFFFF_0000_4800_0000)
- Skip page mapping on ARM64 since boot.S provides direct map

TTBR0/userspace fixes:
- Switch TTBR0 to process page table before ERET to userspace
- Add TTBR0 switching helpers in context_switch.rs
- Fix ARM64 user stack mapping (map into TTBR0, not TTBR1)

Supporting changes:
- Fix Docker scripts to use correct kernel binary path
- Update coreutils for ARM64 argv handling
- Add ARM64 syscall stubs for better compatibility

init_shell now boots successfully on ARM64 QEMU.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Save/restore x30 (link register) around setup_mmu helper calls
- Change device memory shareability from inner to none for MMIO regions
- Add clarifying comment about PL011 UART in device block mapping

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@ryanbreen ryanbreen merged commit a52a7ee into main Jan 27, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants