Deleted: trunk/reactos/ntoskrnl/ex/i386/interlck.S
Added: trunk/reactos/ntoskrnl/ex/i386/interlck_asm.S
Deleted: trunk/reactos/ntoskrnl/ke/i386/main.S
Added: trunk/reactos/ntoskrnl/ke/i386/main_asm.S
Deleted: trunk/reactos/ntoskrnl/ke/i386/usercall.S
Added: trunk/reactos/ntoskrnl/ke/i386/usercall_asm.S
Modified: trunk/reactos/ntoskrnl/ntoskrnl.xml
--- trunk/reactos/ntoskrnl/ex/i386/interlck.S 2005-10-27 19:13:52 UTC (rev 18795)
+++ trunk/reactos/ntoskrnl/ex/i386/interlck.S 2005-10-27 19:33:42 UTC (rev 18796)
@@ -1,143 +0,0 @@
-/* $Id: interlck.c 15557 2005-05-28 07:26:38Z hbirr $
- *
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * FILE: ntoskrnl/ex/i386/interlck.c
- * PURPOSE: No purpose listed.
- *
- * PROGRAMMERS: No programmer listed.
- */
-
-#ifdef CONFIG_SMP
-#define LOCK lock
-#else
-#define LOCK
-#endif
-
-.global @Exfi386InterlockedIncrementLong@4
-@Exfi386InterlockedIncrementLong@4:
- LOCK
- addl $1,(%ecx)
- lahf
- andl $0xC000, %eax
- ret
-
-.global @Exfi386InterlockedDecrementLong@4
-@Exfi386InterlockedDecrementLong@4:
- LOCK
- subl $1,(%ecx)
- lahf
- andl $0xC000, %eax
- ret
-
-.global @Exfi386InterlockedExchangeUlong@8
-@Exfi386InterlockedExchangeUlong@8:
- LOCK
- xchgl %edx,(%ecx)
- movl %edx,%eax
- ret
-
-.global _Exi386InterlockedIncrementLong@4
-_Exi386InterlockedIncrementLong@4:
- movl 4(%esp),%eax
- LOCK
- addl $1,(%eax)
- lahf
- andl $0xC000, %eax
- ret $4
-
-.global _Exi386InterlockedDecrementLong@4
-_Exi386InterlockedDecrementLong@4:
- movl 4(%esp),%eax
- LOCK
- subl $1,(%eax)
- lahf
- andl $0xC000, %eax
- ret $4
-
-.global _Exi386InterlockedExchangeUlong@8
-_Exi386InterlockedExchangeUlong@8:
- movl 4(%esp),%edx
- movl 8(%esp),%eax
- LOCK
- xchgl %eax,(%edx)
- ret $8
-
-.global @InterlockedIncrement@4
-@InterlockedIncrement@4:
- movl $1,%eax
- LOCK
- xaddl %eax,(%ecx)
- incl %eax
- ret
-
-.global @InterlockedDecrement@4
-@InterlockedDecrement@4:
- movl $-1,%eax
- LOCK
- xaddl %eax,(%ecx)
- decl %eax
- ret
-
-.global @InterlockedExchange@8
-@InterlockedExchange@8:
- LOCK
- xchgl %edx,(%ecx)
- movl %edx,%eax
- ret
-
-.global @InterlockedExchangeAdd@8
-@InterlockedExchangeAdd@8:
- LOCK
- xaddl %edx,(%ecx)
- movl %edx,%eax
- ret
-
-.global @InterlockedClearBit@8
-@InterlockedClearBit@8:
- LOCK
- btr %edx,(%ecx)
- setc %al
- ret
-
-.global @InterlockedCompareExchange@12
-@InterlockedCompareExchange@12:
- movl 4(%esp),%eax
- LOCK
- cmpxchg %edx,(%ecx)
- ret $4
-
-.global @ExfpInterlockedExchange64@8
-@ExfpInterlockedExchange64@8:
- pushl %ebx
- pushl %esi
- movl %ecx,%esi
- movl (%edx),%ebx
- movl 4(%edx),%ecx
-1:
- movl (%esi),%eax
- movl 4(%esi),%edx
- LOCK
- cmpxchg8b (%esi)
- jnz 1b
- popl %esi
- popl %ebx
- ret
-
-.global @ExfInterlockedCompareExchange64@12
-@ExfInterlockedCompareExchange64@12:
- pushl %ebx
- pushl %esi
- movl %ecx,%esi
- movl (%edx),%ebx
- movl 4(%edx),%ecx
- movl 12(%esp),%edx
- movl (%edx),%eax
- movl 4(%edx),%edx
- LOCK
- cmpxchg8b (%esi)
- popl %esi
- popl %ebx
- ret $4
-
-/* EOF */
--- trunk/reactos/ntoskrnl/ke/i386/main.S 2005-10-27 19:13:52 UTC (rev 18795)
+++ trunk/reactos/ntoskrnl/ke/i386/main.S 2005-10-27 19:33:42 UTC (rev 18796)
@@ -1,47 +0,0 @@
-#include <roscfg.h>
-#include <ndk/asm.h>
-#include <ndk/i386/segment.h>
-
-#define AP_MAGIC (0x12481020)
-
-.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
-
- cmpl $AP_MAGIC, %ecx
- jne .m1
-
- pushl $0
- popfl
-
- /*
- * Reserve space for the floating point save area.
- */
- subl $SIZEOF_FX_SAVE_AREA, %esp
-
- /*
- * Call the application processor initialization code
- */
- pushl $0
- call _KiSystemStartup
-
-.m1:
- /* 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
--- trunk/reactos/ntoskrnl/ke/i386/usercall.S 2005-10-27 19:13:52 UTC (rev 18795)
+++ trunk/reactos/ntoskrnl/ke/i386/usercall.S 2005-10-27 19:33:42 UTC (rev 18796)
@@ -1,53 +0,0 @@
-/*
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * FILE: ntoskrnl/ke/i386s/usercall.S
- * PURPOSE: User-Mode callbacks and return.
- *
- * PROGRAMMERS: Alex Ionescu (alex@relsoft.net)
- */
-
-/* INCLUDES ******************************************************************/
-
-#include <roscfg.h>
-.intel_syntax noprefix
-
-/* GLOBALS ****************************************************************/
-.extern PVOID _SystemDllCallbackDispatcher
-
-#define CBSTACK_BUFFER_ADDRESS 0x20
-#define CBSTACK_BUFFER_LENGTH 0x24
-/* FUNCTIONS ****************************************************************/
-
-/*++
- * KiSwitchToUserMode
- *
- * The KiSwitchToUserMode routine sets up a Trap Frame and a Callback stack
- * for the purpose of switching to user mode. The actual final jump is done
- * by KiServiceExit which will treat this as a syscall return.
- *
- * Params:
- * OutputBuffer - Pointer to a caller-allocated buffer where to receive
- * the return data from the user-mode function
- *
- * OutputLength - Size of the Output Buffer described above.
- *
- * Returns:
- * Jumps into KiServiceExit.
- *
- * Remarks:
- * If there is not enough Kernel Stack space, the routine will increase the
- * Kernel Stack.
- *
- * User mode execution resumes at ntdll!KiUserCallbackDispatcher.
- *
- * This call MUST be paired by interrupt 0x2B or NtCallbackReturn.
- *
- *--*/
-.globl _KiSwitchToUserMode@8
-.func KiSwitchToUserMode@8
-_KiSwitchToUserMode@8:
-
-.endfunc
-
-
--- trunk/reactos/ntoskrnl/ntoskrnl.xml 2005-10-27 19:13:52 UTC (rev 18795)
+++ trunk/reactos/ntoskrnl/ntoskrnl.xml 2005-10-27 19:33:42 UTC (rev 18796)
@@ -23,7 +23,7 @@
<directory name="ke">
<if property="ARCH" value="i386">
<directory name="i386">
- <file first="true">main.S</file>
+ <file first="true">main_asm.S</file>
<file>bios.c</file>
<file>brkpoint.S</file>
<file>ctxswitch.S</file>
@@ -41,7 +41,7 @@
<file>tlbflush.S</file>
<file>trap.s</file>
<file>tss.c</file>
- <file>usercall.S</file>
+ <file>usercall_asm.S</file>
<file>usertrap.c</file>
<file>v86m.c</file>
<file>v86m_sup.S</file>
@@ -119,7 +119,7 @@
<file>atom.c</file>
<if property="ARCH" value="i386">
<directory name="i386">
- <file>interlck.S</file>
+ <file>interlck_asm.S</file>
</directory>
</if>
<file>callback.c</file>