ArvernOS
|
#include <stdint.h>
Macros | |
#define | IA32_EFER 0xC0000080 |
#define | IA32_STAR 0xC0000081 |
System Call Target Address. | |
#define | IA32_LSTAR 0xC0000082 |
IA-32e Mode System Call Target Address. | |
#define | IA32_SFMASK 0xC0000084 |
System Call Flag Mask. | |
Functions | |
uint64_t | read_cr0 () |
uint64_t | read_cr2 () |
uint64_t | read_cr3 () |
uint64_t | read_cr4 () |
void | write_cr0 (uint64_t value) |
void | write_cr3 (uint64_t value) |
void | write_cr4 (uint64_t value) |
uint64_t | read_msr (uint64_t msr) |
void | write_msr (uint64_t msr, uint64_t value) |
uint64_t | read_rsp () |
#define IA32_EFER 0xC0000080 |
Extended Feature Enables
uint64_t read_cr0 | ( | ) |
Returns the value of the CR0 register.
uint64_t read_cr2 | ( | ) |
Returns the value of the CR2 register.
uint64_t read_cr3 | ( | ) |
Returns the value of the CR3 register.
uint64_t read_cr4 | ( | ) |
Returns the value of the CR4 register.
uint64_t read_msr | ( | uint64_t | msr | ) |
Read a Model Specific Register.
uint64_t read_rsp | ( | ) |
Returns the value of the RSP register (stack pointer).
void write_cr0 | ( | uint64_t | value | ) |
Updates the value of the CR0 register.
value | the new value for the CR0 register |
void write_cr3 | ( | uint64_t | value | ) |
Updates the value of the CR3 register.
value | the new value for the CR3 register |
void write_cr4 | ( | uint64_t | value | ) |
Updates the value of the CR4 register.
value | the new value for the CR4 register |
void write_msr | ( | uint64_t | msr, |
uint64_t | value ) |
Updates the value of the given Model Specific Register.
msr | the model specific register number |
value | the new value |