Author: tkreuzer
Date: Wed Mar 24 23:02:26 2010
New Revision: 46406
URL:
http://svn.reactos.org/svn/reactos?rev=46406&view=rev
Log:
[NTOS]
- remove KeGetCurrentThread inline function, it's already in the wdm.h, reenable the
exported function
- Add InitializeSListHead export
- Use RtlInitializeSListHead for InititializeSListHead
- Add hacks for WDK compilation
- Add ValidKernelPte/Pde
- Comment out MiSyncARM3WithROS, add a stub instead
Modified:
branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h
branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/mm.h
branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/rtl.h
branches/ros-amd64-bringup/reactos/ntoskrnl/include/ntoskrnl.h
branches/ros-amd64-bringup/reactos/ntoskrnl/io/iomgr/adapter.c
branches/ros-amd64-bringup/reactos/ntoskrnl/io/iomgr/arcname.c
branches/ros-amd64-bringup/reactos/ntoskrnl/ke/thrdobj.c
branches/ros-amd64-bringup/reactos/ntoskrnl/mm/ARM3/mminit.c
branches/ros-amd64-bringup/reactos/ntoskrnl/mm/amd64/init.c
branches/ros-amd64-bringup/reactos/ntoskrnl/mm/sysldr.c
branches/ros-amd64-bringup/reactos/ntoskrnl/ntoskrnl.pspec
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h [iso-8859-1]
Wed Mar 24 23:02:26 2010
@@ -144,13 +144,6 @@
{
/* Flush the TLB by resetting CR3 */
__writecr3(__readcr3());
-}
-
-FORCEINLINE
-PRKTHREAD
-KeGetCurrentThread(VOID)
-{
- return (PRKTHREAD)__readgsqword(FIELD_OFFSET(KIPCR, Prcb.CurrentThread));
}
FORCEINLINE
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/mm.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/mm.h [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/mm.h [iso-8859-1]
Wed Mar 24 23:02:26 2010
@@ -158,13 +158,12 @@
#define MI_MAKE_WRITE_PAGE(x) ((x)->u.Hard.Writable = 1)
#endif
-#if 0 // FIXME
+// FIXME!!!
#define PAGE_TO_SECTION_PAGE_DIRECTORY_OFFSET(x) \
((x) / (4*1024*1024))
#define PAGE_TO_SECTION_PAGE_TABLE_OFFSET(x) \
((((x)) % (4*1024*1024)) / (4*1024))
-#endif
#define NR_SECTION_PAGE_TABLES 1024
#define NR_SECTION_PAGE_ENTRIES 1024
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/rtl.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/rtl.h [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/rtl.h [iso-8859-1] Wed
Mar 24 23:02:26 2010
@@ -1,4 +1,8 @@
#pragma once
+
+#ifdef _WIN64
+#define InitializeSListHead RtlInitializeSListHead
+#endif
NTSTATUS
NTAPI
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/ntoskrnl.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/include/ntoskrnl.h [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/include/ntoskrnl.h [iso-8859-1] Wed Mar 24
23:02:26 2010
@@ -11,6 +11,12 @@
/* ARM Bringup Hack */
#ifdef _M_ARM
#define DbgPrint DbgPrintEarly
+#endif
+
+/* WDK hacks */
+#ifdef _M_AMD64
+#define IoAllocateAdapterChannel _IoAllocateAdapterChannel
+#define KeGetCurrentThread _KeGetCurrentThread
#endif
/* Version Data */
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/io/iomgr/adapter.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/io/iomgr/adapter.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/io/iomgr/adapter.c [iso-8859-1] Wed Mar 24
23:02:26 2010
@@ -21,6 +21,7 @@
/* FUNCTIONS *****************************************************************/
+#undef IoAllocateAdapterChannel
/*
* @implemented
*/
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/io/iomgr/arcname.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/io/iomgr/arcname.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/io/iomgr/arcname.c [iso-8859-1] Wed Mar 24
23:02:26 2010
@@ -377,7 +377,9 @@
}
goto checkbootcd;
+#ifndef _M_AMD64
freeldrhack:
+#endif
/*
* FIXME: In normal conditions, NTLDR/FreeLdr sends the *proper* CDROM
* ARC Path name, and what happens here is a comparision of both checksums
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/thrdobj.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/ke/thrdobj.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/ke/thrdobj.c [iso-8859-1] Wed Mar 24
23:02:26 2010
@@ -897,7 +897,6 @@
UNIMPLEMENTED;
}
-#ifndef _M_AMD64
/*
* @implemented
*/
@@ -909,7 +908,6 @@
/* Return the current thread on this PCR */
return _KeGetCurrentThread();
}
-#endif
/*
* @implemented
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/ARM3/mminit.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/mm/ARM3/mminit.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/mm/ARM3/mminit.c [iso-8859-1] Wed Mar 24
23:02:26 2010
@@ -303,6 +303,7 @@
/* PRIVATE FUNCTIONS **********************************************************/
+#ifndef _M_AMD64
//
// In Bavaria, this is probably a hate crime
//
@@ -325,6 +326,7 @@
Pde++;
}
}
+#endif
PFN_NUMBER
NTAPI
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/amd64/init.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/mm/amd64/init.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/mm/amd64/init.c [iso-8859-1] Wed Mar 24
23:02:26 2010
@@ -26,21 +26,16 @@
/* GLOBALS *****************************************************************/
+/* Template PTE and PDE for a kernel page */
+MMPTE ValidKernelPde = {.u.Hard.Valid = 1, .u.Hard.Write = 1, .u.Hard.Dirty = 1,
.u.Hard.Accessed = 1};
+MMPTE ValidKernelPte = {.u.Hard.Valid = 1, .u.Hard.Write = 1, .u.Hard.Dirty = 1,
.u.Hard.Accessed = 1};
+
/* Sizes */
-//SIZE_T MmBootImageSize;
-//SIZE_T MmMinimumNonPagedPoolSize = 256 * 1024;
-//SIZE_T MmSizeOfNonPagedPoolInBytes;
-//SIZE_T MmMaximumNonPagedPoolInBytes;
-//ULONG MmMaximumNonPagedPoolPercent;
-//ULONG MmMinAdditionNonPagedPoolPerMb = 32 * 1024;
-//ULONG MmMaxAdditionNonPagedPoolPerMb = 400 * 1024;
-//SIZE_T MmDefaultMaximumNonPagedPool = 1024 * 1024;
-//SIZE_T MmSessionSize = MI_SESSION_SIZE;
+///SIZE_T MmSessionSize = MI_SESSION_SIZE;
SIZE_T MmSessionViewSize = MI_SESSION_VIEW_SIZE;
SIZE_T MmSessionPoolSize = MI_SESSION_POOL_SIZE;
SIZE_T MmSessionImageSize = MI_SESSION_IMAGE_SIZE;
SIZE_T MmSystemViewSize = MI_SYSTEM_VIEW_SIZE;
-//SIZE_T MmSizeOfPagedPoolInBytes = MI_MIN_INIT_PAGED_POOLSIZE;
SIZE_T MiNonPagedSystemSize;
/* Address ranges */
@@ -66,15 +61,8 @@
///PVOID MmNonPagedPoolEnd = MI_NONPAGED_POOL_END; // 0xFFFFFAE000000000
PVOID MmHyperSpaceEnd = (PVOID)HYPER_SPACE_END;
-//PPHYSICAL_MEMORY_DESCRIPTOR MmPhysicalMemoryBlock;
-//ULONG MmNumberOfPhysicalPages, MmHighestPhysicalPage, MmLowestPhysicalPage = -1; //
FIXME: ULONG64
-
-//ULONG MmNumberOfSystemPtes;
-//PMMPTE MmSystemPagePtes;
MMSUPPORT MmSystemCacheWs;
-//RTL_BITMAP MiPfnBitMap;
-//ULONG64 MxPfnAllocation;
ULONG64 MxPfnSizeInBytes;
PMEMORY_ALLOCATION_DESCRIPTOR MxFreeDescriptor;
@@ -87,7 +75,6 @@
ULONG64 MxFreePageCount = 0;
extern PFN_NUMBER MmSystemPageDirectory;
-//PFN_NUMBER MmSizeOfPagedPoolInPages = MI_MIN_INIT_PAGED_POOLSIZE / PAGE_SIZE;
BOOLEAN MiPfnsInitialized = FALSE;
@@ -878,3 +865,18 @@
return STATUS_SUCCESS;
}
+VOID
+FASTCALL
+MiSyncARM3WithROS(IN PVOID AddressStart,
+ IN PVOID AddressEnd)
+{
+
+}
+
+NTSTATUS
+NTAPI
+MiInitMachineDependent(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/sysldr.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/mm/sysldr.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/mm/sysldr.c [iso-8859-1] Wed Mar 24
23:02:26 2010
@@ -790,7 +790,7 @@
}
/* Free the driver */
- MmFreeSection(LdrEntry->DllBase);
+ //MmFreeSection(LdrEntry->DllBase);
/* Check if we're linked in */
if (LdrEntry->InLoadOrderLinks.Flink)
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ntoskrnl.pspec
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/ntoskrnl.pspec [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/ntoskrnl.pspec [iso-8859-1] Wed Mar 24
23:02:26 2010
@@ -347,6 +347,8 @@
@ FASTCALL InterlockedIncrement(ptr)
@ FASTCALL InterlockedPopEntrySList(ptr)
@ FASTCALL InterlockedPushEntrySList(ptr ptr)
+#else
+@ stdcall InitializeSListHead(ptr) RtlInitializeSListHead
#endif
@ stdcall IoAcquireCancelSpinLock(ptr)
@ stdcall IoAcquireRemoveLockEx(ptr ptr str long long)