Commit 5a715ae1 authored by Madhukar Pappireddy's avatar Madhukar Pappireddy Committed by TrustedFirmware Code Review
Browse files

Merge "plat: imx: add sdei support for i.MX8MM" into integration

parents e4c83756 8567103e
/*
* Copyright 2020 NXP
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <bl31/ehf.h>
#include <platform_def.h>
ehf_pri_desc_t imx_exceptions[] = {
#if SDEI_SUPPORT
/* Critical priority SDEI */
EHF_PRI_DESC(PLAT_PRI_BITS, PLAT_SDEI_CRITICAL_PRI),
/* Normal priority SDEI */
EHF_PRI_DESC(PLAT_PRI_BITS, PLAT_SDEI_NORMAL_PRI),
#endif
};
/* Plug in ARM exceptions to Exception Handling Framework. */
EHF_REGISTER_PRIORITIES(imx_exceptions, ARRAY_SIZE(imx_exceptions), PLAT_PRI_BITS);
/*
* Copyright (c) 2017-2020, ARM Limited and Contributors. All rights reserved.
* Copyright 2020 NXP
*
* SPDX-License-Identifier: BSD-3-Clause
*/
/* SDEI configuration for ARM platforms */
#include <bl31/ehf.h>
#include <common/debug.h>
#include <services/sdei.h>
#include <lib/utils_def.h>
#include <platform_def.h>
/* Private event mappings */
static sdei_ev_map_t imx_sdei_private[] = {
SDEI_DEFINE_EVENT_0(PLAT_SDEI_SGI_PRIVATE),
};
/* Shared event mappings */
static sdei_ev_map_t imx_sdei_shared[] = {
};
void plat_sdei_setup(void)
{
INFO("SDEI platform setup\n");
}
/* Export ARM SDEI events */
REGISTER_SDEI_MAP(imx_sdei_private, imx_sdei_shared);
......@@ -22,6 +22,10 @@ uintptr_t rdistif_base_addrs[PLATFORM_CORE_COUNT];
static const interrupt_prop_t g01s_interrupt_props[] = {
INTR_PROP_DESC(8, GIC_HIGHEST_SEC_PRIORITY,
INTR_GROUP0, GIC_INTR_CFG_LEVEL),
#if SDEI_SUPPORT
INTR_PROP_DESC(PLAT_SDEI_SGI_PRIVATE, PLAT_SDEI_NORMAL_PRI,
INTR_GROUP0, GIC_INTR_CFG_LEVEL),
#endif
};
static unsigned int plat_imx_mpidr_to_core_pos(unsigned long mpidr)
......
......@@ -29,6 +29,11 @@
#define PLAT_WAIT_RET_STATE U(1)
#define PLAT_STOP_OFF_STATE U(3)
#define PLAT_PRI_BITS U(3)
#define PLAT_SDEI_CRITICAL_PRI 0x10
#define PLAT_SDEI_NORMAL_PRI 0x20
#define PLAT_SDEI_SGI_PRIVATE U(9)
#define BL31_BASE U(0x920000)
#define BL31_LIMIT U(0x940000)
......
......@@ -29,6 +29,8 @@ BL31_SOURCES += plat/imx/common/imx8_helpers.S \
plat/imx/common/imx_sip_handler.c \
plat/imx/common/imx_sip_svc.c \
plat/imx/common/imx_uart_console.S \
plat/imx/common/imx_ehf.c \
plat/imx/common/imx_sdei.c \
lib/xlat_tables/aarch64/xlat_tables.c \
lib/xlat_tables/xlat_tables_common.c \
lib/cpus/aarch64/cortex_a53.S \
......@@ -53,3 +55,6 @@ $(eval $(call add_define,BL32_SIZE))
IMX_BOOT_UART_BASE ?= 0x30890000
$(eval $(call add_define,IMX_BOOT_UART_BASE))
EL3_EXCEPTION_HANDLING := 1
SDEI_SUPPORT := 1
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