-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upstream: SHA2 reworking and API for iterating
over multiple implementations The changes in the shared files to enable macOS support to PR Signed-off-by: Jorgen Lundman <[email protected]>
- Loading branch information
Showing
11 changed files
with
89 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,13 +18,14 @@ | |
* Portions Copyright (c) 2022 Tino Reichardt <[email protected]> | ||
* - modified assembly to fit into OpenZFS | ||
*/ | ||
#include <sys/asm_linkage.h> | ||
|
||
#if defined(__aarch64__) | ||
|
||
.text | ||
SECTION_TEXT | ||
|
||
.align 6 | ||
.type .LK512,%object | ||
.balign 64 | ||
SET_OBJ(.LK512) | ||
.LK512: | ||
.quad 0x428a2f98d728ae22,0x7137449123ef65cd | ||
.quad 0xb5c0fbcfec4d3b2f,0xe9b5dba58189dbbc | ||
|
@@ -67,13 +68,17 @@ | |
.quad 0x4cc5d4becb3e42b6,0x597f299cfc657e2a | ||
.quad 0x5fcb6fab3ad6faec,0x6c44198c4a475817 | ||
.quad 0 // terminator | ||
.size .LK512,.-.LK512 | ||
SET_SIZE(.LK512) | ||
|
||
#ifdef __APPLE__ | ||
ENTRY_ALIGN(zfs_sha512_block_armv7, 64) | ||
#else | ||
.globl zfs_sha512_block_armv7 | ||
.type zfs_sha512_block_armv7,%function | ||
.align 6 | ||
zfs_sha512_block_armv7: | ||
hint #34 // bti c | ||
#endif | ||
stp x29,x30,[sp,#-128]! | ||
add x29,sp,#0 | ||
|
||
|
@@ -1034,14 +1039,18 @@ zfs_sha512_block_armv7: | |
ldp x27,x28,[x29,#80] | ||
ldp x29,x30,[sp],#128 | ||
ret | ||
.size zfs_sha512_block_armv7,.-zfs_sha512_block_armv7 | ||
SET_SIZE(zfs_sha512_block_armv7) | ||
|
||
|
||
#ifdef __APPLE__ | ||
ENTRY_ALIGN(zfs_sha512_block_armv8, 64) | ||
#else | ||
.globl zfs_sha512_block_armv8 | ||
.type zfs_sha512_block_armv8,%function | ||
.align 6 | ||
zfs_sha512_block_armv8: | ||
hint #34 // bti c | ||
#endif | ||
.Lv8_entry: | ||
// Armv8.3-A PAuth: even though x30 is pushed to stack it is not popped later | ||
stp x29,x30,[sp,#-16]! | ||
|
@@ -1063,7 +1072,7 @@ zfs_sha512_block_armv8: | |
rev64 v23.16b,v23.16b | ||
b .Loop_hw | ||
|
||
.align 4 | ||
.balign 16 | ||
.Loop_hw: | ||
ld1 {v24.2d},[x3],#16 | ||
subs x2,x2,#1 | ||
|
@@ -1556,5 +1565,5 @@ zfs_sha512_block_armv8: | |
|
||
ldr x29,[sp],#16 | ||
ret | ||
.size zfs_sha512_block_armv8,.-zfs_sha512_block_armv8 | ||
SET_SIZE(zfs_sha512_block_armv8) | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters