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