1 /* SPDX-License-Identifier: BSD-3-Clause */ 2 /* 3 * Copyright (C) 2024, Charleye <wangkart@aliyun.com> 4 * All rights reserved. 5 */ 6 7 /* SDEI configuration for ARM platforms */ 8 9 #include <bl31/ehf.h> 10 #include <common/debug.h> 11 #include <plat/common/platform.h> 12 #include <services/sdei.h> 13 14 #include <platform_def.h> 15 16 int arm_validate_ns_entrypoint(uintptr_t entrypoint) 17 { 18 uint64_t base = BL31_BASE; 19 uint64_t limit = BL31_LIMIT; 20 21 return (entrypoint < base || entrypoint > limit) ? 0 : -1; 22 } 23 24 /* Private event mappings */ 25 static sdei_ev_map_t lua_sdei_private[] = { 26 SDEI_DEFINE_EVENT_0(LUA_SDEI_SGI_PRIVATE), 27 SDEI_EXPLICIT_EVENT(5001, SDEI_MAPF_NORMAL), 28 }; 29 30 /* Shared event mappings */ 31 static sdei_ev_map_t lua_sdei_shared[] = { 32 }; 33 34 void plat_sdei_setup(void) 35 { 36 INFO("SDEI platform setup\n"); 37 } 38 39 /* Export ARM SDEI events */ 40 REGISTER_SDEI_MAP(lua_sdei_private, lua_sdei_shared);