diff options
| author | Richard Qin <richard.qin.x@gmail.com> | 2026-07-10 11:24:56 +0800 |
|---|---|---|
| committer | Richard Qin <richard.qin.x@gmail.com> | 2026-07-10 11:24:56 +0800 |
| commit | 1767d390fbf3d0c65389de46caf0b6d43ef3b6ad (patch) | |
| tree | 0f5e01cd7c7a05abb6b1c7472d7f00f49caf02cc /na/kernel/sys_mm.cc | |
| parent | 63dc025705f6533b91fb1a7d26e6ed864efd9900 (diff) | |
| download | lume-1767d390fbf3d0c65389de46caf0b6d43ef3b6ad.tar.gz lume-1767d390fbf3d0c65389de46caf0b6d43ef3b6ad.tar.xz | |
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.
Diffstat (limited to 'na/kernel/sys_mm.cc')
| -rw-r--r-- | na/kernel/sys_mm.cc | 8 |
1 files changed, 7 insertions, 1 deletions
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 <lume/errno.h> #include <lume/mman.h> #include <lume/config.h> +#include <lume/klog.h> /* 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<int64>(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 */ |
