Author: tkreuzer
Date: Fri Feb 5 02:39:05 2010
New Revision: 45427
URL:
http://svn.reactos.org/svn/reactos?rev=45427&view=rev
Log:
[NTOS]
- Make assembly ML64 safe
- remove 2 stubs, add 2 others
Modified:
branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/boot.S
branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/ctxswitch.S
branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/stubs.c
branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/trap.S
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/boot.S
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/boot.S [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/boot.S [iso-8859-1] Fri Feb 5
02:39:05 2010
@@ -11,6 +11,7 @@
#include <reactos/asm.h>
#include <ndk/amd64/asm.h>
+EXTERN KiInitializeKernelAndGotoIdleLoop:PROC
/* GLOBALS *******************************************************************/
@@ -37,13 +38,15 @@
mov rsi, rsp
/* Setup the new stack */
- mov ax, 0x18
+ mov ax, HEX(18)
mov ss, ax
mov rsp, r8
- sub rsp, 0x300 // FIXME
+ sub rsp, HEX(300) // FIXME
/* Copy stack parameters to the new stack */
- sub rsp, 0x38
+ sub rsp, HEX(38)
+ .ENDPROLOG
+
mov rdi, rsp
movsq
movsq
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/ctxswitch.S
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/ctxswitch.S [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/ctxswitch.S [iso-8859-1] Fri Feb
5 02:39:05 2010
@@ -13,6 +13,8 @@
#include <ndk/amd64/asm.h>
/* FUNCTIONS ****************************************************************/
+
+.code64
/*++
* KiThreadStartup
@@ -43,8 +45,7 @@
* If a return from a system thread is detected, a bug check will occur.
*
*--*/
- .func KiThreadStartup
-.globl KiThreadStartup
+PUBLIC KiThreadStartup
KiThreadStartup:
/*
@@ -85,13 +86,12 @@
/* Exit back to user-mode */
// jmp _KiServiceExit2
-UNIMPLEMENTED KiThreadStartup->KiServiceExit2
+UNIMPLEMENTED KiThreadStartup_KiServiceExit2
BadThread:
/* A system thread returned...this is very bad! */
int 3
-.endfunc
/*++
@@ -112,13 +112,11 @@
* Absolutely all registers except ESP can be trampled here for maximum code
flexibility.
*
*--*/
-.globl KiSwapContextInternal
-.func KiSwapContextInternal
+PUBLIC KiSwapContextInternal
KiSwapContextInternal:
UNIMPLEMENTED KiSwapContextInternal
ret
-.endfunc
/**
* KiSwapContext
@@ -147,8 +145,7 @@
* another thread switches to IT.
*
*--*/
-.globl KiSwapContext
-.func KiSwapContext
+PUBLIC KiSwapContext
KiSwapContext:
/* Save 10 registers */
@@ -198,4 +195,5 @@
/* Clean stack */
add esp, 10 * 8
ret
-.endfunc
+
+END
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/stubs.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/stubs.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/stubs.c [iso-8859-1] Fri Feb 5
02:39:05 2010
@@ -165,22 +165,15 @@
{
}
+BOOLEAN CcPfEnablePrefetcher;
-NTKERNELAPI
-PSLIST_ENTRY
-ExpInterlockedPopEntrySList(
- PSLIST_HEADER ListHead)
+unsigned long __readfsdword(const unsigned long Offset)
{
return 0;
}
-NTKERNELAPI
-PSLIST_ENTRY
-ExpInterlockedPushEntrySList(
- PSLIST_HEADER ListHead,
- PSLIST_ENTRY ListEntry)
+void main()
{
- return 0;
}
#endif
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/trap.S
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/trap.S [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/trap.S [iso-8859-1] Fri Feb 5
02:39:05 2010
@@ -24,28 +24,28 @@
.data
PUBLIC MsgUnimplemented
-_MsgUnimplemented:
+MsgUnimplemented:
.ascii "WARNING: %s at %s:%d is UNIMPLEMENTED!\n"
-_MsgPageFault:
+MsgPageFault:
.ascii "Page fault! Code = 0x%x, RIP = %p, FaultingAddress = %p\n\0"
-_MsgGeneralProtFault:
+MsgGeneralProtFault:
.ascii "General protection fault at %p!\n\0"
-_MsgBreakpointTrap:
+MsgBreakpointTrap:
.ascii "BreakpointTrap at %p\n\0"
-_MsgUnexpectedInterrupt:
+MsgUnexpectedInterrupt:
.ascii "UnexpectedInterrupt Vector=0x%02lx\n\0"
-_MsgInvalidOpcodeFault:
+MsgInvalidOpcodeFault:
.ascii "Invalid opcode fault at %p!\n\0"
-_MsgDoubleFault:
+MsgDoubleFault:
.ascii "Double fault at %p, rbp=%p!\n\0"
-_MsgTrapInfo:
+MsgTrapInfo:
.ascii "Trap: %s at %p\n\0"
MACRO(TRAPINFO, func)
@@ -55,7 +55,7 @@
label1: .asciz "\func"
label2:
sub rsp, 32
- lea rcx, _MsgTrapInfo[rip]
+ lea rcx, MsgTrapInfo[rip]
lea rdx, 1b[rip]
mov r8, [rbp + KTRAP_FRAME_Rip]
call qword ptr FrLdrDbgPrint[rip]
@@ -421,7 +421,7 @@
TRAPINFO KiBreakpointTrap
-// lea rcx, _MsgBreakpointTrap[rip]
+// lea rcx, MsgBreakpointTrap[rip]
// mov rdx, rsp
// call qword ptr FrLdrDbgPrint[rip]
@@ -501,7 +501,7 @@
TRAPINFO KiInvalidOpcodeFault
mov rdx, [rbp + KTRAP_FRAME_Rip]
- lea rcx, _MsgInvalidOpcodeFault[rip]
+ lea rcx, MsgInvalidOpcodeFault[rip]
call qword ptr FrLdrDbgPrint[rip]
/* Enable interrupts */
@@ -562,7 +562,7 @@
/* Push pseudo error code */
ENTER_TRAP_FRAME TRAPFLAG_ALL
- lea rcx, _MsgDoubleFault[rip]
+ lea rcx, MsgDoubleFault[rip]
mov rdx, [rbp + KTRAP_FRAME_FaultAddress]
mov r8, rbp
call qword ptr FrLdrDbgPrint[rip]
@@ -639,7 +639,7 @@
TRAPINFO KiGeneralProtectionFault
mov rdx, [rbp + KTRAP_FRAME_Rip]
- lea rcx, _MsgGeneralProtFault[rip]
+ lea rcx, MsgGeneralProtFault[rip]
call qword ptr FrLdrDbgPrint[rip]
/* Call the C handler */
@@ -682,7 +682,7 @@
TRAPINFO KiPageFault
#if 0
- lea rcx, _MsgPageFault[rip]
+ lea rcx, MsgPageFault[rip]
mov rdx, [rbp + KTRAP_FRAME_ErrorCode]
mov r8, [rbp + KTRAP_FRAME_Rip]
mov r9, [rbp + KTRAP_FRAME_FaultAddress]