Skip to content

Commit

Permalink
CI: Update Caliptra RTL (#697)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Aug 25, 2023
1 parent 767c26f commit d3a06ea
Show file tree
Hide file tree
Showing 18 changed files with 209 additions and 18 deletions.
2 changes: 1 addition & 1 deletion hw-latest/caliptra-rtl
Submodule caliptra-rtl updated 269 files
2 changes: 1 addition & 1 deletion registers/src/csrng.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Licensed under the Apache-2.0 license.
//
// generated by caliptra_registers_generator with caliptra-rtl repo at 8bb19ac0b1decac7da43fc69aa64eb2a8f22ab7c
// generated by caliptra_registers_generator with caliptra-rtl repo at 76d7c90fc8eab682519676e12d3e1599040df43b
//
#![allow(clippy::erasing_op)]
#![allow(clippy::identity_op)]
Expand Down
2 changes: 1 addition & 1 deletion registers/src/doe.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Licensed under the Apache-2.0 license.
//
// generated by caliptra_registers_generator with caliptra-rtl repo at 8bb19ac0b1decac7da43fc69aa64eb2a8f22ab7c
// generated by caliptra_registers_generator with caliptra-rtl repo at 76d7c90fc8eab682519676e12d3e1599040df43b
//
#![allow(clippy::erasing_op)]
#![allow(clippy::identity_op)]
Expand Down
2 changes: 1 addition & 1 deletion registers/src/dv.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Licensed under the Apache-2.0 license.
//
// generated by caliptra_registers_generator with caliptra-rtl repo at 8bb19ac0b1decac7da43fc69aa64eb2a8f22ab7c
// generated by caliptra_registers_generator with caliptra-rtl repo at 76d7c90fc8eab682519676e12d3e1599040df43b
//
#![allow(clippy::erasing_op)]
#![allow(clippy::identity_op)]
Expand Down
2 changes: 1 addition & 1 deletion registers/src/ecc.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Licensed under the Apache-2.0 license.
//
// generated by caliptra_registers_generator with caliptra-rtl repo at 8bb19ac0b1decac7da43fc69aa64eb2a8f22ab7c
// generated by caliptra_registers_generator with caliptra-rtl repo at 76d7c90fc8eab682519676e12d3e1599040df43b
//
#![allow(clippy::erasing_op)]
#![allow(clippy::identity_op)]
Expand Down
2 changes: 1 addition & 1 deletion registers/src/entropy_src.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Licensed under the Apache-2.0 license.
//
// generated by caliptra_registers_generator with caliptra-rtl repo at 8bb19ac0b1decac7da43fc69aa64eb2a8f22ab7c
// generated by caliptra_registers_generator with caliptra-rtl repo at 76d7c90fc8eab682519676e12d3e1599040df43b
//
#![allow(clippy::erasing_op)]
#![allow(clippy::identity_op)]
Expand Down
2 changes: 1 addition & 1 deletion registers/src/hmac.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Licensed under the Apache-2.0 license.
//
// generated by caliptra_registers_generator with caliptra-rtl repo at 8bb19ac0b1decac7da43fc69aa64eb2a8f22ab7c
// generated by caliptra_registers_generator with caliptra-rtl repo at 76d7c90fc8eab682519676e12d3e1599040df43b
//
#![allow(clippy::erasing_op)]
#![allow(clippy::identity_op)]
Expand Down
2 changes: 1 addition & 1 deletion registers/src/kv.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Licensed under the Apache-2.0 license.
//
// generated by caliptra_registers_generator with caliptra-rtl repo at 8bb19ac0b1decac7da43fc69aa64eb2a8f22ab7c
// generated by caliptra_registers_generator with caliptra-rtl repo at 76d7c90fc8eab682519676e12d3e1599040df43b
//
#![allow(clippy::erasing_op)]
#![allow(clippy::identity_op)]
Expand Down
2 changes: 1 addition & 1 deletion registers/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Licensed under the Apache-2.0 license.
//
// generated by caliptra_registers_generator with caliptra-rtl repo at 8bb19ac0b1decac7da43fc69aa64eb2a8f22ab7c
// generated by caliptra_registers_generator with caliptra-rtl repo at 76d7c90fc8eab682519676e12d3e1599040df43b
//
#![no_std]
#![allow(clippy::erasing_op)]
Expand Down
10 changes: 9 additions & 1 deletion registers/src/mbox.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Licensed under the Apache-2.0 license.
//
// generated by caliptra_registers_generator with caliptra-rtl repo at 8bb19ac0b1decac7da43fc69aa64eb2a8f22ab7c
// generated by caliptra_registers_generator with caliptra-rtl repo at 76d7c90fc8eab682519676e12d3e1599040df43b
//
#![allow(clippy::erasing_op)]
#![allow(clippy::identity_op)]
Expand Down Expand Up @@ -318,6 +318,14 @@ pub mod regs {
pub fn soc_has_lock(&self) -> bool {
((self.0 >> 9) & 1) != 0
}
/// Returns the current read pointer for the mailbox
/// [br]Caliptra Access: RO
/// [br]SOC Access: RO
/// [br]TAP Access [in debug/manuf mode]: RO
#[inline(always)]
pub fn mbox_rdptr(&self) -> u32 {
(self.0 >> 10) & 0x7fff
}
/// Construct a WriteVal that can be used to modify the contents of this register value.
#[inline(always)]
pub fn modify(self) -> StatusWriteVal {
Expand Down
2 changes: 1 addition & 1 deletion registers/src/pv.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Licensed under the Apache-2.0 license.
//
// generated by caliptra_registers_generator with caliptra-rtl repo at 8bb19ac0b1decac7da43fc69aa64eb2a8f22ab7c
// generated by caliptra_registers_generator with caliptra-rtl repo at 76d7c90fc8eab682519676e12d3e1599040df43b
//
#![allow(clippy::erasing_op)]
#![allow(clippy::identity_op)]
Expand Down
2 changes: 1 addition & 1 deletion registers/src/sha256.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Licensed under the Apache-2.0 license.
//
// generated by caliptra_registers_generator with caliptra-rtl repo at 8bb19ac0b1decac7da43fc69aa64eb2a8f22ab7c
// generated by caliptra_registers_generator with caliptra-rtl repo at 76d7c90fc8eab682519676e12d3e1599040df43b
//
#![allow(clippy::erasing_op)]
#![allow(clippy::identity_op)]
Expand Down
2 changes: 1 addition & 1 deletion registers/src/sha512.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Licensed under the Apache-2.0 license.
//
// generated by caliptra_registers_generator with caliptra-rtl repo at 8bb19ac0b1decac7da43fc69aa64eb2a8f22ab7c
// generated by caliptra_registers_generator with caliptra-rtl repo at 76d7c90fc8eab682519676e12d3e1599040df43b
//
#![allow(clippy::erasing_op)]
#![allow(clippy::identity_op)]
Expand Down
2 changes: 1 addition & 1 deletion registers/src/sha512_acc.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Licensed under the Apache-2.0 license.
//
// generated by caliptra_registers_generator with caliptra-rtl repo at 8bb19ac0b1decac7da43fc69aa64eb2a8f22ab7c
// generated by caliptra_registers_generator with caliptra-rtl repo at 76d7c90fc8eab682519676e12d3e1599040df43b
//
#![allow(clippy::erasing_op)]
#![allow(clippy::identity_op)]
Expand Down
185 changes: 184 additions & 1 deletion registers/src/soc_ifc.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Licensed under the Apache-2.0 license.
//
// generated by caliptra_registers_generator with caliptra-rtl repo at 8bb19ac0b1decac7da43fc69aa64eb2a8f22ab7c
// generated by caliptra_registers_generator with caliptra-rtl repo at 76d7c90fc8eab682519676e12d3e1599040df43b
//
#![allow(clippy::erasing_op)]
#![allow(clippy::identity_op)]
Expand Down Expand Up @@ -448,6 +448,7 @@ impl<TMmio: ureg::Mmio> RegisterBlock<TMmio> {
}
}
/// Caliptra HW revision ID that matches the official final release milestone
/// SoC stepping ID is repopulated with the value in the fuse register on every warm reset
/// [br]Caliptra Access: RO
/// [br]SOC Access: RO
///
Expand Down Expand Up @@ -640,6 +641,62 @@ impl<TMmio: ureg::Mmio> RegisterBlock<TMmio> {
)
}
}
/// SOC provided count in cycles for WDT1 timeout.
///
/// Read value: [`u32`]; Write value: [`u32`]
#[inline(always)]
pub fn cptra_wdt_cfg(
&self,
) -> ureg::Array<2, ureg::RegRef<crate::soc_ifc::meta::CptraWdtCfg, &TMmio>> {
unsafe {
ureg::Array::new_with_mmio(
self.ptr.wrapping_add(0x110 / core::mem::size_of::<u32>()),
core::borrow::Borrow::borrow(&self.mmio),
)
}
}
/// Adaptive threshold values for entropy source health tests.
///
/// Read value: [`soc_ifc::regs::CptraItrngEntropyConfig0ReadVal`]; Write value: [`soc_ifc::regs::CptraItrngEntropyConfig0WriteVal`]
#[inline(always)]
pub fn cptra_i_trng_entropy_config_0(
&self,
) -> ureg::RegRef<crate::soc_ifc::meta::CptraItrngEntropyConfig0, &TMmio> {
unsafe {
ureg::RegRef::new_with_mmio(
self.ptr.wrapping_add(0x118 / core::mem::size_of::<u32>()),
core::borrow::Borrow::borrow(&self.mmio),
)
}
}
/// Repetition count value for entropy source health tests.
///
/// Read value: [`soc_ifc::regs::CptraItrngEntropyConfig1ReadVal`]; Write value: [`soc_ifc::regs::CptraItrngEntropyConfig1WriteVal`]
#[inline(always)]
pub fn cptra_i_trng_entropy_config_1(
&self,
) -> ureg::RegRef<crate::soc_ifc::meta::CptraItrngEntropyConfig1, &TMmio> {
unsafe {
ureg::RegRef::new_with_mmio(
self.ptr.wrapping_add(0x11c / core::mem::size_of::<u32>()),
core::borrow::Borrow::borrow(&self.mmio),
)
}
}
/// Set of reserved registers for survivability
///
/// Read value: [`u32`]; Write value: [`u32`]
#[inline(always)]
pub fn cptra_rsvd_reg(
&self,
) -> ureg::Array<2, ureg::RegRef<crate::soc_ifc::meta::CptraRsvdReg, &TMmio>> {
unsafe {
ureg::Array::new_with_mmio(
self.ptr.wrapping_add(0x120 / core::mem::size_of::<u32>()),
core::borrow::Borrow::borrow(&self.mmio),
)
}
}
/// Obfuscated UDS.
/// [br]Caliptra Access: -
/// [br]SOC Access: WL-S
Expand Down Expand Up @@ -2625,6 +2682,120 @@ pub mod regs {
}
}
#[derive(Clone, Copy)]
pub struct CptraItrngEntropyConfig0ReadVal(u32);
impl CptraItrngEntropyConfig0ReadVal {
///
#[inline(always)]
pub fn low_threshold(&self) -> u32 {
(self.0 >> 0) & 0xffff
}
///
#[inline(always)]
pub fn high_threshold(&self) -> u32 {
(self.0 >> 16) & 0xffff
}
/// Construct a WriteVal that can be used to modify the contents of this register value.
#[inline(always)]
pub fn modify(self) -> CptraItrngEntropyConfig0WriteVal {
CptraItrngEntropyConfig0WriteVal(self.0)
}
}
impl From<u32> for CptraItrngEntropyConfig0ReadVal {
#[inline(always)]
fn from(val: u32) -> Self {
Self(val)
}
}
impl From<CptraItrngEntropyConfig0ReadVal> for u32 {
#[inline(always)]
fn from(val: CptraItrngEntropyConfig0ReadVal) -> u32 {
val.0
}
}
#[derive(Clone, Copy)]
pub struct CptraItrngEntropyConfig0WriteVal(u32);
impl CptraItrngEntropyConfig0WriteVal {
///
#[inline(always)]
pub fn low_threshold(self, val: u32) -> Self {
Self((self.0 & !(0xffff << 0)) | ((val & 0xffff) << 0))
}
///
#[inline(always)]
pub fn high_threshold(self, val: u32) -> Self {
Self((self.0 & !(0xffff << 16)) | ((val & 0xffff) << 16))
}
}
impl From<u32> for CptraItrngEntropyConfig0WriteVal {
#[inline(always)]
fn from(val: u32) -> Self {
Self(val)
}
}
impl From<CptraItrngEntropyConfig0WriteVal> for u32 {
#[inline(always)]
fn from(val: CptraItrngEntropyConfig0WriteVal) -> u32 {
val.0
}
}
#[derive(Clone, Copy)]
pub struct CptraItrngEntropyConfig1ReadVal(u32);
impl CptraItrngEntropyConfig1ReadVal {
///
#[inline(always)]
pub fn repetition_count(&self) -> u32 {
(self.0 >> 0) & 0xffff
}
///
#[inline(always)]
pub fn rsvd(&self) -> u32 {
(self.0 >> 16) & 0xffff
}
/// Construct a WriteVal that can be used to modify the contents of this register value.
#[inline(always)]
pub fn modify(self) -> CptraItrngEntropyConfig1WriteVal {
CptraItrngEntropyConfig1WriteVal(self.0)
}
}
impl From<u32> for CptraItrngEntropyConfig1ReadVal {
#[inline(always)]
fn from(val: u32) -> Self {
Self(val)
}
}
impl From<CptraItrngEntropyConfig1ReadVal> for u32 {
#[inline(always)]
fn from(val: CptraItrngEntropyConfig1ReadVal) -> u32 {
val.0
}
}
#[derive(Clone, Copy)]
pub struct CptraItrngEntropyConfig1WriteVal(u32);
impl CptraItrngEntropyConfig1WriteVal {
///
#[inline(always)]
pub fn repetition_count(self, val: u32) -> Self {
Self((self.0 & !(0xffff << 0)) | ((val & 0xffff) << 0))
}
///
#[inline(always)]
pub fn rsvd(self, val: u32) -> Self {
Self((self.0 & !(0xffff << 16)) | ((val & 0xffff) << 16))
}
}
impl From<u32> for CptraItrngEntropyConfig1WriteVal {
#[inline(always)]
fn from(val: u32) -> Self {
Self(val)
}
}
impl From<CptraItrngEntropyConfig1WriteVal> for u32 {
#[inline(always)]
fn from(val: CptraItrngEntropyConfig1WriteVal) -> u32 {
val.0
}
}
#[derive(Clone, Copy)]
pub struct ErrorIntrEnTReadVal(u32);
impl ErrorIntrEnTReadVal {
/// Enable bit for Internal Errors
Expand Down Expand Up @@ -3933,6 +4104,18 @@ pub mod meta {
crate::soc_ifc::regs::CptraXxxxPauserLockReadVal,
crate::soc_ifc::regs::CptraXxxxPauserLockWriteVal,
>;
pub type CptraWdtCfg = ureg::ReadWriteReg32<0, u32, u32>;
pub type CptraItrngEntropyConfig0 = ureg::ReadWriteReg32<
0,
crate::soc_ifc::regs::CptraItrngEntropyConfig0ReadVal,
crate::soc_ifc::regs::CptraItrngEntropyConfig0WriteVal,
>;
pub type CptraItrngEntropyConfig1 = ureg::ReadWriteReg32<
0,
crate::soc_ifc::regs::CptraItrngEntropyConfig1ReadVal,
crate::soc_ifc::regs::CptraItrngEntropyConfig1WriteVal,
>;
pub type CptraRsvdReg = ureg::ReadWriteReg32<0, u32, u32>;
pub type FuseUdsSeed = ureg::WriteOnlyReg32<0, u32>;
pub type FuseFieldEntropy = ureg::WriteOnlyReg32<0, u32>;
pub type FuseKeyManifestPkHash = ureg::ReadWriteReg32<0, u32, u32>;
Expand Down
2 changes: 1 addition & 1 deletion registers/src/soc_ifc_trng.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Licensed under the Apache-2.0 license.
//
// generated by caliptra_registers_generator with caliptra-rtl repo at 8bb19ac0b1decac7da43fc69aa64eb2a8f22ab7c
// generated by caliptra_registers_generator with caliptra-rtl repo at 76d7c90fc8eab682519676e12d3e1599040df43b
//
#![allow(clippy::erasing_op)]
#![allow(clippy::identity_op)]
Expand Down
2 changes: 1 addition & 1 deletion registers/src/spi_host.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Licensed under the Apache-2.0 license.
//
// generated by caliptra_registers_generator with caliptra-rtl repo at 8bb19ac0b1decac7da43fc69aa64eb2a8f22ab7c
// generated by caliptra_registers_generator with caliptra-rtl repo at 76d7c90fc8eab682519676e12d3e1599040df43b
//
#![allow(clippy::erasing_op)]
#![allow(clippy::identity_op)]
Expand Down
2 changes: 1 addition & 1 deletion registers/src/uart.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Licensed under the Apache-2.0 license.
//
// generated by caliptra_registers_generator with caliptra-rtl repo at 8bb19ac0b1decac7da43fc69aa64eb2a8f22ab7c
// generated by caliptra_registers_generator with caliptra-rtl repo at 76d7c90fc8eab682519676e12d3e1599040df43b
//
#![allow(clippy::erasing_op)]
#![allow(clippy::identity_op)]
Expand Down

0 comments on commit d3a06ea

Please sign in to comment.