2 * Various useful prototypes
5 #ifndef __INCLUDE_INTERNAL_NTOSKRNL_H
6 #define __INCLUDE_INTERNAL_NTOSKRNL_H
11 #define NTOS_MODE_KERNEL
14 #include "internal/ke.h"
17 * Use these to place a function in a specific section of the executable
19 #define PLACE_IN_SECTION(s) __attribute__((section (s)))
20 #define INIT_FUNCTION (PLACE_IN_SECTION("init"))
21 #define PAGE_LOCKED_FUNCTION (PLACE_IN_SECTION("pagelk"))
22 #define PAGE_UNLOCKED_FUNCTION (PLACE_IN_SECTION("pagepo"))
25 * Defines a descriptor as it appears in the processor tables
27 typedef struct _DESCRIPTOR
31 } __attribute__ ((packed)) IDT_DESCRIPTOR, GDT_DESCRIPTOR;
33 extern IDT_DESCRIPTOR KiIdt[256];
34 //extern GDT_DESCRIPTOR KiGdt[256];
37 VOID NtInitializeEventImplementation(VOID);
41 * Initalization functions (called once by main())
43 VOID MmInitSystem(ULONG Phase, PLOADER_PARAMETER_BLOCK LoaderBlock, ULONG LastKernelAddress);
48 VOID CmInitializeRegistry(VOID);
49 VOID CmInit2(PCHAR CommandLine);
50 VOID CmShutdownRegistry(VOID);
51 BOOLEAN CmImportSystemHive(PCHAR ChunkBase, ULONG ChunkSize);
52 BOOLEAN CmImportHardwareHive(PCHAR ChunkBase, ULONG ChunkSize);
53 VOID KdInitSystem(ULONG Reserved, PLOADER_PARAMETER_BLOCK LoaderBlock);
60 #define MM_STACK_SIZE (3*4096)
62 #endif /* INCLUDE_INTERNAL_NTOSKRNL_H */