Skip to content
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

Cherry pick commits from main [12/19-1/30] #1969

Merged
merged 11 commits into from
Feb 19, 2025
Merged

Conversation

mhatrevi
Copy link
Collaborator

This does not have the fa6b1a9 which will be added later.

mhatrevi and others added 4 commits February 16, 2025 19:19
* Reserve a portion of DCCM for future changes to PersistentData.
* Remove most hard coded addresses in memory layout.
* Reserved 19KiB in `PersistentData`.
* Left 8K in the Data section. Currently less than 4KiB is being used.

This resolves #1662.

(cherry picked from commit e09efb5)
FMC and RT SVNs are controlled by the vendor. Add an option to the image
builder to specify these SVNs from the command-line.

(cherry picked from commit 9ea287b)
Currently `rand_bytes` is only used on a buffer < than 48 bytes.

If used with a buffer larger than 48 bytes a panic is introduced to the
Caliptra runtime due to bounds checking.

This change uses a chunks iterator instead. Each chunk is guaranteed to
be 48 bytes except for the last chunk which contains the remainder.

(cherry picked from commit 9a26b8b)
This can be useful for offline/external signing to extract the digests
for an image bundle to be passed to the signing interface.

The output is a JSON file with the vendor and owner hashes tagged with
their respective names.

This was tested by printing the hash from the ROM in the smoke tests to
ensure the calculated hash is the same for both the firmware and tool.

(cherry picked from commit 6f0a823)
@mhatrevi mhatrevi force-pushed the vmhatre/cherry-pick-2-18 branch from 40c92c2 to 8d6a92c Compare February 19, 2025 00:04
jhand2 and others added 7 commits February 18, 2025 17:04
Creates an image bundle with FMC and Runtime populated with zeros. 0 is
an ilegal opcode in risc-v, so the image will immediately NMI.

This is useful for testing production signing infrastructure. A
production key can be used to sign this image before an official
release is ready. The prod-signed zeros binary is benign but can
be used to ensure that the prod key was loaded into fuses correctly.

(cherry picked from commit 85b732a)
Sometimes when results are unwrapped, the compiler will memcopy the
Ok struct. okref will instead borrow the inner type.

Using this on the packet struct saves about 4KiB of stack space.

(cherry picked from commit 2d659cb)
(cherry picked from commit 77823a1)
Checking that byte slice is utf-8 requires a significant amount of code
space. By enforcing ascii this space can be saved at the cost of using
subject alt names that contain non-ascii utf-8 characters.

(cherry picked from commit f17528a)
@mhatrevi mhatrevi force-pushed the vmhatre/cherry-pick-2-18 branch from 8d6a92c to 99d941a Compare February 19, 2025 01:05
@mhatrevi mhatrevi marked this pull request as ready for review February 19, 2025 01:51
@mhatrevi mhatrevi changed the title Cherry pick commits from main [12/19-2/10] Cherry pick commits from main [12/19-1/30] Feb 19, 2025
@mhatrevi mhatrevi added the Caliptra v2.0 Items to be considered for v2.0 Release label Feb 19, 2025
Copy link
Contributor

@swenson swenson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one question

@mhatrevi mhatrevi merged commit c402172 into main-2.x Feb 19, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Caliptra v2.0 Items to be considered for v2.0 Release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants