summaryrefslogtreecommitdiffstats
path: root/arch/x86_64
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64')
-rw-r--r--arch/x86_64/hal/smp.c2
-rw-r--r--arch/x86_64/sys/syscall.c15
-rw-r--r--arch/x86_64/sys/syscall.h2
3 files changed, 6 insertions, 13 deletions
diff --git a/arch/x86_64/hal/smp.c b/arch/x86_64/hal/smp.c
index 473786d..f67ce0b 100644
--- a/arch/x86_64/hal/smp.c
+++ b/arch/x86_64/hal/smp.c
@@ -54,7 +54,7 @@ smp_init_bsp(void)
obj_release(processor_objdir_obj);
}
- idt_init();
+ //idt_init();
paging_pml4_init();
}
diff --git a/arch/x86_64/sys/syscall.c b/arch/x86_64/sys/syscall.c
index a694674..7c5727f 100644
--- a/arch/x86_64/sys/syscall.c
+++ b/arch/x86_64/sys/syscall.c
@@ -26,35 +26,28 @@ _syscall_handle_arch(syscall_context_t *ctx)
__attribute__((naked))
void _syscall_entry(void)
{
- __asm__ volatile(" \
+ asm volatile(" \
swapgs; \
movq %%gs:%c[pcb], %%rax; \
movq %%rsp, %%rdx; \
movq %c[ksp](%%rax), %%rsp; \
- pushq %%rcx; \
pushq %%rdx; \
pushq %%r11; \
+ pushq %%rcx; \
pushq %%rbp; \
callq syscall_handler; \
swapgs; \
- xorq %%r15, %%r15; \
- xorq %%r14, %%r14; \
- xorq %%r13, %%r13; \
- xorq %%r12, %%r12; \
xorq %%r10, %%r10; \
xorq %%r9, %%r9; \
xorq %%r8, %%r8; \
xorq %%rsi, %%rsi; \
xorq %%rdi, %%rdi; \
- xorq %%rbp, %%rbp; \
xorq %%rdx, %%rdx; \
- xorq %%rcx, %%rcx; \
- xorq %%rbx, %%rbx; \
popq %%rbp; \
+ popq %%rcx; \
popq %%r11; \
popq %%rsp; \
- popq %%rcx; \
- sysretq;"
+ sysretq"
::
[pcb] "i"(offsetof(processor_t, pcb)),
[ksp] "i"(offsetof(pcb_t, ksp)));
diff --git a/arch/x86_64/sys/syscall.h b/arch/x86_64/sys/syscall.h
index 34f6a2a..32bf787 100644
--- a/arch/x86_64/sys/syscall.h
+++ b/arch/x86_64/sys/syscall.h
@@ -5,6 +5,6 @@
int _syscall_handle_serial(syscall_context_t *ctx);
-#define SYSCALL_SERIAL_COM_WRITE 0
+#define SYSCALL_SERIAL_COM_WRITE 1
#endif