diff --git a/build/config_headers/kernel_debug_config.h b/build/config_headers/kernel_debug_config.h index 2a0b4d653f..b4a6f84848 100644 --- a/build/config_headers/kernel_debug_config.h +++ b/build/config_headers/kernel_debug_config.h @@ -93,7 +93,9 @@ // Enables the vm_page::access_count field, which is used to detect invalid // concurrent access to the page. +#ifndef __riscv #define DEBUG_PAGE_ACCESS KDEBUG_LEVEL_2 +#endif // Enables a global list of all vm_cache structures. #define DEBUG_CACHE_LIST KDEBUG_LEVEL_2 diff --git a/src/system/kernel/arch/riscv64/arch_platform.cpp b/src/system/kernel/arch/riscv64/arch_platform.cpp index 455208634a..aed73643fb 100644 --- a/src/system/kernel/arch/riscv64/arch_platform.cpp +++ b/src/system/kernel/arch/riscv64/arch_platform.cpp @@ -17,7 +17,7 @@ uint32 gPlatform; void* gFDT = NULL; -HtifRegs *volatile gHtifRegs = (HtifRegs *volatile)0x40008000; +HtifRegs *volatile gHtifRegs = (HtifRegs *volatile)0; PlicRegs *volatile gPlicRegs; ClintRegs *volatile gClintRegs; diff --git a/src/system/kernel/team.cpp b/src/system/kernel/team.cpp index 51421eb595..431edd09aa 100644 --- a/src/system/kernel/team.cpp +++ b/src/system/kernel/team.cpp @@ -444,7 +444,7 @@ Team::Team(team_id id, bool kernel) fArgs[0] = '\0'; num_threads = 0; io_context = NULL; - address_space = NULL; + address_space = kernel ? VMAddressSpace::Kernel() : NULL; realtime_sem_context = NULL; xsi_sem_context = NULL; thread_list = NULL;