1
0
mirror of https://github.com/taigrr/gopher-os synced 2025-01-18 04:43:13 -08:00

Fix bug in the ASM code used to load the PDT to the CR2 register

The previous implementation in Go assembly did not translate to the
correct assembly instructions for loading CR2
This commit is contained in:
Achilleas Anagnostopoulos 2017-07-12 23:34:08 +01:00
parent 4e0ad81770
commit fdd5611220

View File

@ -19,7 +19,8 @@ TEXT ·FlushTLBEntry(SB),NOSPLIT,$0
TEXT ·SwitchPDT(SB),NOSPLIT,$0
// loading CR3 also triggers a TLB flush
MOVQ pdtPhysAddr+0(FP), CR3
MOVQ pdtPhysAddr+0(FP), AX
MOVQ AX, CR3
RET
TEXT ·ActivePDT(SB),NOSPLIT,$0