1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* Copyright (C) 2018 Google, Inc. */ 3 #ifndef __GASKET_CONSTANTS_H__ 4 #define __GASKET_CONSTANTS_H__ 5 6 #define GASKET_FRAMEWORK_VERSION "1.1.2" 7 8 /* 9 * The maximum number of simultaneous device types supported by the framework. 10 */ 11 #define GASKET_FRAMEWORK_DESC_MAX 2 12 13 /* The maximum devices per each type. */ 14 #define GASKET_DEV_MAX 256 15 16 /* The number of supported (and possible) PCI BARs. */ 17 #define GASKET_NUM_BARS 6 18 19 /* The number of supported Gasket page tables per device. */ 20 #define GASKET_MAX_NUM_PAGE_TABLES 1 21 22 /* Maximum length of device names (driver name + minor number suffix + NULL). */ 23 #define GASKET_NAME_MAX 32 24 25 /* Device status enumeration. */ 26 enum gasket_status { 27 /* 28 * A device is DEAD if it has not been initialized or has had an error. 29 */ 30 GASKET_STATUS_DEAD = 0, 31 /* 32 * A device is LAMED if the hardware is healthy but the kernel was 33 * unable to enable some functionality (e.g. interrupts). 34 */ 35 GASKET_STATUS_LAMED, 36 37 /* A device is ALIVE if it is ready for operation. */ 38 GASKET_STATUS_ALIVE, 39 40 /* 41 * This status is set when the driver is exiting and waiting for all 42 * handles to be closed. 43 */ 44 GASKET_STATUS_DRIVER_EXIT, 45 }; 46 47 #endif