aboutsummaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
authorTheo Buehler <tb@openbsd.org>2024-11-08 09:22:29 -0700
committerTheo Buehler <tb@openbsd.org>2024-11-08 09:29:50 -0700
commit52b1623c6b4fee563f01ce91d76e2df23ed090c1 (patch)
tree51eb1df43f0c714c2dc0e6a11be70098c934f24a /patches
parent3ade76d86b1bcea9d53307511597d2a17b43239b (diff)
downloadportable-52b1623c6b4fee563f01ce91d76e2df23ed090c1.tar.gz
portable-52b1623c6b4fee563f01ce91d76e2df23ed090c1.tar.bz2
portable-52b1623c6b4fee563f01ce91d76e2df23ed090c1.zip
Hook up new aarch64 feature detection
Diffstat (limited to 'patches')
-rw-r--r--patches/patch-aarch64-crypto-cpu-caps.c.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/patches/patch-aarch64-crypto-cpu-caps.c.patch b/patches/patch-aarch64-crypto-cpu-caps.c.patch
new file mode 100644
index 0000000..2a1006e
--- /dev/null
+++ b/patches/patch-aarch64-crypto-cpu-caps.c.patch
@@ -0,0 +1,39 @@
1Disable feature detection until we find a more portable way.
2
3--- crypto/arch/aarch64/crypto_cpu_caps.c Fri Nov 8 09:23:31 2024
4--- crypto/arch/aarch64/crypto_cpu_caps.c Fri Nov 8 09:02:47 2024
5@@ -16,9 +16,12 @@
6 */
7
8 #include <sys/types.h>
9+
10+#if defined(__OpenBSD__)
11 #include <sys/sysctl.h>
12
13 #include <machine/cpu.h>
14+#endif
15
16 #include <stddef.h>
17 #include <stdio.h>
18@@ -66,6 +69,7 @@
19 return caps;
20 }
21
22+#if defined(__OpenBSD__)
23 static int
24 read_isar0(uint64_t *isar0)
25 {
26@@ -83,6 +87,13 @@
27
28 return 1;
29 }
30+#else
31+static int
32+read_isar0(uint64_t *isar0)
33+{
34+ return 0;
35+}
36+#endif
37
38 void
39 crypto_cpu_caps_init(void)