x86_64: pmap: enable NX protection during bootstrap

This commit is contained in:
2023-02-09 21:38:06 +00:00
parent ddb00acd31
commit d960909d1b
3 changed files with 14 additions and 0 deletions

View File

@@ -226,6 +226,8 @@ void pmap_bootstrap(void)
{
can_use_gbpages = gigabyte_pages();
printk("pmap: gigabyte pages %sabled", can_use_gbpages == 1 ? "en" : "dis");
enable_nx();
printk("pmap: NX protection enabled");
page_size_t hugepage = PS_2M;
if (can_use_gbpages) {