From 1767d390fbf3d0c65389de46caf0b6d43ef3b6ad Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Fri, 10 Jul 2026 11:24:56 +0800 Subject: feat: establish bootable new architecture checkpoint Replace the compressed boot path with a relocatable higher-half RISC-V entry, expand memory and SMP support, and add the driver, TTY, VFS, exec, signal, syscall, initramfs, and self-test infrastructure needed for a bootable kernel checkpoint. --- na/kernel/sys_mm.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'na/kernel/sys_mm.cc') diff --git a/na/kernel/sys_mm.cc b/na/kernel/sys_mm.cc index ff03e96..bfa067c 100644 --- a/na/kernel/sys_mm.cc +++ b/na/kernel/sys_mm.cc @@ -15,6 +15,7 @@ #include #include #include +#include /* Page alignment helpers */ @@ -78,6 +79,9 @@ int64 sys_brk(uint64 new_brk, uint64, uint64, uint64, uint64, uint64) int64 sys_mmap(uint64 addr, uint64 length, uint64 prot, uint64 flags, uint64 fd, uint64 offset) { + printk("[mmap] addr=%llx len=%llx prot=%llx flags=%llx fd=%lld off=%llx\n", + addr, length, prot, flags, static_cast(fd), offset); + if (length == 0) return -EINVAL; length = page_align_up(length); if (offset % kPageSize != 0) return -EINVAL; @@ -89,8 +93,10 @@ int64 sys_mmap(uint64 addr, uint64 length, uint64 prot, if (!mm) return -ENOMEM; /* Phase 2: only anonymous private mappings */ - if (!(flags & MAP_ANONYMOUS)) + if (!(flags & MAP_ANONYMOUS)) { + printk("[mmap] REJECTED: file-backed mmap not implemented\n"); return -ENOSYS; /* File-backed mmap is Phase 3 */ + } if (flags & MAP_SHARED) return -ENOSYS; /* Shared mappings are Phase 3 */ -- cgit v1.2.3