kernel: pin _kernel variable in case of paging

Exception handler(arch/x86/core/ia32/excstub.S) may access
_kernel variable, it will lead to failure when enabled paging,
so make this critical variable pinned.

Signed-off-by: Qipeng Zha <qipeng.zha@intel.com>
This commit is contained in:
Qipeng Zha 2023-05-15 13:29:18 +08:00 committed by Anas Nashif
parent 4d4900c311
commit fa973d1b7b

View file

@ -42,6 +42,7 @@ BUILD_ASSERT(CONFIG_MP_NUM_CPUS == CONFIG_MP_MAX_NUM_CPUS,
"CONFIG_MP_NUM_CPUS and CONFIG_MP_MAX_NUM_CPUS need to be set the same");
/* the only struct z_kernel instance */
__pinned_bss
struct z_kernel _kernel;
/* init/main and idle threads */