wolfssl icon indicating copy to clipboard operation
wolfssl copied to clipboard

Versal bringup

Open sjaeckel opened this issue 3 years ago • 9 comments

Description

Complete port to Xilinx Versal with support for the AES-GCM, ECDSA, RSA, TRNG and SHA3-384 engines.

~The first part of this PR is handled in #5165~ Edit: This is now all handled in this PR.

Testing

Tested on the VMK180.

Checklist

  • [x] added tests
  • [ ] updated/added doxygen
  • [ ] updated appropriate READMEs
  • [ ] Updated manual and documentation

sjaeckel avatar May 23 '22 14:05 sjaeckel

Can one of the wolfSSL admins verify this patch?

wolfSSL-Bot avatar May 23 '22 15:05 wolfSSL-Bot

ok to test

JacobBarthelmeh avatar May 23 '22 15:05 JacobBarthelmeh

Test app and benchmark ran for me on a VMK180 device.

JacobBarthelmeh avatar Sep 14 '22 20:09 JacobBarthelmeh

We will need to squash this commit. Found some whitespace issues:

[...]
./wolfssl/wolfcrypt/settings.h:2758:»(defined(HAVE_PKCS11) || defined(HAVE_PK_CALLBACKS) || \
./wolfssl/wolfcrypt/settings.h:2759:» defined(WOLF_CRYPTO_CB) || defined(WOLFSSL_KCAPI))
./wolfssl/wolfcrypt/settings.h:2760:» /* Enables support for using wolfSSL_CTX_use_PrivateKey_Id and
./wolfssl/wolfcrypt/settings.h:2761:»  *   wolfSSL_CTX_use_PrivateKey_Label */
./wolfssl/wolfcrypt/settings.h:2762:»#define WOLF_PRIVATE_KEY_ID
./scripts/bench/bench_functions.sh:18:»[ "$my_path" != "" ] || { echo "\$my_path must not be empty"; return 1; }
[...]
  1. how is this checked? I couldn't find a way to run that myself. (Also shouldn't this be a CI job!?)
  2. those mentioned issues in ./wolfssl/wolfcrypt/settings.h were already fixed in 0603031

I've replaced the tabs and fixed the indentation of the changes in this PR. How should I proceed? I can add another commit on top of the existing ones or I've also been able to fixup most of the original commits. What do you prefer?

I'll also wait for an answer to #5166 (comment) until I push those latest changes.

This is an internal script we use ../testing/git-hooks/wolfssl-multi-test.sh check-source-text that will soon be added to the PRB and nightly tests.

For the squash merge see git merge --squash. We can also do it on merge in GitHub, but it looses some author history.

dgarske avatar Sep 15 '22 16:09 dgarske

@sjaeckel

./wolfcrypt/src/include.am:              wolfcrypt/src/port/xilinx/xil-versal-glue.c \
./wolfcrypt/src/include.am:              wolfcrypt/src/port/xilinx/xil-versal-trng.c \
./wolfssl/wolfcrypt/include.am:                         wolfssl/wolfcrypt/port/xilinx/xil-versal-glue.h \
./wolfssl/wolfcrypt/include.am:                         wolfssl/wolfcrypt/port/xilinx/xil-versal-trng.h \
AUTOCONF NEW FILE DETECTOR FAILED!

dgarske avatar Sep 19 '22 15:09 dgarske

@sjaeckel

./wolfcrypt/src/include.am:              wolfcrypt/src/port/xilinx/xil-versal-glue.c \
./wolfcrypt/src/include.am:              wolfcrypt/src/port/xilinx/xil-versal-trng.c \
./wolfssl/wolfcrypt/include.am:                         wolfssl/wolfcrypt/port/xilinx/xil-versal-glue.h \
./wolfssl/wolfcrypt/include.am:                         wolfssl/wolfcrypt/port/xilinx/xil-versal-trng.h \
AUTOCONF NEW FILE DETECTOR FAILED!

Disregard.. that was a failure from prior commit. It passed now with latest.

dgarske avatar Sep 19 '22 16:09 dgarske

@sjaeckel thanks for getting this done, I was looking for a successful bringup PR

how can I (easily) get a patchset for this (like the link provided in the email notification on the very 1st comment)

paulwratt avatar Sep 21 '22 11:09 paulwratt

how can I (easily) get a patchset for this (like the link provided in the email notification on the very 1st comment)

If you really need a patch file I guess the easiest would be to download the patch generated by GitHub via https://github.com/wolfSSL/wolfssl/pull/5166.patch

or do you mean something more official? :)

sjaeckel avatar Sep 21 '22 11:09 sjaeckel

no, thats the one, its for a reference.

I was just on a thread on the wolfssl/wolfboot repo and noticed at the bottom of the page it says (like the link you provide) "add .patch or .diff" but it does not say that here (maybe because its a rotating ProTip) .. Thanks

paulwratt avatar Sep 21 '22 11:09 paulwratt