diff --git a/PowerMonkeyApp/DelayX86.c b/PowerMonkeyApp/DelayX86.c index 9577bd5e..8f36ddfb 100644 --- a/PowerMonkeyApp/DelayX86.c +++ b/PowerMonkeyApp/DelayX86.c @@ -33,8 +33,15 @@ #include "SaferAsmHdr.h" #include +#if defined(__GNUC__) && !defined(__clang__) +#include +#else + #pragma intrinsic(__rdtsc) // At this point, code will look so #pragma intrinsic(_mm_pause) // fugly that writing it in pure SMM + // ASM would count as an improvement +#endif + /******************************************************************************* * Globals that must be initialized diff --git a/PowerMonkeyApp/LowLevel.c b/PowerMonkeyApp/LowLevel.c index abc6c2b2..af5e89a5 100644 --- a/PowerMonkeyApp/LowLevel.c +++ b/PowerMonkeyApp/LowLevel.c @@ -33,12 +33,13 @@ #include "LowLevel.h" #include "MiniLog.h" - /******************************************************************************* * Compiler Overrides ******************************************************************************/ +#if defined(_MSC_VER) #pragma warning( disable : 4090 ) +#endif /******************************************************************************* * Globals diff --git a/PowerMonkeyApp/MiniLog.c b/PowerMonkeyApp/MiniLog.c index 5a6b403d..722f21a7 100644 --- a/PowerMonkeyApp/MiniLog.c +++ b/PowerMonkeyApp/MiniLog.c @@ -24,9 +24,6 @@ * *******************************************************************************/ -#pragma intrinsic(__rdtsc) -#pragma intrinsic(__cpuid) - /******************************************************************************* * Includes ******************************************************************************/ @@ -39,6 +36,7 @@ #include #include #include +#include #include "CONFIGURATION.h" #include "MiniLog.h" @@ -47,7 +45,18 @@ #include "DelayX86.h" extern PLATFORM* gPlatform; - + +/******************************************************************************* + * + ******************************************************************************/ + +#if defined(__GNUC__) && !defined(__clang__) +#include +#else +#pragma intrinsic(__rdtsc) +#endif + + /******************************************************************************* * Globals ******************************************************************************/ diff --git a/PowerMonkeyApp/MpDispatcher.c b/PowerMonkeyApp/MpDispatcher.c index 1f42d33e..2e176b24 100644 --- a/PowerMonkeyApp/MpDispatcher.c +++ b/PowerMonkeyApp/MpDispatcher.c @@ -252,5 +252,4 @@ EFI_STATUS EFIAPI RunOnAllProcessors( } return status; -} - +} \ No newline at end of file diff --git a/PowerMonkeyApp/PowerMonkey.c b/PowerMonkeyApp/PowerMonkey.c index 082d0eec..3ddc7dd5 100644 --- a/PowerMonkeyApp/PowerMonkey.c +++ b/PowerMonkeyApp/PowerMonkey.c @@ -262,7 +262,7 @@ VOID PrintBanner(VOID) " | ____// _ \\ | | | | / _ ) / __)| || || | / _ \\ | _ \\ | | / )/ _ )| | | |\n" " | | | |_| || | | |( (/ / | | | || || || |_| || | | || |< (( (/ / | |_| |\n" " |_| \\___/ \\____| \\____)|_| |_||_||_| \\___/ |_| |_||_| \\_)\\____) \\__ |\n" - " Version 0.1.9 (____/\n" + " Version 0.2.0 (____/\n" ); AsciiPrint( diff --git a/README.MD b/README.MD index 622bb096..8441b2c5 100644 --- a/README.MD +++ b/README.MD @@ -159,7 +159,9 @@ This route is based on Alex Ionescu's excellent [VisualUEFI project](https://git #### **Building - EDK2 route:** -NOTE: Only MSVC (VS2019) and CLANG (CLANGDWARF) toolchains are validated. For CLANGDWARF toolchain, you will need to add: +NOTE: Only MSVC (VS2019), gcc (GCC5) and Clang (CLANGDWARF) toolchains are validated. + +For CLANGDWARF toolchain, you will need to add: `DEBUG_CLANGDWARF_X64_DLINK_FLAGS =`**` -z notext ... `**

`RELEASE_CLANGDWARF_X64_DLINK_FLAGS =`**` -z notext ... `**

`NOOPT_CLANGDWARF_X64_DLINK_FLAGS =`**` -z notext ... `**