feat: gettimeofday + mprotect syscalls + Newlib libgloss port
Kernel:
- Add SYSCALL_GETTIMEOFDAY (127): returns RTC epoch seconds + TSC-derived
microseconds via struct timeval. Timezone arg ignored per POSIX.
- Add SYSCALL_MPROTECT (128): changes page protection on heap, mmap, and
stack regions. Converts POSIX PROT_READ/WRITE/EXEC to VMM flags and
calls vmm_protect_range(). Validates ownership before modifying PTEs.
ulibc:
- Add gettimeofday() wrapper in sys/time.h + time.c
- Add mprotect() wrapper in sys/mman.h + mman.c
- Add SYS_GETTIMEOFDAY/SYS_MPROTECT to ulibc syscall.h
Newlib port (newlib/):
- newlib/libgloss/adros/crt0.S: C runtime startup for AdrOS, calls
__libc_init_array/__libc_fini_array for Newlib/C++ ctor/dtor support
- newlib/libgloss/adros/syscalls.c: all 21 Newlib-required OS stubs
(_exit, _read, _write, _open, _close, _lseek, _fstat, _stat, _isatty,
_kill, _getpid, _sbrk, _link, _unlink, _fork, _execve, _wait, _times,
_gettimeofday, _rename, _mkdir) implemented via INT 0x80
- newlib/libgloss/adros/Makefile: builds crt0.o + libadros.a
- newlib/README.md: build instructions for full Newlib cross-compilation
- newlib/patches/README.md: documents config.sub, configure.host, and
libgloss/configure.in changes needed in Newlib source tree
All 21 Newlib libgloss stubs are now implemented. To build Newlib:
1. Copy libgloss/adros/ into Newlib source tree
2. Add i686-*-adros* target to configure files
3. Build with: ../configure --target=i686-adros && make