X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Fboot%2Ffreeldr%2Ffreeldr%2Finclude%2Ffreeldr.h;h=406e117876e00e4d2ca3d54eda7435e0650890fd;hp=ebbc93be1712b7bb06702e58a335c6dfe5a9780a;hb=36c3408fb1f2acc30b5ae9b79ca78f8f439ba494;hpb=fc53f8c8909842acef1faa8c044c92e2e89d9b48 diff --git a/reactos/boot/freeldr/freeldr/include/freeldr.h b/reactos/boot/freeldr/freeldr/include/freeldr.h index ebbc93be171..406e117876e 100644 --- a/reactos/boot/freeldr/freeldr/include/freeldr.h +++ b/reactos/boot/freeldr/freeldr/include/freeldr.h @@ -12,15 +12,22 @@ * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + * 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)) #define NTOSAPI #define printf TuiPrintf @@ -52,7 +59,6 @@ #include #include #include -#include /* file system headers */ #include #include @@ -65,10 +71,13 @@ #include /* arch files */ #if defined(_M_IX86) +#include +#include #include #include #include #include +#include #include #include #elif defined(_M_PPC) @@ -77,6 +86,9 @@ #include #elif defined(_M_MIPS) #include +#elif defined(_M_AMD64) +#include +#include #endif /* misc files */ #include @@ -87,28 +99,21 @@ /* Needed by boot manager */ #include #include -#include -#include #include #include /* Externals */ #include #include -#include /* Needed if debuging is enabled */ #include /* Swap */ #include -/* arch defines */ -#ifdef _X86_ -#define Ke386EraseFlags(x) __asm__ __volatile__("pushl $0 ; popfl\n") -#endif - VOID BootMain(LPSTR CmdLine); VOID RunLoader(VOID); /* Special hack for ReactOS setup OS type */ VOID LoadReactOSSetup(VOID); +VOID LoadReactOSSetup2(VOID); #endif // defined __FREELDR_H