mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 09:34:18 +00:00
feat(st): map 2MB for ROM code
This allows reducing MMU tables, and as there is nothing after ROM code in memory mapping, this has no impact. Change-Id: If51facb96a523770465cb06eb1ab400f75d26db3 Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
This commit is contained in:
parent
db3e0ece71
commit
1697ad8cc8
2 changed files with 6 additions and 5 deletions
|
@ -1,13 +1,11 @@
|
|||
/*
|
||||
* Copyright (c) 2019, STMicroelectronics - All Rights Reserved
|
||||
* Copyright (c) 2019-2022, STMicroelectronics - All Rights Reserved
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include <platform_def.h>
|
||||
|
||||
#include <common/debug.h>
|
||||
#include <drivers/io/io_storage.h>
|
||||
#include <drivers/st/bsec.h>
|
||||
|
@ -15,6 +13,8 @@
|
|||
#include <lib/xlat_tables/xlat_tables_v2.h>
|
||||
#include <plat/common/platform.h>
|
||||
|
||||
#include <platform_def.h>
|
||||
|
||||
static const struct stm32mp_auth_ops *auth_ops;
|
||||
|
||||
void stm32mp_init_auth(struct stm32mp_auth_ops *init_ptr)
|
||||
|
@ -47,7 +47,7 @@ int stm32mp_auth_image(boot_api_image_header_t *header, uintptr_t buffer)
|
|||
}
|
||||
|
||||
ret = mmap_add_dynamic_region(STM32MP_ROM_BASE, STM32MP_ROM_BASE,
|
||||
STM32MP_ROM_SIZE, MT_CODE | MT_SECURE);
|
||||
STM32MP_ROM_SIZE_2MB_ALIGNED, MT_CODE | MT_SECURE);
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
@ -85,6 +85,6 @@ int stm32mp_auth_image(boot_api_image_header_t *header, uintptr_t buffer)
|
|||
}
|
||||
|
||||
err:
|
||||
mmap_remove_dynamic_region(STM32MP_ROM_BASE, STM32MP_ROM_SIZE);
|
||||
mmap_remove_dynamic_region(STM32MP_ROM_BASE, STM32MP_ROM_SIZE_2MB_ALIGNED);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -68,6 +68,7 @@
|
|||
******************************************************************************/
|
||||
#define STM32MP_ROM_BASE U(0x00000000)
|
||||
#define STM32MP_ROM_SIZE U(0x00020000)
|
||||
#define STM32MP_ROM_SIZE_2MB_ALIGNED U(0x00200000)
|
||||
|
||||
#define STM32MP_SYSRAM_BASE U(0x2FFC0000)
|
||||
#define STM32MP_SYSRAM_SIZE U(0x00040000)
|
||||
|
|
Loading…
Add table
Reference in a new issue