-
Notifications
You must be signed in to change notification settings - Fork 0
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
[RFC] Enable Firmware Handoff in Qemu-Arm via bloblist #2
Draft
raymo200915
wants to merge
19
commits into
master
Choose a base branch
from
fw_handoff_bloblist
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
Align bloblist tags with the FW handoff spec v0.9. The most common ones are from 0. TF related ones are from 0x100. All non-standard ones from 0xfff000. Signed-off-by: Simon Glass <sjg@chromium.org> Co-developed-by: Raymond Mao <raymond.mao@linaro.org> Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
The updated bloblist structure stores the alignment as a power-of-two value in its structures. Adjust the API to use this, to avoid needing to calling ilog2(). Drop a stale comment while we are here. Signed-off-by: Simon Glass <sjg@chromium.org> Co-developed-by: Raymond Mao <raymond.mao@linaro.org> Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
raymo200915
force-pushed
the
fw_handoff_bloblist
branch
from
November 27, 2023 20:22
858b1dc
to
8484889
Compare
This uses a new value with spec v0.9 so change it. Signed-off-by: Simon Glass <sjg@chromium.org> Co-developed-by: Raymond Mao <raymond.mao@linaro.org> Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
The new bloblist for v0.9 has version 1 so update this value. Signed-off-by: Simon Glass <sjg@chromium.org> Co-developed-by: Raymond Mao <raymond.mao@linaro.org> Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
These values currently use a simple field. With spec v0.9 they have moved to a packed format. Convert most accesses to use functions, so this change can be accomodated. Signed-off-by: Simon Glass <sjg@chromium.org>
There is no flags value in spec v0.9 so drop it. For now it is still present in the header, with an underscore, so that tests continue to pass. Signed-off-by: Simon Glass <sjg@chromium.org>
There are no spare values in spec v0.9 so drop them. For now they are still present in the headers, with an underscore, so that tests continue to pass. Signed-off-by: Simon Glass <sjg@chromium.org>
Use a sinple 8-bit checksum for bloblist, as specified by the spec version 0.9 Signed-off-by: Simon Glass <sjg@chromium.org>
Spec v0.9 specifies that the entire bloblist area is checksummed, including unused portions. Update the code to follow this. Signed-off-by: Simon Glass <sjg@chromium.org>
Rather than setting the alignment using the header size, add an entirely new entry to cover the gap left by the alignment. Signed-off-by: Simon Glass <sjg@chromium.org>
The v0.9 spec provides for an 8-byte header for each blob, with fewer fields. The blob data start address should be aligned with the alignment specified by the bloblist header. Update the implementation to match this. Signed-off-by: Simon Glass <sjg@chromium.org> Co-developed-by: Raymond Mao <raymond.mao@linaro.org> Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
The v0.9 spec provides for a 16-byte header with fewer fields. Update the implementation to match this. This also adds an alignment field. Signed-off-by: Simon Glass <sjg@chromium.org>
Allow the alignment to be specified when creating a bloblist. Signed-off-by: Simon Glass <sjg@chromium.org>
Align the documentation with the v0.9 spec. Signed-off-by: Simon Glass <sjg@chromium.org>
Standard passage provides for a bloblist to be passed from one firmware phase to the next. That can be used to pass the devicetree along as well. If CONFIG_OF_BOARD is defined, a board custom routine will provide a bloblist or a specified memory address to retrieve the devicetree at runtime. A devicetree from a bloblist is prioritized than the one from specified memory region. Tests for this will be added as part of the Universal Payload work. Signed-off-by: Simon Glass <sjg@chromium.org> Co-developed-by: Raymond Mao <raymond.mao@linaro.org> Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Align used_size and total_size of the bloblist header to the definition of the FW Handoff spec v0.9. Update the related bloblist APIs and UT testcases. Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Add platform custom function to get bloblist from boot arguments. Check whether boot arguments aligns with the register conventions defined in FW Handoff spec v0.9. Add bloblist related options into qemu default config. Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
During bloblist initialization, when CONFIG_OF_BOARD is defined, invoke the platform custom function to load the bloblist via boot arguments from the previous loader. If the bloblist exists, copy it into the fixed bloblist memory region. Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Add flags to bloblist header to align to the FW handoff spec. Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
raymo200915
force-pushed
the
fw_handoff_bloblist
branch
from
November 30, 2023 18:27
8484889
to
a52fe4f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is base on below patch set series, added/amended new commits to align the bloblist APIs with the Firmware Handoff spec , and implemented Qemu-Arm platform custom functions to retrieve bloblist from previous loader via boot arguments when
CONFIG_OF_BOARD
option is enabled.bloblist: Align to firmware handoff
[v2,30/32] fdt: Allow the devicetree to come from a bloblist
It is tested with my patches for TF-A and OP-TEE with a complete Firmware Handoff flow (BL2, BL31, BL32, BL33).
TF-A Patches:
feat(handoff): introduce firmware handoff library
feat(qemu): implement firmware handoff on qemu
feat(handoff): enhance transfer list library
feat(optee): enable transfer list in opteed
feat(qemu): enable transfer list to BL31/32
OP-TEE Patch:
Firmware handoff
fixup of transfer list entry overriding
Update transfer list to align to the spec