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

added restore feature for SHA512 #612

Merged
merged 9 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/integration/asserts/caliptra_top_sva.sv
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,6 @@ module caliptra_top_sva

generate
for(genvar dword = 0; dword < KV_NUM_DWORDS; dword++) begin
//sha512 block read
kv_sha512_block_r_flow: assert property (
@(posedge `SVA_RDC_CLK)
$rose(`SHA512_PATH.kv_src_done & ~`SHA512_PATH.pcr_hash_extend_ip) && (dword < (`KEYVAULT_PATH.kv_reg1.hwif_out.KEY_CTRL[`SHA512_PATH.kv_read.read_entry].last_dword.value + 1)) |-> (`KEYVAULT_PATH.kv_reg1.hwif_out.KEY_ENTRY[`SHA512_PATH.kv_read.read_entry][dword].data.value == `SHA512_PATH.block_reg[dword])
)
else $display("SVA ERROR: SHA384 block mismatch!, 0x%04x, 0x%04x", `KEYVAULT_PATH.kv_reg1.hwif_out.KEY_ENTRY[`SHA512_PATH.kv_read.read_entry][dword].data.value, `SHA512_PATH.block_reg[dword]);

//sha512 digest write
if (dword < SHA512_DIG_NUM_DWORDS) begin
kv_sha512_digest_w_flow: assert property (
Expand Down Expand Up @@ -552,6 +545,13 @@ module caliptra_top_sva
)
else $display("SVA ERROR: ECC VALID flag mismatch!");

//SVA for SHA512 restore
sha512_restore_cmd: assert property (
@(posedge `SVA_RDC_CLK)
`SHA512_PATH.restore_reg |-> (`SHA512_PATH.next_reg && !`SHA512_PATH.init_reg)
)
else $display("SVA ERROR: SHA512 restore is not valid!");

//SVA for modular operations
ecc_opa_input: assert property (
@(posedge `SVA_RDC_CLK)
Expand Down
2 changes: 2 additions & 0 deletions src/integration/rtl/caliptra_reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -3967,6 +3967,8 @@
#define SHA512_REG_SHA512_CTRL_ZEROIZE_MASK (0x10)
#define SHA512_REG_SHA512_CTRL_LAST_LOW (5)
#define SHA512_REG_SHA512_CTRL_LAST_MASK (0x20)
#define SHA512_REG_SHA512_CTRL_RESTORE_LOW (6)
#define SHA512_REG_SHA512_CTRL_RESTORE_MASK (0x40)
#define CLP_SHA512_REG_SHA512_STATUS (0x10020018)
#define SHA512_REG_SHA512_STATUS (0x18)
#define SHA512_REG_SHA512_STATUS_READY_LOW (0)
Expand Down
2 changes: 2 additions & 0 deletions src/integration/rtl/caliptra_reg_defines.svh
Original file line number Diff line number Diff line change
Expand Up @@ -3967,6 +3967,8 @@
`define SHA512_REG_SHA512_CTRL_ZEROIZE_MASK (32'h10)
`define SHA512_REG_SHA512_CTRL_LAST_LOW (5)
`define SHA512_REG_SHA512_CTRL_LAST_MASK (32'h20)
`define SHA512_REG_SHA512_CTRL_RESTORE_LOW (6)
`define SHA512_REG_SHA512_CTRL_RESTORE_MASK (32'h40)
`define CLP_SHA512_REG_SHA512_STATUS (32'h10020018)
`define SHA512_REG_SHA512_STATUS (32'h18)
`define SHA512_REG_SHA512_STATUS_READY_LOW (0)
Expand Down
7 changes: 3 additions & 4 deletions src/integration/rtl/caliptra_top.sv
Original file line number Diff line number Diff line change
Expand Up @@ -793,10 +793,6 @@ sha512_ctrl #(
.hresp_o (responder_inst[`CALIPTRA_SLAVE_SEL_SHA512].hresp),
.hreadyout_o (responder_inst[`CALIPTRA_SLAVE_SEL_SHA512].hreadyout),
.hrdata_o (responder_inst[`CALIPTRA_SLAVE_SEL_SHA512].hrdata),
.kv_read (kv_read[2]),
.kv_write (kv_write[1]),
.kv_rd_resp (kv_rd_resp[2]),
.kv_wr_resp (kv_wr_resp[1]),
.pv_read (pv_read),
.pv_write (pv_write),
.pv_rd_resp (pv_rd_resp),
Expand All @@ -808,6 +804,9 @@ sha512_ctrl #(
.debugUnlock_or_scan_mode_switch(debug_lock_or_scan_mode_switch)
);

always_comb kv_read[2] = '0;
always_comb kv_write[1] = '0;

sha256_ctrl #(
.AHB_DATA_WIDTH (`CALIPTRA_AHB_HDATA_SIZE),
.AHB_ADDR_WIDTH (`CALIPTRA_SLAVE_ADDR_WIDTH(`CALIPTRA_SLAVE_SEL_SHA256))
Expand Down
1 change: 1 addition & 0 deletions src/integration/stimulus/L0_regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ contents:
- ../test_suites/smoke_test_mbox_byte_read/smoke_test_mbox_byte_read.yml
- ../test_suites/smoke_test_mbox_cg/smoke_test_mbox_cg.yml
- ../test_suites/smoke_test_sha512/smoke_test_sha512.yml
- ../test_suites/smoke_test_sha512_restore/smoke_test_sha512_restore.yml
- ../test_suites/smoke_test_sha256/smoke_test_sha256.yml
- ../test_suites/smoke_test_sha256_wntz/smoke_test_sha256_wntz.yml
- ../test_suites/smoke_test_sha256_wntz_rand/smoke_test_sha256_wntz_rand.yml
Expand Down
50 changes: 50 additions & 0 deletions src/integration/test_suites/libs/sha512/sha512.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,54 @@ void sha512_flow(sha512_io block, uint8_t mode, sha512_io digest){
offset++;
}

}

void sha512_restore_flow(sha512_io block, uint8_t mode, sha512_io restore_digest, sha512_io digest){
volatile uint32_t * reg_ptr;
uint8_t offset;
uint8_t fail_cmd = 0x1;
uint32_t sha512_digest [16];

// wait for SHA to be ready
while((lsu_read_32(CLP_SHA512_REG_SHA512_STATUS) & SHA512_REG_SHA512_STATUS_READY_MASK) == 0);

// Write SHA512 block
reg_ptr = (uint32_t*) CLP_SHA512_REG_SHA512_BLOCK_0;
offset = 0;
while (reg_ptr <= (uint32_t*) CLP_SHA512_REG_SHA512_BLOCK_31) {
*reg_ptr++ = block.data[offset++];
}

// Write SHA512 restore DIGEST
reg_ptr = (uint32_t*) CLP_SHA512_REG_SHA512_DIGEST_0;
offset = 0;
while (reg_ptr <= (uint32_t*) CLP_SHA512_REG_SHA512_DIGEST_15) {
*reg_ptr++ = restore_digest.data[offset++];
}

// Enable SHA512 core
VPRINTF(LOW, "Enable SHA512\n");
lsu_write_32(CLP_SHA512_REG_SHA512_CTRL, SHA512_REG_SHA512_CTRL_NEXT_MASK |
SHA512_REG_SHA512_CTRL_RESTORE_MASK |
(mode << SHA512_REG_SHA512_CTRL_MODE_LOW) & SHA512_REG_SHA512_CTRL_MODE_MASK);

// wait for SHA to be valid
wait_for_sha512_intr();

reg_ptr = (uint32_t *) CLP_SHA512_REG_SHA512_DIGEST_0;
printf("Load DIGEST data from SHA512\n");
offset = 0;
while (reg_ptr <= (uint32_t*) CLP_SHA512_REG_SHA512_DIGEST_15) {
sha512_digest[offset] = *reg_ptr;
if (sha512_digest[offset] != digest.data[offset]) {
printf("At offset [%d], sha_digest data mismatch!\n", offset);
printf("Actual data: 0x%x\n", sha512_digest[offset]);
printf("Expected data: 0x%x\n", digest.data[offset]);
printf("%c", fail_cmd);
while(1);
}
reg_ptr++;
offset++;
}

}
1 change: 1 addition & 0 deletions src/integration/test_suites/libs/sha512/sha512.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ void sha_next_last(enum sha512_mode_e mode);
void sha384_kvflow(uint8_t sha_kv_id, uint8_t store_to_kv, uint8_t digest_kv_id, uint32_t expected_digest[12]);
void sha512_zeroize();
void sha512_flow(sha512_io block, uint8_t mode, sha512_io digest);
void sha512_restore_flow(sha512_io block, uint8_t mode, sha512_io restore_digest, sha512_io digest);

//polls until sha512 is ready to be used
inline void sha512_poll_ready() {
Expand Down
252 changes: 252 additions & 0 deletions src/integration/test_suites/smoke_test_sha512_restore/caliptra_isr.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,252 @@
// SPDX-License-Identifier: Apache-2.0
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ---------------------------------------------------------------------
// File: caliptra_isr.h
// Description:
// Provides function declarations for use by external test files, so
// that the ISR functionality may behave like a library.
// TODO:
// This header file includes inline function definitions for event and
// test specific interrupt service behavior, so it should be copied and
// modified for each test.
// ---------------------------------------------------------------------

#ifndef CALIPTRA_ISR_H
#define CALIPTRA_ISR_H

#define EN_ISR_PRINTS 1

#include "caliptra_defines.h"
#include <stdint.h>
#include "printf.h"

/* --------------- symbols/typedefs --------------- */
typedef struct {
uint32_t doe_error;
uint32_t doe_notif;
uint32_t ecc_error;
uint32_t ecc_notif;
uint32_t hmac_error;
uint32_t hmac_notif;
uint32_t kv_error;
uint32_t kv_notif;
uint32_t sha512_error;
uint32_t sha512_notif;
uint32_t sha256_error;
uint32_t sha256_notif;
uint32_t qspi_error;
uint32_t qspi_notif;
uint32_t uart_error;
uint32_t uart_notif;
uint32_t i3c_error;
uint32_t i3c_notif;
uint32_t soc_ifc_error;
uint32_t soc_ifc_notif;
uint32_t sha512_acc_error;
uint32_t sha512_acc_notif;
uint32_t axi_dma_error;
uint32_t axi_dma_notif;
} caliptra_intr_received_s;
extern volatile caliptra_intr_received_s cptra_intr_rcv;

//////////////////////////////////////////////////////////////////////////////
// Function Declarations
//

// Performs all the CSR setup to configure and enable vectored external interrupts
void init_interrupts(void);

// These inline functions are used to insert event-specific functionality into the
// otherwise generic ISR that gets laid down by the parameterized macro "nonstd_veer_isr"
inline void service_doe_error_intr() {return;}
inline void service_doe_notif_intr() {
uint32_t * reg = (uint32_t *) (CLP_DOE_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R);
uint32_t sts = *reg;
/* Write 1 to Clear the pending interrupt */
if (sts & DOE_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_CMD_DONE_STS_MASK) {
*reg = DOE_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_CMD_DONE_STS_MASK;
cptra_intr_rcv.doe_notif |= DOE_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_CMD_DONE_STS_MASK;
}
if (sts == 0) {
VPRINTF(ERROR,"bad doe_notif_intr sts:%x\n", sts);
SEND_STDOUT_CTRL(0x1);
while(1);
}
}

inline void service_ecc_error_intr() {return;}
inline void service_ecc_notif_intr() {
uint32_t * reg = (uint32_t *) (CLP_ECC_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R);
uint32_t sts = *reg;
/* Write 1 to Clear the pending interrupt */
if (sts & ECC_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_CMD_DONE_STS_MASK) {
*reg = ECC_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_CMD_DONE_STS_MASK;
cptra_intr_rcv.ecc_notif |= ECC_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_CMD_DONE_STS_MASK;
}
if (sts == 0) {
VPRINTF(ERROR,"bad ecc_notif_intr sts:%x\n", sts);
SEND_STDOUT_CTRL(0x1);
while(1);
}
}

inline void service_hmac_error_intr() {return;}
inline void service_hmac_notif_intr() {
uint32_t * reg = (uint32_t *) (CLP_HMAC_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R);
uint32_t sts = *reg;
/* Write 1 to Clear the pending interrupt */
if (sts & HMAC_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_CMD_DONE_STS_MASK) {
*reg = HMAC_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_CMD_DONE_STS_MASK;
cptra_intr_rcv.hmac_notif |= HMAC_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_CMD_DONE_STS_MASK;
}
if (sts == 0) {
VPRINTF(ERROR,"bad hmac_notif_intr sts:%x\n", sts);
SEND_STDOUT_CTRL(0x1);
while(1);
}
}

inline void service_kv_error_intr() {return;}
inline void service_kv_notif_intr() {return;}
inline void service_sha512_error_intr() {return;}
inline void service_sha512_notif_intr() {
uint32_t * reg = (uint32_t *) (CLP_SHA512_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R);
uint32_t sts = *reg;
/* Write 1 to Clear the pending interrupt */
if (sts & SHA512_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_CMD_DONE_STS_MASK) {
*reg = SHA512_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_CMD_DONE_STS_MASK;
cptra_intr_rcv.sha512_notif |= SHA512_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_CMD_DONE_STS_MASK;
}
if (sts == 0) {
VPRINTF(ERROR,"bad sha512_notif_intr sts:%x\n", sts);
SEND_STDOUT_CTRL(0x1);
while(1);
}
}

inline void service_sha256_error_intr() {return;}
inline void service_sha256_notif_intr() {
uint32_t * reg = (uint32_t *) (CLP_SHA256_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R);
uint32_t sts = *reg;
/* Write 1 to Clear the pending interrupt */
if (sts & SHA256_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_CMD_DONE_STS_MASK) {
*reg = SHA256_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_CMD_DONE_STS_MASK;
cptra_intr_rcv.sha256_notif |= SHA256_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_CMD_DONE_STS_MASK;
}
if (sts == 0) {
VPRINTF(ERROR,"bad sha256_notif_intr sts:%x\n", sts);
SEND_STDOUT_CTRL(0x1);
while(1);
}
}

inline void service_qspi_error_intr() {return;}
inline void service_qspi_notif_intr() {return;}
inline void service_uart_error_intr() {return;}
inline void service_uart_notif_intr() {return;}
inline void service_i3c_error_intr() {return;}
inline void service_i3c_notif_intr() {return;}

inline void service_soc_ifc_error_intr() {
uint32_t * reg = (uint32_t *) (CLP_SOC_IFC_REG_INTR_BLOCK_RF_ERROR_INTERNAL_INTR_R);
uint32_t sts = *reg;
/* Write 1 to Clear the pending interrupt */
if (sts & SOC_IFC_REG_INTR_BLOCK_RF_ERROR_INTERNAL_INTR_R_ERROR_INTERNAL_STS_MASK) {
*reg = SOC_IFC_REG_INTR_BLOCK_RF_ERROR_INTERNAL_INTR_R_ERROR_INTERNAL_STS_MASK;
cptra_intr_rcv.soc_ifc_error |= SOC_IFC_REG_INTR_BLOCK_RF_ERROR_INTERNAL_INTR_R_ERROR_INTERNAL_STS_MASK;
}
if (sts & SOC_IFC_REG_INTR_BLOCK_RF_ERROR_INTERNAL_INTR_R_ERROR_INV_DEV_STS_MASK) {
*reg = SOC_IFC_REG_INTR_BLOCK_RF_ERROR_INTERNAL_INTR_R_ERROR_INV_DEV_STS_MASK;
cptra_intr_rcv.soc_ifc_error |= SOC_IFC_REG_INTR_BLOCK_RF_ERROR_INTERNAL_INTR_R_ERROR_INV_DEV_STS_MASK;
}
if (sts & SOC_IFC_REG_INTR_BLOCK_RF_ERROR_INTERNAL_INTR_R_ERROR_CMD_FAIL_STS_MASK) {
*reg = SOC_IFC_REG_INTR_BLOCK_RF_ERROR_INTERNAL_INTR_R_ERROR_CMD_FAIL_STS_MASK;
cptra_intr_rcv.soc_ifc_error |= SOC_IFC_REG_INTR_BLOCK_RF_ERROR_INTERNAL_INTR_R_ERROR_CMD_FAIL_STS_MASK;
}
if (sts & SOC_IFC_REG_INTR_BLOCK_RF_ERROR_INTERNAL_INTR_R_ERROR_BAD_FUSE_STS_MASK) {
*reg = SOC_IFC_REG_INTR_BLOCK_RF_ERROR_INTERNAL_INTR_R_ERROR_BAD_FUSE_STS_MASK;
cptra_intr_rcv.soc_ifc_error |= SOC_IFC_REG_INTR_BLOCK_RF_ERROR_INTERNAL_INTR_R_ERROR_BAD_FUSE_STS_MASK;
}
if (sts & SOC_IFC_REG_INTR_BLOCK_RF_ERROR_INTERNAL_INTR_R_ERROR_ICCM_BLOCKED_STS_MASK) {
*reg = SOC_IFC_REG_INTR_BLOCK_RF_ERROR_INTERNAL_INTR_R_ERROR_ICCM_BLOCKED_STS_MASK;
cptra_intr_rcv.soc_ifc_error |= SOC_IFC_REG_INTR_BLOCK_RF_ERROR_INTERNAL_INTR_R_ERROR_ICCM_BLOCKED_STS_MASK;
}
if (sts & SOC_IFC_REG_INTR_BLOCK_RF_ERROR_INTERNAL_INTR_R_ERROR_MBOX_ECC_UNC_STS_MASK) {
*reg = SOC_IFC_REG_INTR_BLOCK_RF_ERROR_INTERNAL_INTR_R_ERROR_MBOX_ECC_UNC_STS_MASK;
cptra_intr_rcv.soc_ifc_error |= SOC_IFC_REG_INTR_BLOCK_RF_ERROR_INTERNAL_INTR_R_ERROR_MBOX_ECC_UNC_STS_MASK;
}
if (sts == 0) {
VPRINTF(ERROR,"bad soc_ifc_error_intr sts:%x\n", sts);
SEND_STDOUT_CTRL(0x1);
while(1);
}
}

inline void service_soc_ifc_notif_intr () {
uint32_t * reg = (uint32_t *) (CLP_SOC_IFC_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R);
uint32_t sts = *reg;
/* Write 1 to Clear the pending interrupt */
if (sts & SOC_IFC_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_CMD_AVAIL_STS_MASK) {
*reg = SOC_IFC_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_CMD_AVAIL_STS_MASK;
cptra_intr_rcv.soc_ifc_notif |= SOC_IFC_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_CMD_AVAIL_STS_MASK;
}
if (sts & SOC_IFC_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_MBOX_ECC_COR_STS_MASK) {
*reg = SOC_IFC_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_MBOX_ECC_COR_STS_MASK;
cptra_intr_rcv.soc_ifc_notif |= SOC_IFC_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_MBOX_ECC_COR_STS_MASK;
}
if (sts & SOC_IFC_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_DEBUG_LOCKED_STS_MASK) {
*reg = SOC_IFC_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_DEBUG_LOCKED_STS_MASK;
cptra_intr_rcv.soc_ifc_notif |= SOC_IFC_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_DEBUG_LOCKED_STS_MASK;
}
if (sts & SOC_IFC_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_SCAN_MODE_STS_MASK) {
*reg = SOC_IFC_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_SCAN_MODE_STS_MASK;
cptra_intr_rcv.soc_ifc_notif |= SOC_IFC_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_SCAN_MODE_STS_MASK;
}
if (sts & SOC_IFC_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_SOC_REQ_LOCK_STS_MASK) {
*reg = SOC_IFC_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_SOC_REQ_LOCK_STS_MASK;
cptra_intr_rcv.soc_ifc_notif |= SOC_IFC_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_SOC_REQ_LOCK_STS_MASK;
}
if (sts & SOC_IFC_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_GEN_IN_TOGGLE_STS_MASK) {
*reg = SOC_IFC_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_GEN_IN_TOGGLE_STS_MASK;
cptra_intr_rcv.soc_ifc_notif |= SOC_IFC_REG_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_GEN_IN_TOGGLE_STS_MASK;
}
if (sts == 0) {
VPRINTF(ERROR,"bad soc_ifc_notif_intr sts:%x\n", sts);
SEND_STDOUT_CTRL(0x1);
while(1);
}
}

inline void service_sha512_acc_error_intr() {return;}
inline void service_sha512_acc_notif_intr() {
uint32_t * reg = (uint32_t *) (CLP_SHA512_ACC_CSR_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R);
uint32_t sts = *reg;
/* Write 1 to Clear the pending interrupt */
if (sts & SHA512_ACC_CSR_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_CMD_DONE_STS_MASK) {
*reg = SHA512_ACC_CSR_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_CMD_DONE_STS_MASK;
cptra_intr_rcv.sha512_acc_notif |= SHA512_ACC_CSR_INTR_BLOCK_RF_NOTIF_INTERNAL_INTR_R_NOTIF_CMD_DONE_STS_MASK;
}
if (sts == 0) {
VPRINTF(ERROR,"bad sha512_acc_notif_intr sts:%x\n", sts);
SEND_STDOUT_CTRL(0x1);
while(1);
}
}

inline void service_axi_dma_error_intr() {return;}
inline void service_axi_dma_notif_intr() {return;}


#endif //CALIPTRA_ISR_H
Loading
Loading