Linux Kernel
3.7.1
|
Go to the source code of this file.
Data Structures | |
struct | nx_sg |
struct | msc_triplet |
struct | max_sync_cop |
struct | alg_props |
struct | nx_of |
struct | nx_stats |
struct | nx_debugfs |
struct | nx_crypto_driver |
struct | nx_gcm_priv |
struct | nx_ccm_priv |
struct | nx_xcbc_priv |
struct | nx_ctr_priv |
struct | nx_crypto_ctx |
Macros | |
#define | NX_NAME "nx-crypto" |
#define | NX_STRING "IBM Power7+ Nest Accelerator Crypto Driver" |
#define | NX_VERSION "1.0" |
#define | NX_PAGE_SIZE (4096) |
#define | NX_MAX_SG_ENTRIES (NX_PAGE_SIZE/(sizeof(struct nx_sg))) |
#define | NX_OF_FLAG_MAXSGLEN_SET (1) |
#define | NX_OF_FLAG_STATUS_SET (2) |
#define | NX_OF_FLAG_MAXSYNCCOP_SET (4) |
#define | NX_OF_FLAG_MASK_READY |
#define | NX_GCM4106_NONCE_LEN (4) |
#define | NX_GCM_CTR_OFFSET (12) |
#define | NX_CCM_AES_KEY_LEN (16) |
#define | NX_CCM4309_AES_KEY_LEN (19) |
#define | NX_CCM4309_NONCE_LEN (3) |
#define | NX_DEBUGFS_INIT(drv) (0) |
#define | NX_DEBUGFS_FINI(drv) (0) |
#define | NX_PAGE_NUM(x) ((u64)(x) & 0xfffffffffffff000ULL) |
#define | SCATTERWALK_TO_SG 1 |
#define | SCATTERWALK_FROM_SG 0 |
Enumerations | |
enum | nx_status { NX_DISABLED, NX_WAITING, NX_OKAY } |
Functions | |
struct nx_sg | __attribute ((packed)) |
int | nx_crypto_ctx_aes_ccm_init (struct crypto_tfm *tfm) |
int | nx_crypto_ctx_aes_gcm_init (struct crypto_tfm *tfm) |
int | nx_crypto_ctx_aes_xcbc_init (struct crypto_tfm *tfm) |
int | nx_crypto_ctx_aes_ctr_init (struct crypto_tfm *tfm) |
int | nx_crypto_ctx_aes_cbc_init (struct crypto_tfm *tfm) |
int | nx_crypto_ctx_aes_ecb_init (struct crypto_tfm *tfm) |
int | nx_crypto_ctx_sha_init (struct crypto_tfm *tfm) |
void | nx_crypto_ctx_exit (struct crypto_tfm *tfm) |
void | nx_ctx_init (struct nx_crypto_ctx *nx_ctx, unsigned int function) |
int | nx_hcall_sync (struct nx_crypto_ctx *ctx, struct vio_pfo_op *op, u32 may_sleep) |
struct nx_sg * | nx_build_sg_list (struct nx_sg *, u8 *, unsigned int, u32) |
int | nx_build_sg_lists (struct nx_crypto_ctx *, struct blkcipher_desc *, struct scatterlist *, struct scatterlist *, unsigned int, u8 *) |
struct nx_sg * | nx_walk_and_build (struct nx_sg *, unsigned int, struct scatterlist *, unsigned int, unsigned int) |
#define NX_OF_FLAG_MASK_READY |
|
read |
nx_build_sg_list - build an NX scatter list describing a single buffer
: pointer to the first scatter list element to build : pointer to the linear buffer : length of the data at : the largest number of scatter list elements we're allowed to create
This function will start writing nx_sg elements at and keep writing them until all of the data from is described or until sgmax elements have been written. Scatter list elements will be created such that none of the elements describes a buffer that crosses a 4K boundary.
int nx_build_sg_lists | ( | struct nx_crypto_ctx * | nx_ctx, |
struct blkcipher_desc * | desc, | ||
struct scatterlist * | dst, | ||
struct scatterlist * | src, | ||
unsigned int | nbytes, | ||
u8 * | iv | ||
) |
nx_build_sg_lists - walk the input scatterlists and build arrays of NX scatterlists based on them.
: NX crypto context for the lists we're building : the block cipher descriptor for the operation : destination scatterlist : source scatterlist : length of data described in the scatterlists : destination for the iv data, if the algorithm requires it
This is common code shared by all the AES algorithms. It uses the block cipher walk routines to traverse input and output scatterlists, building corresponding NX scatterlists
int nx_crypto_ctx_aes_cbc_init | ( | struct crypto_tfm * | tfm | ) |
int nx_crypto_ctx_aes_ccm_init | ( | struct crypto_tfm * | tfm | ) |
int nx_crypto_ctx_aes_ctr_init | ( | struct crypto_tfm * | tfm | ) |
int nx_crypto_ctx_aes_ecb_init | ( | struct crypto_tfm * | tfm | ) |
int nx_crypto_ctx_aes_gcm_init | ( | struct crypto_tfm * | tfm | ) |
int nx_crypto_ctx_aes_xcbc_init | ( | struct crypto_tfm * | tfm | ) |
void nx_crypto_ctx_exit | ( | struct crypto_tfm * | tfm | ) |
int nx_crypto_ctx_sha_init | ( | struct crypto_tfm * | tfm | ) |
void nx_ctx_init | ( | struct nx_crypto_ctx * | nx_ctx, |
unsigned int | function | ||
) |
int nx_hcall_sync | ( | struct nx_crypto_ctx * | nx_ctx, |
struct vio_pfo_op * | op, | ||
u32 | may_sleep | ||
) |
Routines supporting the Power 7+ Nest Accelerators driver
Copyright (C) 2011-2012 International Business Machines Inc.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 only.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Author: Kent Yoder yoder nx_hcall_sync - make an H_COP_OP hcall for 1@us .ibm. comthe passed in op structure
: the crypto context handle : PFO operation struct to pass in : flag indicating the request can sleep
Make the hcall, retrying while the hardware is busy. If we cannot yield the thread, limit the number of retries to 10 here.
|
read |
nx_walk_and_build - walk a linux scatterlist and build an nx scatterlist
: pointer to the first nx_sg element to write : max number of nx_sg entries we're allowed to write : pointer to the source linux scatterlist to walk : number of bytes to fast-forward past at the beginning of : number of bytes to walk in
struct mpsc_tx_desc __attribute |
struct crypto_alg nx_cbc_aes_alg |
Definition at line 121 of file nx-aes-cbc.c.
struct crypto_alg nx_ccm4309_aes_alg |
Definition at line 445 of file nx-aes-ccm.c.
struct crypto_alg nx_ccm_aes_alg |
Definition at line 423 of file nx-aes-ccm.c.
struct crypto_alg nx_ctr3686_aes_alg |
Definition at line 156 of file nx-aes-ctr.c.
struct crypto_alg nx_ctr_aes_alg |
Definition at line 135 of file nx-aes-ctr.c.
struct nx_crypto_driver nx_driver |
struct crypto_alg nx_ecb_aes_alg |
Definition at line 120 of file nx-aes-ecb.c.
struct crypto_alg nx_gcm4106_aes_alg |
Definition at line 331 of file nx-aes-gcm.c.
struct crypto_alg nx_gcm_aes_alg |
Definition at line 310 of file nx-aes-gcm.c.
Definition at line 217 of file nx-aes-xcbc.c.
Definition at line 226 of file nx-sha256.c.
Definition at line 245 of file nx-sha512.c.