1
0
mirror of https://github.com/corundum/corundum.git synced 2025-01-16 08:12:53 +08:00
corundum/modules/mqnic/mqnic_ioctl.h

60 lines
1.2 KiB
C
Raw Normal View History

/* SPDX-License-Identifier: BSD-2-Clause-Views */
2019-07-23 18:43:04 -07:00
/*
* Copyright (c) 2019-2023 The Regents of the University of California
*/
2019-07-23 18:43:04 -07:00
#ifndef MQNIC_IOCTL_H
#define MQNIC_IOCTL_H
#include <linux/types.h>
#define MQNIC_IOCTL_API_VERSION 0
2019-07-23 18:43:04 -07:00
#define MQNIC_IOCTL_TYPE 0x88
#define MQNIC_IOCTL_BASE 0xC0
enum {
MQNIC_REGION_TYPE_UNIMPLEMENTED = 0x00000000,
MQNIC_REGION_TYPE_CTRL = 0x00001000,
MQNIC_REGION_TYPE_NIC_CTRL = 0x00001001,
MQNIC_REGION_TYPE_APP_CTRL = 0x00001002,
MQNIC_REGION_TYPE_RAM = 0x00002000
};
2019-07-23 18:43:04 -07:00
// get API version
#define MQNIC_IOCTL_GET_API_VERSION _IO(MQNIC_IOCTL_TYPE, MQNIC_IOCTL_BASE + 0)
2019-07-23 18:43:04 -07:00
// get device information
struct mqnic_ioctl_device_info {
__u32 argsz;
__u32 flags;
2021-10-08 18:31:53 -07:00
__u32 fw_id;
__u32 fw_ver;
__u32 board_id;
__u32 board_ver;
__u32 build_date;
__u32 git_hash;
__u32 rel_info;
__u32 num_regions;
__u32 num_irqs;
2019-07-23 18:43:04 -07:00
};
#define MQNIC_IOCTL_GET_DEVICE_INFO _IO(MQNIC_IOCTL_TYPE, MQNIC_IOCTL_BASE + 1)
// get region information
struct mqnic_ioctl_region_info {
__u32 argsz;
__u32 flags;
__u32 index;
__u32 type;
__u32 next;
__u32 child;
__u64 size;
__u64 offset;
__u8 name[32];
};
#define MQNIC_IOCTL_GET_REGION_INFO _IO(MQNIC_IOCTL_TYPE, MQNIC_IOCTL_BASE + 2)
2019-07-23 18:43:04 -07:00
#endif /* MQNIC_IOCTL_H */