UEFI: Conditionally define the ASSERT macro

Only define the ASSERT macro when it is not already defined.  This
change allows the UEFI/FSP definitions to be included with most other
coreboot includes.

BRANCH=none
BUG=None
TEST=Build and run on sklrvp

Change-Id: Iccfeb83eb1e52623ae0a0fe2a96b587ce61f82d7
Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
Reviewed-on: http://review.coreboot.org/10334
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Lee Leahy 2015-05-27 16:16:19 -07:00 committed by Leroy P Leahy
parent f4d65872d7
commit 2befcbb85d
1 changed files with 2 additions and 0 deletions

View File

@ -66,12 +66,14 @@ static inline void debug_dead_loop(void)
}
#define _ASSERT(expression) debug_dead_loop()
#ifndef ASSERT
#define ASSERT(expression) \
do { \
if (!(expression)) { \
_ASSERT(expression); \
} \
} while (FALSE)
#endif
//
// Contents of the PEI_GRAPHICS_INFO_HOB