Caliptra Hardware Specification
- -Version 0.5
- - - -# Scope - -This document defines technical specifications for a Caliptra RoT for Measurement (RTM)[1] cryptographic subsystem used in the Open Compute Project (OCP). This document, along with [Caliptra: A Datacenter System on a Chip (SoC) Root of Trust (RoT)](https://chipsalliance.github.io/Caliptra/doc/Caliptra.html), shall comprise the Caliptra technical specification. - -# Overview - -This document provides definitions and requirements for a Caliptra cryptographic subsystem. The document then relates these definitions to existing technologies, enabling device and platform vendors to better understand those technologies in trusted computing terms. - -# Caliptra Core - -The following figure shows the Caliptra Core. - -*Figure 1: Caliptra Block Diagram* - -TODO: add figures - -## Boot FSM - -The Boot FSM detects that the SoC is bringing Caliptra out of reset. Part of this flow involves signaling to the SoC that Caliptra is awake and ready for fuses. After fuses are populated and the SoC indicates that it is done downloading fuses, Caliptra can wake up the rest of the IP by de-asserting the internal reset. - -The following figure shows the initial power-on arc of the Mailbox Boot FSM. - -*Figure 2: Mailbox Boot FSM state diagram* - -The Boot FSM first waits for the SoC to assert cptra\_pwrgood and de-assert cptra\_rst\_b. In the BOOT\_FUSE state, Caliptra signals to the SoC that it is ready for fuses. After the SoC is done writing fuses, it sets the fuse done register and the FSM advances to BOOT\_DONE. - -BOOT\_DONE enables Caliptra reset de-assertion through a two flip-flop synchronizer. - -## FW update reset (Impactless FW update) - -Runtime FW updates write to fw\_update\_reset register to trigger the FW update reset. When this register is written, only the RISC-V core is reset using cptra\_uc\_fw\_rst\_b pin and all AHB slaves are still active. All registers within the slaves and ICCM/DCCM memories are intact after the reset. Since ICCM is locked during runtime, it must be unlocked after the RISC-V reset is asserted. Reset is deasserted synchronously after a programmable number of cycles (currently set to 5 clocks) and normal boot flow updates the ICCM with the new FW from the mailbox SRAM. Reset de-assertion is done through a two flip-flop synchronizer. The boot flow is modified as shown in the following figure. - -*Figure 3: Mailbox Boot FSM state diagram for FW update reset* - -After Caliptra comes out of global reset and enters the BOOT\_DONE state, a write to the fw\_update\_reset register triggers the FW update reset flow. In the BOOT\_FWRST state, only the reset to the VeeR core is asserted, ICCM is unlocked and the timer is initialized. After the timer expires, the FSM advances from the BOOT\_WAIT to BOOT\_DONE state where the reset is deasserted. - -| Control register | Start address | Description | -| :------- | :---------- | :--------- | -| FW_UPDATE_RESET | 0x30030418 | Register to trigger the FW update reset flow. Setting it to 1 starts the Boot FSM. The field auto-clears to 0. | -| FW_UPDATE_RESET_WAIT_CYCLES | 0x3003041C | Programmable wait time to keep the microcontroller reset asserted. | - -## RISC-V core - -The RISC-V core is VeeR EL2 from CHIPS Alliance. It is a 32-bit CPU core that contains a 4-stage, scalar, in-order pipeline. The core supports RISC-V’s integer(I), compressed instruction(C), multiplication and division (M), instruction-fetch fence, CSR, and subset of bit manipulation instructions (Z) extensions. A link to the RISC-V VeeR EL2 Programmer’s Reference Manual is provided in the [References](#references) section. - -### Configuration - -The RISC-V core is highly configurable and has the following settings. - -| Parameter | Configuration | -| :---------------------- | :------------ | -| Interface | AHB-Lite | -| DCCM | 128 KiB | -| ICCM | 128 KiB | -| I-Cache | Disabled | -| Reset Vector | 0x00000000 | -| Fast Interrupt Redirect | Enabled | -| External Interrupts | 31 | - -### Embedded memory export - -Internal RISC-V SRAM memory components are exported from the Caliptra subsystem to support adaptation to various fabrication processes. For more information, see the [Caliptra Integration Specification](https://github.com/chipsalliance/caliptra-rtl/blob/main/docs/CaliptraIntegrationSpecification.md). - -#### Memory map address regions - -The 32-bit address region is subdivided into 16 fixed-sized, contiguous 256 MB regions. The following table describes the address mapping for each of the AHB devices that the RISC-V core interfaces with. - -| Subsystem | Address size | Start address | End address | -| :------------------ | :----------- | :------------ | :---------- | -| ROM | 48 KiB | 0x0000_0000 | 0x0000_BFFF | -| Cryptographic | 512 KiB | 0x1000_0000 | 0x1007_FFFF | -| Peripherals | 32 KiB | 0x2000_0000 | 0x2000_7FFF | -| SoC IFC | 256 KiB | 0x3000_0000 | 0x3003_FFFF | -| RISC-V Core ICCM | 128 KiB | 0x4000_0000 | 0x4001_FFFF | -| RISC-V Core DCCM | 128 KiB | 0x5000_0000 | 0x5001_FFFF | -| RISC-V MM CSR (PIC) | 256 MiB | 0x6000_0000 | 0x6FFF_FFFF | - -##### Cryptographic subsystem - -The following table shows the memory map address ranges for each of the IP blocks in the cryptographic subsystem. - -| IP/Peripheral | Slave \# | Address size | Start address | End address | -| :---------------------------------- | :------- | :----------- | :------------ | :---------- | -| Cryptographic Initialization Engine | 0 | 32 KiB | 0x1000_0000 | 0x1000_7FFF | -| ECC Secp384 | 1 | 32 KiB | 0x1000_8000 | 0x1000_FFFF | -| HMAC384 | 2 | 4 KiB | 0x1001_0000 | 0x1001_0FFF | -| Key Vault | 3 | 8 KiB | 0x1001_8000 | 0x1001_9FFF | -| PCR Vault | 4 | 8 KiB | 0x1001_A000 | 0x1001_BFFF | -| Data Vault | 5 | 8 KiB | 0x1001_C000 | 0x1001_DFFF | -| SHA512 | 6 | 32 KiB | 0x1002_0000 | 0x1002_7FFF | -| SHA256 | 13 | 32 KiB | 0x1002_8000 | 0x1002_FFFF | - -##### Peripherals subsystem - -The following table shows the memory map address ranges for each of the IP blocks in the peripherals’ subsystem. - -| IP/Peripheral | Slave \# | Address size | Start address | End address | -| :------------ | :------- | :----------- | :------------ | :---------- | -| QSPI | 7 | 4 KiB | 0x2000_0000 | 0x2000_0FFF | -| UART | 8 | 4 KiB | 0x2000_1000 | 0x2000_1FFF | -| CSRNG | 15 | 4 KiB | 0x2000_2000 | 0x2000_2FFF | -| ENTROPY SRC | 16 | 4 KiB | 0x2000_3000 | 0x2000_3FFF | - -##### SoC interface subsystem - -The following table shows the memory map address ranges for each of the IP blocks in the SoC interface subsystem. - -| IP/Peripheral | Slave \# | Address size | Start address | End address | -| :------------------------- | :------- | :----------- | :------------ | :---------- | -| Mailbox SRAM Direct Access | 10 | 128 KiB | 0x3000_0000 | 0x3001_FFFF | -| Mailbox CSR | 10 | 4 KiB | 0x3002_0000 | 0x3002_0FFF | -| SHA512 Accelerator CSR | 10 | 4 KiB | 0x3002_1000 | 0x3002_1FFF | -| Mailbox | 10 | 64 KiB | 0x3003_0000 | 0x3003_FFFF | - -##### RISC-V core local memory blocks - -The following table shows the memory map address ranges for each of the local memory blocks that interface with RISC-V core. - -| IP/Peripheral | Slave \# | Address size | Start address | End address | -| :-------------- | :------- | :----------- | :------------ | :---------- | -| ICCM0 (via DMA) | 12 | 128 KiB | 0x4000_0000 | 0x4001_FFFF | -| DCCM | 11 | 128 KiB | 0x5000_0000 | 0x5001_FFFF | - -#### Interrupts - -The VeeR-EL2 processor supports multiple types of interrupts, including non-maskable interrupts (NMI), software interrupts, timer interrupts, external interrupts, and local interrupts. Local interrupts are events not specified by the RISC-V standard, such as auxiliary timers and correctable errors. - -Caliptra uses NMI in conjunction with a watchdog timer to support fatal error recovery and system restart. For more information, see the [Watchdog timer](#watchdog-timer) section. - -Software and local interrupts are not implemented in the first generation of Caliptra. Standard RISC-V timer interrupts are implemented using the mtime and mtimecmp registers defined in the RISC-V Privileged Architecture Specification. Both mtime and mtimecmp are included in the soc\_ifc register bank, and are accessible by the internal microprocessor to facilitate precise timing tasks. Frequency for the timers is configured by the SoC using the dedicated timer configuration register, which satisfies the requirement prescribed in the RISC-V specification for such a mechanism. These timer registers drive the timer\_int pin into the internal microprocessor. - -##### Non-maskable interrupts - -Caliptra Integration Specification
- -Version 1.0-rc1
- - - -# Scope - -This document describes the Caliptra hardware implementation requirements, details, and release notes. This document is intended for a high-level overview of the IP used in Caliptra. - -This document is not intended for any micro-architectural design specifications. Detailed information on each of the IP components are shared in individual documents, where applicable. - -# Overview - -This document contains high level information on the Caliptra hardware design. The details include open-source IP information, configuration settings for open-source IP (if applicable), and IP written specifically for Caliptra. - -For more information, see[ Caliptra: A Datacenter System on a Chip (SoC) Root of Trust (RoT)](https://chipsalliance.github.io/Caliptra/doc/Caliptra.html). - -## References and related specifications - -The blocks described in this document are either obtained from open-source GitHub repositories, developed from scratch, or modification of open-source implementations. Links to relevant documentation and GitHub sources are shared in the following table. - -*Table 1: Related specifications* - -| IP/Block | GitHub URL | Documentation | Link | -| :--------- | :--------- | :--------- |:--------- | -| Cores-VeeR | [GitHub - chipsalliance/Cores-VeeR-EL2](https://github.com/chipsalliance/Cores-VeeR-EL2) | VeeR EL2 Programmer’s Reference Manual | [chipsalliance/Cores-VeeR-EL2 · GitHubPDF](http://cores-swerv-el2/RISC-V_SweRV_EL2_PRM.pdf%20at%20master%20%C2%B7) | -| AHB Lite Bus | [aignacio/ahb_lite_bus: AHB Bus lite v3.0 (github.com)](https://github.com/aignacio/ahb_lite_bus) | AHB Lite ProtocolP5XPk3{`+v_YU-~a#B*>??EBO#dT+ vZ+qZPVh*wZj^`n>l|MZGE8JWw=(=-xH1tzo3zQ
za(JJWV`6`$*Vv^$`LKFJ=|)cAMQ0Sv$EmH+kSL(tFN)S3 l}3-(`w6c<`oe>EuU37wvg?_CSM
zKHDDhH_fboyUA+nTk7XvP`FnUd#b(qv0o<`8zy><7coXOC|)1-^87QN$oO3_P42S^
zOjFqDx#IBPyO!$_bcDc>5o^YI>tHC@m>tOU8emSSVhtQo+K)N%VvaQ5?1(w+2RTLl
z3~5A{m%2)${yEh#uvhRH(`yN2vxs!ump_l8qiHTPXY$HUXg}jD4E1jJ#bHeFg+vF2
z_MK3R*F&}h3Th_0TG#^l?dG*AGTz6{F7$cM`d>eWUDEXwlLU?#!S9BQrQ5WTjW5WG
zMNJHvs;h-wGrreZt>a3rWZ351E_V!Y{u4M~^a#3lYw{%qM|}^hRM5B`@`{E$o`)L1
zIYP8W&}59vIT?s1f!B<0+tAh`YDjG(c7HRDT|pBqo6S}&24a;K8h;Bd%F3i?&PzS%
z>fs}C4&m`UGkX6TR-&H)f`(w|!pd0PrzUisvar)jQ0q6KtfU{t`YT{fUEW1<>X-
zr=poJZ89w(GaGCXP+)M(15TNX1X2k_?ExA|h bVmWs%d_iH8
zF&d)yGknH<6WY7?a{2h7pV8p)p_eb9Iyb==>BvP
zBD`X_hrq54?O_n*3OYILvRlOelB82{G#=AsB(CGK{KFR)TMTc@wa#`_dQfB#R1>!P
zVYisoR!7LCPg}0V!XNY*A%nKzAU@_cq{@#S7b&Lm{a1fq3AWpJxklkV&LR&G&YOc@
z`Z0wk3XuZ5VXqkTYi9MNAGZ1*`gM=LWx;Eo51yC3{(WWVg0clo9XhH;+l05`Tu79k
z^3@%MMD_1ar*wQH?xLM@odEieTP+2g?}tqRH;So|@CR((M=!siWAwGP=k?SlR55zG
zQWU)jun%lOZ_E&blq?nq#zSl+w|S
vSE|y0*eXF&1(s#kKw0HrL{mYl>ld}XQ+T;X
jMxw$=}