From: Michal Simek Date: Tue, 18 Apr 2023 12:51:56 +0000 (+0200) Subject: xen: Limit execution to EL1 only X-Git-Url: http://git.dujemihanovic.xyz/%22http:/www.sics.se/static/%7B%7B%20.RelPermalink%20%7D%7D?a=commitdiff_plain;h=b411ba921005f8aa7978dbd1c5fee630c4af298d;p=u-boot.git xen: Limit execution to EL1 only Xen core_init() is calling HVC which should be called from EL1 level that's why do Xen initialization only when U-Boot runs in EL1. Signed-off-by: Michal Simek --- diff --git a/drivers/xen/hypervisor.c b/drivers/xen/hypervisor.c index 16c7c96c94..0b2311ba26 100644 --- a/drivers/xen/hypervisor.c +++ b/drivers/xen/hypervisor.c @@ -264,8 +264,15 @@ void clear_evtchn(uint32_t port) int xen_init(void) { + int el = current_el(); + debug("%s\n", __func__); + if (el != 1) { + puts("XEN:\tnot running from EL1\n"); + return 0; + } + map_shared_info(NULL); init_events(); init_xenbus();