summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2003-02-19 19:59:15 +0000
committerJason Wright <jason@cvs.openbsd.org>2003-02-19 19:59:15 +0000
commit31f53ff018d8335fb6c11f75d1055875d76df2c9 (patch)
treeebd2ad0099bd72b8b97f595a26703dbfe7a46a28
parent49145cfe1d688c32f3b482d51f0194cafebd1af0 (diff)
- Bump size of MAX_RESULT by 4 to include compression result
- add defines for compression - add bit/structure defintions for the result structures
-rw-r--r--sys/dev/pci/hifn7751reg.h52
1 files changed, 47 insertions, 5 deletions
diff --git a/sys/dev/pci/hifn7751reg.h b/sys/dev/pci/hifn7751reg.h
index b24fafcebd7..8c85e68b321 100644
--- a/sys/dev/pci/hifn7751reg.h
+++ b/sys/dev/pci/hifn7751reg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: hifn7751reg.h,v 1.41 2003/02/17 16:48:22 jason Exp $ */
+/* $OpenBSD: hifn7751reg.h,v 1.42 2003/02/19 19:59:14 jason Exp $ */
/*
* Invertex AEON / Hifn 7751 driver
@@ -59,12 +59,12 @@
*
* MAX_COMMAND = base command + mac command + encrypt command +
* mac-key + rc4-key
- * MAX_RESULT = base result + mac result + mac + encrypt result
+ * MAX_RESULT = base result + comp result + mac result + mac + encrypt result
*
*
*/
#define HIFN_MAX_COMMAND (8 + 8 + 8 + 64 + 260)
-#define HIFN_MAX_RESULT (8 + 4 + 20 + 4)
+#define HIFN_MAX_RESULT (8 + 4 + 4 + 20 + 4)
/*
* hifn_desc_t
@@ -372,8 +372,10 @@ struct hifn_base_command {
volatile u_int16_t total_dest_count;
};
-#define HIFN_BASE_CMD_MAC 0x0400
-#define HIFN_BASE_CMD_CRYPT 0x0800
+#define HIFN_BASE_CMD_COMP 0x0100 /* enable compression engine */
+#define HIFN_BASE_CMD_PAD 0x0200 /* enable padding engine */
+#define HIFN_BASE_CMD_MAC 0x0400 /* enable MAC engine */
+#define HIFN_BASE_CMD_CRYPT 0x0800 /* enable crypt engine */
#define HIFN_BASE_CMD_DECODE 0x2000
#define HIFN_BASE_CMD_SRCLEN_M 0xc000
#define HIFN_BASE_CMD_SRCLEN_S 14
@@ -457,6 +459,46 @@ struct hifn_comp_command {
#define HIFN_COMP_CMD_ALG_MPPC 0x0001 /* MPPC */
#define HIFN_COMP_CMD_ALG_LZS 0x0000 /* LZS */
+struct hifn_base_result {
+ volatile u_int16_t flags;
+ volatile u_int16_t session;
+ volatile u_int16_t src_cnt; /* 15:0 of source count */
+ volatile u_int16_t dst_cnt; /* 15:0 of dest count */
+};
+
+#define HIFN_BASE_RES_DSTOVERRUN 0x0200 /* destination overrun */
+#define HIFN_BASE_RES_SRCLEN_M 0xc000 /* 17:16 of source count */
+#define HIFN_BASE_RES_SRCLEN_S 14
+#define HIFN_BASE_RES_DSTLEN_M 0x3000 /* 17:16 of dest count */
+#define HIFN_BASE_RES_DSTLEN_S 12
+
+struct hifn_comp_result {
+ volatile u_int16_t flags;
+ volatile u_int16_t crc;
+};
+
+#define HIFN_COMP_RES_LCB_M 0xff00 /* longitudinal check byte */
+#define HIFN_COMP_RES_LCB_S 8
+#define HIFN_COMP_RES_RESTART 0x0004 /* MPPC: restart */
+#define HIFN_COMP_RES_ENDMARKER 0x0002 /* LZS: end marker seen */
+#define HIFN_COMP_RES_SRC_NOTZERO 0x0001 /* source expired */
+
+struct hifn_mac_result {
+ volatile u_int16_t flags;
+ volatile u_int16_t reserved;
+ /* followed by 0, 6, 8, or 10 u_int16_t's of the MAC, then crypt */
+};
+
+#define HIFN_MAC_RES_MISCOMPARE 0x0002 /* compare failed */
+#define HIFN_MAC_RES_SRC_NOTZERO 0x0001 /* source expired */
+
+struct hifn_crypt_result {
+ volatile u_int16_t flags;
+ volatile u_int16_t reserved;
+};
+
+#define HIFN_CRYPT_RES_SRC_NOTZERO 0x0001 /* source expired */
+
/*
* The poll frequency and poll scalar defines are unshifted values used
* to set fields in the DMA Configuration Register.