ReactOS  0.4.14-dev-77-gd9e7c48
freeldr.h
Go to the documentation of this file.
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 /* Public headers */
33 #ifdef __REACTOS__
34 #define NTOSAPI
35 #define printf TuiPrintf
36 #include <ntddk.h>
37 #include <ntifs.h>
38 #include <ioaccess.h>
39 #include <arc/arc.h>
40 #include <ketypes.h>
41 #include <mmtypes.h>
42 #include <ndk/asm.h>
43 #include <ndk/rtlfuncs.h>
44 #include <ndk/ldrtypes.h>
45 #include <ndk/halfuncs.h>
46 #include <stdlib.h>
47 #include <stdio.h>
48 #include <ctype.h>
49 #include <ntdddisk.h>
50 #include <internal/hal.h>
51 #include <drivers/pci/pci.h>
52 #include <winerror.h>
53 #include <ntstrsafe.h>
54 #else
55 #include <ntsup.h>
56 #endif
57 
58 /* Internal headers */
59 // #include <arcemul.h>
60 #include <arcname.h>
61 #include <arcsupp.h>
62 #include <bytesex.h>
63 #include <cache.h>
64 #include <cmdline.h>
65 #include <comm.h>
66 #include <disk.h>
67 #include <fs.h>
68 #include <inifile.h>
69 #include <keycodes.h>
70 #include <linux.h>
71 #include <custom.h>
72 #include <miscboot.h>
73 #include <machine.h>
74 #include <mm.h>
75 #include <multiboot.h>
76 #include <options.h>
77 #include <oslist.h>
78 #include <ramdisk.h>
79 #include <ui.h>
80 #include <ver.h>
81 
82 /* NTOS loader */
83 #include <include/ntldr/winldr.h>
84 #include <conversion.h> // More-or-less related to MM also...
85 #include <peloader.h>
86 
87 /* File system headers */
88 #include <fs/ext2.h>
89 #include <fs/fat.h>
90 #include <fs/ntfs.h>
91 #include <fs/iso.h>
92 #include <fs/pxe.h>
93 #include <fs/btrfs.h>
94 
95 /* UI support */
96 #include <ui/gui.h>
97 #include <ui/minitui.h>
98 #include <ui/noui.h>
99 #include <ui/tui.h>
100 #include <ui/video.h>
101 
102 /* Arch specific includes */
103 #include <arch/archwsup.h>
104 #if defined(_M_IX86) || defined(_M_AMD64)
105 #include <arch/pc/hardware.h>
106 #include <arch/pc/pcbios.h>
107 #include <arch/pc/machpc.h>
108 #include <arch/pc/x86common.h>
109 #include <arch/pc/pxe.h>
110 #include <arch/i386/drivemap.h>
111 #endif
112 #if defined(_M_IX86)
113 #include <arch/i386/i386.h>
114 #include <arch/i386/machxbox.h>
115 #include <internal/i386/intrin_i.h>
116 #elif defined(_M_AMD64)
117 #include <arch/amd64/amd64.h>
118 #include <internal/amd64/intrin_i.h>
119 #elif defined(_M_PPC)
120 #include <arch/powerpc/hardware.h>
121 #elif defined(_M_ARM)
122 #include <arch/arm/hardware.h>
123 #elif defined(_M_MIPS)
124 #include <arch/mips/arcbios.h>
125 #endif
126 
129 #ifdef HAS_OPTION_MENU_EDIT_CMDLINE
131 #endif
134 
135 #endif /* __FREELDR_H */
VOID EditOperatingSystemEntry(IN OperatingSystemItem *OperatingSystem)
#define IN
Definition: typedefs.h:38
#define __cdecl
Definition: accygwin.h:79
VOID __cdecl BootMain(IN PCCH CmdLine)
Definition: freeldr.c:43
CONST CHAR * PCCH
Definition: ntbasedef.h:399
CHAR CmdLine[MAX_PATH]
Definition: mach.c:34
VOID FrLdrCheckCpuCompatibility(VOID)
Definition: macharm.c:63
VOID LoadOperatingSystem(IN OperatingSystemItem *OperatingSystem)
Definition: bootmgr.c:178
VOID RunLoader(VOID)
Definition: bootmgr.c:299