Update log2lines to the latest version. Jan Roeloffzen, bug #4342.
[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 <ioaccess.h>
36 #include <arc/arc.h>
37 #include <ketypes.h>
38 #include <mmtypes.h>
39 #include <ndk/asm.h>
40 #include <ndk/rtlfuncs.h>
41 #include <ndk/ldrtypes.h>
42 #include <stdlib.h>
43 #include <stdio.h>
44 #include <ctype.h>
45 #include <rosldr.h>
46 #include <arcemul.h>
47 #include <arch.h>
48 #include <rtl.h>
49 #include <disk.h>
50 #include <fs.h>
51 #include <ui.h>
52 #include <multiboot.h>
53 #include <mm.h>
54 #include <cache.h>
55 #include <machine.h>
56 #include <inifile.h>
57 #include <inffile.h>
58 #include <video.h>
59 #include <ramdisk.h>
60 #include <reactos.h>
61 #include <registry.h>
62 #include <winldr.h>
63 /* file system headers */
64 #include <fs/ext2.h>
65 #include <fs/fat.h>
66 #include <fs/ntfs.h>
67 #include <fs/iso.h>
68 /* ui support */
69 #include <ui/gui.h>
70 #include <ui/minitui.h>
71 #include <ui/noui.h>
72 #include <ui/tui.h>
73 /* arch files */
74 #if defined(_M_IX86)
75 #include <arch/i386/custom.h>
76 #include <arch/i386/drivemap.h>
77 #include <arch/i386/hardware.h>
78 #include <arch/i386/i386.h>
79 #include <arch/i386/machpc.h>
80 #include <arch/i386/machxbox.h>
81 #include <arch/i386/miscboot.h>
82 #include <internal/i386/intrin_i.h>
83 #include <internal/i386/ke.h>
84 #elif defined(_M_PPC)
85 #include <arch/powerpc/hardware.h>
86 #elif defined(_M_ARM)
87 #include <arch/arm/hardware.h>
88 #elif defined(_M_MIPS)
89 #include <arch/mips/arcbios.h>
90 #elif defined(_M_AMD64)
91 #include <arch/amd64/hardware.h>
92 #include <arch/amd64/machpc.h>
93 #endif
94 /* misc files */
95 #include <keycodes.h>
96 #include <ver.h>
97 #include <cmdline.h>
98 #include <bget.h>
99 #include <winerror.h>
100 /* Needed by boot manager */
101 #include <oslist.h>
102 #include <options.h>
103 #include <linux.h>
104 /* Externals */
105 #include <reactos/rossym.h>
106 #include <reactos/buildno.h>
107 /* Needed if debuging is enabled */
108 #include <comm.h>
109 /* Swap */
110 #include <bytesex.h>
111
112 VOID BootMain(LPSTR CmdLine);
113 VOID RunLoader(VOID);
114
115 /* Special hack for ReactOS setup OS type */
116 VOID LoadReactOSSetup(VOID);
117 VOID LoadReactOSSetup2(VOID);
118
119 #endif // defined __FREELDR_H