-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support keystone on CVA6 #396
support keystone on CVA6 #396
Conversation
I just merge the branch to the latest master. I also want to highlight the issue in the CI run beb530d
it seems the flow in the CI is not yet updated to use the |
Hi @asyarifstudio ! Thank you so much for your PR. I haven't had much spare capacity for reviewing these past few weeks, but things have eased up so I'll make sure to give this a good look in the next few days |
Okay, I've taken a look at this patchset. Again, thank you very much for your contributions -- its exciting to have people participate in this project. A couple of high-level notes:
One potential layout could be:
Then, |
Hi @grg-haas Regarding the point 1, 3 and layout in general, I think a platform or board specific folder has to be in the root for better visibility. putting them under Regarding point 2, the files from cva6-sdk. I agree with you. However some patches are not working with Keystone because different version of Linux. I will link the rest of the files to cva6-sdk |
Hi @asyarifstudio, That's a very good point with regard to discoverability. One of my long-term plans with this Buildroot build system is to split For now though, I take your point. The |
Hi @grg-haas Understood, I will move the |
5ac0084
to
b9db326
Compare
hi @grg-haas I also want to propose the naming convention for additional board buildroot configuration. I saw for sifive unmatched, an if statement has to be added
I think we can avoid this by generalize the buildroot config name
with this, no changes is needed in the Makefile when new buildroot config is added. However we need to do two things for qemu target
I can implement this together in this PR. I already did actually but it seems to be removed after I rebase. what do you think? |
@asyarifstudio I love this idea! Please remember to also change @dayeol , any opposition to renaming the |
great. I will include this in my PR. we can adjust later if necessary |
Hi @grg-haas few notes on the update
|
Thanks for these changes, they broadly look good. A few clarification questions:
diff --git a/examples/attestation/CMakeLists.txt b/examples/attestation/CMakeLists.txt
index 710c4ec..a700e7f 100644
--- a/examples/attestation/CMakeLists.txt
+++ b/examples/attestation/CMakeLists.txt
@@ -3,7 +3,6 @@ set(eapp_src eapp/attestor.c)
set(host_bin attestor-runner)
set(host_src host/attestor-runner.cpp host/host.cpp host/verifier.cpp)
set(package_name "attestor.ke")
-set(package_script "./attestor-runner attestor eyrie-rt loader.bin --sm-bin fw_jump.bin")
set(eyrie_plugins "none")
# eapp
@@ -41,6 +40,9 @@ if(NOT DEFINED fw_bin)
set(fw_bin ../../../images/fw_jump.bin)
endif()
+get_filename_component(fw_file ${fw_bin} NAME)
+set(package_script "./attestor-runner attestor eyrie-rt loader.bin --sm-bin ${fw_file}")
+
# add target for packaging (see keystone.cmake)
add_keystone_package(${eapp_bin}-package
diff --git a/overlays/keystone/package/keystone-examples/keystone-examples.mk b/overlays/keystone/package/keystone-examples/keystone-examples.mk
index c95c746..c887dc2 100644
--- a/overlays/keystone/package/keystone-examples/keystone-examples.mk
+++ b/overlays/keystone/package/keystone-examples/keystone-examples.mk
@@ -11,6 +11,10 @@ include $(KEYSTONE)/mkutils/pkg-keystone.mk
endif
KEYSTONE_EXAMPLES_DEPENDENCIES += host-keystone-sdk keystone-runtime opensbi
+ifeq ($(KEYSTONE_PLATFORM),cva6)
+KEYSTONE_EXAMPLES_CONF_OPTS += -Dfw_bin=$(BINARIES_DIR)/fw_payload.bin
+endif
+
KEYSTONE_EXAMPLES_CONF_OPTS += -DKEYSTONE_SDK_DIR=$(HOST_DIR)/usr/share/keystone/sdk \
-DKEYSTONE_EYRIE_RUNTIME=$(KEYSTONE_RUNTIME_BUILDDIR) \
-DKEYSTONE_BITS=${KEYSTONE_BITS} |
Hi @grg-haas Thanks a lot for your feedback. to answer your question
|
This reverts commit e5343cb4333d3286ef77a3cfc03716236bed4cdf.
fc7021a
to
1d68518
Compare
Hi @asyarifstudio, thanks for these changes! This looks really good -- I am just about ready to merge this. I've made a PR in your fork (ThalesGroup#1) to pull these changes for cva6 into the recently integrated CI. Once that PR is merged into your fork's I was trying to think of ways that we can also do full end-to-end system tests of Keystone on CVA6. For |
Hi @grg-haas Thanks a lot. It's nice that the CI is back so we can make sure that no build is broken. I let the build run on your PR, but there seems to be issue on build generic 32 I'm not very familiar with the CI, perhaps if you can help to share the log so I can analyze it and fix the issue. on the second point. We tested the keystone on Genesys2 Board. I personally never tried the |
CI support for CVA6
Hi @asyarifstudio, That test is kinda flaky -- sometimes, just rerunning it will make it pass. I'm not necessarily too worried about it. I've approved CI for this PR to also run in this repo, so we'll see how that turns out -- I don't expect any issues. If it passes I am comfortable with merging these changes! And sounds good on the CVA6 CI note. I was also just curious about this, so no need to ask around if it is a large effort. |
The pull request contains changes to support running keystone on CVA6 with Genesys 2 Board.
On top of that, this pull request also
Several notes in this Pull request
Let me know if you have any comment