From 4cadbff15541ca09ced3321acfdf302fced29ee9 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Mon, 29 Jan 2024 19:54:04 +0100 Subject: NewBoot: Working on EFI implementation to load kernel into memory... Signed-off-by: Amlal El Mahrouss --- Private/NewKit/Macros.hpp | 46 ++++++++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 24 deletions(-) (limited to 'Private/NewKit') diff --git a/Private/NewKit/Macros.hpp b/Private/NewKit/Macros.hpp index a6cb58dc..6f72dadd 100644 --- a/Private/NewKit/Macros.hpp +++ b/Private/NewKit/Macros.hpp @@ -10,62 +10,58 @@ #pragma once #ifndef KIB -# define KIB(X) ((X)*1024) +#define KIB(X) ((X) * 1024) #endif #ifndef MIB -# define MIB(X) (KIB(X) * 1024) +#define MIB(X) (KIB(X) * 1024) #endif #ifndef GIB -# define GIB(X) (MIB(X) * 1024) +#define GIB(X) (MIB(X) * 1024) #endif #ifndef TIB -# define TIB(X) (GIB(X) * 1024) +#define TIB(X) (GIB(X) * 1024) #endif #ifndef ARRAY_SIZE -#define ARRAY_SIZE(a) (((sizeof(a) / sizeof(*(a))) / (static_cast(!(sizeof(a) % sizeof(*(a))))))) +#define ARRAY_SIZE(a) \ + (((sizeof(a) / sizeof(*(a))) / \ + (static_cast(!(sizeof(a) % sizeof(*(a))))))) #endif #ifndef ALIGN #define ALIGN(X) __attribute__((aligned(X))) -#endif // #ifndef ALIGN +#endif // #ifndef ALIGN #ifndef ATTRIBUTE #define ATTRIBUTE(X) __attribute__((X)) -#endif // #ifndef ATTRIBUTE +#endif // #ifndef ATTRIBUTE #ifndef __HCORE__ #define __HCORE__ (202401) -#endif // !__HCORE__ +#endif // !__HCORE__ #ifndef EXTERN_C -#define EXTERN_C() \ - extern "C" \ - { -#define END_EXTERN_C() \ - } \ - ; +#define EXTERN_C() extern "C" { +#define END_EXTERN_C() \ + } \ + ; #endif #ifndef MAKE_ENUM -#define MAKE_ENUM(NAME) \ - enum NAME \ - { +#define MAKE_ENUM(NAME) enum NAME { #endif #ifndef END_ENUM -#define END_ENUM() \ - } \ - ; +#define END_ENUM() \ + } \ + ; #endif #ifndef MAKE_STRING_ENUM -#define MAKE_STRING_ENUM(NAME) \ - namespace NAME \ - { +#define MAKE_STRING_ENUM(NAME) namespace NAME { #endif #ifndef ENUM_STRING @@ -78,9 +74,11 @@ #ifndef Alloca #define Alloca(Sz) __builtin_alloca(Sz) -#endif // #ifndef Alloca +#endif // #ifndef Alloca #ifndef CantReach #define CantReach() __builtin_unreachable() #endif +#define kBadPtr 0xFBFBFBFBFBFBFBFB +#define kmaxAddr 0xFFFFFFFFFFFFFFFF -- cgit v1.2.3