Author: tkreuzer
Date: Mon Jun 6 19:08:39 2011
New Revision: 52121
URL:
http://svn.reactos.org/svn/reactos?rev=52121&view=rev
Log:
[NTOSKRNL]
Fix MSVC and amd64 build
Modified:
trunk/reactos/ntoskrnl/CMakeLists.txt
trunk/reactos/ntoskrnl/cache/section/io.c
trunk/reactos/ntoskrnl/include/internal/amd64/intrin_i.h
trunk/reactos/ntoskrnl/include/internal/amd64/mm.h
trunk/reactos/ntoskrnl/include/internal/ex.h
trunk/reactos/ntoskrnl/include/internal/mm.h
trunk/reactos/ntoskrnl/include/ntoskrnl.h
trunk/reactos/ntoskrnl/ke/amd64/boot.S
trunk/reactos/ntoskrnl/ke/amd64/ctxswitch.S
trunk/reactos/ntoskrnl/ke/amd64/trap.S
Modified: trunk/reactos/ntoskrnl/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/CMakeLists.txt?re…
==============================================================================
--- trunk/reactos/ntoskrnl/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/CMakeLists.txt [iso-8859-1] Mon Jun 6 19:08:39 2011
@@ -423,7 +423,11 @@
add_executable(ntoskrnl ${SOURCE})
-set_entrypoint(ntoskrnl KiSystemStartup@4)
+if (ARCH MATCHES i386)
+ set_entrypoint(ntoskrnl KiSystemStartup@4)
+else()
+ set_entrypoint(ntoskrnl KiSystemStartup)
+endif()
set_subsystem(ntoskrnl native)
if(MSVC)
Modified: trunk/reactos/ntoskrnl/cache/section/io.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cache/section/io.…
==============================================================================
--- trunk/reactos/ntoskrnl/cache/section/io.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cache/section/io.c [iso-8859-1] Mon Jun 6 19:08:39 2011
@@ -71,9 +71,10 @@
PIRP Irp,
PVOID Context)
{
+ PMDL Mdl = Irp->MdlAddress;
+
/* Unlock MDL Pages, page 167. */
DPRINT("MiSimpleReadComplete %x\n", Irp);
- PMDL Mdl = Irp->MdlAddress;
while (Mdl)
{
DPRINT("MDL Unlock %x\n", Mdl);
Modified: trunk/reactos/ntoskrnl/include/internal/amd64/intrin_i.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/amd64/intrin_i.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/amd64/intrin_i.h [iso-8859-1] Mon Jun 6
19:08:39 2011
@@ -104,8 +104,6 @@
#elif defined(_MSC_VER)
-#define UNIMPLEMENTED DbgPrint("%s is unimplemented!!!\n", __FUNCTION__);
-
void __lgdt(void *Source);
void __sgdt(void *Destination);
Modified: trunk/reactos/ntoskrnl/include/internal/amd64/mm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/amd64/mm.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/amd64/mm.h [iso-8859-1] Mon Jun 6 19:08:39
2011
@@ -141,6 +141,9 @@
(MiAddressToPpe(Address)->u.Hard.Valid) &&
(MiAddressToPde(Address)->u.Hard.Valid));
}
+
+#define MiPdeToPte(PDE) ((PMMPTE)MiPteToAddress(PDE))
+#define MiPteToPde(PTE) ((PMMPDE)MiAddressToPte(PTE))
#define ADDR_TO_PAGE_TABLE(v) (((ULONG_PTR)(v)) / (512 * PAGE_SIZE))
#define ADDR_TO_PDE_OFFSET(v) ((((ULONG_PTR)(v)) / (512 * PAGE_SIZE)))
Modified: trunk/reactos/ntoskrnl/include/internal/ex.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/ex.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/ex.h [iso-8859-1] Mon Jun 6 19:08:39 2011
@@ -480,7 +480,7 @@
ExGetCountFastReference(IN EX_FAST_REF FastRef)
{
/* Return the reference count */
- return FastRef.RefCnt;
+ return (ULONG)FastRef.RefCnt;
}
FORCEINLINE
Modified: trunk/reactos/ntoskrnl/include/internal/mm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] Mon Jun 6 19:08:39 2011
@@ -1140,7 +1140,7 @@
if (Pfn > MmHighestPhysicalPage) return NULL;
/* Make sure this page actually has a PFN entry */
- if ((MiPfnBitMap.Buffer) && !(RtlTestBit(&MiPfnBitMap, Pfn))) return
NULL;
+ if ((MiPfnBitMap.Buffer) && !(RtlTestBit(&MiPfnBitMap, (ULONG)Pfn)))
return NULL;
/* Get the entry */
Page = &MmPfnDatabase[Pfn];
Modified: trunk/reactos/ntoskrnl/include/ntoskrnl.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/ntoskrnl.…
==============================================================================
--- trunk/reactos/ntoskrnl/include/ntoskrnl.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/ntoskrnl.h [iso-8859-1] Mon Jun 6 19:08:39 2011
@@ -17,6 +17,7 @@
#ifdef _M_AMD64
#define IoAllocateAdapterChannel _IoAllocateAdapterChannel
#define KeGetCurrentThread _KeGetCurrentThread
+#define RtlFillMemoryUlong _RtlFillMemoryUlong
#endif
/* Version Data */
Modified: trunk/reactos/ntoskrnl/ke/amd64/boot.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/amd64/boot.S?r…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/amd64/boot.S [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/amd64/boot.S [iso-8859-1] Mon Jun 6 19:08:39 2011
@@ -8,7 +8,6 @@
/* INCLUDES ******************************************************************/
#include <asm.inc>
-
#include <ksamd64.inc>
EXTERN KiInitializeKernelAndGotoIdleLoop:PROC
@@ -19,7 +18,6 @@
/* FUNCTIONS *****************************************************************/
.code64
-.text
/**
* VOID
Modified: trunk/reactos/ntoskrnl/ke/amd64/ctxswitch.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/amd64/ctxswitc…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/amd64/ctxswitch.S [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/amd64/ctxswitch.S [iso-8859-1] Mon Jun 6 19:08:39 2011
@@ -10,7 +10,6 @@
/* INCLUDES ******************************************************************/
#include <asm.inc>
-
#include <ksamd64.inc>
/* FUNCTIONS ****************************************************************/
@@ -166,7 +165,7 @@
mov [rsp+0], rbp
/* Get the PCR */
- mov rbx, gs:[KPCR_SELF]
+ mov rbx, gs:[PcSelf]
/* Get the current thread */
mov rdi, rcx
Modified: trunk/reactos/ntoskrnl/ke/amd64/trap.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/amd64/trap.S?r…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/amd64/trap.S [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/amd64/trap.S [iso-8859-1] Mon Jun 6 19:08:39 2011
@@ -259,7 +259,6 @@
/* FUNCTIONS *****************************************************************/
-.text
.code64
ALIGN 8
@@ -907,6 +906,8 @@
.ENDP KiUnexpectedInterrupt
#ifdef _MSC_VER
+#undef lgdt
+#undef lidt
//void __lgdt(void *Source);
PUBLIC __lgdt