hw_x86_64: Set system control flags of cr0 register

Enable paging, write protection, caching and native FPU error reporting,
see Intel SDM Vol. 3A, section 2.5.
This commit is contained in:
Reto Buerki 2015-02-11 15:50:50 +01:00 committed by Christian Helmuth
parent 032fc3b190
commit 59bba7624f
1 changed files with 9 additions and 0 deletions

View File

@ -45,6 +45,15 @@
btsl $11, %eax
wrmsr
/* Enable paging, write protection, caching and FPU error reporting */
movl %cr0, %eax
btsl $5, %eax
btsl $16, %eax
btrl $29, %eax
btrl $30, %eax
btsl $31, %eax
movl %eax, %cr0
/*
* Install initial temporary environment that is replaced later by the
* environment that init_main_thread creates.