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