2017-05-19 09:59:37 +01:00
|
|
|
/*
|
xlat: Fix MISRA defects
Fix defects of MISRA C-2012 rules 8.13, 10.1, 10.3, 10.4, 10.8, 11.6,
14.4, 15.7, 17.8, 20.10, 20.12, 21.1 and Directive 4.9.
Change-Id: I7ff61e71733908596dbafe2e99d99b4fce9765bd
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-07-24 10:20:53 +01:00
|
|
|
* Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
|
2017-05-19 09:59:37 +01:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
*/
|
|
|
|
|
xlat: Fix MISRA defects
Fix defects of MISRA C-2012 rules 8.13, 10.1, 10.3, 10.4, 10.8, 11.6,
14.4, 15.7, 17.8, 20.10, 20.12, 21.1 and Directive 4.9.
Change-Id: I7ff61e71733908596dbafe2e99d99b4fce9765bd
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-07-24 10:20:53 +01:00
|
|
|
#ifndef XLAT_TABLES_ARCH_H
|
|
|
|
#define XLAT_TABLES_ARCH_H
|
2017-05-19 09:59:37 +01:00
|
|
|
|
|
|
|
#ifdef AARCH32
|
|
|
|
#include "aarch32/xlat_tables_aarch32.h"
|
|
|
|
#else
|
|
|
|
#include "aarch64/xlat_tables_aarch64.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Evaluates to 1 if the given physical address space size is a power of 2,
|
|
|
|
* or 0 if it's not.
|
|
|
|
*/
|
|
|
|
#define CHECK_PHY_ADDR_SPACE_SIZE(size) \
|
|
|
|
(IS_POWER_OF_TWO(size))
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Compute the number of entries required at the initial lookup level to address
|
|
|
|
* the whole virtual address space.
|
|
|
|
*/
|
|
|
|
#define GET_NUM_BASE_LEVEL_ENTRIES(addr_space_size) \
|
|
|
|
((addr_space_size) >> \
|
|
|
|
XLAT_ADDR_SHIFT(GET_XLAT_TABLE_LEVEL_BASE(addr_space_size)))
|
|
|
|
|
xlat: Fix MISRA defects
Fix defects of MISRA C-2012 rules 8.13, 10.1, 10.3, 10.4, 10.8, 11.6,
14.4, 15.7, 17.8, 20.10, 20.12, 21.1 and Directive 4.9.
Change-Id: I7ff61e71733908596dbafe2e99d99b4fce9765bd
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-07-24 10:20:53 +01:00
|
|
|
#endif /* XLAT_TABLES_ARCH_H */
|