On 17.06.26 11:48, Harald Freudenberger wrote:
Move the cpacf sha512 implementation into a new file cpacf_sha512.c. Add this new file to the build and add a new header file cpacf.h containing the prototypes for the s390 cpacf stuff. Signed-off-by: Harald Freudenberger <[email protected]> Tested-by: Holger Dengler <[email protected]>
With the one typo (see below) fixed: Reviewed-by: Finn Callies <[email protected]>
--- target/s390x/tcg/cpacf.h | 16 ++ target/s390x/tcg/cpacf_sha512.c | 245 +++++++++++++++++++++++++++++++ target/s390x/tcg/crypto_helper.c | 227 +--------------------------- target/s390x/tcg/meson.build | 1 + 4 files changed, 263 insertions(+), 226 deletions(-) create mode 100644 target/s390x/tcg/cpacf.h create mode 100644 target/s390x/tcg/cpacf_sha512.c diff --git a/target/s390x/tcg/cpacf.h b/target/s390x/tcg/cpacf.h new file mode 100644 index 0000000000..d27839ddd9 --- /dev/null +++ b/target/s390x/tcg/cpacf.h @@ -0,0 +1,16 @@ +/* + * s390x cpacf + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ + +#ifndef S390X_CPACF_H +#define S390X_CPACF_H + +/* from crypto_sha512.c */
It should be cpacf_sha512.c in the comment instead of crypto_sha512.c
+int cpacf_sha512(CPUS390XState *env, const int mmu_idx, uintptr_t ra, + uint64_t param_addr, uint64_t *message_reg, uint64_t *len_reg, + uint32_t type); +
[ snip ]
