Rename assert to CHECK.
To avoid confusion with the usual definition of assert in C which will
sometimes be compiled out and the expression not evaluated. CHECK will
always be evaluated and tested.
Change-Id: I6a36359ecdecdada5c12ebf70c67cffec9574f7d
diff --git a/src/mm.c b/src/mm.c
index be87e69..ee9384a 100644
--- a/src/mm.c
+++ b/src/mm.c
@@ -19,10 +19,11 @@
#include <stdatomic.h>
#include <stdint.h>
-#include "hf/assert.h"
+#include "hf/check.h"
#include "hf/dlog.h"
#include "hf/layout.h"
#include "hf/plat/console.h"
+#include "hf/static_assert.h"
/**
* This file has functions for managing the level 1 and 2 page tables used by
@@ -500,7 +501,7 @@
* Assert condition to communicate the API constraint of mm_max_level(),
* that isn't encoded in the types, to the static analyzer.
*/
- assert(root_level >= 2);
+ CHECK(root_level >= 2);
/* Cap end to stay within the bounds of the page table. */
if (end > ptable_end) {
@@ -875,7 +876,7 @@
void mm_unlock_stage1(struct mm_stage1_locked *lock)
{
- assert(lock->ptable == &ptable);
+ CHECK(lock->ptable == &ptable);
sl_unlock(&ptable_lock);
lock->ptable = NULL;
}