From d3280beb700321b0ef47b4f61d84667ba501bc61 Mon Sep 17 00:00:00 2001 From: Juan Castillo Date: Thu, 5 Jun 2014 09:45:36 +0100 Subject: Rework incorrect use of assert() and panic() in codebase Assert a valid security state using the macro sec_state_is_valid(). Replace assert() with panic() in those cases that might arise because of runtime errors and not programming errors. Replace panic() with assert() in those cases that might arise because of programming errors. Fixes ARM-software/tf-issues#96 Change-Id: I51e9ef0439fd5ff5e0edfef49050b69804bf14d5 --- include/common/bl_common.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/common/bl_common.h') diff --git a/include/common/bl_common.h b/include/common/bl_common.h index e996fd6a..9945e3a3 100644 --- a/include/common/bl_common.h +++ b/include/common/bl_common.h @@ -33,6 +33,7 @@ #define SECURE 0x0 #define NON_SECURE 0x1 +#define sec_state_is_valid(s) (((s) == SECURE) || ((s) == NON_SECURE)) #define UP 1 #define DOWN 0 -- cgit