Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/qat_c2xxx/qat.c
- This file was moved from sys/dev/qat/qat.c.
Show First 20 Lines • Show All 86 Lines • ▼ Show 20 Lines | |||||
#include <dev/pci/pcireg.h> | #include <dev/pci/pcireg.h> | ||||
#include <dev/pci/pcivar.h> | #include <dev/pci/pcivar.h> | ||||
#include "qatreg.h" | #include "qatreg.h" | ||||
#include "qatvar.h" | #include "qatvar.h" | ||||
#include "qat_aevar.h" | #include "qat_aevar.h" | ||||
extern struct qat_hw qat_hw_c2xxx; | extern struct qat_hw qat_hw_c2xxx; | ||||
extern struct qat_hw qat_hw_c3xxx; | |||||
extern struct qat_hw qat_hw_c62x; | |||||
extern struct qat_hw qat_hw_d15xx; | |||||
extern struct qat_hw qat_hw_dh895xcc; | |||||
#define PCI_VENDOR_INTEL 0x8086 | #define PCI_VENDOR_INTEL 0x8086 | ||||
#define PCI_PRODUCT_INTEL_C2000_IQIA_PHYS 0x1f18 | #define PCI_PRODUCT_INTEL_C2000_IQIA_PHYS 0x1f18 | ||||
#define PCI_PRODUCT_INTEL_C3K_QAT 0x19e2 | |||||
#define PCI_PRODUCT_INTEL_C3K_QAT_VF 0x19e3 | |||||
#define PCI_PRODUCT_INTEL_C620_QAT 0x37c8 | |||||
#define PCI_PRODUCT_INTEL_C620_QAT_VF 0x37c9 | |||||
#define PCI_PRODUCT_INTEL_XEOND_QAT 0x6f54 | |||||
#define PCI_PRODUCT_INTEL_XEOND_QAT_VF 0x6f55 | |||||
#define PCI_PRODUCT_INTEL_DH895XCC_QAT 0x0435 | |||||
#define PCI_PRODUCT_INTEL_DH895XCC_QAT_VF 0x0443 | |||||
static const struct qat_product { | static const struct qat_product { | ||||
uint16_t qatp_vendor; | uint16_t qatp_vendor; | ||||
uint16_t qatp_product; | uint16_t qatp_product; | ||||
const char *qatp_name; | const char *qatp_name; | ||||
enum qat_chip_type qatp_chip; | enum qat_chip_type qatp_chip; | ||||
const struct qat_hw *qatp_hw; | const struct qat_hw *qatp_hw; | ||||
} qat_products[] = { | } qat_products[] = { | ||||
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_C2000_IQIA_PHYS, | { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_C2000_IQIA_PHYS, | ||||
"Intel C2000 QuickAssist PF", | "Intel C2000 QuickAssist PF", | ||||
QAT_CHIP_C2XXX, &qat_hw_c2xxx }, | QAT_CHIP_C2XXX, &qat_hw_c2xxx }, | ||||
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_C3K_QAT, | |||||
"Intel C3000 QuickAssist PF", | |||||
QAT_CHIP_C3XXX, &qat_hw_c3xxx }, | |||||
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_C620_QAT, | |||||
"Intel C620/Xeon D-2100 QuickAssist PF", | |||||
QAT_CHIP_C62X, &qat_hw_c62x }, | |||||
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_XEOND_QAT, | |||||
"Intel Xeon D-1500 QuickAssist PF", | |||||
QAT_CHIP_D15XX, &qat_hw_d15xx }, | |||||
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_DH895XCC_QAT, | |||||
"Intel 8950 QuickAssist PCIe Adapter PF", | |||||
QAT_CHIP_DH895XCC, &qat_hw_dh895xcc }, | |||||
{ 0, 0, NULL, 0, NULL }, | { 0, 0, NULL, 0, NULL }, | ||||
}; | }; | ||||
/* Hash Algorithm specific structure */ | /* Hash Algorithm specific structure */ | ||||
/* SHA1 - 20 bytes - Initialiser state can be found in FIPS stds 180-2 */ | /* SHA1 - 20 bytes - Initialiser state can be found in FIPS stds 180-2 */ | ||||
static const uint8_t sha1_initial_state[QAT_HASH_SHA1_STATE_SIZE] = { | static const uint8_t sha1_initial_state[QAT_HASH_SHA1_STATE_SIZE] = { | ||||
0x67, 0x45, 0x23, 0x01, | 0x67, 0x45, 0x23, 0x01, | ||||
▲ Show 20 Lines • Show All 2,137 Lines • ▼ Show 20 Lines | static device_method_t qat_methods[] = { | ||||
DEVMETHOD(cryptodev_newsession, qat_newsession), | DEVMETHOD(cryptodev_newsession, qat_newsession), | ||||
DEVMETHOD(cryptodev_freesession, qat_freesession), | DEVMETHOD(cryptodev_freesession, qat_freesession), | ||||
DEVMETHOD(cryptodev_process, qat_process), | DEVMETHOD(cryptodev_process, qat_process), | ||||
DEVMETHOD_END | DEVMETHOD_END | ||||
}; | }; | ||||
static driver_t qat_driver = { | static driver_t qat_driver = { | ||||
.name = "qat", | .name = "qat_c2xxx", | ||||
.methods = qat_methods, | .methods = qat_methods, | ||||
.size = sizeof(struct qat_softc), | .size = sizeof(struct qat_softc), | ||||
}; | }; | ||||
DRIVER_MODULE(qat, pci, qat_driver, 0, 0); | DRIVER_MODULE(qat_c2xxx, pci, qat_driver, 0, 0); | ||||
MODULE_VERSION(qat, 1); | MODULE_VERSION(qat_c2xxx, 1); | ||||
MODULE_DEPEND(qat, crypto, 1, 1, 1); | MODULE_DEPEND(qat_c2xxx, crypto, 1, 1, 1); | ||||
MODULE_DEPEND(qat, pci, 1, 1, 1); | MODULE_DEPEND(qat_c2xxx, pci, 1, 1, 1); |