mirror of
https://github.com/hermitcore/libhermit.git
synced 2025-03-09 00:00:03 +01:00
some code cleanups
This commit is contained in:
parent
7ee756ada3
commit
eafdc290c2
1 changed files with 2 additions and 2 deletions
|
@ -368,10 +368,10 @@ inline static uint64_t rdmsr(uint32_t msr) {
|
|||
*/
|
||||
inline static void wrmsr(uint32_t msr, uint64_t value)
|
||||
{
|
||||
uint32_t low = (uint32_t) (value & 0xFFFFFFFFULL);
|
||||
uint32_t low = (uint32_t) value;
|
||||
uint32_t high = (uint32_t) (value >> 32);
|
||||
|
||||
asm volatile("wrmsr" :: "a"(low), "c"(msr), "d"(high));
|
||||
asm volatile("wrmsr" :: "c"(msr), "a"(low), "d"(high) : "memory");
|
||||
}
|
||||
|
||||
/** @brief Read cr0 register
|
||||
|
|
Loading…
Add table
Reference in a new issue