diff options
| author | Richard Qin <richard.qin.x@gmail.com> | 2026-05-13 15:35:49 +0800 |
|---|---|---|
| committer | Richard Qin <richard.qin.x@gmail.com> | 2026-05-13 15:35:49 +0800 |
| commit | 5285755373830eee34300b487d3c0e817a05f043 (patch) | |
| tree | bc89c5c255132162ff8b95832c4ecffbbcaae801 /na/include | |
| parent | 555d7be72c7c3a08b74f4d4afa4dcc6dd8da8271 (diff) | |
| download | lume-5285755373830eee34300b487d3c0e817a05f043.tar.gz lume-5285755373830eee34300b487d3c0e817a05f043.tar.xz | |
feat: add relocation header and implementation for RISC-V architecture
Diffstat (limited to 'na/include')
| -rw-r--r-- | na/include/lume/config.h | 12 |
1 files changed, 12 insertions, 0 deletions
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 |
