2003-05-28 Casper S. Hornstrup <chorns@users.sourceforge.net>
[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 #define NTOS_MODE_KERNEL
11 #include <ntos.h>
12
13 #include <stdarg.h>
14
15 /*
16 * Use these to place a function in a specific section of the executable
17 */
18 #define PLACE_IN_SECTION(s) __attribute__((section (s)))
19 #define INIT_FUNCTION (PLACE_IN_SECTION("init"))
20 #define PAGE_LOCKED_FUNCTION (PLACE_IN_SECTION("pagelk"))
21 #define PAGE_UNLOCKED_FUNCTION (PLACE_IN_SECTION("pagepo"))
22
23 /*
24 * Defines a descriptor as it appears in the processor tables
25 */
26 typedef struct _DESCRIPTOR
27 {
28 ULONG a;
29 ULONG b;
30 } __attribute__ ((packed)) IDT_DESCRIPTOR, GDT_DESCRIPTOR;
31
32 extern IDT_DESCRIPTOR KiIdt[256];
33 //extern GDT_DESCRIPTOR KiGdt[256];
34
35
36 VOID NtInitializeEventImplementation(VOID);
37 VOID NtInit(VOID);
38
39 /*
40 * Initalization functions (called once by main())
41 */
42 VOID MmInitSystem(ULONG Phase, PLOADER_PARAMETER_BLOCK LoaderBlock, ULONG LastKernelAddress);
43 VOID IoInit(VOID);
44 VOID IoInit2(VOID);
45 VOID ObInit(VOID);
46 VOID PsInit(VOID);
47 VOID CmInitializeRegistry(VOID);
48 VOID CmInit2(PCHAR CommandLine);
49 VOID CmShutdownRegistry(VOID);
50 BOOLEAN CmImportSystemHive(PCHAR ChunkBase, ULONG ChunkSize);
51 BOOLEAN CmImportHardwareHive(PCHAR ChunkBase, ULONG ChunkSize);
52 VOID KdInitSystem(ULONG Reserved, PLOADER_PARAMETER_BLOCK LoaderBlock);
53
54 #endif /* __ASM__ */
55
56 /*
57 *
58 */
59 #define MM_STACK_SIZE (3*4096)
60
61 #endif /* INCLUDE_INTERNAL_NTOSKRNL_H */