FWARC/2006/425 NCS HV API Update 2
6425909 crypto (mau) interrupt state machine opens window for lost interrupts
--- a/usr/src/uts/sun4v/sys/ncp.h Wed Aug 02 17:08:49 2006 -0700
+++ b/usr/src/uts/sun4v/sys/ncp.h Wed Aug 02 17:28:02 2006 -0700
@@ -250,6 +250,9 @@
kstat_named_t ns_qfull;
kstat_named_t ns_qbusy;
kstat_named_t ns_qupdate_failure;
+ kstat_named_t ns_nintr;
+ kstat_named_t ns_nintr_err;
+ kstat_named_t ns_nintr_jobs;
} ns_mau[NCP_MAX_NMAUS];
};
@@ -328,6 +331,9 @@
uint64_t qks_qfull;
uint64_t qks_qbusy;
uint64_t qks_qfail;
+ uint64_t qks_nintr;
+ uint64_t qks_nintr_err;
+ uint64_t qks_nintr_jobs;
} nmq_ks;
} ncp_mau_queue_t;
@@ -387,6 +393,7 @@
} ncp_mau2cpu_map_t;
struct ncp {
+ uint_t n_hvapi_major_version;
uint_t n_hvapi_minor_version;
kmutex_t n_lock;
kmem_cache_t *n_ds_cache;
--- a/usr/src/uts/sun4v/sys/ncs.h Wed Aug 02 17:08:49 2006 -0700
+++ b/usr/src/uts/sun4v/sys/ncs.h Wed Aug 02 17:28:02 2006 -0700
@@ -33,17 +33,11 @@
#endif
/*
- * NCS HV API version definitions.
- */
-#define NCS_MAJOR_VER 1
-#define NCS_MINOR_VER 1
-
-/*
* NCS HV API v1.0
*/
#define HV_NCS_REQUEST 0x110
/*
- * NCS HV API v1.1
+ * NCS HV API v2.0
*/
#define HV_NCS_QCONF 0x111
#define HV_NCS_QINFO 0x112
@@ -51,6 +45,7 @@
#define HV_NCS_GETTAIL 0x114
#define HV_NCS_SETTAIL 0x115
#define HV_NCS_QHANDLE_TO_DEVINO 0x116
+#define HV_NCS_SETHEAD_MARKER 0x117
#ifndef _ASM
/* Forward typedefs */
@@ -74,7 +69,7 @@
uint64_t length:6;
} bits;
};
-#endif /* _ASM */
+#endif /* !_ASM */
/* Values for ma_ctl operation field */
#define MA_OP_LOAD 0x0
@@ -193,7 +188,8 @@
uint64_t nhd_state; /* ND_STATE_... */
uint64_t nhd_type; /* ND_TYPE_... */
ma_regs_t nhd_regs;
- uint64_t _padding[2];
+ uint64_t nhd_errstatus;
+ uint64_t _padding;
} ncs_hvdesc_t;
#define NCS_HVDESC_SHIFT 6 /* log2(NCS_HVDESC_SIZE) */
@@ -202,15 +198,15 @@
extern uint64_t hv_ncs_request(int, uint64_t, size_t);
-#endif /* _ASM */
+#endif /* !_ASM */
/*
- * NCS HV API v1.1 definitions (FWARC/2006/174)
+ * NCS HV API v2.0 definitions (FWARC/2006/174, FWARC/2006/425)
*
- * Some of the structures above (v1.0) are inherited for v1.1
+ * Some of the structures above (v1.0) are inherited for v2.0
*/
/*
- * In v1.1, the nhd_type field has the following values
+ * 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.
@@ -221,6 +217,13 @@
#define ND_TYPE_END 0x80
/*
+ * nhd_errstatus
+ */
+#define ND_ERR_OK 0x00
+#define ND_ERR_INVOP 0x01 /* invalid op */
+#define ND_ERR_HWE 0x02 /* hardware err */
+
+/*
* Types of queues supported by NCS
*/
#define NCS_QTYPE_MAU 0x1
@@ -244,8 +247,9 @@
extern uint64_t hv_ncs_gettail(uint64_t, uint64_t *);
extern uint64_t hv_ncs_settail(uint64_t, uint64_t);
extern uint64_t hv_ncs_qhandle_to_devino(uint64_t, uint64_t *);
+extern uint64_t hv_ncs_sethead_marker(uint64_t, uint64_t);
extern uint64_t hv_ncs_intr_clrstate(uint64_t);
-#endif /* _ASM */
+#endif /* !_ASM */
#ifdef __cplusplus
}