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