- Fixed the freeing of memory from boot load drivers.
[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 /*
25 * Defines a descriptor as it appears in the processor tables
26 */
27 typedef struct _DESCRIPTOR
28 {
29 ULONG a;
30 ULONG b;
31 } __attribute__ ((packed)) IDT_DESCRIPTOR, GDT_DESCRIPTOR;
32
33 extern IDT_DESCRIPTOR KiIdt[256];
34 //extern GDT_DESCRIPTOR KiGdt[256];
35
36
37 VOID NtInitializeEventImplementation(VOID);
38 VOID NtInit(VOID);
39
40 /*
41 * Initalization functions (called once by main())
42 */
43 VOID MmInitSystem(ULONG Phase, PLOADER_PARAMETER_BLOCK LoaderBlock, ULONG LastKernelAddress);
44 VOID IoInit(VOID);
45 VOID IoInit2(VOID);
46 VOID ObInit(VOID);
47 VOID PsInit(VOID);
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);
54
55 #endif /* __ASM__ */
56
57 /*
58 *
59 */
60 #define MM_STACK_SIZE (3*4096)
61
62 #endif /* INCLUDE_INTERNAL_NTOSKRNL_H */