mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 01:24:27 +00:00
feat(fvp): add plat API to set and get the DRTM error
Added a platform function to set and get DRTM error. Also, added a platform function to reset the system. Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com> Change-Id: I471f2387f8c78b21a06af063a6fa02cda3646557
This commit is contained in:
parent
40814266d5
commit
586f60cc57
8 changed files with 54 additions and 2 deletions
|
@ -297,6 +297,7 @@ void plat_arm_interconnect_exit_coherency(void);
|
|||
void plat_arm_program_trusted_mailbox(uintptr_t address);
|
||||
bool plat_arm_bl1_fwu_needed(void);
|
||||
__dead2 void plat_arm_error_handler(int err);
|
||||
__dead2 void plat_arm_system_reset(void);
|
||||
|
||||
/*
|
||||
* Optional functions in ARM standard platforms
|
||||
|
|
|
@ -60,4 +60,8 @@ uint64_t plat_drtm_get_tcb_hash_table_size(void);
|
|||
uint64_t plat_drtm_get_imp_def_dlme_region_size(void);
|
||||
uint64_t plat_drtm_get_tcb_hash_features(void);
|
||||
|
||||
/* DRTM error handling functions */
|
||||
int plat_set_drtm_error(uint64_t error_code);
|
||||
int plat_get_drtm_error(uint64_t *error_code);
|
||||
|
||||
#endif /* PLAT_DRTM_H */
|
||||
|
|
|
@ -128,6 +128,7 @@ int plat_crash_console_putc(int c);
|
|||
void plat_crash_console_flush(void);
|
||||
void plat_error_handler(int err) __dead2;
|
||||
void plat_panic_handler(void) __dead2;
|
||||
void plat_system_reset(void) __dead2;
|
||||
const char *plat_log_get_prefix(unsigned int log_level);
|
||||
void bl2_plat_preload_setup(void);
|
||||
int plat_try_next_boot_source(void);
|
||||
|
|
22
plat/arm/board/fvp/fvp_drtm_err.c
Normal file
22
plat/arm/board/fvp/fvp_drtm_err.c
Normal file
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Arm Limited. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <plat/common/platform.h>
|
||||
|
||||
int plat_set_drtm_error(uint64_t error_code)
|
||||
{
|
||||
/* TODO: Set DRTM error in NV-storage */
|
||||
return 0;
|
||||
}
|
||||
|
||||
int plat_get_drtm_error(uint64_t *error_code)
|
||||
{
|
||||
/* TODO: Get DRTM error from NV-storage */
|
||||
*error_code = 0;
|
||||
return 0;
|
||||
}
|
|
@ -29,3 +29,15 @@ __dead2 void plat_arm_error_handler(int err)
|
|||
for (;;)
|
||||
wfi();
|
||||
}
|
||||
|
||||
void __dead2 plat_arm_system_reset(void)
|
||||
{
|
||||
/* Write the System Configuration Control Register */
|
||||
mmio_write_32(V2M_SYSREGS_BASE + V2M_SYS_CFGCTRL,
|
||||
V2M_CFGCTRL_START |
|
||||
V2M_CFGCTRL_RW |
|
||||
V2M_CFGCTRL_FUNC(V2M_FUNC_REBOOT));
|
||||
wfi();
|
||||
ERROR("FVP System Reset: operation not handled.\n");
|
||||
panic();
|
||||
}
|
||||
|
|
|
@ -414,10 +414,13 @@ endif
|
|||
endif
|
||||
|
||||
ifeq (${DRTM_SUPPORT}, 1)
|
||||
BL31_SOURCES += plat/arm/board/fvp/fvp_drtm_dma_prot.c \
|
||||
BL31_SOURCES += plat/arm/board/fvp/fvp_drtm_addr.c \
|
||||
plat/arm/board/fvp/fvp_drtm_dma_prot.c \
|
||||
plat/arm/board/fvp/fvp_drtm_err.c \
|
||||
plat/arm/board/fvp/fvp_drtm_measurement.c \
|
||||
plat/arm/board/fvp/fvp_drtm_stub.c \
|
||||
plat/arm/common/arm_dyn_cfg.c
|
||||
plat/arm/common/arm_dyn_cfg.c \
|
||||
plat/arm/board/fvp/fvp_err.c
|
||||
endif
|
||||
|
||||
ifeq (${TRUSTED_BOARD_BOOT}, 1)
|
||||
|
|
|
@ -363,6 +363,10 @@ BL31_SOURCES += plat/common/plat_spmd_manifest.c \
|
|||
BL31_SOURCES += ${FDT_WRAPPERS_SOURCES}
|
||||
endif
|
||||
|
||||
ifeq (${DRTM_SUPPORT},1)
|
||||
BL31_SOURCES += plat/arm/common/arm_err.c
|
||||
endif
|
||||
|
||||
ifneq (${TRUSTED_BOARD_BOOT},0)
|
||||
|
||||
# Include common TBB sources
|
||||
|
|
|
@ -13,3 +13,8 @@ void __dead2 plat_error_handler(int err)
|
|||
{
|
||||
plat_arm_error_handler(err);
|
||||
}
|
||||
|
||||
void __dead2 plat_system_reset(void)
|
||||
{
|
||||
plat_arm_system_reset();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue