ARM Platforms: Support RAS
authorJeenu Viswambharan <jeenu.viswambharan@arm.com>
Tue, 6 Feb 2018 12:21:39 +0000 (12:21 +0000)
committerJeenu Viswambharan <jeenu.viswambharan@arm.com>
Fri, 4 May 2018 07:33:17 +0000 (08:33 +0100)
  - 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: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
include/plat/arm/common/arm_def.h
plat/arm/common/aarch64/arm_ehf.c
plat/arm/common/aarch64/arm_ras.c [new file with mode: 0644]
plat/arm/common/arm_bl31_setup.c
plat/arm/common/arm_common.mk

index 95e986bf2bf38abfa91f8f75973cf35e0d4c6ae2..d10afaeb7dbafd103d95052c626ec837cad4823e 100644 (file)
 #define PLAT_PERCPU_BAKERY_LOCK_SIZE           (1 * CACHE_WRITEBACK_GRANULE)
 
 /* Priority levels for ARM platforms */
+#define PLAT_RAS_PRI                   0x10
 #define PLAT_SDEI_CRITICAL_PRI         0x60
 #define PLAT_SDEI_NORMAL_PRI           0x70
 
index 785b7bb546197a43e0ca30b7bd69e96b8b773b2b..665871b4add1146850614b8f3beb99e99411c18b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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
  */
  * Enumeration of priority levels on ARM platforms.
  */
 ehf_pri_desc_t arm_exceptions[] = {
+#if RAS_EXTENSION
+       /* RAS Priority */
+       EHF_PRI_DESC(ARM_PRI_BITS, PLAT_RAS_PRI),
+#endif
+
 #if SDEI_SUPPORT
        /* Critical priority SDEI */
        EHF_PRI_DESC(ARM_PRI_BITS, PLAT_SDEI_CRITICAL_PRI),
diff --git a/plat/arm/common/aarch64/arm_ras.c b/plat/arm/common/aarch64/arm_ras.c
new file mode 100644 (file)
index 0000000..80dfaf1
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+ * 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);
index 963c4d2b490db763647371e9c3047b7b97eba261..16ab3d74575e56a64c5feb9842d6c5297db7ea8a 100644 (file)
@@ -14,6 +14,7 @@
 #include <mmio.h>
 #include <plat_arm.h>
 #include <platform.h>
+#include <ras.h>
 
 #define BL31_END (uintptr_t)(&__BL31_END__)
 
@@ -217,6 +218,10 @@ void arm_bl31_platform_setup(void)
 
        /* Initialize power controller before setting up topology */
        plat_arm_pwrc_setup();
+
+#if RAS_EXTENSION
+       ras_init();
+#endif
 }
 
 /*******************************************************************************
index 015e454a125c3ef8f40258666df0e9f847109654..2a787308b06af7935857d196c2499237a8611efc 100644 (file)
@@ -203,6 +203,13 @@ ifeq (${SDEI_SUPPORT},1)
 BL31_SOURCES           +=      plat/arm/common/aarch64/arm_sdei.c
 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)
 
     # Include common TBB sources