diff --git a/sys/amd64/machine.c b/sys/amd64/machine.c index 9c97d7d..e1e125e 100644 --- a/sys/amd64/machine.c +++ b/sys/amd64/machine.c @@ -4,6 +4,7 @@ #include #include #include +#include #include "amd64.h" #include "ioapic.h" @@ -76,7 +77,7 @@ void Machine_SyscallInit() { kprintf("Initializing Syscall... "); - wrmsr(MSR_STAR, SEL_KCS << 32 | SEL_UCS << 48); + wrmsr(MSR_STAR, (uint64_t)SEL_KCS << 32 | (uint64_t)SEL_UCS << 48); wrmsr(MSR_LSTAR, 0); wrmsr(MSR_CSTAR, 0); wrmsr(MSR_SFMASK, 0);