MSR and syscall changes

- Moved MSR code to separate files with an enum class
- Implemented syscall_enable in C++ using new MSR calls
This commit is contained in:
Justin C. Miller
2018-09-15 00:37:49 -07:00
parent 62c559043d
commit 1308864061
9 changed files with 78 additions and 61 deletions

View File

@@ -14,16 +14,6 @@ uint8_t inb(uint16_t port);
/// \arg val The byte to write
void outb(uint16_t port, uint8_t val);
/// Read the value of a MSR
/// \arg addr The MSR address
/// \returns The current value of the MSR
uint64_t rdmsr(uint64_t addr);
/// Write to a MSR
/// \arg addr The MSR address
/// \arg value The value to write
void wrmsr(uint64_t addr, uint64_t value);
/// Pause briefly by doing IO to port 0x80
/// \arg times Number of times to delay by writing
void io_wait(unsigned times = 1);