Skip to content

Commit

Permalink
Merge branch 'main-2.x' into mlvisaya/doc-update
Browse files Browse the repository at this point in the history
  • Loading branch information
mlvisaya authored Dec 20, 2024
2 parents 503f774 + 1186ca8 commit 99ad317
Show file tree
Hide file tree
Showing 269 changed files with 14,464 additions and 6,071 deletions.
3 changes: 3 additions & 0 deletions .cargo/config
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
rustflags = [
"-C", "target-feature=+relax",
"-C", "target-feature=+unaligned-scalar-mem",
"-C", "target-feature=+zba",
"-C", "target-feature=+zbb",
"-C", "target-feature=+zbc",
"-C", "target-feature=+zbs",
]
16 changes: 14 additions & 2 deletions .github/workflows/fpga.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ name: FPGA Build
on:
push:
branches: ["main"]
pull_request:
# Disabled in main-2.x until FPGA CI works again.
# pull_request:
workflow_call:
inputs:
artifact-suffix:
Expand All @@ -22,6 +23,9 @@ on:
hw-version:
default: "latest"
type: string
rom-version:
default: "latest"
type: string
workflow_call:
description: 'Set true for workflow_call'
default: true
Expand Down Expand Up @@ -161,6 +165,9 @@ jobs:
run: |
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER="aarch64-linux-gnu-gcc"
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUSTFLAGS="-C link-arg=--sysroot=$FARGO_SYSROOT"
if [ "${{ inputs.rom-version }}" != "latest" ]; then
export CPTRA_CI_ROM_VERSION="${{ inputs.rom-version }}"
fi
if [ "${{ inputs.workflow_call }}" ]; then
FEATURES=fpga_realtime,${{ inputs.extra-features }}
Expand Down Expand Up @@ -428,7 +435,12 @@ jobs:
# echo "Unexpected inputs.rom-logging: ${{ inputs.rom-logging }}"
# exit 1
# fi
# echo CPTRA_ROM_TYPE=${CPTRA_ROM_TYPE}

# if [[ "${{ inputs.workflow_call }}" && "${{ inputs.rom-version }}" != "latest" ]]; then
# VARS+=" CPTRA_CI_ROM_VERSION="${{ inputs.rom-version }}""
# fi

# echo VARS=${VARS}

# COMMON_ARGS=(
# --cargo-metadata="${TEST_BIN}/target/nextest/cargo-metadata.json"
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/fw-test-emu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ on:
rom-logging:
default: true
type: boolean
rom-version:
default: "latest"
type: string

jobs:
build_and_test:
Expand Down Expand Up @@ -57,6 +60,9 @@ jobs:
- name: Run tests
run: |
export CALIPTRA_PREBUILT_FW_DIR=/tmp/caliptra-test-firmware
if [ "${{ inputs.rom-version }}" != "latest" ]; then
export CPTRA_CI_ROM_VERSION="${{ inputs.rom-version }}"
fi
if [ "${{ inputs.rom-logging }}" == "true" ] || [ -z "${{ inputs.rom-logging }}" ]; then
export CPTRA_ROM_TYPE=ROM_WITH_UART
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/nightly-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: 'true'
ref: 'main'
fetch-depth: 0

- name: Find latest release
Expand Down Expand Up @@ -100,7 +99,7 @@ jobs:
with:
artifact-suffix: -fpga-realtime-latest-itrng-nolog
extra-features: slow_tests,itrng
hw-version: latest
hw-version: "latest"
rom-logging: false
fpga-itrng: true

Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/versioned-full-build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Versioned Build Test

on:
workflow_dispatch:
inputs:
hw-version:
default: "latest"
type: string
rom-ref:
default: "main"
type: string
firmware-version:
default: "main"
type: string

pull_request:
inputs:
todo-remove-before-merging:
default: ""
type: string
hw-version:
default: "latest"
type: string
rom-ref:
default: "main"
type: string
firmware-version:
default: "main"
type: string

jobs:
fpga-full-suite-etrng-log:
name: FPGA Suite (etrng, log)

fpga-full-suite-etrng-nolog:
name: FPGA Suite (etrng, nolog)

fpga-full-suite-itrng-log:
name: FPGA Suite (itrng, log)

fpga-full-suite-itrng-nolog:
name: FPGA Suite (itrng, nolog)

sw-emulator-full-suite-etrng-log:
name: sw-emulator Suite (etrng, log)

sw-emulator-full-suite-etrng-nolog:
name: sw-emulator Suite (etrng, nolog)

sw-emulator-full-suite-itrng-log:
name: sw-emulator Suite (itrng, log)

sw-emulator-full-suite-itrng-nolog:
name: sw-emulator Suite (itrng, nolog)

build-release:
runs-on: ubuntu-22.04
permissions:
contents: write
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ hw/fpga/vivado*.log

# libcaliptra build artifacts
libcaliptra/libcaliptra.a

hw-latest/verilated/out/*
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,3 @@
[submodule "hw/latest/i3c-core-rtl"]
path = hw/latest/i3c-core-rtl
url = https://github.com/chipsalliance/i3c-core.git
[submodule "hw/latest/adams-bridge"]
path = hw/latest/adams-bridge
url = https://github.com/chipsalliance/adams-bridge.git
13 changes: 10 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ sha3 = "0.10.8"
smlang = "0.6.0"
syn = "1.0.107"
tinytemplate = "1.1"
tock-registers = "0.8.1"
tock-registers = { git = "https://github.com/tock/tock.git", rev = "b128ae817b86706c8c4e39d27fae5c54b98659f1" }
toml = "0.7.0"
ufmt = { git = "https://github.com/korran/ufmt.git", rev = "1d0743c1ffffc68bc05ca8eeb81c166192863f33", features = ["inline"] }
uio = { version = "0.2.0" }
Expand Down
4 changes: 2 additions & 2 deletions FROZEN_IMAGES.sha384sum
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# WARNING: Do not update this file without the approval of the Caliptra TAC
490c1adcb0f9d2d03335f5eba2c762daf0b7e502aba15d03f12d41b26d74a513d5092200aff516dc009d54579d349217 caliptra-rom-no-log.bin
8ffd1577fa783e15b2a622a11575a5011286f933f2c4a5f267d45a04b93cf5ccd8af01715052b73bdfb5a86a6f2ccf64 caliptra-rom-with-log.bin
df4a72ee4a88d12d7216f8d23c6567b479694dec959e7332d69094098d312ea2dbf35de1117db156635ad41a78bf3c14 caliptra-rom-no-log.bin
02db1204eea812bee28904ce877ec7604746169fa7bfa82471cf10af239852466c1a16b2d5b3b9ad26b4ccfe2ca0a1b5 caliptra-rom-with-log.bin
30 changes: 29 additions & 1 deletion api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,34 @@ pub use soc_mgr::SocManager;

#[derive(Debug, Eq, PartialEq)]
pub enum CaliptraApiError {
ReadBuffTooSmall,
UnableToSetPauser,
UnableToLockMailbox,
UnableToReadMailbox,
BufferTooLargeForMailbox,
UnknownCommandStatus(u32),
MailboxTimeout,
MailboxCmdFailed(u32),
UnexpectedMailboxFsmStatus {
expected: u32,
actual: u32,
},
MailboxRespInvalidFipsStatus(u32),
MailboxRespInvalidChecksum {
expected: u32,
actual: u32,
},
MailboxRespTypeTooSmall,
MailboxReqTypeTooSmall,
MailboxNoResponseData,
MailboxUnexpectedResponseLen {
expected_min: u32,
expected_max: u32,
actual: u32,
},
UploadFirmwareUnexpectedResponse,
UploadMeasurementResponseError,
ReadBuffTooSmall,
FusesAlreadyIniitalized,
FuseDoneNotSet,
StashMeasurementFailed,
}
Loading

0 comments on commit 99ad317

Please sign in to comment.