Turnstone Operating System
|
64 bit cpu operations More...
Functions | |
MODULE ("turnstone.kernel.cpu") | |
uint64_t | cpu_read_msr (uint32_t msr_address) |
read msr and return More... | |
int8_t | cpu_write_msr (uint32_t msr_address, uint64_t value) |
writes msr More... | |
uint64_t | cpu_read_cr2 (void) |
read cr2 and return More... | |
uint64_t | cpu_read_cr3 (void) |
read cr3 and return More... | |
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 | |
void | cpu_clear_segments (void) |
clears segments More... | |
uint64_t | cpu_read_fs_base (void) |
uint64_t | cpu_read_gs_base (void) |
64 bit cpu operations
This work is licensed under TURNSTONE OS Public License. Please read and understand latest version of Licence.
void cpu_clear_segments | ( | void | ) |
clears segments
sets segment registers to zero
cpu_reg_cr0_t cpu_read_cr0 | ( | void | ) |
reads cr0 register
uint64_t cpu_read_cr2 | ( | void | ) |
read cr2 and return
returns cr2 value for page faults
uint64_t cpu_read_cr3 | ( | void | ) |
read cr3 and return
returns cr3 value for page tables
cpu_reg_cr4_t cpu_read_cr4 | ( | void | ) |
reads cr4 register
read msr and return
[in] | msr_address | model Specific register address |
returns edx:eax as uint64_t
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 |