ReactOS 0.4.16-dev-2610-ge2c92c0
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/* Enabled for supporting the deprecated boot options
24 * that will be removed in a future FreeLdr version */
25#define HAS_DEPRECATED_OPTIONS
26
27#ifndef _FRLDRLIB_
28#define FLDRAPI DECLSPEC_IMPORT
29#else
30#define FLDRAPI
31#endif
32
33
34#define UINT64_C(val) val##ULL
35#define RVA(m, b) ((PVOID)((ULONG_PTR)(b) + (ULONG_PTR)(m)))
36
37#define ROUND_DOWN(n, align) \
38 (((ULONG)n) & ~((align) - 1l))
39
40#define ROUND_UP(n, align) \
41 ROUND_DOWN(((ULONG)n) + (align) - 1, (align))
42
43/* Public headers */
44#ifdef __REACTOS__
45#include <ntddk.h>
46#include <ntifs.h>
47#include <ioaccess.h>
48#include <arc/arc.h>
49#include <ketypes.h>
50#include <mmtypes.h>
51#include <ndk/asm.h>
52#include <ndk/rtlfuncs.h>
53#include <ndk/ldrtypes.h>
54#include <ndk/halfuncs.h>
55#include <stdlib.h>
56#include <stdio.h>
57#include <ctype.h>
58#include <ntdddisk.h>
59#include <drivers/pci/pci.h>
60#include <winerror.h>
61#include <ntstrsafe.h>
62#else
63#include <ntsup.h>
64#endif
65
66/* Internal headers */
67// #include <arcemul.h>
68#include <arcname.h>
69#include <arcsupp.h>
70#include <bytesex.h>
71#include <cache.h>
72#include <comm.h>
73#include <disk.h>
74#include <fs.h>
75#include <inifile.h>
76#include <keycodes.h>
77#include <linux.h>
78#include <custom.h>
79#include <miscboot.h>
80#include <machine.h>
81#include <mm.h>
82#include <multiboot.h>
83#include <options.h>
84#include <oslist.h>
85#include <ramdisk.h>
86#include <settings.h>
87#include <ver.h>
88
89/* NTOS loader */
91#include <conversion.h> // More-or-less related to MM also...
92#include <peloader.h>
93
94/* File system headers */
95#include <fs/ext.h>
96#include <fs/fat.h>
97#include <fs/ntfs.h>
98#include <fs/iso.h>
99#include <fs/pxe.h>
100#include <fs/btrfs.h>
101
102/* UI support */
103#define printf TuiPrintf
104#include <ui.h>
105#include <ui/video.h>
106
107/* Arch specific includes */
108#include <arch/archwsup.h>
109#if defined(_M_IX86) || defined(_M_AMD64)
110#include <arch/pc/hardware.h>
111#include <arch/pc/pcbios.h>
112#include <arch/pc/x86common.h>
113#include <arch/pc/pxe.h>
114#include <arch/i386/drivemap.h>
115#endif
116#if defined(_M_IX86)
117#if defined(SARCH_PC98)
118#include <arch/i386/machpc98.h>
119#elif defined(SARCH_XBOX)
120#include <arch/pc/machpc.h>
121#include <arch/i386/machxbox.h>
122#else
123#include <arch/pc/machpc.h>
124#endif
125#include <arch/i386/i386.h>
126#elif defined(_M_AMD64)
127#include <arch/pc/machpc.h>
128#include <arch/amd64/amd64.h>
129#elif defined(_M_PPC)
130#include <arch/powerpc/hardware.h>
131#elif defined(_M_ARM)
132#include <arch/arm/hardware.h>
133#elif defined(_M_MIPS)
134#include <arch/mips/arcbios.h>
135#endif
136
138
139#ifdef HAS_DEPRECATED_OPTIONS
140VOID
142 _In_ PCSTR MsgFmt,
143 ...);
144#endif
145
146VOID
148 _In_ OperatingSystemItem* OperatingSystem);
149
150#ifdef HAS_OPTION_MENU_EDIT_CMDLINE
151VOID
152EditOperatingSystemEntry(
153 _Inout_ OperatingSystemItem* OperatingSystem);
154#endif
155
158
159#endif /* __FREELDR_H */
#define __cdecl
Definition: corecrt.h:121
static const WCHAR CmdLine[]
Definition: install.c:48
VOID WarnDeprecated(_In_ PCSTR MsgFmt,...)
VOID FrLdrCheckCpuCompatibility(VOID)
Definition: macharm.c:65
VOID __cdecl BootMain(IN PCCH CmdLine)
Definition: freeldr.c:92
VOID LoadOperatingSystem(_In_ OperatingSystemItem *OperatingSystem)
Definition: bootmgr.c:287
VOID RunLoader(VOID)
Definition: bootmgr.c:386
#define _Inout_
Definition: no_sal2.h:162
#define _In_
Definition: no_sal2.h:158
CONST CHAR * PCCH
Definition: ntbasedef.h:404
const char * PCSTR
Definition: typedefs.h:52
#define IN
Definition: typedefs.h:39