mirror of
https://github.com/taigrr/gopher-os
synced 2025-01-18 04:43:13 -08:00
By setting up pwd as a Go workspace, we can trim import paths from something like "github.com/achilleasa/gopher-os/kernel" to just "kernel". These changes make forking easier and also allows us to move the code to a different git hosting provider without having to rewrite the imports.
34 lines
482 B
ArmAsm
34 lines
482 B
ArmAsm
#include "textflag.h"
|
|
|
|
TEXT ·EnableInterrupts(SB),NOSPLIT,$0
|
|
STI
|
|
RET
|
|
|
|
TEXT ·DisableInterrupts(SB),NOSPLIT,$0
|
|
CLI
|
|
RET
|
|
|
|
TEXT ·Halt(SB),NOSPLIT,$0
|
|
CLI
|
|
HLT
|
|
RET
|
|
|
|
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
|
|
|
|
TEXT ·ReadCR2(SB),NOSPLIT,$0
|
|
MOVQ CR2, AX
|
|
MOVQ AX, ret+0(FP)
|
|
RET
|