coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
crypto.c File Reference
#include <device/mmio.h>
#include <assert.h>
#include <console/console.h>
#include <delay.h>
#include <soc/addressmap.h>
#include <soc/soc.h>
#include <types.h>
#include <vb2_api.h>
Include dependency graph for crypto.c:

Go to the source code of this file.

Data Structures

struct  rk3288_crypto
 

Enumerations

enum  rk3288_crypto_interrupt_bits {
  PKA_DONE = 1 << 5 , HASH_DONE = 1 << 4 , HRDMA_ERR = 1 << 3 , HRDMA_DONE = 1 << 2 ,
  BCDMA_ERR = 1 << 1 , BCDMA_DONE = 1 << 0
}
 

Functions

 check_member (rk3288_crypto, trng_dout[7], 0x220)
 
vb2_error_t vb2ex_hwcrypto_digest_init (enum vb2_hash_algorithm hash_alg, uint32_t data_size)
 
vb2_error_t vb2ex_hwcrypto_digest_extend (const uint8_t *buf, uint32_t size)
 
vb2_error_t vb2ex_hwcrypto_digest_finalize (uint8_t *digest, uint32_t digest_size)
 

Variables

struct rk3288_cryptocrypto = (void *)CRYPTO_BASE
 

Enumeration Type Documentation

◆ rk3288_crypto_interrupt_bits

Enumerator
PKA_DONE 
HASH_DONE 
HRDMA_ERR 
HRDMA_DONE 
BCDMA_ERR 
BCDMA_DONE 

Definition at line 12 of file crypto.c.

Function Documentation

◆ check_member()

check_member ( rk3288_crypto  ,
trng_dout  [7],
0x220   
)

◆ vb2ex_hwcrypto_digest_extend()

vb2_error_t vb2ex_hwcrypto_digest_extend ( const uint8_t buf,
uint32_t  size 
)

Definition at line 84 of file crypto.c.

References BIOS_ERR, buf, crypto, rk3288_crypto::ctrl, HRDMA_DONE, HRDMA_ERR, rk3288_crypto::hrdmal, rk3288_crypto::hrdmas, rk3288_crypto::intsts, printk, read32(), RK_SETBITS, and write32().

Here is the call graph for this function:

◆ vb2ex_hwcrypto_digest_finalize()

vb2_error_t vb2ex_hwcrypto_digest_finalize ( uint8_t digest,
uint32_t  digest_size 
)

Definition at line 105 of file crypto.c.

References assert, crypto, rk3288_crypto::hash_dout, rk3288_crypto::hash_sts, and read32().

Here is the call graph for this function:

◆ vb2ex_hwcrypto_digest_init()

vb2_error_t vb2ex_hwcrypto_digest_init ( enum vb2_hash_algorithm  hash_alg,
uint32_t  data_size 
)

Variable Documentation

◆ crypto