[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT PATCH 2/2] plat/xen: CPU definition for Arm32



Introduce minimal CPU definitons to enable compiling for Arm32.
This commits also removes x86 specific CPU functions from the
Arm32 build unit.

Signed-off-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
---
 plat/common/include/arm/arm/cpu.h | 12 +++++++++++-
 plat/xen/Makefile.uk              |  4 ++--
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/plat/common/include/arm/arm/cpu.h 
b/plat/common/include/arm/arm/cpu.h
index 697a20a1..bc4d413c 100644
--- a/plat/common/include/arm/arm/cpu.h
+++ b/plat/common/include/arm/arm/cpu.h
@@ -1,8 +1,9 @@
 /* SPDX-License-Identifier: BSD-3-Clause */
 /*
  * Authors: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
+ * Authors: Wei Chen <wei.chen@xxxxxxx>
  *
- *
+ * Copyright (c) 2018, Arm Ltd. All rights reserved.
  * Copyright (c) 2019, NEC Laboratories Europe GmbH, NEC Corporation.
  *                     All rights reserved.
  *
@@ -37,3 +38,12 @@
 static inline void _init_cpufeatures(void)
 {
 }
+
+/*
+ * Halts the CPU until the next external interrupt is fired. For Arm,
+ * we can use WFI to implement this feature.
+ */
+static inline void halt(void)
+{
+       __asm__ __volatile__("wfi");
+}
diff --git a/plat/xen/Makefile.uk b/plat/xen/Makefile.uk
index 7a3fcc93..5bde25f3 100644
--- a/plat/xen/Makefile.uk
+++ b/plat/xen/Makefile.uk
@@ -49,9 +49,9 @@ LIBXENPLAT_SRCS-$(CONFIG_ARCH_X86_64) += 
$(LIBXENPLAT_BASE)/x86/arch_time.c
 ifneq ($(XEN_HVMLITE),y)
 LIBXENPLAT_ASFLAGS-y           += -DCONFIG_PARAVIRT
 LIBXENPLAT_CFLAGS-y            += -DCONFIG_PARAVIRT
-LIBXENPLAT_SRCS-y              += $(LIBXENPLAT_BASE)/x86/cpu_pv.c
+LIBXENPLAT_SRCS-$(CONFIG_ARCH_X86_64) += $(LIBXENPLAT_BASE)/x86/cpu_pv.c
 else
-LIBXENPLAT_SRCS-y              += $(UK_PLAT_COMMON_BASE)/x86/cpu_native.c
+LIBXENPLAT_SRCS-$(CONFIG_ARCH_X86_64) += 
$(UK_PLAT_COMMON_BASE)/x86/cpu_native.c
 endif
 
 LIBXENPLAT_SRCS-$(CONFIG_ARCH_ARM_32) += $(LIBXENPLAT_BASE)/arm/setup.c
-- 
2.11.0


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.