Jan Kiszka | e1407fc | 2020-07-14 22:36:59 +0200 | [diff] [blame] | 1 | /* |
Michal Simek | 2a47faa | 2023-04-14 08:43:51 +0200 | [diff] [blame] | 2 | * Copyright (c) 2017-2020, Arm Limited and Contributors. All rights reserved. |
Jan Kiszka | e1407fc | 2020-07-14 22:36:59 +0200 | [diff] [blame] | 3 | * Copyright (c) Siemens AG, 2020-2021 |
| 4 | * |
| 5 | * SPDX-License-Identifier: BSD-3-Clause |
| 6 | */ |
| 7 | |
| 8 | /* SDEI configuration for ARM platforms */ |
| 9 | |
| 10 | #include <bl31/ehf.h> |
| 11 | #include <common/debug.h> |
Prasad Kummari | 536e110 | 2023-06-22 10:50:02 +0530 | [diff] [blame] | 12 | #include <plat/common/platform.h> |
Jan Kiszka | e1407fc | 2020-07-14 22:36:59 +0200 | [diff] [blame] | 13 | #include <services/sdei.h> |
| 14 | |
Jan Kiszka | e1407fc | 2020-07-14 22:36:59 +0200 | [diff] [blame] | 15 | #include <platform_def.h> |
| 16 | |
| 17 | int arm_validate_ns_entrypoint(uintptr_t entrypoint) |
| 18 | { |
Michal Simek | c83d9b3 | 2023-06-07 09:03:23 +0200 | [diff] [blame] | 19 | uint64_t base = BL31_BASE; |
| 20 | uint64_t limit = BL31_LIMIT; |
| 21 | |
| 22 | return (entrypoint < base || entrypoint > limit) ? 0 : -1; |
Jan Kiszka | e1407fc | 2020-07-14 22:36:59 +0200 | [diff] [blame] | 23 | } |
| 24 | |
| 25 | /* Private event mappings */ |
| 26 | static sdei_ev_map_t zynqmp_sdei_private[] = { |
| 27 | SDEI_DEFINE_EVENT_0(ZYNQMP_SDEI_SGI_PRIVATE), |
| 28 | }; |
| 29 | |
| 30 | /* Shared event mappings */ |
| 31 | static sdei_ev_map_t zynqmp_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(zynqmp_sdei_private, zynqmp_sdei_shared); |