Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * CAAM Protocol Data Block (PDB) definition header file
0004  *
0005  * Copyright 2008-2016 Freescale Semiconductor, Inc.
0006  *
0007  */
0008 
0009 #ifndef CAAM_PDB_H
0010 #define CAAM_PDB_H
0011 #include "compat.h"
0012 
0013 /*
0014  * PDB- IPSec ESP Header Modification Options
0015  */
0016 #define PDBHMO_ESP_DECAP_SHIFT  28
0017 #define PDBHMO_ESP_ENCAP_SHIFT  28
0018 /*
0019  * Encap and Decap - Decrement TTL (Hop Limit) - Based on the value of the
0020  * Options Byte IP version (IPvsn) field:
0021  * if IPv4, decrement the inner IP header TTL field (byte 8);
0022  * if IPv6 decrement the inner IP header Hop Limit field (byte 7).
0023 */
0024 #define PDBHMO_ESP_DECAP_DEC_TTL    (0x02 << PDBHMO_ESP_DECAP_SHIFT)
0025 #define PDBHMO_ESP_ENCAP_DEC_TTL    (0x02 << PDBHMO_ESP_ENCAP_SHIFT)
0026 /*
0027  * Decap - DiffServ Copy - Copy the IPv4 TOS or IPv6 Traffic Class byte
0028  * from the outer IP header to the inner IP header.
0029  */
0030 #define PDBHMO_ESP_DIFFSERV     (0x01 << PDBHMO_ESP_DECAP_SHIFT)
0031 /*
0032  * Encap- Copy DF bit -if an IPv4 tunnel mode outer IP header is coming from
0033  * the PDB, copy the DF bit from the inner IP header to the outer IP header.
0034  */
0035 #define PDBHMO_ESP_DFBIT        (0x04 << PDBHMO_ESP_ENCAP_SHIFT)
0036 
0037 #define PDBNH_ESP_ENCAP_SHIFT       16
0038 #define PDBNH_ESP_ENCAP_MASK        (0xff << PDBNH_ESP_ENCAP_SHIFT)
0039 
0040 #define PDBHDRLEN_ESP_DECAP_SHIFT   16
0041 #define PDBHDRLEN_MASK          (0x0fff << PDBHDRLEN_ESP_DECAP_SHIFT)
0042 
0043 #define PDB_NH_OFFSET_SHIFT     8
0044 #define PDB_NH_OFFSET_MASK      (0xff << PDB_NH_OFFSET_SHIFT)
0045 
0046 /*
0047  * PDB - IPSec ESP Encap/Decap Options
0048  */
0049 #define PDBOPTS_ESP_ARSNONE 0x00 /* no antireplay window */
0050 #define PDBOPTS_ESP_ARS32   0x40 /* 32-entry antireplay window */
0051 #define PDBOPTS_ESP_ARS128  0x80 /* 128-entry antireplay window */
0052 #define PDBOPTS_ESP_ARS64   0xc0 /* 64-entry antireplay window */
0053 #define PDBOPTS_ESP_ARS_MASK    0xc0 /* antireplay window mask */
0054 #define PDBOPTS_ESP_IVSRC   0x20 /* IV comes from internal random gen */
0055 #define PDBOPTS_ESP_ESN     0x10 /* extended sequence included */
0056 #define PDBOPTS_ESP_OUTFMT  0x08 /* output only decapsulation (decap) */
0057 #define PDBOPTS_ESP_IPHDRSRC    0x08 /* IP header comes from PDB (encap) */
0058 #define PDBOPTS_ESP_INCIPHDR    0x04 /* Prepend IP header to output frame */
0059 #define PDBOPTS_ESP_IPVSN   0x02 /* process IPv6 header */
0060 #define PDBOPTS_ESP_AOFL    0x04 /* adjust out frame len (decap, SEC>=5.3)*/
0061 #define PDBOPTS_ESP_TUNNEL  0x01 /* tunnel mode next-header byte */
0062 #define PDBOPTS_ESP_IPV6    0x02 /* ip header version is V6 */
0063 #define PDBOPTS_ESP_DIFFSERV    0x40 /* copy TOS/TC from inner iphdr */
0064 #define PDBOPTS_ESP_UPDATE_CSUM 0x80 /* encap-update ip header checksum */
0065 #define PDBOPTS_ESP_VERIFY_CSUM 0x20 /* decap-validate ip header checksum */
0066 
0067 /*
0068  * General IPSec encap/decap PDB definitions
0069  */
0070 
0071 /**
0072  * ipsec_encap_cbc - PDB part for IPsec CBC encapsulation
0073  * @iv: 16-byte array initialization vector
0074  */
0075 struct ipsec_encap_cbc {
0076     u8 iv[16];
0077 };
0078 
0079 /**
0080  * ipsec_encap_ctr - PDB part for IPsec CTR encapsulation
0081  * @ctr_nonce: 4-byte array nonce
0082  * @ctr_initial: initial count constant
0083  * @iv: initialization vector
0084  */
0085 struct ipsec_encap_ctr {
0086     u8 ctr_nonce[4];
0087     u32 ctr_initial;
0088     u64 iv;
0089 };
0090 
0091 /**
0092  * ipsec_encap_ccm - PDB part for IPsec CCM encapsulation
0093  * @salt: 3-byte array salt (lower 24 bits)
0094  * @ccm_opt: CCM algorithm options - MSB-LSB description:
0095  *  b0_flags (8b) - CCM B0; use 0x5B for 8-byte ICV, 0x6B for 12-byte ICV,
0096  *    0x7B for 16-byte ICV (cf. RFC4309, RFC3610)
0097  *  ctr_flags (8b) - counter flags; constant equal to 0x3
0098  *  ctr_initial (16b) - initial count constant
0099  * @iv: initialization vector
0100  */
0101 struct ipsec_encap_ccm {
0102     u8 salt[4];
0103     u32 ccm_opt;
0104     u64 iv;
0105 };
0106 
0107 /**
0108  * ipsec_encap_gcm - PDB part for IPsec GCM encapsulation
0109  * @salt: 3-byte array salt (lower 24 bits)
0110  * @rsvd: reserved, do not use
0111  * @iv: initialization vector
0112  */
0113 struct ipsec_encap_gcm {
0114     u8 salt[4];
0115     u32 rsvd1;
0116     u64 iv;
0117 };
0118 
0119 /**
0120  * ipsec_encap_pdb - PDB for IPsec encapsulation
0121  * @options: MSB-LSB description
0122  *  hmo (header manipulation options) - 4b
0123  *  reserved - 4b
0124  *  next header - 8b
0125  *  next header offset - 8b
0126  *  option flags (depend on selected algorithm) - 8b
0127  * @seq_num_ext_hi: (optional) IPsec Extended Sequence Number (ESN)
0128  * @seq_num: IPsec sequence number
0129  * @spi: IPsec SPI (Security Parameters Index)
0130  * @ip_hdr_len: optional IP Header length (in bytes)
0131  *  reserved - 16b
0132  *  Opt. IP Hdr Len - 16b
0133  * @ip_hdr: optional IP Header content
0134  */
0135 struct ipsec_encap_pdb {
0136     u32 options;
0137     u32 seq_num_ext_hi;
0138     u32 seq_num;
0139     union {
0140         struct ipsec_encap_cbc cbc;
0141         struct ipsec_encap_ctr ctr;
0142         struct ipsec_encap_ccm ccm;
0143         struct ipsec_encap_gcm gcm;
0144     };
0145     u32 spi;
0146     u32 ip_hdr_len;
0147     u32 ip_hdr[];
0148 };
0149 
0150 /**
0151  * ipsec_decap_cbc - PDB part for IPsec CBC decapsulation
0152  * @rsvd: reserved, do not use
0153  */
0154 struct ipsec_decap_cbc {
0155     u32 rsvd[2];
0156 };
0157 
0158 /**
0159  * ipsec_decap_ctr - PDB part for IPsec CTR decapsulation
0160  * @ctr_nonce: 4-byte array nonce
0161  * @ctr_initial: initial count constant
0162  */
0163 struct ipsec_decap_ctr {
0164     u8 ctr_nonce[4];
0165     u32 ctr_initial;
0166 };
0167 
0168 /**
0169  * ipsec_decap_ccm - PDB part for IPsec CCM decapsulation
0170  * @salt: 3-byte salt (lower 24 bits)
0171  * @ccm_opt: CCM algorithm options - MSB-LSB description:
0172  *  b0_flags (8b) - CCM B0; use 0x5B for 8-byte ICV, 0x6B for 12-byte ICV,
0173  *    0x7B for 16-byte ICV (cf. RFC4309, RFC3610)
0174  *  ctr_flags (8b) - counter flags; constant equal to 0x3
0175  *  ctr_initial (16b) - initial count constant
0176  */
0177 struct ipsec_decap_ccm {
0178     u8 salt[4];
0179     u32 ccm_opt;
0180 };
0181 
0182 /**
0183  * ipsec_decap_gcm - PDB part for IPsec GCN decapsulation
0184  * @salt: 4-byte salt
0185  * @rsvd: reserved, do not use
0186  */
0187 struct ipsec_decap_gcm {
0188     u8 salt[4];
0189     u32 resvd;
0190 };
0191 
0192 /**
0193  * ipsec_decap_pdb - PDB for IPsec decapsulation
0194  * @options: MSB-LSB description
0195  *  hmo (header manipulation options) - 4b
0196  *  IP header length - 12b
0197  *  next header offset - 8b
0198  *  option flags (depend on selected algorithm) - 8b
0199  * @seq_num_ext_hi: (optional) IPsec Extended Sequence Number (ESN)
0200  * @seq_num: IPsec sequence number
0201  * @anti_replay: Anti-replay window; size depends on ARS (option flags)
0202  */
0203 struct ipsec_decap_pdb {
0204     u32 options;
0205     union {
0206         struct ipsec_decap_cbc cbc;
0207         struct ipsec_decap_ctr ctr;
0208         struct ipsec_decap_ccm ccm;
0209         struct ipsec_decap_gcm gcm;
0210     };
0211     u32 seq_num_ext_hi;
0212     u32 seq_num;
0213     __be32 anti_replay[4];
0214 };
0215 
0216 /*
0217  * IPSec ESP Datapath Protocol Override Register (DPOVRD)
0218  */
0219 struct ipsec_deco_dpovrd {
0220 #define IPSEC_ENCAP_DECO_DPOVRD_USE 0x80
0221     u8 ovrd_ecn;
0222     u8 ip_hdr_len;
0223     u8 nh_offset;
0224     u8 next_header; /* reserved if decap */
0225 };
0226 
0227 /*
0228  * IEEE 802.11i WiFi Protocol Data Block
0229  */
0230 #define WIFI_PDBOPTS_FCS    0x01
0231 #define WIFI_PDBOPTS_AR     0x40
0232 
0233 struct wifi_encap_pdb {
0234     u16 mac_hdr_len;
0235     u8 rsvd;
0236     u8 options;
0237     u8 iv_flags;
0238     u8 pri;
0239     u16 pn1;
0240     u32 pn2;
0241     u16 frm_ctrl_mask;
0242     u16 seq_ctrl_mask;
0243     u8 rsvd1[2];
0244     u8 cnst;
0245     u8 key_id;
0246     u8 ctr_flags;
0247     u8 rsvd2;
0248     u16 ctr_init;
0249 };
0250 
0251 struct wifi_decap_pdb {
0252     u16 mac_hdr_len;
0253     u8 rsvd;
0254     u8 options;
0255     u8 iv_flags;
0256     u8 pri;
0257     u16 pn1;
0258     u32 pn2;
0259     u16 frm_ctrl_mask;
0260     u16 seq_ctrl_mask;
0261     u8 rsvd1[4];
0262     u8 ctr_flags;
0263     u8 rsvd2;
0264     u16 ctr_init;
0265 };
0266 
0267 /*
0268  * IEEE 802.16 WiMAX Protocol Data Block
0269  */
0270 #define WIMAX_PDBOPTS_FCS   0x01
0271 #define WIMAX_PDBOPTS_AR    0x40 /* decap only */
0272 
0273 struct wimax_encap_pdb {
0274     u8 rsvd[3];
0275     u8 options;
0276     u32 nonce;
0277     u8 b0_flags;
0278     u8 ctr_flags;
0279     u16 ctr_init;
0280     /* begin DECO writeback region */
0281     u32 pn;
0282     /* end DECO writeback region */
0283 };
0284 
0285 struct wimax_decap_pdb {
0286     u8 rsvd[3];
0287     u8 options;
0288     u32 nonce;
0289     u8 iv_flags;
0290     u8 ctr_flags;
0291     u16 ctr_init;
0292     /* begin DECO writeback region */
0293     u32 pn;
0294     u8 rsvd1[2];
0295     u16 antireplay_len;
0296     u64 antireplay_scorecard;
0297     /* end DECO writeback region */
0298 };
0299 
0300 /*
0301  * IEEE 801.AE MacSEC Protocol Data Block
0302  */
0303 #define MACSEC_PDBOPTS_FCS  0x01
0304 #define MACSEC_PDBOPTS_AR   0x40 /* used in decap only */
0305 
0306 struct macsec_encap_pdb {
0307     u16 aad_len;
0308     u8 rsvd;
0309     u8 options;
0310     u64 sci;
0311     u16 ethertype;
0312     u8 tci_an;
0313     u8 rsvd1;
0314     /* begin DECO writeback region */
0315     u32 pn;
0316     /* end DECO writeback region */
0317 };
0318 
0319 struct macsec_decap_pdb {
0320     u16 aad_len;
0321     u8 rsvd;
0322     u8 options;
0323     u64 sci;
0324     u8 rsvd1[3];
0325     /* begin DECO writeback region */
0326     u8 antireplay_len;
0327     u32 pn;
0328     u64 antireplay_scorecard;
0329     /* end DECO writeback region */
0330 };
0331 
0332 /*
0333  * SSL/TLS/DTLS Protocol Data Blocks
0334  */
0335 
0336 #define TLS_PDBOPTS_ARS32   0x40
0337 #define TLS_PDBOPTS_ARS64   0xc0
0338 #define TLS_PDBOPTS_OUTFMT  0x08
0339 #define TLS_PDBOPTS_IV_WRTBK    0x02 /* 1.1/1.2/DTLS only */
0340 #define TLS_PDBOPTS_EXP_RND_IV  0x01 /* 1.1/1.2/DTLS only */
0341 
0342 struct tls_block_encap_pdb {
0343     u8 type;
0344     u8 version[2];
0345     u8 options;
0346     u64 seq_num;
0347     u32 iv[4];
0348 };
0349 
0350 struct tls_stream_encap_pdb {
0351     u8 type;
0352     u8 version[2];
0353     u8 options;
0354     u64 seq_num;
0355     u8 i;
0356     u8 j;
0357     u8 rsvd1[2];
0358 };
0359 
0360 struct dtls_block_encap_pdb {
0361     u8 type;
0362     u8 version[2];
0363     u8 options;
0364     u16 epoch;
0365     u16 seq_num[3];
0366     u32 iv[4];
0367 };
0368 
0369 struct tls_block_decap_pdb {
0370     u8 rsvd[3];
0371     u8 options;
0372     u64 seq_num;
0373     u32 iv[4];
0374 };
0375 
0376 struct tls_stream_decap_pdb {
0377     u8 rsvd[3];
0378     u8 options;
0379     u64 seq_num;
0380     u8 i;
0381     u8 j;
0382     u8 rsvd1[2];
0383 };
0384 
0385 struct dtls_block_decap_pdb {
0386     u8 rsvd[3];
0387     u8 options;
0388     u16 epoch;
0389     u16 seq_num[3];
0390     u32 iv[4];
0391     u64 antireplay_scorecard;
0392 };
0393 
0394 /*
0395  * SRTP Protocol Data Blocks
0396  */
0397 #define SRTP_PDBOPTS_MKI    0x08
0398 #define SRTP_PDBOPTS_AR     0x40
0399 
0400 struct srtp_encap_pdb {
0401     u8 x_len;
0402     u8 mki_len;
0403     u8 n_tag;
0404     u8 options;
0405     u32 cnst0;
0406     u8 rsvd[2];
0407     u16 cnst1;
0408     u16 salt[7];
0409     u16 cnst2;
0410     u32 rsvd1;
0411     u32 roc;
0412     u32 opt_mki;
0413 };
0414 
0415 struct srtp_decap_pdb {
0416     u8 x_len;
0417     u8 mki_len;
0418     u8 n_tag;
0419     u8 options;
0420     u32 cnst0;
0421     u8 rsvd[2];
0422     u16 cnst1;
0423     u16 salt[7];
0424     u16 cnst2;
0425     u16 rsvd1;
0426     u16 seq_num;
0427     u32 roc;
0428     u64 antireplay_scorecard;
0429 };
0430 
0431 /*
0432  * DSA/ECDSA Protocol Data Blocks
0433  * Two of these exist: DSA-SIGN, and DSA-VERIFY. They are similar
0434  * except for the treatment of "w" for verify, "s" for sign,
0435  * and the placement of "a,b".
0436  */
0437 #define DSA_PDB_SGF_SHIFT   24
0438 #define DSA_PDB_SGF_MASK    (0xff << DSA_PDB_SGF_SHIFT)
0439 #define DSA_PDB_SGF_Q       (0x80 << DSA_PDB_SGF_SHIFT)
0440 #define DSA_PDB_SGF_R       (0x40 << DSA_PDB_SGF_SHIFT)
0441 #define DSA_PDB_SGF_G       (0x20 << DSA_PDB_SGF_SHIFT)
0442 #define DSA_PDB_SGF_W       (0x10 << DSA_PDB_SGF_SHIFT)
0443 #define DSA_PDB_SGF_S       (0x10 << DSA_PDB_SGF_SHIFT)
0444 #define DSA_PDB_SGF_F       (0x08 << DSA_PDB_SGF_SHIFT)
0445 #define DSA_PDB_SGF_C       (0x04 << DSA_PDB_SGF_SHIFT)
0446 #define DSA_PDB_SGF_D       (0x02 << DSA_PDB_SGF_SHIFT)
0447 #define DSA_PDB_SGF_AB_SIGN (0x02 << DSA_PDB_SGF_SHIFT)
0448 #define DSA_PDB_SGF_AB_VERIFY   (0x01 << DSA_PDB_SGF_SHIFT)
0449 
0450 #define DSA_PDB_L_SHIFT     7
0451 #define DSA_PDB_L_MASK      (0x3ff << DSA_PDB_L_SHIFT)
0452 
0453 #define DSA_PDB_N_MASK      0x7f
0454 
0455 struct dsa_sign_pdb {
0456     u32 sgf_ln; /* Use DSA_PDB_ definitions per above */
0457     u8 *q;
0458     u8 *r;
0459     u8 *g;  /* or Gx,y */
0460     u8 *s;
0461     u8 *f;
0462     u8 *c;
0463     u8 *d;
0464     u8 *ab; /* ECC only */
0465     u8 *u;
0466 };
0467 
0468 struct dsa_verify_pdb {
0469     u32 sgf_ln;
0470     u8 *q;
0471     u8 *r;
0472     u8 *g;  /* or Gx,y */
0473     u8 *w; /* or Wx,y */
0474     u8 *f;
0475     u8 *c;
0476     u8 *d;
0477     u8 *tmp; /* temporary data block */
0478     u8 *ab; /* only used if ECC processing */
0479 };
0480 
0481 /* RSA Protocol Data Block */
0482 #define RSA_PDB_SGF_SHIFT       28
0483 #define RSA_PDB_E_SHIFT         12
0484 #define RSA_PDB_E_MASK          (0xFFF << RSA_PDB_E_SHIFT)
0485 #define RSA_PDB_D_SHIFT         12
0486 #define RSA_PDB_D_MASK          (0xFFF << RSA_PDB_D_SHIFT)
0487 #define RSA_PDB_Q_SHIFT         12
0488 #define RSA_PDB_Q_MASK          (0xFFF << RSA_PDB_Q_SHIFT)
0489 
0490 #define RSA_PDB_SGF_F           (0x8 << RSA_PDB_SGF_SHIFT)
0491 #define RSA_PDB_SGF_G           (0x4 << RSA_PDB_SGF_SHIFT)
0492 #define RSA_PRIV_PDB_SGF_F      (0x4 << RSA_PDB_SGF_SHIFT)
0493 #define RSA_PRIV_PDB_SGF_G      (0x8 << RSA_PDB_SGF_SHIFT)
0494 
0495 #define RSA_PRIV_KEY_FRM_1      0
0496 #define RSA_PRIV_KEY_FRM_2      1
0497 #define RSA_PRIV_KEY_FRM_3      2
0498 
0499 /**
0500  * RSA Encrypt Protocol Data Block
0501  * @sgf: scatter-gather field
0502  * @f_dma: dma address of input data
0503  * @g_dma: dma address of encrypted output data
0504  * @n_dma: dma address of RSA modulus
0505  * @e_dma: dma address of RSA public exponent
0506  * @f_len: length in octets of the input data
0507  */
0508 struct rsa_pub_pdb {
0509     u32     sgf;
0510     dma_addr_t  f_dma;
0511     dma_addr_t  g_dma;
0512     dma_addr_t  n_dma;
0513     dma_addr_t  e_dma;
0514     u32     f_len;
0515 };
0516 
0517 #define SIZEOF_RSA_PUB_PDB  (2 * sizeof(u32) + 4 * caam_ptr_sz)
0518 
0519 /**
0520  * RSA Decrypt PDB - Private Key Form #1
0521  * @sgf: scatter-gather field
0522  * @g_dma: dma address of encrypted input data
0523  * @f_dma: dma address of output data
0524  * @n_dma: dma address of RSA modulus
0525  * @d_dma: dma address of RSA private exponent
0526  */
0527 struct rsa_priv_f1_pdb {
0528     u32     sgf;
0529     dma_addr_t  g_dma;
0530     dma_addr_t  f_dma;
0531     dma_addr_t  n_dma;
0532     dma_addr_t  d_dma;
0533 };
0534 
0535 #define SIZEOF_RSA_PRIV_F1_PDB  (sizeof(u32) + 4 * caam_ptr_sz)
0536 
0537 /**
0538  * RSA Decrypt PDB - Private Key Form #2
0539  * @sgf     : scatter-gather field
0540  * @g_dma   : dma address of encrypted input data
0541  * @f_dma   : dma address of output data
0542  * @d_dma   : dma address of RSA private exponent
0543  * @p_dma   : dma address of RSA prime factor p of RSA modulus n
0544  * @q_dma   : dma address of RSA prime factor q of RSA modulus n
0545  * @tmp1_dma: dma address of temporary buffer. CAAM uses this temporary buffer
0546  *            as internal state buffer. It is assumed to be as long as p.
0547  * @tmp2_dma: dma address of temporary buffer. CAAM uses this temporary buffer
0548  *            as internal state buffer. It is assumed to be as long as q.
0549  * @p_q_len : length in bytes of first two prime factors of the RSA modulus n
0550  */
0551 struct rsa_priv_f2_pdb {
0552     u32     sgf;
0553     dma_addr_t  g_dma;
0554     dma_addr_t  f_dma;
0555     dma_addr_t  d_dma;
0556     dma_addr_t  p_dma;
0557     dma_addr_t  q_dma;
0558     dma_addr_t  tmp1_dma;
0559     dma_addr_t  tmp2_dma;
0560     u32     p_q_len;
0561 };
0562 
0563 #define SIZEOF_RSA_PRIV_F2_PDB  (2 * sizeof(u32) + 7 * caam_ptr_sz)
0564 
0565 /**
0566  * RSA Decrypt PDB - Private Key Form #3
0567  * This is the RSA Chinese Reminder Theorem (CRT) form for two prime factors of
0568  * the RSA modulus.
0569  * @sgf     : scatter-gather field
0570  * @g_dma   : dma address of encrypted input data
0571  * @f_dma   : dma address of output data
0572  * @c_dma   : dma address of RSA CRT coefficient
0573  * @p_dma   : dma address of RSA prime factor p of RSA modulus n
0574  * @q_dma   : dma address of RSA prime factor q of RSA modulus n
0575  * @dp_dma  : dma address of RSA CRT exponent of RSA prime factor p
0576  * @dp_dma  : dma address of RSA CRT exponent of RSA prime factor q
0577  * @tmp1_dma: dma address of temporary buffer. CAAM uses this temporary buffer
0578  *            as internal state buffer. It is assumed to be as long as p.
0579  * @tmp2_dma: dma address of temporary buffer. CAAM uses this temporary buffer
0580  *            as internal state buffer. It is assumed to be as long as q.
0581  * @p_q_len : length in bytes of first two prime factors of the RSA modulus n
0582  */
0583 struct rsa_priv_f3_pdb {
0584     u32     sgf;
0585     dma_addr_t  g_dma;
0586     dma_addr_t  f_dma;
0587     dma_addr_t  c_dma;
0588     dma_addr_t  p_dma;
0589     dma_addr_t  q_dma;
0590     dma_addr_t  dp_dma;
0591     dma_addr_t  dq_dma;
0592     dma_addr_t  tmp1_dma;
0593     dma_addr_t  tmp2_dma;
0594     u32     p_q_len;
0595 };
0596 
0597 #define SIZEOF_RSA_PRIV_F3_PDB  (2 * sizeof(u32) + 9 * caam_ptr_sz)
0598 
0599 #endif