Unverified Commit a513506b authored by Dimitris Papastamos's avatar Dimitris Papastamos Committed by GitHub
Browse files

Merge pull request #1373 from jeenu-arm/ras-support

RAS support
parents 83cf7a00 0b9ce906
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <mmio.h> #include <mmio.h>
#include <plat_arm.h> #include <plat_arm.h>
#include <platform.h> #include <platform.h>
#include <ras.h>
#define BL31_END (uintptr_t)(&__BL31_END__) #define BL31_END (uintptr_t)(&__BL31_END__)
...@@ -221,6 +222,10 @@ void arm_bl31_platform_setup(void) ...@@ -221,6 +222,10 @@ void arm_bl31_platform_setup(void)
/* Initialize power controller before setting up topology */ /* Initialize power controller before setting up topology */
plat_arm_pwrc_setup(); plat_arm_pwrc_setup();
#if RAS_EXTENSION
ras_init();
#endif
} }
/******************************************************************************* /*******************************************************************************
......
...@@ -203,6 +203,13 @@ ifeq (${SDEI_SUPPORT},1) ...@@ -203,6 +203,13 @@ ifeq (${SDEI_SUPPORT},1)
BL31_SOURCES += plat/arm/common/aarch64/arm_sdei.c BL31_SOURCES += plat/arm/common/aarch64/arm_sdei.c
endif endif
# RAS sources
ifeq (${RAS_EXTENSION},1)
BL31_SOURCES += lib/extensions/ras/std_err_record.c \
lib/extensions/ras/ras_common.c \
plat/arm/common/aarch64/arm_ras.c
endif
ifneq (${TRUSTED_BOARD_BOOT},0) ifneq (${TRUSTED_BOARD_BOOT},0)
# Include common TBB sources # Include common TBB sources
......
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
#include <assert.h> #include <assert.h>
#include <console.h> #include <console.h>
#include <platform.h> #include <platform.h>
#if RAS_EXTENSION
#include <ras.h>
#endif
#include <xlat_mmu_helpers.h> #include <xlat_mmu_helpers.h>
/* /*
...@@ -28,6 +31,8 @@ ...@@ -28,6 +31,8 @@
#pragma weak plat_sdei_validate_entry_point #pragma weak plat_sdei_validate_entry_point
#endif #endif
#pragma weak plat_ea_handler
void bl31_plat_enable_mmu(uint32_t flags) void bl31_plat_enable_mmu(uint32_t flags)
{ {
enable_mmu_el3(flags); enable_mmu_el3(flags);
...@@ -105,3 +110,20 @@ int plat_sdei_validate_entry_point(uintptr_t ep, unsigned int client_mode) ...@@ -105,3 +110,20 @@ int plat_sdei_validate_entry_point(uintptr_t ep, unsigned int client_mode)
return 0; return 0;
} }
#endif #endif
/* RAS functions common to AArch64 ARM platforms */
void plat_ea_handler(unsigned int ea_reason, uint64_t syndrome, void *cookie,
void *handle, uint64_t flags)
{
#if RAS_EXTENSION
/* Call RAS EA handler */
int handled = ras_ea_handler(ea_reason, syndrome, cookie, handle, flags);
if (handled != 0)
return;
#endif
ERROR("Unhandled External Abort received on 0x%lx at EL3!\n",
read_mpidr_el1());
ERROR(" exception reason=%u syndrome=0x%lx\n", ea_reason, syndrome);
panic();
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment