Commit 0b9ce906 authored by Jeenu Viswambharan's avatar Jeenu Viswambharan
Browse files

ARM Platforms: Support RAS



  - Assign 0x10 for RAS exceptions on ARM platforms, and install
    EHF priority descriptor.

  - Call the common RAS initialisation from ARM BL31 setup.

  - Add empty definitions for platform error records and RAS interrupts.

Change-Id: I0675f299b7840be4c83a9c7a81073a95c605dc90
Signed-off-by: default avatarJeenu Viswambharan <jeenu.viswambharan@arm.com>
parent 1a7c1cfe
...@@ -483,6 +483,7 @@ ...@@ -483,6 +483,7 @@
#define PLAT_PERCPU_BAKERY_LOCK_SIZE (1 * CACHE_WRITEBACK_GRANULE) #define PLAT_PERCPU_BAKERY_LOCK_SIZE (1 * CACHE_WRITEBACK_GRANULE)
/* Priority levels for ARM platforms */ /* Priority levels for ARM platforms */
#define PLAT_RAS_PRI 0x10
#define PLAT_SDEI_CRITICAL_PRI 0x60 #define PLAT_SDEI_CRITICAL_PRI 0x60
#define PLAT_SDEI_NORMAL_PRI 0x70 #define PLAT_SDEI_NORMAL_PRI 0x70
......
/* /*
* Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
...@@ -11,6 +11,11 @@ ...@@ -11,6 +11,11 @@
* Enumeration of priority levels on ARM platforms. * Enumeration of priority levels on ARM platforms.
*/ */
ehf_pri_desc_t arm_exceptions[] = { ehf_pri_desc_t arm_exceptions[] = {
#if RAS_EXTENSION
/* RAS Priority */
EHF_PRI_DESC(ARM_PRI_BITS, PLAT_RAS_PRI),
#endif
#if SDEI_SUPPORT #if SDEI_SUPPORT
/* Critical priority SDEI */ /* Critical priority SDEI */
EHF_PRI_DESC(ARM_PRI_BITS, PLAT_SDEI_CRITICAL_PRI), EHF_PRI_DESC(ARM_PRI_BITS, PLAT_SDEI_CRITICAL_PRI),
......
/*
* Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <ras.h>
struct ras_interrupt arm_ras_interrupts[] = {
};
struct err_record_info arm_err_records[] = {
};
REGISTER_ERR_RECORD_INFO(arm_err_records);
REGISTER_RAS_INTERRUPTS(arm_ras_interrupts);
...@@ -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__)
...@@ -217,6 +218,10 @@ void arm_bl31_platform_setup(void) ...@@ -217,6 +218,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
......
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