Author: tkreuzer
Date: Wed Jul 30 18:59:02 2008
New Revision: 34967
URL:
http://svn.reactos.org/svn/reactos?rev=34967&view=rev
Log:
- add some definitions to winddk.h
- amd64/ketypes.h: KSEG0_BASE is where the kernel is loaded, on amd64 this is not equal to
MM_LOWEST_SYSTEM_ADDRESS (FFFF080000000000, which is not even a valid canocical address),
but it's 0xfffff80000000000)
- add a field for a DbgPrint function pointer to the ROS_LOADER_PARAMETER_BLOCK for early
debug prints in ntoskrnl
- hack PCR
Modified:
branches/ros-amd64-bringup/reactos/include/ddk/winddk.h
branches/ros-amd64-bringup/reactos/include/ndk/amd64/ketypes.h
branches/ros-amd64-bringup/reactos/include/reactos/rosldr.h
Modified: branches/ros-amd64-bringup/reactos/include/ddk/winddk.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
==============================================================================
--- branches/ros-amd64-bringup/reactos/include/ddk/winddk.h [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/include/ddk/winddk.h [iso-8859-1] Wed Jul 30
18:59:02 2008
@@ -5485,7 +5485,34 @@
#define PROFILE_LEVEL 15
#define HIGH_LEVEL 15
-#define KI_USER_SHARED_DATA 0xFFFFF78000000000ULL
+#define PAGE_SIZE 0x1000
+#define PAGE_SHIFT 12L
+#define PTI_SHIFT 12L
+#define PDI_SHIFT 21L
+#define PPI_SHIFT 30L
+#define PXI_SHIFT 39L
+#define PTE_PER_PAGE 512
+#define PDE_PER_PAGE 512
+#define PPE_PER_PAGE 512
+#define PXE_PER_PAGE 512
+#define PTI_MASK_AMD64 (PTE_PER_PAGE - 1)
+#define PDI_MASK_AMD64 (PDE_PER_PAGE - 1)
+#define PPI_MASK (PPE_PER_PAGE - 1)
+#define PXI_MASK (PXE_PER_PAGE - 1)
+
+#define PXE_BASE 0xFFFFF6FB7DBED000ULL
+#define PXE_SELFMAP 0xFFFFF6FB7DBEDF68ULL
+#define PPE_BASE 0xFFFFF6FB7DA00000ULL
+#define PDE_BASE 0xFFFFF6FB40000000ULL
+#define PTE_BASE 0xFFFFF68000000000ULL
+#define PXE_TOP 0xFFFFF6FB7DBEDFFFULL
+#define PPE_TOP 0xFFFFF6FB7DBFFFFFULL
+#define PDE_TOP 0xFFFFF6FB7FFFFFFFULL
+#define PTE_TOP 0xFFFFF6FFFFFFFFFFULL
+
+#define MM_LOWEST_USER_ADDRESS (PVOID)0x10000
+#define MM_LOWEST_SYSTEM_ADDRESS (PVOID)0xFFFF080000000000ULL
+#define KI_USER_SHARED_DATA 0xFFFFF78000000000ULL
typedef struct _KPCR
{
Modified: branches/ros-amd64-bringup/reactos/include/ndk/amd64/ketypes.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
==============================================================================
--- branches/ros-amd64-bringup/reactos/include/ndk/amd64/ketypes.h [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/include/ndk/amd64/ketypes.h [iso-8859-1] Wed Jul 30
18:59:02 2008
@@ -1,10 +1,11 @@
/*++ NDK Version: 0098
Copyright (c) Alex Ionescu. All rights reserved.
+Copyright (c) Timo Kreuzer. All rights reserved.
Header Name:
- ketypes.h (X86)
+ ketypes.h (AMD64)
Abstract:
@@ -13,6 +14,7 @@
Author:
Alex Ionescu (alexi(a)tinykrnl.org) - Updated - 27-Feb-2006
+ Timo Kreuzer (timo.kreuzer(a)reactos.org) - Updated - 30-Jul-2008
--*/
@@ -28,6 +30,7 @@
//
//#define K0IPCR ((ULONG_PTR)(KIP0PCRADDRESS))
//#define PCR ((volatile KPCR * const)K0IPCR)
+#define PCR 0 // HACK
//#if defined(CONFIG_SMP) || defined(NT_BUILD)
//#undef KeGetPcr
//#define KeGetPcr() ((volatile KPCR * const)__readfsdword(0x1C))
@@ -131,7 +134,7 @@
//
// Static Kernel-Mode Address start (use MM_KSEG0_BASE for actual)
//
-#define KSEG0_BASE 0xffff080000000000ULL
+#define KSEG0_BASE 0xfffff80000000000ULL
//
// Synchronization-level IRQL
Modified: branches/ros-amd64-bringup/reactos/include/reactos/rosldr.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
==============================================================================
--- branches/ros-amd64-bringup/reactos/include/reactos/rosldr.h [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/include/reactos/rosldr.h [iso-8859-1] Wed Jul 30
18:59:02 2008
@@ -45,6 +45,7 @@
ULONG_PTR PageDirectoryEnd;
ULONG_PTR KernelBase;
ULONG_PTR ArchExtra;
+ ULONG (*FrLdrDbgPrint)(const char *Format, ...);
} ROS_LOADER_PARAMETER_BLOCK, *PROS_LOADER_PARAMETER_BLOCK;
extern BOOLEAN AcpiTableDetected;