diff options
author | Soby Mathew <soby.mathew@arm.com> | 2014-09-03 17:48:44 +0100 |
---|---|---|
committer | Achin Gupta <achin.gupta@arm.com> | 2014-09-25 11:43:47 +0100 |
commit | d0ecd97987a685bd79bc162669563a93a785a467 (patch) | |
tree | 93089c0ecab7a34544e5b74d033c5a2dc8c3e7ed /include/lib | |
parent | 8e0bbcb3a9be810ad46af36bee65aada70becb27 (diff) |
Create BL stage specific translation tables
This patch uses the IMAGE_BL<x> constants to create translation tables specific
to a boot loader stage. This allows each stage to create mappings only for areas
in the memory map that it needs.
Fixes ARM-software/tf-issues#209
Change-Id: Ie4861407ddf9317f0fb890fc7575eaa88d0de51c
Diffstat (limited to 'include/lib')
-rw-r--r-- | include/lib/aarch64/xlat_tables.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/lib/aarch64/xlat_tables.h b/include/lib/aarch64/xlat_tables.h index 2d4a211b..0b5dbdf2 100644 --- a/include/lib/aarch64/xlat_tables.h +++ b/include/lib/aarch64/xlat_tables.h @@ -41,6 +41,16 @@ #ifndef __ASSEMBLY__ #include <stdint.h> +/* Helper macro to define entries for mmap_region_t. It creates + * identity mappings for each region. + */ +#define MAP_REGION_FLAT(adr, sz, attr) MAP_REGION(adr, adr, sz, attr) + +/* Helper macro to define entries for mmap_region_t. It allows to + * re-map address mappings from 'pa' to 'va' for each region. + */ +#define MAP_REGION(pa, va, sz, attr) {(pa), (va), (sz), (attr)} + /* * Flags for building up memory mapping attributes. * These are organised so that a clear bit gives a more restrictive mapping |