summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/openssl/openssl/initial-aarch64-bits.patch
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2015-03-04 09:46:48 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-10 10:47:46 +0000
commitf5e4349011bd00aa47d142022dcdd1d1706a9655 (patch)
tree31b2c535de004b08968cfdb57ce085ca3b70eb83 /meta/recipes-connectivity/openssl/openssl/initial-aarch64-bits.patch
parent7c504b44ef593f97f5311d0d27f667e85a2eddbb (diff)
downloadpoky-f5e4349011bd00aa47d142022dcdd1d1706a9655.tar.gz
openssl: Upgrade to 1.0.2
Rebased numerous patches removed aarch64 initial work since it's part of upstream now Imported a few additional patches from Debian to support the version-script and blacklist additional bad certificates. (From OE-Core rev: 10b689033551c37d6cafa284d82bdccd43f6113e) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/openssl/openssl/initial-aarch64-bits.patch')
-rw-r--r--meta/recipes-connectivity/openssl/openssl/initial-aarch64-bits.patch120
1 files changed, 0 insertions, 120 deletions
diff --git a/meta/recipes-connectivity/openssl/openssl/initial-aarch64-bits.patch b/meta/recipes-connectivity/openssl/openssl/initial-aarch64-bits.patch
deleted file mode 100644
index 770097db78..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/initial-aarch64-bits.patch
+++ /dev/null
@@ -1,120 +0,0 @@
1From: Andy Polyakov <appro@openssl.org>
2Date: Sun, 13 Oct 2013 17:15:15 +0000 (+0200)
3Subject: Initial aarch64 bits.
4X-Git-Url: http://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff_plain;h=039081b80977e2a5de84e1f88f8b4d025b559956
5
6Initial aarch64 bits.
7Upstream-Status: backport (will be included in 1.0.2)
8---
9 crypto/bn/bn_lcl.h | 9 +++++++++
10 crypto/md32_common.h | 18 ++++++++++++++++++
11 crypto/modes/modes_lcl.h | 8 ++++++++
12 crypto/sha/sha512.c | 13 +++++++++++++
13 4 files changed, 48 insertions(+)
14
15Index: openssl-1.0.1f/crypto/bn/bn_lcl.h
16===================================================================
17--- openssl-1.0.1f.orig/crypto/bn/bn_lcl.h 2014-01-06 15:47:42.000000000 +0200
18+++ openssl-1.0.1f/crypto/bn/bn_lcl.h 2014-02-28 10:37:55.495979037 +0200
19@@ -300,6 +300,15 @@
20 : "r"(a), "r"(b));
21 # endif
22 # endif
23+# elif defined(__aarch64__) && defined(SIXTY_FOUR_BIT_LONG)
24+# if defined(__GNUC__) && __GNUC__>=2
25+# define BN_UMULT_HIGH(a,b) ({ \
26+ register BN_ULONG ret; \
27+ asm ("umulh %0,%1,%2" \
28+ : "=r"(ret) \
29+ : "r"(a), "r"(b)); \
30+ ret; })
31+# endif
32 # endif /* cpu */
33 #endif /* OPENSSL_NO_ASM */
34
35Index: openssl-1.0.1f/crypto/md32_common.h
36===================================================================
37--- openssl-1.0.1f.orig/crypto/md32_common.h 2014-01-06 15:47:42.000000000 +0200
38+++ openssl-1.0.1f/crypto/md32_common.h 2014-02-28 10:39:21.751979107 +0200
39@@ -213,6 +213,24 @@
40 asm ("bswapl %0":"=r"(r):"0"(r)); \
41 *((unsigned int *)(c))=r; (c)+=4; r; })
42 # endif
43+# elif defined(__aarch64__)
44+# if defined(__BYTE_ORDER__)
45+# if defined(__ORDER_LITTLE_ENDIAN__) && __BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__
46+# define HOST_c2l(c,l) ({ unsigned int r; \
47+ asm ("rev %w0,%w1" \
48+ :"=r"(r) \
49+ :"r"(*((const unsigned int *)(c))));\
50+ (c)+=4; (l)=r; })
51+# define HOST_l2c(l,c) ({ unsigned int r; \
52+ asm ("rev %w0,%w1" \
53+ :"=r"(r) \
54+ :"r"((unsigned int)(l)));\
55+ *((unsigned int *)(c))=r; (c)+=4; r; })
56+# elif defined(__ORDER_BIG_ENDIAN__) && __BYTE_ORDER__==__ORDER_BIG_ENDIAN__
57+# define HOST_c2l(c,l) ((l)=*((const unsigned int *)(c)), (c)+=4, (l))
58+# define HOST_l2c(l,c) (*((unsigned int *)(c))=(l), (c)+=4, (l))
59+# endif
60+# endif
61 # endif
62 # endif
63 #endif
64Index: openssl-1.0.1f/crypto/modes/modes_lcl.h
65===================================================================
66--- openssl-1.0.1f.orig/crypto/modes/modes_lcl.h 2014-02-28 10:47:48.731979011 +0200
67+++ openssl-1.0.1f/crypto/modes/modes_lcl.h 2014-02-28 10:48:49.707978919 +0200
68@@ -29,6 +29,7 @@
69 #if defined(__i386) || defined(__i386__) || \
70 defined(__x86_64) || defined(__x86_64__) || \
71 defined(_M_IX86) || defined(_M_AMD64) || defined(_M_X64) || \
72+ defined(__aarch64__) || \
73 defined(__s390__) || defined(__s390x__)
74 # undef STRICT_ALIGNMENT
75 #endif
76@@ -50,6 +51,13 @@
77 # define BSWAP4(x) ({ u32 ret=(x); \
78 asm ("bswapl %0" \
79 : "+r"(ret)); ret; })
80+# elif defined(__aarch64__)
81+# define BSWAP8(x) ({ u64 ret; \
82+ asm ("rev %0,%1" \
83+ : "=r"(ret) : "r"(x)); ret; })
84+# define BSWAP4(x) ({ u32 ret; \
85+ asm ("rev %w0,%w1" \
86+ : "=r"(ret) : "r"(x)); ret; })
87 # elif (defined(__arm__) || defined(__arm)) && !defined(STRICT_ALIGNMENT)
88 # define BSWAP8(x) ({ u32 lo=(u64)(x)>>32,hi=(x); \
89 asm ("rev %0,%0; rev %1,%1" \
90Index: openssl-1.0.1f/crypto/sha/sha512.c
91===================================================================
92--- openssl-1.0.1f.orig/crypto/sha/sha512.c 2014-01-06 15:47:42.000000000 +0200
93+++ openssl-1.0.1f/crypto/sha/sha512.c 2014-02-28 10:52:14.579978981 +0200
94@@ -55,6 +55,7 @@
95 #if defined(__i386) || defined(__i386__) || defined(_M_IX86) || \
96 defined(__x86_64) || defined(_M_AMD64) || defined(_M_X64) || \
97 defined(__s390__) || defined(__s390x__) || \
98+ defined(__aarch64__) || \
99 defined(SHA512_ASM)
100 #define SHA512_BLOCK_CAN_MANAGE_UNALIGNED_DATA
101 #endif
102@@ -347,6 +348,18 @@
103 asm ("rotrdi %0,%1,%2" \
104 : "=r"(ret) \
105 : "r"(a),"K"(n)); ret; })
106+# elif defined(__aarch64__)
107+# define ROTR(a,n) ({ SHA_LONG64 ret; \
108+ asm ("ror %0,%1,%2" \
109+ : "=r"(ret) \
110+ : "r"(a),"I"(n)); ret; })
111+# if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && \
112+ __BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__
113+# define PULL64(x) ({ SHA_LONG64 ret; \
114+ asm ("rev %0,%1" \
115+ : "=r"(ret) \
116+ : "r"(*((const SHA_LONG64 *)(&(x))))); ret; })
117+# endif
118 # endif
119 # elif defined(_MSC_VER)
120 # if defined(_WIN64) /* applies to both IA-64 and AMD64 */