Apply touchups to last PR
Compilers like GCC require comments on lines like `#endif rdmsr`. Since the rdmsr macro was only being used in arch_prctl(), I've localized the macro, and I'm considering deleting arch_prctl() too, since there isn't any way to have mem segments unfortunately across operating systems ;_; The remaining changed lines are due to clang-format which runs on auto.
This commit is contained in:
@@ -17,11 +17,10 @@
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "ape/lib/pc.h"
|
||||
#include "libc/bits/bits.h"
|
||||
|
||||
textreal void pageunmap(int64_t vaddr) {
|
||||
uint64_t *entry;
|
||||
entry = __getpagetableentry(vaddr, 3, &g_pml4t, &g_ptsp_xlm);
|
||||
*entry &= ~PAGE_V;
|
||||
invlpg(vaddr);
|
||||
asm volatile("invlpg\t(%0)" : /* no outputs */ : "r"(vaddr) : "memory");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user