-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.h.in
57 lines (52 loc) · 2.65 KB
/
config.h.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef __ARCH_CONFIG_H__
#define __ARCH_CONFIG_H__
#include <ctcfg.h>
using config = ctcfg::config_holder<
ctcfg::string_entry<"version.version", "@VERSION@">,
ctcfg::string_entry<"version.git-info", "$GIT_VERSION_INFO">,
ctcfg::string_entry<"version.full-version", "@VERSION@-$GIT_VERSION_INFO">,
ctcfg::string_entry<"version.cc.id", "@COMPILER_C_ID@">,
ctcfg::string_entry<"version.cc.ver", "@COMPILER_C_VER@">,
ctcfg::string_entry<"version.cxx.id", "@COMPILER_CXX_ID@">,
ctcfg::string_entry<"version.cxx.ver", "@COMPILER_CXX_VER@">,
ctcfg::string_entry<"arch.name", "@ARCH_NAME@">,
ctcfg::string_entry<"arch.path", "@ARCH_PATH@">,
ctcfg::size_entry<"arch.page_size", @ARCH_PAGE_SIZE@>,
ctcfg::size_entry<"preallocate-pages", @PRE_ALLOCATE_PAGES@>,
ctcfg::size_entry<"cpuid-feature-size", @CPUID_FEATURE_SIZE@>,
ctcfg::size_entry<"klog-shift", @KLOG_SHIFT@>,
ctcfg::size_entry<"vmm-size", @VMM_SIZE@>,
ctcfg::address_entry<"mmap.start.hhdm", @HHDM_START@>,
ctcfg::address_entry<"mmap.start.pfn", @PFN_START@>,
ctcfg::address_entry<"mmap.start.scrollback", @SCROLLBACK_START@>,
ctcfg::address_entry<"mmap.start.heap", @HEAP_START@>,
ctcfg::size_entry<"mmap.size.heap", @HEAP_SIZE@>,
ctcfg::address_entry<"mmap.start.slab", @SLAB_START@>,
ctcfg::address_entry<"mmap.start.klog", @KLOG_START@>,
ctcfg::address_entry<"mmap.start.kernel", 0xffffffff80000000>,
ctcfg::address_entry<"mmap.start.vmm", @VMM_START@>,
ctcfg::bool_entry<"debug.log.mmap", @DEBUG_LOG_MMAP@>,
ctcfg::bool_entry<"debug.log.cpuid", @DEBUG_LOG_CPUID@>,
ctcfg::bool_entry<"debug.log.acpi", @DEBUG_LOG_ACPI@>,
ctcfg::bool_entry<"debug.log.pci", @DEBUG_LOG_PCI@>,
ctcfg::bool_entry<"debug.lock.spinlock_dep", @DEBUG_SPINLOCK_DEP@>,
ctcfg::size_entry<"slab.min_order", @SLAB_MIN_ORDER@>,
ctcfg::size_entry<"slab.max_order", @SLAB_MAX_ORDER@>,
ctcfg::size_entry<"slab.slab_size_order", @SLAB_SIZE_ORDER@>,
ctcfg::bool_entry<"sanitize.address", @HAS_ASAN@>,
ctcfg::bool_entry<"sanitize.undefined", @HAS_UBSAN@>
>;
static_assert(config::get_val<"slab.min_order"> <= config::get_val<"slab.max_order">);
static_assert(config::get_val<"slab.max_order"> <= config::get_val<"slab.slab_size_order">);
#mesondefine COMPILER_GCC
#mesondefine COMPILER_CLANG
#if defined(COMPILER_GCC)
#define INLINE [[gnu::always_inline]] inline
#define NO_UBSAN [[gcc::no_sanitize("undefined")]]
#define NO_ASAN [[gcc::no_sanitize("address")]]
#elif defined(COMPILER_CLANG)
#define INLINE [[clang::always_inline]] inline
#define NO_UBSAN [[clang::no_sanitize("undefined")]]
#define NO_ASAN [[clang::no_sanitize("address")]]
#endif
#endif