From e2564d112ba03b432f9f44f445cbc4a3ed85751a Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Fri, 17 Apr 2026 01:05:31 +0800 Subject: feat: add initial RISC-V architecture support and core kernel functionality - Implement MMU hardware primitives for RISC-V SV39 in mmu.h - Create trap vector control primitives in trap.h - Define trap frame structure for RISC-V in trapframe.h - Add assembly routines for context switching in swtch.S - Implement trap vector entry/exit in trap_vector.S - Introduce basic error number definitions in errno.h - Provide placement new/delete operators in new.h - Define kernel panic handler in panic.h and implement in panic.cc - Establish basic type definitions in types.h - Create the kernel main entry point in main.cc with global initialization - Add synchronization primitives using spinlocks in spinlock.h and spinlock.cc - Define per-CPU state tracking for interrupts in cpu_state.h - Create a linker script for the kernel in linker.ld - Update module makefiles for kernel and library components --- include/lib/errno.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include/lib') diff --git a/include/lib/errno.h b/include/lib/errno.h index 62fd3e5..f0c1436 100644 --- a/include/lib/errno.h +++ b/include/lib/errno.h @@ -1,11 +1,11 @@ -// SPDX-License-Identifier: GPL-2.0-or-later +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* - * Copyright (C) 2026 Richard Qin * Lume OS - Linux Compatibility Layer * * This file aligns strictly with Linux RISC-V 64 ABI (asm-generic). - * Reference: linux/include/uapi/asm-generic/errno-base.h - * Reference: linux/include/uapi/asm-generic/errno.h + * The definitions are copied from the Linux kernel's UAPI headers + * (include/uapi/asm-generic/errno-base.h and include/uapi/asm-generic/errno.h) + * to ensure ABI compatibility. Original copyrights apply. */ #ifndef _ERRNO_H -- cgit v1.2.3