Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
crypto4xx_core.h File Reference
#include <crypto/internal/hash.h>

Go to the source code of this file.

Data Structures

struct  pd_uinfo
struct  crypto4xx_device
struct  crypto4xx_core_device
struct  crypto4xx_ctx
struct  crypto4xx_req_ctx
struct  crypto4xx_alg_common
struct  crypto4xx_alg


#define PPC460SX_SDR0_SRST   0x201
#define PPC405EX_SDR0_SRST   0x200
#define PPC460EX_SDR0_SRST   0x201
#define PPC460EX_CE_RESET   0x08000000
#define PPC460SX_CE_RESET   0x20000000
#define PPC405EX_CE_RESET   0x00000008
#define PPC4XX_LAST_PD   63
#define PPC4XX_NUM_PD   64
#define PPC4XX_LAST_GD   1023
#define PPC4XX_NUM_GD   1024
#define PPC4XX_LAST_SD   63
#define PPC4XX_NUM_SD   64
#define PPC4XX_SD_BUFFER_SIZE   2048
#define PD_ENTRY_INUSE   1
#define PD_ENTRY_FREE   0
#define ERING_WAS_FULL   0xffffffff


int crypto4xx_alloc_sa (struct crypto4xx_ctx *ctx, u32 size)
void crypto4xx_free_sa (struct crypto4xx_ctx *ctx)
u32 crypto4xx_alloc_sa_rctx (struct crypto4xx_ctx *ctx, struct crypto4xx_ctx *rctx)
void crypto4xx_free_sa_rctx (struct crypto4xx_ctx *rctx)
void crypto4xx_free_ctx (struct crypto4xx_ctx *ctx)
u32 crypto4xx_alloc_state_record (struct crypto4xx_ctx *ctx)
u32 get_dynamic_sa_offset_state_ptr_field (struct crypto4xx_ctx *ctx)
u32 get_dynamic_sa_offset_key_field (struct crypto4xx_ctx *ctx)
u32 get_dynamic_sa_iv_size (struct crypto4xx_ctx *ctx)
void crypto4xx_memcpy_le (unsigned int *dst, const unsigned char *buf, int len)
u32 crypto4xx_build_pd (struct crypto_async_request *req, struct crypto4xx_ctx *ctx, struct scatterlist *src, struct scatterlist *dst, unsigned int datalen, void *iv, u32 iv_len)
int crypto4xx_setkey_aes_cbc (struct crypto_ablkcipher *cipher, const u8 *key, unsigned int keylen)
int crypto4xx_encrypt (struct ablkcipher_request *req)
int crypto4xx_decrypt (struct ablkcipher_request *req)
int crypto4xx_sha1_alg_init (struct crypto_tfm *tfm)
int crypto4xx_hash_digest (struct ahash_request *req)
int crypto4xx_hash_final (struct ahash_request *req)
int crypto4xx_hash_update (struct ahash_request *req)
int crypto4xx_hash_init (struct ahash_request *req)

Macro Definition Documentation


Definition at line 34 of file crypto4xx_core.h.

#define ERING_WAS_FULL   0xffffffff

Definition at line 45 of file crypto4xx_core.h.

#define PD_ENTRY_FREE   0

Definition at line 44 of file crypto4xx_core.h.

#define PD_ENTRY_INUSE   1

Definition at line 43 of file crypto4xx_core.h.

#define PPC405EX_CE_RESET   0x00000008

Definition at line 32 of file crypto4xx_core.h.

#define PPC405EX_SDR0_SRST   0x200

Definition at line 28 of file crypto4xx_core.h.

#define PPC460EX_CE_RESET   0x08000000

Definition at line 30 of file crypto4xx_core.h.

#define PPC460EX_SDR0_SRST   0x201

Definition at line 29 of file crypto4xx_core.h.

#define PPC460SX_CE_RESET   0x20000000

Definition at line 31 of file crypto4xx_core.h.

#define PPC460SX_SDR0_SRST   0x201

AMCC SoC PPC4xx Crypto Driver

Copyright (c) 2008 Applied Micro Circuits Corporation. All rights reserved. James Hsiao

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; either version 2 of the License, or (at your option) any later version.

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.

This is the header file for AMCC Crypto offload Linux device driver for use with Linux CryptoAPI.

Definition at line 27 of file crypto4xx_core.h.

#define PPC4XX_LAST_GD   1023

Definition at line 37 of file crypto4xx_core.h.

#define PPC4XX_LAST_PD   63

Definition at line 35 of file crypto4xx_core.h.

#define PPC4XX_LAST_SD   63

Definition at line 39 of file crypto4xx_core.h.

#define PPC4XX_NUM_GD   1024

Definition at line 38 of file crypto4xx_core.h.

#define PPC4XX_NUM_PD   64

Definition at line 36 of file crypto4xx_core.h.

#define PPC4XX_NUM_SD   64

Definition at line 40 of file crypto4xx_core.h.

#define PPC4XX_SD_BUFFER_SIZE   2048

Definition at line 41 of file crypto4xx_core.h.

Function Documentation

int crypto4xx_alloc_sa ( struct crypto4xx_ctx ctx,
u32  size 

Definition at line 124 of file crypto4xx_core.c.

u32 crypto4xx_alloc_sa_rctx ( struct crypto4xx_ctx ctx,
struct crypto4xx_ctx rctx 
u32 crypto4xx_alloc_state_record ( struct crypto4xx_ctx ctx)

Definition at line 161 of file crypto4xx_core.c.

u32 crypto4xx_build_pd ( struct crypto_async_request req,
struct crypto4xx_ctx ctx,
struct scatterlist src,
struct scatterlist dst,
unsigned int  datalen,
void iv,
u32  iv_len 

Definition at line 777 of file crypto4xx_core.c.

int crypto4xx_decrypt ( struct ablkcipher_request req)

Definition at line 86 of file crypto4xx_alg.c.

int crypto4xx_encrypt ( struct ablkcipher_request req)

Definition at line 72 of file crypto4xx_alg.c.

void crypto4xx_free_ctx ( struct crypto4xx_ctx ctx)
void crypto4xx_free_sa ( struct crypto4xx_ctx ctx)

Definition at line 147 of file crypto4xx_core.c.

void crypto4xx_free_sa_rctx ( struct crypto4xx_ctx rctx)
int crypto4xx_hash_digest ( struct ahash_request req)

Definition at line 272 of file crypto4xx_alg.c.

int crypto4xx_hash_final ( struct ahash_request req)

Definition at line 267 of file crypto4xx_alg.c.

int crypto4xx_hash_init ( struct ahash_request req)

Definition at line 236 of file crypto4xx_alg.c.

int crypto4xx_hash_update ( struct ahash_request req)

Definition at line 253 of file crypto4xx_alg.c.

void crypto4xx_memcpy_le ( unsigned int dst,
const unsigned char buf,
int  len 

Note: Only use this function to copy items that is word aligned.

Definition at line 686 of file crypto4xx_core.c.

int crypto4xx_setkey_aes_cbc ( struct crypto_ablkcipher cipher,
const u8 key,
unsigned int  keylen 

Definition at line 169 of file crypto4xx_alg.c.

int crypto4xx_sha1_alg_init ( struct crypto_tfm tfm)

SHA1 Algorithm

Definition at line 288 of file crypto4xx_alg.c.

u32 get_dynamic_sa_iv_size ( struct crypto4xx_ctx ctx)

Definition at line 87 of file crypto4xx_sa.c.

u32 get_dynamic_sa_offset_key_field ( struct crypto4xx_ctx ctx)

Definition at line 98 of file crypto4xx_sa.c.

u32 get_dynamic_sa_offset_state_ptr_field ( struct crypto4xx_ctx ctx)

Definition at line 60 of file crypto4xx_sa.c.