mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-08 14:14:32 +00:00
8e4e914652
This patch adds support for encryption and decryption on a given data blob using different key sources such as userkey(KUP), device key and PUF key. Inorder to support this a new zynqmp command(zynqmp aes) has been introduced. Command: zynqmp aes srcaddr ivaddr len aesop keysrc dstaddr [keyaddr]\n" Encrypts or decrypts blob of data at src address and puts it\n" back to dstaddr using key and iv at keyaddr and ivaddr\n" respectively. keysrc values specifies from which source key\n" has to be used, it can be User/Device/PUF key. A value of 0\n" for KUP(user key),1 for DeviceKey and 2 for PUF key. The\n" aesop value would specify the operationwhich can be 0 for\n" decrypt and 1 for encrypt(1) operation\n"; Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
57 lines
1.1 KiB
C
57 lines
1.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* (C) Copyright 2014 - 2015 Xilinx, Inc.
|
|
* Michal Simek <michal.simek@xilinx.com>
|
|
*/
|
|
|
|
#ifndef _ASM_ARCH_SYS_PROTO_H
|
|
#define _ASM_ARCH_SYS_PROTO_H
|
|
|
|
#define ZYNQMP_CSU_SILICON_VER_MASK 0xF
|
|
#define KEY_PTR_LEN 32
|
|
#define IV_SIZE 12
|
|
|
|
#define ZYNQMP_FPGA_BIT_AUTH_DDR 1
|
|
#define ZYNQMP_FPGA_BIT_AUTH_OCM 2
|
|
#define ZYNQMP_FPGA_BIT_ENC_USR_KEY 3
|
|
#define ZYNQMP_FPGA_BIT_ENC_DEV_KEY 4
|
|
#define ZYNQMP_FPGA_BIT_NS 5
|
|
|
|
#define ZYNQMP_FPGA_AUTH_DDR 1
|
|
|
|
enum {
|
|
IDCODE,
|
|
VERSION,
|
|
IDCODE2,
|
|
};
|
|
|
|
enum {
|
|
ZYNQMP_SILICON_V1,
|
|
ZYNQMP_SILICON_V2,
|
|
ZYNQMP_SILICON_V3,
|
|
ZYNQMP_SILICON_V4,
|
|
};
|
|
|
|
enum {
|
|
TCM_LOCK,
|
|
TCM_SPLIT,
|
|
};
|
|
|
|
struct zynqmp_ipi_msg {
|
|
size_t len;
|
|
u32 *buf;
|
|
};
|
|
|
|
int zynq_board_read_rom_ethaddr(unsigned char *ethaddr);
|
|
unsigned int zynqmp_get_silicon_version(void);
|
|
|
|
int zynqmp_mmio_write(const u32 address, const u32 mask, const u32 value);
|
|
int zynqmp_mmio_read(const u32 address, u32 *value);
|
|
|
|
void initialize_tcm(bool mode);
|
|
void mem_map_fill(void);
|
|
#if defined(CONFIG_SYS_MEM_RSVD_FOR_MMU) || defined(CONFIG_DEFINE_TCM_OCM_MMAP)
|
|
void tcm_init(u8 mode);
|
|
#endif
|
|
|
|
#endif /* _ASM_ARCH_SYS_PROTO_H */
|