* ========== Copyright Header Begin ==========================================
* Hypervisor Software File: ncs_api.h
* Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
* - Do no alter or remove copyright notices
* - Redistribution and use of this software in source and binary forms, with
* or without modification, are permitted provided that the following
* - Redistribution of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistribution in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of Sun Microsystems, Inc. or the names of contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
* This software is provided "AS IS," without a warranty of any kind.
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
* MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN
* OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR
* FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
* DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
* ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
* SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* You acknowledge that this software is not designed, licensed or
* intended for use in the design, construction, operation or maintenance of
* ========== Copyright Header End ============================================
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
#pragma ident "@(#)ncs_api.h 1.4 07/05/03 SMI"
* NCS API v1.0 definitions (PSARC/2005/125)
* NCS Crypto Function Numbers
#define NCS_V10_QCONF 0x1
#define NCS_V10_QTAIL_UPDATE 0x2
* The following are parameters to the NCS_QTAIL_UPDATE calls:
* NCS_SYNC Perform MA/SPU operations synchronously,
* i.e. wait for all enqueued operations
* to complete before progressing to
* NCS_ASYNC Perform MA/SPU operations asynchronously,
* i.e. kick off the next MA/SPU operation
* without waiting for its completion.
* Pointers passed to NCS must be on 8-byte boundary.
* CWQ pointers must be on 64-byte boundary.
#define NCS_CWQ_PTR_ALIGN 64
typedef struct ncs_qconf_arg
{
typedef struct ncs_qtail_update_arg
{
} ncs_qtail_update_arg_t
;
* The interface to the MAU is via the following data structures. The
* structure consists of a copy of all relevant registers required to perform
* the requested operation.
typedef union cwq_cw_ret
{
uint64_t cw_ret_dst_addr
;
uint64_t cw_auth_key_addr
;
uint64_t cw_auth_iv_addr
;
uint64_t cw_final_auth_state_addr
;
uint64_t cw_enc_key_addr
;
* struct ncs_hvdesc.nhd_state
#define ND_STATE_PENDING 1
* struct ncs_hvdesc.nhd_type
#define ND_TYPE_UNASSIGNED 0x00
* NCS HV descriptor structure (ncs_hvdesc) MUST MATCH
* corresponding one in kernel/driver.
* Structure padded to the next power of 2.
uint64_t nhd_state
; /* set in OS/HV */
uint64_t nhd_type
; /* set in OS */
ma_regs_t nhd_regs
; /* used in HV */
uint64_t nhd_errstatus
; /* set in HV (v2.0) */
* NCS HV API v2.0 definitions (FWARC/2006/174)
* Some of the structures above (v1.0) are inherited for v2.0
* In v2.0, the nhd_type field has the following values
* when non-zero (unassigned). The nhd_type field indicates
* whether the descriptor is the beginning of a crypto job,
* the continuation, or the end/last descriptor in a job.
* A job may be comprised of multiple descriptors.
#define ND_TYPE_START 0x01
#define ND_TYPE_CONT 0x02
#define ND_ERR_INVOP 0x01
* Types of queues supported by NCS
#define NCS_QTYPE_MAU 0x1
#define NCS_QTYPE_CWQ 0x2