/* * FreeLoader * Copyright (C) 1998-2003 Brian Palmer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef __FREELDR_H #define __FREELDR_H #define UINT64_C(val) val##ULL #define RVA(m, b) ((PVOID)((ULONG_PTR)(b) + (ULONG_PTR)(m))) #define ROUND_DOWN(n, align) \ (((ULONG)n) & ~((align) - 1l)) #define ROUND_UP(n, align) \ ROUND_DOWN(((ULONG)n) + (align) - 1, (align)) /* Public headers */ #ifdef __REACTOS__ #define NTOSAPI #define printf TuiPrintf #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #else #include #endif /* Internal headers */ // #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* NTOS loader */ #include #include // More-or-less related to MM also... #include /* File system headers */ #include #include #include #include #include #include /* UI support */ #include #include #include #include #include /* Arch specific includes */ #include #if defined(_M_IX86) || defined(_M_AMD64) #include #include #include #include #include #include #endif #if defined(_M_IX86) #include #include #include #elif defined(_M_AMD64) #include #include #elif defined(_M_PPC) #include #elif defined(_M_ARM) #include #elif defined(_M_MIPS) #include #endif VOID __cdecl BootMain(IN PCCH CmdLine); VOID LoadOperatingSystem(IN OperatingSystemItem* OperatingSystem); #ifdef HAS_OPTION_MENU_EDIT_CMDLINE VOID EditOperatingSystemEntry(IN OperatingSystemItem* OperatingSystem); #endif VOID RunLoader(VOID); VOID FrLdrCheckCpuCompatibility(VOID); #endif /* __FREELDR_H */