c80fed6b6f882923fd0c4540dbf7fb8c06f98f84
[reactos.git] / reactos / boot / freeldr / freeldr / include / freeldr.h
1 /*
2 * FreeLoader
3 * Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 #ifndef __FREELDR_H
21 #define __FREELDR_H
22
23 #define UINT64_C(val) val##ULL
24 #define RVA(m, b) ((PVOID)((ULONG_PTR)(b) + (ULONG_PTR)(m)))
25
26 #define ROUND_DOWN(n, align) \
27 (((ULONG)n) & ~((align) - 1l))
28
29 #define ROUND_UP(n, align) \
30 ROUND_DOWN(((ULONG)n) + (align) - 1, (align))
31
32 #define NTOSAPI
33 #define printf TuiPrintf
34 #include <ntddk.h>
35 #include <ntifs.h>
36 #include <ioaccess.h>
37 #include <arc/arc.h>
38 #include <ketypes.h>
39 #include <mmtypes.h>
40 #include <ndk/asm.h>
41 #include <ndk/rtlfuncs.h>
42 #include <ndk/ldrtypes.h>
43 #include <ndk/halfuncs.h>
44 #include <stdlib.h>
45 #include <stdio.h>
46 #include <ctype.h>
47 #include <rosldr.h>
48 #include <arcemul.h>
49 #include <arch.h>
50 #include <rtl.h>
51 #include <disk.h>
52 #include <fs.h>
53 #include <ui.h>
54 #include <multiboot.h>
55 #include <mm.h>
56 #include <cache.h>
57 #include <machine.h>
58 #include <inifile.h>
59 #include <inffile.h>
60 #include <video.h>
61 #include <ramdisk.h>
62 #include <reactos.h>
63 #include <registry.h>
64 #include <winldr.h>
65 #include <ntdddisk.h>
66 #include <internal/hal.h>
67 /* file system headers */
68 #include <fs/ext2.h>
69 #include <fs/fat.h>
70 #include <fs/ntfs.h>
71 #include <fs/iso.h>
72 /* ui support */
73 #include <ui/gui.h>
74 #include <ui/minitui.h>
75 #include <ui/noui.h>
76 #include <ui/tui.h>
77 /* arch files */
78 #if defined(_M_IX86)
79 #include <arch/i386/custom.h>
80 #include <arch/i386/drivemap.h>
81 #include <arch/i386/hardware.h>
82 #include <arch/i386/i386.h>
83 #include <arch/i386/machpc.h>
84 #include <arch/i386/machxbox.h>
85 #include <arch/i386/miscboot.h>
86 #include <internal/i386/intrin_i.h>
87 #elif defined(_M_PPC)
88 #include <arch/powerpc/hardware.h>
89 #elif defined(_M_ARM)
90 #include <arch/arm/hardware.h>
91 #elif defined(_M_MIPS)
92 #include <arch/mips/arcbios.h>
93 #elif defined(_M_AMD64)
94 #include <arch/amd64/hardware.h>
95 #include <arch/amd64/machpc.h>
96 #include <internal/amd64/intrin_i.h>
97 #endif
98 /* misc files */
99 #include <keycodes.h>
100 #include <ver.h>
101 #include <cmdline.h>
102 #include <bget.h>
103 #include <winerror.h>
104 /* Needed by boot manager */
105 #include <oslist.h>
106 #include <options.h>
107 #include <linux.h>
108 /* Externals */
109 #include <reactos/rossym.h>
110 #include <reactos/buildno.h>
111 /* Needed if debuging is enabled */
112 #include <comm.h>
113 /* Swap */
114 #include <bytesex.h>
115
116 VOID BootMain(LPSTR CmdLine);
117 VOID RunLoader(VOID);
118
119 /* Special hack for ReactOS setup OS type */
120 VOID LoadReactOSSetup(VOID);
121 VOID LoadReactOSSetup2(VOID);
122
123 #endif // defined __FREELDR_H