Merge 14981:15268 from trunk
[reactos.git] / reactos / ntoskrnl / include / internal / ntoskrnl.h
1 /*
2 * Various useful prototypes
3 */
4
5 #ifndef __INCLUDE_INTERNAL_NTOSKRNL_H
6 #define __INCLUDE_INTERNAL_NTOSKRNL_H
7
8 #ifndef __ASM__
9
10 #include <stdarg.h>
11 #define NTOS_MODE_KERNEL
12 #include <ntos.h>
13
14 #include "internal/ke.h"
15
16 /*
17 * Use these to place a function in a specific section of the executable
18 */
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")
23
24 #include <pshpack1.h>
25 /*
26 * Defines a descriptor as it appears in the processor tables
27 */
28 typedef struct _DESCRIPTOR
29 {
30 ULONG a;
31 ULONG b;
32 } IDT_DESCRIPTOR, GDT_DESCRIPTOR;
33
34 #include <poppack.h>
35
36 extern IDT_DESCRIPTOR KiIdt[256];
37 //extern GDT_DESCRIPTOR KiGdt[256];
38
39
40 VOID ExpInitializeEventImplementation(VOID);
41 VOID ExpInitializeEventImplementation(VOID);
42 VOID ExpInitializeEventPairImplementation(VOID);
43 VOID ExpInitializeSemaphoreImplementation(VOID);
44 VOID ExpInitializeMutantImplementation(VOID);
45 VOID ExpInitializeTimerImplementation(VOID);
46 VOID ExpInitializeProfileImplementation(VOID);
47 /*
48 * Initalization functions (called once by main())
49 */
50 VOID MmInitSystem(ULONG Phase, PLOADER_PARAMETER_BLOCK LoaderBlock, ULONG LastKernelAddress);
51 VOID IoInit(VOID);
52 VOID IoInit2(BOOLEAN BootLog);
53 VOID STDCALL IoInit3(VOID);
54 VOID ObInit(VOID);
55 VOID PsInit(VOID);
56 VOID CmInitializeRegistry(VOID);
57 VOID STDCALL CmInitHives(BOOLEAN SetupBoot);
58 VOID CmInit2(PCHAR CommandLine);
59 VOID CmShutdownRegistry(VOID);
60 BOOLEAN CmImportSystemHive(PCHAR ChunkBase, ULONG ChunkSize);
61 BOOLEAN CmImportHardwareHive(PCHAR ChunkBase, ULONG ChunkSize);
62 VOID KdInitSystem(ULONG Reserved, PLOADER_PARAMETER_BLOCK LoaderBlock);
63
64 #endif /* __ASM__ */
65
66 /*
67 *
68 */
69 #define MM_STACK_SIZE (3*4096)
70
71 #endif /* INCLUDE_INTERNAL_NTOSKRNL_H */