2 * Various useful prototypes
5 #ifndef __INCLUDE_INTERNAL_NTOSKRNL_H
6 #define __INCLUDE_INTERNAL_NTOSKRNL_H
10 #include <ddk/ntddk.h>
15 * Use these to place a function in a specific section of the executable
17 #define PLACE_IN_SECTION(s) __attribute__((section (s)))
18 #define INIT_FUNCTION (PLACE_IN_SECTION("init"))
19 #define PAGE_LOCKED_FUNCTION (PLACE_IN_SECTION("pagelk"))
20 #define PAGE_UNLOCKED_FUNCTION (PLACE_IN_SECTION("pagepo"))
23 * Maximum size of the kmalloc area (this is totally arbitary)
25 #define NONPAGED_POOL_SIZE (4*1024*1024)
28 * Defines a descriptor as it appears in the processor tables
30 typedef struct _DESCRIPTOR
34 } __attribute__ ((packed
)) IDT_DESCRIPTOR
, GDT_DESCRIPTOR
;
36 extern IDT_DESCRIPTOR KiIdt
[256];
37 //extern GDT_DESCRIPTOR KiGdt[256];
40 VOID
NtInitializeEventImplementation(VOID
);
44 * Initalization functions (called once by main())
46 VOID
MmInitSystem(ULONG Phase
, PLOADER_PARAMETER_BLOCK LoaderBlock
, ULONG LastKernelAddress
);
50 VOID
CmInitializeRegistry(VOID
);
51 VOID
CmInitializeRegistry2(VOID
);
52 VOID
CmShutdownRegistry(VOID
);
53 VOID
CmImportHive(PCHAR ChunkBase
, ULONG ChunkSize
);
54 VOID
KdInitSystem(ULONG Reserved
, PLOADER_PARAMETER_BLOCK LoaderBlock
);
56 VOID
RtlpInitNlsTables(VOID
);
58 NTSTATUS
RtlpInitNlsSections(ULONG Mod1Start
,
70 #define MM_STACK_SIZE (3*4096)
72 #endif /* INCLUDE_INTERNAL_NTOSKRNL_H */