kernel/x86_64: implement x86_swap_pgdir in C++
No reason not to inline this function. Signed-off-by: Paweł Dziepak <[email protected]>
This commit is contained in:
@@ -45,4 +45,11 @@ x86_context_switch(arch_thread* oldState, arch_thread* newState)
|
||||
}
|
||||
|
||||
|
||||
static inline void
|
||||
x86_swap_pgdir(uintptr_t root)
|
||||
{
|
||||
asm volatile("movq %0, %%cr3" : : "r" (root));
|
||||
}
|
||||
|
||||
|
||||
#endif // _KERNEL_ARCH_X86_64_CPU_H
|
||||
|
||||
@@ -455,7 +455,6 @@ void __x86_setup_system_time(uint32 conversionFactor,
|
||||
|
||||
void x86_userspace_thread_exit(void);
|
||||
void x86_end_userspace_thread_exit(void);
|
||||
void x86_swap_pgdir(addr_t newPageDir);
|
||||
void x86_fxsave(void* fpuState);
|
||||
void x86_fxrstor(const void* fpuState);
|
||||
void x86_noop_swap(void* oldFpuState, const void* newFpuState);
|
||||
@@ -480,6 +479,8 @@ void x86_page_fault_exception(iframe* iframe);
|
||||
|
||||
#ifndef __x86_64__
|
||||
|
||||
void x86_swap_pgdir(addr_t newPageDir);
|
||||
|
||||
uint64 x86_read_msr(uint32 registerNumber);
|
||||
void x86_write_msr(uint32 registerNumber, uint64 value);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user