ReactOS 0.4.16-dev-2204-g370eb8c
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 <internal/hal.h>
60#include <drivers/pci/pci.h>
61#include <winerror.h>
62#include <ntstrsafe.h>
63#else
64#include <ntsup.h>
65#endif
66
67/* Internal headers */
68// #include <arcemul.h>
69#include <arcname.h>
70#include <arcsupp.h>
71#include <bytesex.h>
72#include <cache.h>
73#include <comm.h>
74#include <disk.h>
75#include <fs.h>
76#include <inifile.h>
77#include <keycodes.h>
78#include <linux.h>
79#include <custom.h>
80#include <miscboot.h>
81#include <machine.h>
82#include <mm.h>
83#include <multiboot.h>
84#include <options.h>
85#include <oslist.h>
86#include <ramdisk.h>
87#include <settings.h>
88#include <ver.h>
89
90/* NTOS loader */
92#include <conversion.h> // More-or-less related to MM also...
93#include <peloader.h>
94
95/* File system headers */
96#include <fs/ext.h>
97#include <fs/fat.h>
98#include <fs/ntfs.h>
99#include <fs/iso.h>
100#include <fs/pxe.h>
101#include <fs/btrfs.h>
102
103/* UI support */
104#define printf TuiPrintf
105#include <ui.h>
106#include <ui/video.h>
107
108/* Arch specific includes */
109#include <arch/archwsup.h>
110#if defined(_M_IX86) || defined(_M_AMD64)
111#include <arch/pc/hardware.h>
112#include <arch/pc/pcbios.h>
113#include <arch/pc/x86common.h>
114#include <arch/pc/pxe.h>
115#include <arch/i386/drivemap.h>
116#endif
117#if defined(_M_IX86)
118#if defined(SARCH_PC98)
119#include <arch/i386/machpc98.h>
120#elif defined(SARCH_XBOX)
121#include <arch/pc/machpc.h>
122#include <arch/i386/machxbox.h>
123#else
124#include <arch/pc/machpc.h>
125#endif
126#include <arch/i386/i386.h>
127#elif defined(_M_AMD64)
128#include <arch/pc/machpc.h>
129#include <arch/amd64/amd64.h>
130#elif defined(_M_PPC)
131#include <arch/powerpc/hardware.h>
132#elif defined(_M_ARM)
133#include <arch/arm/hardware.h>
134#elif defined(_M_MIPS)
135#include <arch/mips/arcbios.h>
136#endif
137
139
140#ifdef HAS_DEPRECATED_OPTIONS
141VOID
143 _In_ PCSTR MsgFmt,
144 ...);
145#endif
146
147VOID
149 _In_ OperatingSystemItem* OperatingSystem);
150
151#ifdef HAS_OPTION_MENU_EDIT_CMDLINE
152VOID
153EditOperatingSystemEntry(
154 _Inout_ OperatingSystemItem* OperatingSystem);
155#endif
156
159
160#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:91
VOID LoadOperatingSystem(_In_ OperatingSystemItem *OperatingSystem)
Definition: bootmgr.c:283
VOID RunLoader(VOID)
Definition: bootmgr.c:358
#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