mirror of
https://github.com/taigrr/gopher-os
synced 2025-01-18 04:43:13 -08:00
Add assemnly code for enabling/disabling insterrupts and halting the CPU
This commit is contained in:
parent
d793300279
commit
cd3199199b
@ -1,5 +1,14 @@
|
|||||||
package cpu
|
package cpu
|
||||||
|
|
||||||
|
// EnableInterrupts enables interrupt handling.
|
||||||
|
func EnableInterrupts()
|
||||||
|
|
||||||
|
// DisableInterrupts disables interrupt handling.
|
||||||
|
func DisableInterrupts()
|
||||||
|
|
||||||
|
// Halt stops instruction execution.
|
||||||
|
func Halt()
|
||||||
|
|
||||||
// FlushTLBEntry flushes a TLB entry for a particular virtual address.
|
// FlushTLBEntry flushes a TLB entry for a particular virtual address.
|
||||||
func FlushTLBEntry(virtAddr uintptr)
|
func FlushTLBEntry(virtAddr uintptr)
|
||||||
|
|
||||||
|
@ -1,5 +1,18 @@
|
|||||||
#include "textflag.h"
|
#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
|
TEXT ·FlushTLBEntry(SB),NOSPLIT,$0
|
||||||
INVLPG virtAddr+0(FP)
|
INVLPG virtAddr+0(FP)
|
||||||
RET
|
RET
|
||||||
|
Loading…
x
Reference in New Issue
Block a user