From 5285755373830eee34300b487d3c0e817a05f043 Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Wed, 13 May 2026 15:35:49 +0800 Subject: feat: add relocation header and implementation for RISC-V architecture --- na/include/lume/config.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'na/include') diff --git a/na/include/lume/config.h b/na/include/lume/config.h index 40787cc..d3539c5 100644 --- a/na/include/lume/config.h +++ b/na/include/lume/config.h @@ -60,6 +60,14 @@ #define CONFIG_DEFAULT_TIMESLICE (CONFIG_HZ / 10) #endif +#ifndef CONFIG_KASLR_POLICY_ID +#define CONFIG_KASLR_POLICY_ID 0 /* Default: basic KASLR policy */ +#endif + +#ifndef CONFIG_KASLR_LOG_LEVEL +#define CONFIG_KASLR_LOG_LEVEL 1 /* 0=off, 1=minimal, 2=debug */ +#endif + /* ================================================================ * Legacy compatibility aliases (shared with assembly) * ================================================================ */ @@ -78,4 +86,8 @@ inline constexpr int kMaxCpus = CONFIG_NR_CPUS; /* Virtual memory page size (4KB, matching SV39 base page). */ inline constexpr uint64 kPageSize = CONFIG_PAGE_SIZE; +/* KASLR policy ID and logging level (build-time configurable) */ +inline constexpr uint32 kKaslrPolicyId = CONFIG_KASLR_POLICY_ID; +inline constexpr int kKaslrLogLevel = CONFIG_KASLR_LOG_LEVEL; + #endif /* __ASSEMBLER__ */ \ No newline at end of file -- cgit v1.2.3