Turnstone Operating System
|
defines crx registers detailed More...
#include <types.h>
Classes | |
union | cpu_reg_cr0_t |
union | cpu_reg_cr4_u |
cr4 register bit fields More... | |
Macros | |
#define | ___CPU_CRX_H 0 |
#define | CPU_MSR_EFER 0xC0000080 |
extended feature register | |
#define | CPU_MSR_STAR 0xC0000081 |
system call target address register | |
#define | CPU_MSR_LSTAR 0xC0000082 |
system call target address register | |
#define | CPU_MSR_FMASK 0xC0000084 |
system call rflags mask register | |
#define | CPU_MSR_IA32_FS_BASE 0xC0000100 |
fs base address | |
#define | CPU_MSR_IA32_GS_BASE 0xC0000101 |
gs base address | |
#define | CPU_MSR_IA32_KERNEL_GS_BASE 0xC0000102 |
kernel gs base address | |
Typedefs | |
typedef union cpu_reg_cr0_t | cpu_reg_cr0_t |
shard hand for struct cpu_reg_cr0_s | |
typedef union cpu_reg_cr4_u | cpu_reg_cr4_t |
short hand for union cpu_reg_cr4_u | |
Functions | |
_Static_assert (sizeof(cpu_reg_cr4_t)==8, "cpu_reg_cr4_t size must be 8") | |
cpu_reg_cr4_t | cpu_read_cr4 (void) |
reads cr4 register More... | |
void | cpu_write_cr4 (cpu_reg_cr4_t cr4) |
writes cr4 register More... | |
cpu_reg_cr0_t | cpu_read_cr0 (void) |
reads cr0 register More... | |
void | cpu_write_cr0 (cpu_reg_cr0_t cr0) |
writes cr0 register More... | |
void | cpu_toggle_cr0_wp (void) |
toggles write protect bit cr0, when setted kernel can not modify readonly pages | |
void | cpu_cr0_disable_wp (void) |
disables write protect bit cr0, when setted kernel can not modify readonly pages | |
void | cpu_cr0_enable_wp (void) |
enables write protect bit cr0, when setted kernel can not modify readonly pages | |
void | cpu_enable_sse (void) |
enables sse support, modifies cr4 register | |
defines crx registers detailed
This work is licensed under TURNSTONE OS Public License. Please read and understand latest version of Licence.
#define ___CPU_CRX_H 0 |
prevent duplicate header error macro
cpu_reg_cr0_t cpu_read_cr0 | ( | void | ) |
reads cr0 register
cpu_reg_cr4_t cpu_read_cr4 | ( | void | ) |
reads cr4 register
void cpu_write_cr0 | ( | cpu_reg_cr0_t | cr0 | ) |
writes cr0 register
[in] | cr0 | cr0 value |
void cpu_write_cr4 | ( | cpu_reg_cr4_t | cr4 | ) |
writes cr4 register
[in] | cr4 | cr4 value |