Author: tkreuzer
Date: Fri Feb 5 04:05:51 2010
New Revision: 45433
URL:
http://svn.reactos.org/svn/reactos?rev=45433&view=rev
Log:
[NTOS]
On MSVC implement _lgdt, __sgdt, __lldt, __sldt, __ltr and __str as assembly functions,
because there is no inline assembly.
The MSVC/ML64 built kernel now boots and WinDbg connects.
Modified:
branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/intrin_i.h
branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/trap.S
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/intrin_i.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/intrin_i.h
[iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/intrin_i.h
[iso-8859-1] Fri Feb 5 04:05:51 2010
@@ -106,36 +106,17 @@
#define UNIMPLEMENTED DbgPrint("%s is unimplemented!!!\n", __FUNCTION__);
-void FORCEINLINE __lgdt(void *Source)
-{
- UNIMPLEMENTED;
-}
+void __lgdt(void *Source);
-void FORCEINLINE __sgdt(void *Destination)
-{
- UNIMPLEMENTED;
-}
+void __sgdt(void *Destination);
-void FORCEINLINE __lldt(unsigned short Value)
-{
- UNIMPLEMENTED;
-}
+void __lldt(unsigned short Value);
-void FORCEINLINE __sldt(void *Destination)
-{
- UNIMPLEMENTED;
-}
+void __sldt(void *Destination);
-void FORCEINLINE __ltr(unsigned short Source)
-{
- UNIMPLEMENTED;
-}
+void __ltr(unsigned short Source);
-void FORCEINLINE __str(unsigned short *Destination)
-{
- UNIMPLEMENTED;
-}
-
+void __str(unsigned short *Destination);
#else
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
04:05:51 2010
@@ -905,6 +905,44 @@
jmp $
.ENDP KiUnexpectedInterrupt
-
+#ifdef _MSC_VER
+
+//void __lgdt(void *Source);
+PUBLIC __lgdt
+__lgdt:
+ lgdt fword ptr [rcx]
+ ret
+
+//void __sgdt(void *Destination);
+PUBLIC __sgdt
+__sgdt:
+ sgdt fword ptr [rcx]
+ ret
+
+// void __lldt(unsigned short Value)
+PUBLIC __lldt
+__lldt:
+ lldt cx
+ ret
+
+//void __sldt(void *Destination);
+PUBLIC __sldt
+__sldt:
+ sldt word ptr [rcx]
+ ret
+
+//void __ltr(unsigned short Source);
+PUBLIC __ltr
+__ltr:
+ ltr cx
+ ret
+
+//void __str(unsigned short *Destination);
+PUBLIC __str
+__str:
+ str word ptr [rcx]
+ ret
+
+#endif
END