mirror of
https://github.com/bdnugget/eggos.git
synced 2026-11-07 04:17:27 +00:00
kernel: use FLAGS_IF enum for 0x200 (#105)
This commit is contained in:
1 parent
4892e84bae
commit
78b167e4f3
2 files changed
+3
-3
No files matched your search
+1
-1
@@ -415,7 +415,7 @@ func syscallInit() {
|
||||
// write syscall selector
|
||||
wrmsr(_MSR_STAR, 8<<32)
|
||||
// clear IF when enter syscall
|
||||
wrmsr(_MSR_FSTAR, 0x200)
|
||||
wrmsr(_MSR_FSTAR, _FLAGS_IF)
|
||||
// set syscall entry
|
||||
wrmsr(_MSR_LSTAR, sys.FuncPC(syscallEntry))
|
||||
|
||||
|
||||
+2
-2
@@ -317,9 +317,9 @@ func pickup(pidx *int) *Thread {
|
||||
//go:nosplit
|
||||
func switchto(t *Thread) {
|
||||
begin := nanosecond()
|
||||
// assert interrupt is enableds
|
||||
// assert that interrupt is enabled
|
||||
// TODO: enable check
|
||||
if t.tf != nil && t.tf.FLAGS&0x200 == 0 {
|
||||
if t.tf != nil && t.tf.FLAGS&_FLAGS_IF == 0 {
|
||||
throw("bad eflags")
|
||||
}
|
||||
setMythread(t)
|
||||
|
||||
Reference in new issue
Block a user