mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-05-09 02:51:21 +00:00
Merge branch 'integration' into tf_issue_461
This commit is contained in:
commit
0f22bef31d
133 changed files with 4305 additions and 2056 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
|
||||
* Copyright (c) 2016-2017, ARM Limited and Contributors. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
|
@ -85,13 +85,13 @@
|
|||
static uint64_t base_xlation_table[NUM_BASE_LEVEL_ENTRIES]
|
||||
__aligned(NUM_BASE_LEVEL_ENTRIES * sizeof(uint64_t));
|
||||
|
||||
#if DEBUG
|
||||
#if ENABLE_ASSERTIONS
|
||||
static unsigned long long get_max_supported_pa(void)
|
||||
{
|
||||
/* Physical address space size for long descriptor format. */
|
||||
return (1ULL << 40) - 1ULL;
|
||||
}
|
||||
#endif
|
||||
#endif /* ENABLE_ASSERTIONS */
|
||||
|
||||
void init_xlat_tables(void)
|
||||
{
|
||||
|
|
|
@ -127,7 +127,7 @@ static unsigned long long calc_physical_addr_size_bits(
|
|||
return TCR_PS_BITS_4GB;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
#if ENABLE_ASSERTIONS
|
||||
/* Physical Address ranges supported in the AArch64 Memory Model */
|
||||
static const unsigned int pa_range_bits_arr[] = {
|
||||
PARANGE_0000, PARANGE_0001, PARANGE_0010, PARANGE_0011, PARANGE_0100,
|
||||
|
@ -144,7 +144,7 @@ static unsigned long long get_max_supported_pa(void)
|
|||
|
||||
return (1ULL << pa_range_bits_arr[pa_range]) - 1ULL;
|
||||
}
|
||||
#endif
|
||||
#endif /* ENABLE_ASSERTIONS */
|
||||
|
||||
void init_xlat_tables(void)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
|
||||
* Copyright (c) 2016-2017, ARM Limited and Contributors. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
|
@ -87,7 +87,7 @@ void print_mmap(void)
|
|||
}
|
||||
|
||||
void mmap_add_region(unsigned long long base_pa, uintptr_t base_va,
|
||||
size_t size, unsigned int attr)
|
||||
size_t size, mmap_attr_t attr)
|
||||
{
|
||||
mmap_region_t *mm = mmap;
|
||||
mmap_region_t *mm_last = mm + ARRAY_SIZE(mmap) - 1;
|
||||
|
@ -109,7 +109,7 @@ void mmap_add_region(unsigned long long base_pa, uintptr_t base_va,
|
|||
assert((base_pa + (unsigned long long)size - 1ULL) <=
|
||||
(PLAT_PHY_ADDR_SPACE_SIZE - 1));
|
||||
|
||||
#if DEBUG
|
||||
#if ENABLE_ASSERTIONS
|
||||
|
||||
/* Check for PAs and VAs overlaps with all other regions */
|
||||
for (mm = mmap; mm->size; ++mm) {
|
||||
|
@ -154,7 +154,7 @@ void mmap_add_region(unsigned long long base_pa, uintptr_t base_va,
|
|||
|
||||
mm = mmap; /* Restore pointer to the start of the array */
|
||||
|
||||
#endif /* DEBUG */
|
||||
#endif /* ENABLE_ASSERTIONS */
|
||||
|
||||
/* Find correct place in mmap to insert new region */
|
||||
while (mm->base_va < base_va && mm->size)
|
||||
|
@ -199,7 +199,7 @@ void mmap_add(const mmap_region_t *mm)
|
|||
}
|
||||
}
|
||||
|
||||
static uint64_t mmap_desc(unsigned attr, unsigned long long addr_pa,
|
||||
static uint64_t mmap_desc(mmap_attr_t attr, unsigned long long addr_pa,
|
||||
int level)
|
||||
{
|
||||
uint64_t desc;
|
||||
|
@ -277,11 +277,11 @@ static uint64_t mmap_desc(unsigned attr, unsigned long long addr_pa,
|
|||
* attributes of the innermost region that contains it. If there are partial
|
||||
* overlaps, it returns -1, as a smaller size is needed.
|
||||
*/
|
||||
static int mmap_region_attr(mmap_region_t *mm, uintptr_t base_va,
|
||||
static mmap_attr_t mmap_region_attr(mmap_region_t *mm, uintptr_t base_va,
|
||||
size_t size)
|
||||
{
|
||||
/* Don't assume that the area is contained in the first region */
|
||||
int attr = -1;
|
||||
mmap_attr_t attr = -1;
|
||||
|
||||
/*
|
||||
* Get attributes from last (innermost) region that contains the
|
||||
|
@ -360,7 +360,8 @@ static mmap_region_t *init_xlation_table_inner(mmap_region_t *mm,
|
|||
* there are partially overlapping regions. On success,
|
||||
* it will return the innermost region's attributes.
|
||||
*/
|
||||
int attr = mmap_region_attr(mm, base_va, level_size);
|
||||
mmap_attr_t attr = mmap_region_attr(mm, base_va,
|
||||
level_size);
|
||||
if (attr >= 0) {
|
||||
desc = mmap_desc(attr,
|
||||
base_va - mm->base_va + mm->base_pa,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue