mirror of
https://github.com/taigrr/gopher-os
synced 2025-01-18 04:43:13 -08:00
The API provides the Map() and MapTemporary() functions that establish virtual -> physical address mappings using the currently active page directory table. Mapped pages can be unmapped using the Unmap() function. When unmapping virtual addresses, the page tables leading to them will not be automatically released even if they are empty. This will be addressed by a future commit.
16 lines
270 B
ArmAsm
16 lines
270 B
ArmAsm
#include "textflag.h"
|
|
|
|
TEXT ·flushTLBEntry(SB),NOSPLIT,$0
|
|
INVLPG virtAddr+0(FP)
|
|
RET
|
|
|
|
TEXT ·switchPDT(SB),NOSPLIT,$0
|
|
// loading CR3 also triggers a TLB flush
|
|
MOVQ pdtPhysAddr+0(FP), CR3
|
|
RET
|
|
|
|
TEXT ·activePDT(SB),NOSPLIT,$0
|
|
MOVQ CR3, AX
|
|
MOVQ AX, ret+0(FP)
|
|
RET
|