summaryrefslogtreecommitdiff
path: root/include/lib
diff options
context:
space:
mode:
authorLin Ma <lin.ma@caviumnetworks.com>2014-06-02 11:45:36 -0700
committerLin Ma <lin.ma@caviumnetworks.com>2014-06-02 11:45:36 -0700
commitf984ce84bab84c821cc7be76c8362808c375c1c8 (patch)
tree16736ab8230bcaf0b6a144a7823909cf282d5ca1 /include/lib
parente10af77b2873396c9aca6e53326db3ca294f6de4 (diff)
Enable mapping higher physical address
Current ATF uses a direct physical-to-virtual mapping, that is, a physical address is mapped to the same address in the virtual space. For example, physical address 0x8000_0000 is mapped to 0x8000_0000 virtual. This approach works fine for FVP as all its physical addresses fall into 0 to 4GB range. But for other platform where all I/O addresses are 48-bit long, If we follow the same direct mapping, we would need virtual address range from 0 to 0x8fff_ffff_ffff, which is about 144TB. This requires a significant amount of memory for MMU tables and it is not necessary to use that much virtual space in ATF. The patch is to enable mapping a physical address range to an arbitrary virtual address range (instead of flat mapping) Changed "base" to "base_va" and added "base_pa" in mmap_region_t and modified functions such as mmap_add_region and init_xlation_table etc. Fixes ARM-software/tf-issues#158
Diffstat (limited to 'include/lib')
-rw-r--r--include/lib/aarch64/xlat_tables.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/lib/aarch64/xlat_tables.h b/include/lib/aarch64/xlat_tables.h
index 5df655bd..8e0adc7f 100644
--- a/include/lib/aarch64/xlat_tables.h
+++ b/include/lib/aarch64/xlat_tables.h
@@ -55,13 +55,14 @@ typedef enum {
* Structure for specifying a single region of memory.
*/
typedef struct mmap_region {
- unsigned long base;
+ unsigned long base_pa;
+ unsigned long base_va;
unsigned long size;
mmap_attr_t attr;
} mmap_region_t;
-void mmap_add_region(unsigned long base, unsigned long size,
- unsigned attr);
+void mmap_add_region(unsigned long base_pa, unsigned long base_va,
+ unsigned long size, unsigned attr);
void mmap_add(const mmap_region_t *mm);
void init_xlat_tables(void);