summaryrefslogtreecommitdiff
path: root/drivers/xen
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@amd.com>2023-04-18 14:51:56 +0200
committerTom Rini <trini@konsulko.com>2023-04-25 15:31:28 -0400
commitb411ba921005f8aa7978dbd1c5fee630c4af298d (patch)
tree82a3a620a424ffdfd67c61ac25d138c2fdbe8695 /drivers/xen
parent539486787ec8bd9337c497171ff8bd67625a51a9 (diff)
downloadu-boot-b411ba921005f8aa7978dbd1c5fee630c4af298d.tar.gz
u-boot-b411ba921005f8aa7978dbd1c5fee630c4af298d.tar.bz2
u-boot-b411ba921005f8aa7978dbd1c5fee630c4af298d.zip
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 <michal.simek@amd.com>
Diffstat (limited to 'drivers/xen')
-rw-r--r--drivers/xen/hypervisor.c7
1 files changed, 7 insertions, 0 deletions
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();