Commit 5b395e37 authored by Antonio Nino Diaz's avatar Antonio Nino Diaz
Browse files

xlat: Use bool instead of int



Change-Id: I35d5b6a7c219f6f38983b30f157c1ed3808af17f
Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
parent f214a806
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#include <stdbool.h>
#include <stdint.h> #include <stdint.h>
#include <sys/types.h> #include <sys/types.h>
...@@ -78,7 +79,7 @@ void enable_mmu_direct_el1(unsigned int flags); ...@@ -78,7 +79,7 @@ void enable_mmu_direct_el1(unsigned int flags);
void enable_mmu_direct_el3(unsigned int flags); void enable_mmu_direct_el3(unsigned int flags);
#endif /* AARCH32 */ #endif /* AARCH32 */
int xlat_arch_is_granule_size_supported(size_t size); bool xlat_arch_is_granule_size_supported(size_t size);
size_t xlat_arch_get_max_supported_granule_size(void); size_t xlat_arch_get_max_supported_granule_size(void);
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <cassert.h> #include <cassert.h>
#include <platform_def.h> #include <platform_def.h>
#include <stdbool.h>
#include <stddef.h> #include <stddef.h>
#include <xlat_tables_arch.h> #include <xlat_tables_arch.h>
#include <xlat_tables_defs.h> #include <xlat_tables_defs.h>
...@@ -95,8 +96,8 @@ struct xlat_ctx { ...@@ -95,8 +96,8 @@ struct xlat_ctx {
/* Level of the base translation table. */ /* Level of the base translation table. */
unsigned int base_level; unsigned int base_level;
/* Set to 1 when the translation tables are initialized. */ /* Set to true when the translation tables are initialized. */
int initialized; bool initialized;
/* /*
* Translation regime managed by this xlat_ctx_t. It should be one of * Translation regime managed by this xlat_ctx_t. It should be one of
...@@ -157,7 +158,7 @@ struct xlat_ctx { ...@@ -157,7 +158,7 @@ struct xlat_ctx {
.max_pa = 0U, \ .max_pa = 0U, \
.max_va = 0U, \ .max_va = 0U, \
.next_table = 0, \ .next_table = 0, \
.initialized = 0, \ .initialized = false, \
} }
#endif /*__ASSEMBLY__*/ #endif /*__ASSEMBLY__*/
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <common_def.h> #include <common_def.h>
#include <debug.h> #include <debug.h>
#include <platform_def.h> #include <platform_def.h>
#include <stdbool.h>
#include <string.h> #include <string.h>
#include <types.h> #include <types.h>
#include <utils.h> #include <utils.h>
...@@ -100,17 +101,16 @@ void mmap_add_region(unsigned long long base_pa, uintptr_t base_va, ...@@ -100,17 +101,16 @@ void mmap_add_region(unsigned long long base_pa, uintptr_t base_va,
* Check if one of the regions is completely inside the other * Check if one of the regions is completely inside the other
* one. * one.
*/ */
int fully_overlapped_va = bool fully_overlapped_va =
(((base_va >= mm->base_va) && (end_va <= mm_end_va)) || ((base_va >= mm->base_va) && (end_va <= mm_end_va)) ||
((mm->base_va >= base_va) && (mm_end_va <= end_va))) ((mm->base_va >= base_va) && (mm_end_va <= end_va));
? 1 : 0;
/* /*
* Full VA overlaps are only allowed if both regions are * Full VA overlaps are only allowed if both regions are
* identity mapped (zero offset) or have the same VA to PA * identity mapped (zero offset) or have the same VA to PA
* offset. Also, make sure that it's not the exact same area. * offset. Also, make sure that it's not the exact same area.
*/ */
if (fully_overlapped_va == 1) { if (fully_overlapped_va) {
assert((mm->base_va - mm->base_pa) == assert((mm->base_va - mm->base_pa) ==
(base_va - base_pa)); (base_va - base_pa));
assert((base_va != mm->base_va) || (size != mm->size)); assert((base_va != mm->base_va) || (size != mm->size));
...@@ -124,12 +124,12 @@ void mmap_add_region(unsigned long long base_pa, uintptr_t base_va, ...@@ -124,12 +124,12 @@ void mmap_add_region(unsigned long long base_pa, uintptr_t base_va,
unsigned long long mm_end_pa = unsigned long long mm_end_pa =
mm->base_pa + mm->size - 1; mm->base_pa + mm->size - 1;
int separated_pa = ((end_pa < mm->base_pa) || bool separated_pa = (end_pa < mm->base_pa) ||
(base_pa > mm_end_pa)) ? 1 : 0; (base_pa > mm_end_pa);
int separated_va = ((end_va < mm->base_va) || bool separated_va = (end_va < mm->base_va) ||
(base_va > mm_end_va)) ? 1 : 0; (base_va > mm_end_va);
assert((separated_va == 1) && (separated_pa == 1)); assert(separated_va && separated_pa);
} }
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include <assert.h> #include <assert.h>
#include <cassert.h> #include <cassert.h>
#include <platform_def.h> #include <platform_def.h>
#include <utils.h> #include <stdbool.h>
#include <utils_def.h> #include <utils_def.h>
#include <xlat_tables_v2.h> #include <xlat_tables_v2.h>
#include "../xlat_tables_private.h" #include "../xlat_tables_private.h"
...@@ -19,15 +19,15 @@ ...@@ -19,15 +19,15 @@
#endif #endif
/* /*
* Returns 1 if the provided granule size is supported, 0 otherwise. * Returns true if the provided granule size is supported, false otherwise.
*/ */
int xlat_arch_is_granule_size_supported(size_t size) bool xlat_arch_is_granule_size_supported(size_t size)
{ {
/* /*
* The library uses the long descriptor translation table format, which * The library uses the long descriptor translation table format, which
* supports 4 KiB pages only. * supports 4 KiB pages only.
*/ */
return (size == PAGE_SIZE_4KB) ? 1 : 0; return size == PAGE_SIZE_4KB;
} }
size_t xlat_arch_get_max_supported_granule_size(void) size_t xlat_arch_get_max_supported_granule_size(void)
...@@ -43,7 +43,7 @@ unsigned long long xlat_arch_get_max_supported_pa(void) ...@@ -43,7 +43,7 @@ unsigned long long xlat_arch_get_max_supported_pa(void)
} }
#endif /* ENABLE_ASSERTIONS*/ #endif /* ENABLE_ASSERTIONS*/
int is_mmu_enabled_ctx(const xlat_ctx_t *ctx __unused) bool is_mmu_enabled_ctx(const xlat_ctx_t *ctx __unused)
{ {
return (read_sctlr() & SCTLR_M_BIT) != 0; return (read_sctlr() & SCTLR_M_BIT) != 0;
} }
......
...@@ -8,30 +8,31 @@ ...@@ -8,30 +8,31 @@
#include <arch_helpers.h> #include <arch_helpers.h>
#include <assert.h> #include <assert.h>
#include <cassert.h> #include <cassert.h>
#include <stdbool.h>
#include <sys/types.h> #include <sys/types.h>
#include <utils_def.h> #include <utils_def.h>
#include <xlat_tables_v2.h> #include <xlat_tables_v2.h>
#include "../xlat_tables_private.h" #include "../xlat_tables_private.h"
/* /*
* Returns 1 if the provided granule size is supported, 0 otherwise. * Returns true if the provided granule size is supported, false otherwise.
*/ */
int xlat_arch_is_granule_size_supported(size_t size) bool xlat_arch_is_granule_size_supported(size_t size)
{ {
u_register_t id_aa64mmfr0_el1 = read_id_aa64mmfr0_el1(); u_register_t id_aa64mmfr0_el1 = read_id_aa64mmfr0_el1();
if (size == PAGE_SIZE_4KB) { if (size == PAGE_SIZE_4KB) {
return (((id_aa64mmfr0_el1 >> ID_AA64MMFR0_EL1_TGRAN4_SHIFT) & return ((id_aa64mmfr0_el1 >> ID_AA64MMFR0_EL1_TGRAN4_SHIFT) &
ID_AA64MMFR0_EL1_TGRAN4_MASK) == ID_AA64MMFR0_EL1_TGRAN4_MASK) ==
ID_AA64MMFR0_EL1_TGRAN4_SUPPORTED) ? 1 : 0; ID_AA64MMFR0_EL1_TGRAN4_SUPPORTED;
} else if (size == PAGE_SIZE_16KB) { } else if (size == PAGE_SIZE_16KB) {
return (((id_aa64mmfr0_el1 >> ID_AA64MMFR0_EL1_TGRAN16_SHIFT) & return ((id_aa64mmfr0_el1 >> ID_AA64MMFR0_EL1_TGRAN16_SHIFT) &
ID_AA64MMFR0_EL1_TGRAN16_MASK) == ID_AA64MMFR0_EL1_TGRAN16_MASK) ==
ID_AA64MMFR0_EL1_TGRAN16_SUPPORTED) ? 1 : 0; ID_AA64MMFR0_EL1_TGRAN16_SUPPORTED;
} else if (size == PAGE_SIZE_64KB) { } else if (size == PAGE_SIZE_64KB) {
return (((id_aa64mmfr0_el1 >> ID_AA64MMFR0_EL1_TGRAN64_SHIFT) & return ((id_aa64mmfr0_el1 >> ID_AA64MMFR0_EL1_TGRAN64_SHIFT) &
ID_AA64MMFR0_EL1_TGRAN64_MASK) == ID_AA64MMFR0_EL1_TGRAN64_MASK) ==
ID_AA64MMFR0_EL1_TGRAN64_SUPPORTED) ? 1 : 0; ID_AA64MMFR0_EL1_TGRAN64_SUPPORTED;
} else { } else {
return 0; return 0;
} }
...@@ -39,12 +40,12 @@ int xlat_arch_is_granule_size_supported(size_t size) ...@@ -39,12 +40,12 @@ int xlat_arch_is_granule_size_supported(size_t size)
size_t xlat_arch_get_max_supported_granule_size(void) size_t xlat_arch_get_max_supported_granule_size(void)
{ {
if (xlat_arch_is_granule_size_supported(PAGE_SIZE_64KB) != 0) { if (xlat_arch_is_granule_size_supported(PAGE_SIZE_64KB)) {
return PAGE_SIZE_64KB; return PAGE_SIZE_64KB;
} else if (xlat_arch_is_granule_size_supported(PAGE_SIZE_16KB) != 0) { } else if (xlat_arch_is_granule_size_supported(PAGE_SIZE_16KB)) {
return PAGE_SIZE_16KB; return PAGE_SIZE_16KB;
} else { } else {
assert(xlat_arch_is_granule_size_supported(PAGE_SIZE_4KB) != 0); assert(xlat_arch_is_granule_size_supported(PAGE_SIZE_4KB));
return PAGE_SIZE_4KB; return PAGE_SIZE_4KB;
} }
} }
...@@ -99,15 +100,15 @@ unsigned long long xlat_arch_get_max_supported_pa(void) ...@@ -99,15 +100,15 @@ unsigned long long xlat_arch_get_max_supported_pa(void)
} }
#endif /* ENABLE_ASSERTIONS*/ #endif /* ENABLE_ASSERTIONS*/
int is_mmu_enabled_ctx(const xlat_ctx_t *ctx) bool is_mmu_enabled_ctx(const xlat_ctx_t *ctx)
{ {
if (ctx->xlat_regime == EL1_EL0_REGIME) { if (ctx->xlat_regime == EL1_EL0_REGIME) {
assert(xlat_arch_current_el() >= 1U); assert(xlat_arch_current_el() >= 1U);
return ((read_sctlr_el1() & SCTLR_M_BIT) != 0U) ? 1 : 0; return (read_sctlr_el1() & SCTLR_M_BIT) != 0U;
} else { } else {
assert(ctx->xlat_regime == EL3_REGIME); assert(ctx->xlat_regime == EL3_REGIME);
assert(xlat_arch_current_el() >= 3U); assert(xlat_arch_current_el() >= 3U);
return ((read_sctlr_el3() & SCTLR_M_BIT) != 0U) ? 1 : 0; return (read_sctlr_el3() & SCTLR_M_BIT) != 0U;
} }
} }
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <debug.h> #include <debug.h>
#include <errno.h> #include <errno.h>
#include <platform_def.h> #include <platform_def.h>
#include <stdbool.h>
#include <string.h> #include <string.h>
#include <types.h> #include <types.h>
#include <utils_def.h> #include <utils_def.h>
...@@ -39,7 +40,7 @@ static int xlat_table_get_index(const xlat_ctx_t *ctx, const uint64_t *table) ...@@ -39,7 +40,7 @@ static int xlat_table_get_index(const xlat_ctx_t *ctx, const uint64_t *table)
* Maybe we were asked to get the index of the base level table, which * Maybe we were asked to get the index of the base level table, which
* should never happen. * should never happen.
*/ */
assert(0); assert(false);
return -1; return -1;
} }
...@@ -73,10 +74,9 @@ static void xlat_table_dec_regions_count(const xlat_ctx_t *ctx, ...@@ -73,10 +74,9 @@ static void xlat_table_dec_regions_count(const xlat_ctx_t *ctx,
} }
/* Returns 0 if the specified table isn't empty, otherwise 1. */ /* Returns 0 if the specified table isn't empty, otherwise 1. */
static int xlat_table_is_empty(const xlat_ctx_t *ctx, const uint64_t *table) static bool xlat_table_is_empty(const xlat_ctx_t *ctx, const uint64_t *table)
{ {
return (ctx->tables_mapped_regions[xlat_table_get_index(ctx, table)] == 0) return ctx->tables_mapped_regions[xlat_table_get_index(ctx, table)] == 0;
? 1 : 0;
} }
#else /* PLAT_XLAT_TABLES_DYNAMIC */ #else /* PLAT_XLAT_TABLES_DYNAMIC */
...@@ -333,7 +333,7 @@ static void xlat_tables_unmap_region(xlat_ctx_t *ctx, mmap_region_t *mm, ...@@ -333,7 +333,7 @@ static void xlat_tables_unmap_region(xlat_ctx_t *ctx, mmap_region_t *mm,
/* /*
* If the subtable is now empty, remove its reference. * If the subtable is now empty, remove its reference.
*/ */
if (xlat_table_is_empty(ctx, subtable) != 0) { if (xlat_table_is_empty(ctx, subtable)) {
table_base[table_idx] = INVALID_DESC; table_base[table_idx] = INVALID_DESC;
xlat_arch_tlbi_va(table_idx_va, xlat_arch_tlbi_va(table_idx_va,
ctx->xlat_regime); ctx->xlat_regime);
...@@ -650,12 +650,11 @@ static int mmap_add_region_check(const xlat_ctx_t *ctx, const mmap_region_t *mm) ...@@ -650,12 +650,11 @@ static int mmap_add_region_check(const xlat_ctx_t *ctx, const mmap_region_t *mm)
* Check if one of the regions is completely inside the other * Check if one of the regions is completely inside the other
* one. * one.
*/ */
int fully_overlapped_va = bool fully_overlapped_va =
(((base_va >= mm_cursor->base_va) && ((base_va >= mm_cursor->base_va) &&
(end_va <= mm_cursor_end_va)) || (end_va <= mm_cursor_end_va)) ||
((mm_cursor->base_va >= base_va) && ((mm_cursor->base_va >= base_va) &&
(mm_cursor_end_va <= end_va))) (mm_cursor_end_va <= end_va));
? 1 : 0;
/* /*
* Full VA overlaps are only allowed if both regions are * Full VA overlaps are only allowed if both regions are
...@@ -663,7 +662,7 @@ static int mmap_add_region_check(const xlat_ctx_t *ctx, const mmap_region_t *mm) ...@@ -663,7 +662,7 @@ static int mmap_add_region_check(const xlat_ctx_t *ctx, const mmap_region_t *mm)
* offset. Also, make sure that it's not the exact same area. * offset. Also, make sure that it's not the exact same area.
* This can only be done with static regions. * This can only be done with static regions.
*/ */
if (fully_overlapped_va != 0) { if (fully_overlapped_va) {
#if PLAT_XLAT_TABLES_DYNAMIC #if PLAT_XLAT_TABLES_DYNAMIC
if (((mm->attr & MT_DYNAMIC) != 0U) || if (((mm->attr & MT_DYNAMIC) != 0U) ||
...@@ -688,12 +687,12 @@ static int mmap_add_region_check(const xlat_ctx_t *ctx, const mmap_region_t *mm) ...@@ -688,12 +687,12 @@ static int mmap_add_region_check(const xlat_ctx_t *ctx, const mmap_region_t *mm)
unsigned long long mm_cursor_end_pa = unsigned long long mm_cursor_end_pa =
mm_cursor->base_pa + mm_cursor->size - 1U; mm_cursor->base_pa + mm_cursor->size - 1U;
int separated_pa = ((end_pa < mm_cursor->base_pa) || bool separated_pa = (end_pa < mm_cursor->base_pa) ||
(base_pa > mm_cursor_end_pa)) ? 1 : 0; (base_pa > mm_cursor_end_pa);
int separated_va = ((end_va < mm_cursor->base_va) || bool separated_va = (end_va < mm_cursor->base_va) ||
(base_va > mm_cursor_end_va)) ? 1 : 0; (base_va > mm_cursor_end_va);
if ((separated_va == 0) || (separated_pa == 0)) if (!separated_va || !separated_pa)
return -EPERM; return -EPERM;
} }
} }
...@@ -715,12 +714,12 @@ void mmap_add_region_ctx(xlat_ctx_t *ctx, const mmap_region_t *mm) ...@@ -715,12 +714,12 @@ void mmap_add_region_ctx(xlat_ctx_t *ctx, const mmap_region_t *mm)
return; return;
/* Static regions must be added before initializing the xlat tables. */ /* Static regions must be added before initializing the xlat tables. */
assert(ctx->initialized == 0); assert(!ctx->initialized);
ret = mmap_add_region_check(ctx, mm); ret = mmap_add_region_check(ctx, mm);
if (ret != 0) { if (ret != 0) {
ERROR("mmap_add_region_check() failed. error %d\n", ret); ERROR("mmap_add_region_check() failed. error %d\n", ret);
assert(0); assert(false);
return; return;
} }
...@@ -856,7 +855,7 @@ int mmap_add_dynamic_region_ctx(xlat_ctx_t *ctx, mmap_region_t *mm) ...@@ -856,7 +855,7 @@ int mmap_add_dynamic_region_ctx(xlat_ctx_t *ctx, mmap_region_t *mm)
* Update the translation tables if the xlat tables are initialized. If * Update the translation tables if the xlat tables are initialized. If
* not, this region will be mapped when they are initialized. * not, this region will be mapped when they are initialized.
*/ */
if (ctx->initialized != 0) { if (ctx->initialized) {
end_va = xlat_tables_map_region(ctx, mm_cursor, end_va = xlat_tables_map_region(ctx, mm_cursor,
0U, ctx->base_table, ctx->base_table_entries, 0U, ctx->base_table, ctx->base_table_entries,
ctx->base_level); ctx->base_level);
...@@ -948,7 +947,7 @@ int mmap_remove_dynamic_region_ctx(xlat_ctx_t *ctx, uintptr_t base_va, ...@@ -948,7 +947,7 @@ int mmap_remove_dynamic_region_ctx(xlat_ctx_t *ctx, uintptr_t base_va,
update_max_pa_needed = 1; update_max_pa_needed = 1;
/* Update the translation tables if needed */ /* Update the translation tables if needed */
if (ctx->initialized != 0) { if (ctx->initialized) {
xlat_tables_unmap_region(ctx, mm, 0U, ctx->base_table, xlat_tables_unmap_region(ctx, mm, 0U, ctx->base_table,
ctx->base_table_entries, ctx->base_table_entries,
ctx->base_level); ctx->base_level);
...@@ -987,10 +986,10 @@ int mmap_remove_dynamic_region_ctx(xlat_ctx_t *ctx, uintptr_t base_va, ...@@ -987,10 +986,10 @@ int mmap_remove_dynamic_region_ctx(xlat_ctx_t *ctx, uintptr_t base_va,
void init_xlat_tables_ctx(xlat_ctx_t *ctx) void init_xlat_tables_ctx(xlat_ctx_t *ctx)
{ {
assert(ctx != NULL); assert(ctx != NULL);
assert(ctx->initialized == 0); assert(!ctx->initialized);
assert((ctx->xlat_regime == EL3_REGIME) || assert((ctx->xlat_regime == EL3_REGIME) ||
(ctx->xlat_regime == EL1_EL0_REGIME)); (ctx->xlat_regime == EL1_EL0_REGIME));
assert(is_mmu_enabled_ctx(ctx) == 0); assert(!is_mmu_enabled_ctx(ctx));
mmap_region_t *mm = ctx->mmap; mmap_region_t *mm = ctx->mmap;
...@@ -1028,7 +1027,7 @@ void init_xlat_tables_ctx(xlat_ctx_t *ctx) ...@@ -1028,7 +1027,7 @@ void init_xlat_tables_ctx(xlat_ctx_t *ctx)
assert(ctx->max_va <= ctx->va_max_address); assert(ctx->max_va <= ctx->va_max_address);
assert(ctx->max_pa <= ctx->pa_max_address); assert(ctx->max_pa <= ctx->pa_max_address);
ctx->initialized = 1; ctx->initialized = true;
xlat_tables_print(ctx); xlat_tables_print(ctx);
} }
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#define XLAT_TABLES_PRIVATE_H #define XLAT_TABLES_PRIVATE_H
#include <platform_def.h> #include <platform_def.h>
#include <stdbool.h>
#include <xlat_tables_defs.h> #include <xlat_tables_defs.h>
#if PLAT_XLAT_TABLES_DYNAMIC #if PLAT_XLAT_TABLES_DYNAMIC
...@@ -91,9 +92,9 @@ unsigned int xlat_arch_current_el(void); ...@@ -91,9 +92,9 @@ unsigned int xlat_arch_current_el(void);
unsigned long long xlat_arch_get_max_supported_pa(void); unsigned long long xlat_arch_get_max_supported_pa(void);
/* /*
* Return 1 if the MMU of the translation regime managed by the given xlat_ctx_t * Returns true if the MMU of the translation regime managed by the given
* is enabled, 0 otherwise. * xlat_ctx_t is enabled, false otherwise.
*/ */
int is_mmu_enabled_ctx(const xlat_ctx_t *ctx); bool is_mmu_enabled_ctx(const xlat_ctx_t *ctx);
#endif /* XLAT_TABLES_PRIVATE_H */ #endif /* XLAT_TABLES_PRIVATE_H */
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <debug.h> #include <debug.h>
#include <errno.h> #include <errno.h>
#include <platform_def.h> #include <platform_def.h>
#include <stdbool.h>
#include <types.h> #include <types.h>
#include <utils_def.h> #include <utils_def.h>
#include <xlat_tables_defs.h> #include <xlat_tables_defs.h>
...@@ -307,7 +308,7 @@ static uint64_t *find_xlat_table_entry(uintptr_t virtual_addr, ...@@ -307,7 +308,7 @@ static uint64_t *find_xlat_table_entry(uintptr_t virtual_addr,
* This shouldn't be reached, the translation table walk should end at * This shouldn't be reached, the translation table walk should end at
* most at level XLAT_TABLE_LEVEL_MAX and return from inside the loop. * most at level XLAT_TABLE_LEVEL_MAX and return from inside the loop.
*/ */
assert(0); assert(false);
return NULL; return NULL;
} }
...@@ -326,7 +327,7 @@ static int get_mem_attributes_internal(const xlat_ctx_t *ctx, uintptr_t base_va, ...@@ -326,7 +327,7 @@ static int get_mem_attributes_internal(const xlat_ctx_t *ctx, uintptr_t base_va,
* Sanity-check arguments. * Sanity-check arguments.
*/ */
assert(ctx != NULL); assert(ctx != NULL);
assert(ctx->initialized != 0); assert(ctx->initialized);
assert((ctx->xlat_regime == EL1_EL0_REGIME) || assert((ctx->xlat_regime == EL1_EL0_REGIME) ||
(ctx->xlat_regime == EL3_REGIME)); (ctx->xlat_regime == EL3_REGIME));
...@@ -422,7 +423,7 @@ int change_mem_attributes(const xlat_ctx_t *ctx, ...@@ -422,7 +423,7 @@ int change_mem_attributes(const xlat_ctx_t *ctx,
/* Note: This implementation isn't optimized. */ /* Note: This implementation isn't optimized. */
assert(ctx != NULL); assert(ctx != NULL);
assert(ctx->initialized != 0); assert(ctx->initialized);
unsigned long long virt_addr_space_size = unsigned long long virt_addr_space_size =
(unsigned long long)ctx->va_max_address + 1U; (unsigned long long)ctx->va_max_address + 1U;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment