summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/nss/nss/0001-freebl-add-a-configure-option-to-disable-ARM-HW-cryp.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/nss/nss/0001-freebl-add-a-configure-option-to-disable-ARM-HW-cryp.patch')
-rw-r--r--meta/recipes-support/nss/nss/0001-freebl-add-a-configure-option-to-disable-ARM-HW-cryp.patch52
1 files changed, 0 insertions, 52 deletions
diff --git a/meta/recipes-support/nss/nss/0001-freebl-add-a-configure-option-to-disable-ARM-HW-cryp.patch b/meta/recipes-support/nss/nss/0001-freebl-add-a-configure-option-to-disable-ARM-HW-cryp.patch
deleted file mode 100644
index c380c14491..0000000000
--- a/meta/recipes-support/nss/nss/0001-freebl-add-a-configure-option-to-disable-ARM-HW-cryp.patch
+++ /dev/null
@@ -1,52 +0,0 @@
1From 5595e9651aca39af945931c73eb524a0f8bd130d Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Wed, 18 Dec 2019 12:29:50 +0100
4Subject: [PATCH] freebl: add a configure option to disable ARM HW crypto
5
6Not all current hardware supports it, particularly anything
7prior to armv8 does not.
8
9Upstream-Status: Pending
10Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
11---
12 nss/lib/freebl/Makefile | 3 +++
13 1 file changed, 3 insertions(+)
14
15--- a/nss/lib/freebl/Makefile
16+++ b/nss/lib/freebl/Makefile
17@@ -125,6 +125,9 @@ else
18 DEFINES += -DNSS_X86
19 endif
20 endif
21+
22+ifdef NSS_USE_ARM_HW_CRYPTO
23+ DEFINES += -DNSS_USE_ARM_HW_CRYPTO
24 ifeq ($(CPU_ARCH),aarch64)
25 DEFINES += -DUSE_HW_AES
26 EXTRA_SRCS += aes-armv8.c gcm-aarch64.c
27@@ -146,6 +149,7 @@ ifeq ($(CPU_ARCH),arm)
28 endif
29 endif
30 endif
31+endif
32
33 ifeq ($(OS_TARGET),OSF1)
34 DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_NO_MP_WORD
35--- a/nss/lib/freebl/gcm.c
36+++ b/nss/lib/freebl/gcm.c
37@@ -17,6 +17,7 @@
38
39 #include <limits.h>
40
41+#ifdef NSS_USE_ARM_HW_CRYPTO
42 /* old gcc doesn't support some poly64x2_t intrinsic */
43 #if defined(__aarch64__) && defined(IS_LITTLE_ENDIAN) && \
44 (defined(__clang__) || defined(__GNUC__) && __GNUC__ > 6)
45@@ -25,6 +26,7 @@
46 /* We don't test on big endian platform, so disable this on big endian. */
47 #define USE_ARM_GCM
48 #endif
49+#endif
50
51 /* Forward declarations */
52 SECStatus gcm_HashInit_hw(gcmHashContext *ghash);