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

[Minios-devel] [UNIKRAFT PATCH 2/2] plat/common: Add cpu.h for Arm32



Adds a minimal cpu.h for Arm32 so that linux user space
can be built again.

Signed-off-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
---
 plat/common/include/arm/arm/cpu.h | 39 +++++++++++++++++++++++++++++++++++++++
 plat/common/include/arm/cpu.h     |  4 +++-
 plat/common/include/cpu.h         |  2 +-
 plat/linuxu/setup.c               |  4 +---
 4 files changed, 44 insertions(+), 5 deletions(-)
 create mode 100644 plat/common/include/arm/arm/cpu.h

diff --git a/plat/common/include/arm/arm/cpu.h 
b/plat/common/include/arm/arm/cpu.h
new file mode 100644
index 00000000..697a20a1
--- /dev/null
+++ b/plat/common/include/arm/arm/cpu.h
@@ -0,0 +1,39 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/*
+ * Authors: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
+ *
+ *
+ * Copyright (c) 2019, NEC Laboratories Europe GmbH, NEC Corporation.
+ *                     All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the copyright holder nor the names of its
+ *    contributors may be used to endorse or promote products derived from
+ *    this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY.
+ */
+
+static inline void _init_cpufeatures(void)
+{
+}
diff --git a/plat/common/include/arm/cpu.h b/plat/common/include/arm/cpu.h
index 1c067218..558945f3 100644
--- a/plat/common/include/arm/cpu.h
+++ b/plat/common/include/arm/cpu.h
@@ -35,7 +35,9 @@
 #ifndef __PLAT_CMN_ARM_CPU_H__
 #define __PLAT_CMN_ARM_CPU_H__
 
-#if defined(__ARM_64__)
+#if defined(__ARM_32__)
+#include <arm/arm/cpu.h>
+#elif defined(__ARM_64__)
 #include <arm/arm64/cpu.h>
 #else
 #error "Add cpu.h for current architecture."
diff --git a/plat/common/include/cpu.h b/plat/common/include/cpu.h
index ca2e15e5..ac2f8fe3 100644
--- a/plat/common/include/cpu.h
+++ b/plat/common/include/cpu.h
@@ -38,7 +38,7 @@
 #include <uk/arch/lcpu.h>
 #if defined(__X86_64__)
 #include <x86/cpu.h>
-#elif defined(__ARM_64__)
+#elif defined(__ARM_32__) || defined(__ARM_64__)
 #include <arm/cpu.h>
 #else
 #error "Add cpu.h for current architecture."
diff --git a/plat/linuxu/setup.c b/plat/linuxu/setup.c
index 7849f682..50454437 100644
--- a/plat/linuxu/setup.c
+++ b/plat/linuxu/setup.c
@@ -45,9 +45,7 @@
 #include <uk/plat/bootstrap.h>
 #include <uk/assert.h>
 #include <uk/errptr.h>
-#if defined __X86_64__
-#include <x86/cpu.h>
-#endif
+#include <cpu.h>
 
 struct liblinuxuplat_opts _liblinuxuplat_opts = { 0 };
 
-- 
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®.