From e2de4723c63b5c58799000eafa46861dab4ed705 Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Tue, 8 Feb 2005 01:55:04 +0000 Subject: [PATCH] Forgot this file svn path=/trunk/; revision=13463 --- reactos/ntoskrnl/ke/i386/main.S | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 reactos/ntoskrnl/ke/i386/main.S diff --git a/reactos/ntoskrnl/ke/i386/main.S b/reactos/ntoskrnl/ke/i386/main.S new file mode 100644 index 00000000000..ab0374f7af9 --- /dev/null +++ b/reactos/ntoskrnl/ke/i386/main.S @@ -0,0 +1,31 @@ +#include +#include +#include +#include +#include +#include +#include + +.globl _NtProcessStartup + +_NtProcessStartup: + + /* FIXME: Application processors should have their own GDT/IDT */ + lgdt _KiGdtDescriptor + lidt _KiIdtDescriptor + + /* Load the PCR selector */ + movl $PCR_SELECTOR, %eax + movl %eax, %fs + + /* Load the initial kernel stack */ + lea _kernel_stack, %eax + add $0x1000, %eax + and $0xFFFFE000, %eax + add $(0x3000 - SIZEOF_FX_SAVE_AREA), %eax + movl %eax, %esp + + /* Call the main kernel initialization */ + pushl %edx + pushl %ecx + call __main