aboutsummaryrefslogtreecommitdiff
path: root/host/include
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2023-05-18 03:50:45 +0000
committerRichard Henderson <richard.henderson@linaro.org>2023-05-23 16:51:18 -0700
commit0dd0c7fa2055d5f95413b510386753bb00d61202 (patch)
treef31d85057cfa62ac232f70f9984aca4e3061a752 /host/include
parentb5c0d842d6ea6456bdabfdff5ce853be296cf234 (diff)
util: Add cpuinfo-aarch64.c
Move the code from tcg/. The only use of these bits so far is with respect to the atomicity of tcg operations. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'host/include')
-rw-r--r--host/include/aarch64/host/cpuinfo.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/host/include/aarch64/host/cpuinfo.h b/host/include/aarch64/host/cpuinfo.h
new file mode 100644
index 0000000000..82227890b4
--- /dev/null
+++ b/host/include/aarch64/host/cpuinfo.h
@@ -0,0 +1,22 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ * Host specific cpu indentification for AArch64.
+ */
+
+#ifndef HOST_CPUINFO_H
+#define HOST_CPUINFO_H
+
+#define CPUINFO_ALWAYS (1u << 0) /* so cpuinfo is nonzero */
+#define CPUINFO_LSE (1u << 1)
+#define CPUINFO_LSE2 (1u << 2)
+
+/* Initialized with a constructor. */
+extern unsigned cpuinfo;
+
+/*
+ * We cannot rely on constructor ordering, so other constructors must
+ * use the function interface rather than the variable above.
+ */
+unsigned cpuinfo_init(void);
+
+#endif /* HOST_CPUINFO_H */