feat(microkernel): implement pure microkernel architecture with vfs_server, net_server, and procmgr

- Added vfs_server in Ring 3 (Endpoint 5) managing unified VFS tree (/, /bin, /etc, /proc, /dev, /tmp)
- Added net_server in Ring 3 (Endpoint 6) owning RTL8139 hardware NIC, DHCP, DNS, and TCP/IPv4 stack
- Refactored procmgr in Ring 3 (Endpoint 4) to handle userspace process spawning via PROC_OP_SPAWN
- Added primitive microkernel syscalls in Ring 0: SYS_TASK_CREATE (29), SYS_TASK_MAP_PAGE (30), SYS_TASK_START (31)
- Updated shell (sh) and desktop GUI (gui_server) to delegate process management and I/O to Ring 3 daemons
- Expanded boot pipeline to orchestrate 7 concurrent Ring 3 servers across dedicated SMP CPU cores
This commit is contained in:
RarDog
2026-09-03 11:03:35 +03:00
parent c18717539c
commit 5a4206acb6
15 changed files with 604 additions and 34 deletions
+19
View File
@@ -53,6 +53,25 @@ extern "C" void _start() {
__asm__ volatile("syscall" : "+r"(rax) : "r"(rdi), "r"(rsi) : "rcx", "r11", "memory");
reply_val0 = (rax > 0) ? rax : 0;
reply_val1 = 0;
} else if (opcode == PROC_OP_SPAWN) {
// Program name passed in arg0 (8 bytes) + arg1 (8 bytes)
char prog[20] = {0};
memcpy(prog, &arg0, 8);
memcpy(prog + 8, &arg1, 8);
int64_t tid = sys_module_exec(prog);
if (tid < 0 && !strstr(prog, ".")) {
char opc_name[28];
snprintf(opc_name, sizeof(opc_name), "%s.opc", prog);
tid = sys_module_exec(opc_name);
if (tid < 0) {
char elf_name[28];
snprintf(elf_name, sizeof(elf_name), "%s.elf", prog);
tid = sys_module_exec(elf_name);
}
}
reply_val0 = (uint64_t)tid;
reply_val1 = 0;
} else {
reply_val0 = 0;
reply_val1 = 0;