15#include "../../winldr.h"
18#define LARGE_PFN_SHIFT 20
20#define PTE_BASE 0xC0000000
21#define PDE_BASE 0xC0400000
22#define PDR_BASE 0xFFD00000
23#define VECTOR_BASE 0xFFFF0000
26#define IDMAP_BASE 0x81000000
27#define MMIO_BASE 0x10000000
29#define IDMAP_BASE 0x00000000
30#define MMIO_BASE 0x10000000
33#define LowMemPageTableIndex (IDMAP_BASE >> PDE_SHIFT)
34#define MmioPageTableIndex (MMIO_BASE >> PDE_SHIFT)
35#define KernelPageTableIndex (KSEG0_BASE >> PDE_SHIFT)
36#define StartupPtePageTableIndex (PTE_BASE >> PDE_SHIFT)
37#define StartupPdePageTableIndex (PDE_BASE >> PDE_SHIFT)
38#define PdrPageTableIndex (PDR_BASE >> PDE_SHIFT)
39#define VectorPageTableIndex (VECTOR_BASE >> PDE_SHIFT)
50#define PaToPfn(p) ((p) >> PFN_SHIFT)
51#define PaToLargePfn(p) ((p) >> LARGE_PFN_SHIFT)
52#define PaPtrToPfn(p) (((ULONG_PTR)(p)) >> PFN_SHIFT)
55#define PaPtrToPdePfn(p) (((ULONG_PTR)(p)) >> CPT_SHIFT)
130 for (
i = 0;
i < 4;
i++)
222 for (
i = 0;
i < 2;
i++)
231 for (
i = 0;
i < 12;
i++)
241 for (
i = 0;
i < 3072;
i++)
VOID WinLdrSetProcessorContext(_In_ USHORT OperatingSystemVersion)
BOOLEAN MempSetupPaging(IN PFN_NUMBER StartPage, IN PFN_NUMBER NumberOfPages, IN BOOLEAN KernelMapping)
static BOOLEAN MempAllocatePageTables(VOID)
VOID MempUnmapPage(PFN_NUMBER Page)
void WinLdrSetupMachineDependent(PLOADER_PARAMETER_BLOCK LoaderBlock)
struct _KPDR_PAGE * PKPDR_PAGE
#define KernelPageTableIndex
HARDWARE_PTE_ARMV6 TempPte
VOID WinLdrSetupForNt(IN PLOADER_PARAMETER_BLOCK LoaderBlock, IN PVOID *GdtIdt, IN PULONG PcrBasePage, IN PULONG TssBasePage)
#define StartupPdePageTableIndex
struct _KPDR_PAGE KPDR_PAGE
#define StartupPtePageTableIndex
#define VectorPageTableIndex
HARDWARE_PDE_ARMV6 TempPde
HARDWARE_LARGE_PTE_ARMV6 TempLargePte
#define PdrPageTableIndex
#define LowMemPageTableIndex
PVOID MempKernelBaseAddress
#define MmioPageTableIndex
static BOOLEAN WinLdrMapSpecialPages(void)
FORCEINLINE VOID KeArmControlRegisterSet(IN ARM_CONTROL_REGISTER ControlRegister)
FORCEINLINE VOID KeArmDomainRegisterSet(IN ARM_DOMAIN_REGISTER DomainRegister)
FORCEINLINE ARM_CONTROL_REGISTER KeArmControlRegisterGet(VOID)
FORCEINLINE VOID KeArmTranslationTableRegisterSet(IN ARM_TTB_REGISTER Ttb)
PVOID MmAllocateMemoryAtAddress(SIZE_T MemorySize, PVOID DesiredAddress, TYPE_OF_MEMORY MemoryType)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
ULONG FirstLevelIcacheFillSize
ULONG SecondLevelDcacheSize
ULONG FirstLevelDcacheFillSize
ULONG FirstLevelIcacheSize
ULONG SecondLevelIcacheSize
ULONG FirstLevelDcacheSize
ULONG SecondLevelDcacheFillSize
_In_ PVOID _Out_opt_ BOOLEAN _Out_opt_ PPFN_NUMBER Page
#define KERNEL_STACK_SIZE
PAGE_TABLE_ARM PageDirPageTable
CHAR KernelStack[KERNEL_STACK_SIZE]
PAGE_TABLE_ARM KernelPageTable[3]
PAGE_TABLE_ARM VectorPageTable
CHAR InitialThread[PAGE_SIZE]
CHAR InterruptStack[KERNEL_STACK_SIZE]
CHAR HyperSpace[233 *PAGE_SIZE]
PAGE_DIRECTORY_ARM PageDir
CHAR InitialProcess[PAGE_SIZE]
CHAR PanicStack[KERNEL_STACK_SIZE]
CHAR SharedData[PAGE_SIZE]
HARDWARE_LARGE_PTE_ARMV6 Pte[4096]
HARDWARE_PDE_ARMV6 Pde[4096]
HARDWARE_PTE_ARMV6 Pte[1024]
int WINAPI StartPage(_In_ HDC)