xref: /isa-l_crypto/sha512_mb/sha512_mb_mgr_init_sse.c (revision 592e639e5cd0e9fa1a927dd7459a23176ec36070)
16df3ef80SGreg Tucker /**********************************************************************
26df3ef80SGreg Tucker   Copyright(c) 2011-2016 Intel Corporation All rights reserved.
36df3ef80SGreg Tucker 
46df3ef80SGreg Tucker   Redistribution and use in source and binary forms, with or without
56df3ef80SGreg Tucker   modification, are permitted provided that the following conditions
66df3ef80SGreg Tucker   are met:
76df3ef80SGreg Tucker     * Redistributions of source code must retain the above copyright
86df3ef80SGreg Tucker       notice, this list of conditions and the following disclaimer.
96df3ef80SGreg Tucker     * Redistributions in binary form must reproduce the above copyright
106df3ef80SGreg Tucker       notice, this list of conditions and the following disclaimer in
116df3ef80SGreg Tucker       the documentation and/or other materials provided with the
126df3ef80SGreg Tucker       distribution.
136df3ef80SGreg Tucker     * Neither the name of Intel Corporation nor the names of its
146df3ef80SGreg Tucker       contributors may be used to endorse or promote products derived
156df3ef80SGreg Tucker       from this software without specific prior written permission.
166df3ef80SGreg Tucker 
176df3ef80SGreg Tucker   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
186df3ef80SGreg Tucker   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
196df3ef80SGreg Tucker   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
206df3ef80SGreg Tucker   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
216df3ef80SGreg Tucker   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
226df3ef80SGreg Tucker   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
236df3ef80SGreg Tucker   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
246df3ef80SGreg Tucker   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
256df3ef80SGreg Tucker   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
266df3ef80SGreg Tucker   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
276df3ef80SGreg Tucker   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
286df3ef80SGreg Tucker **********************************************************************/
296df3ef80SGreg Tucker 
306df3ef80SGreg Tucker #include "sha512_mb.h"
316df3ef80SGreg Tucker 
323fb7b5f1SMarcel Cornu void
_sha512_mb_mgr_init_sse(ISAL_SHA512_MB_JOB_MGR * state)33*592e639eSPablo de Lara _sha512_mb_mgr_init_sse(ISAL_SHA512_MB_JOB_MGR *state)
346df3ef80SGreg Tucker {
356df3ef80SGreg Tucker         unsigned int j;
366df3ef80SGreg Tucker 
37fabd0c36SMarcel Cornu         memset(state, 0, sizeof(*state));
386df3ef80SGreg Tucker         state->lens[0] = 0;
396df3ef80SGreg Tucker         state->lens[1] = 1;
406df3ef80SGreg Tucker         state->unused_lanes = 0xFF0100;
41a2066853SSergey Kaplun         state->num_lanes_inuse = 0;
42*592e639eSPablo de Lara         for (j = 0; j < ISAL_SHA512_MIN_LANES; j++) {
436df3ef80SGreg Tucker                 state->ldata[j].job_in_lane = 0;
446df3ef80SGreg Tucker         }
456df3ef80SGreg Tucker }
46