target_core_user.h revision e01d32f8022966df2c1e697b679f9efe148c12c8
1/**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19#ifndef __TARGET_CORE_USER_H 20#define __TARGET_CORE_USER_H 21#include <linux/types.h> 22#include <linux/uio.h> 23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24#define TCMU_VERSION "1.0" 25#define TCMU_MAILBOX_VERSION 1 26#define ALIGN_SIZE 64 27struct tcmu_mailbox { 28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29 __u16 version; 30 __u16 flags; 31 __u32 cmdr_off; 32 __u32 cmdr_size; 33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34 __u32 cmd_head; 35 __u32 cmd_tail __attribute__((__aligned__(ALIGN_SIZE))); 36} __packed; 37enum tcmu_opcode { 38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39 TCMU_OP_PAD = 0, 40 TCMU_OP_CMD, 41}; 42struct tcmu_cmd_entry_hdr { 43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 __u32 len_op; 45} __packed; 46#define TCMU_OP_MASK 0x7 47#define TCMU_SENSE_BUFFERSIZE 96 48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49struct tcmu_cmd_entry { 50 struct tcmu_cmd_entry_hdr hdr; 51 uint16_t cmd_id; 52 uint16_t __pad1; 53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54 union { 55 struct { 56 uint64_t cdb_off; 57 uint64_t iov_cnt; 58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59 struct iovec iov[0]; 60 } req; 61 struct { 62 uint8_t scsi_status; 63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64 uint8_t __pad1; 65 uint16_t __pad2; 66 uint32_t __pad3; 67 char sense_buffer[TCMU_SENSE_BUFFERSIZE]; 68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69 } rsp; 70 }; 71} __packed; 72#define TCMU_OP_ALIGN_SIZE sizeof(uint64_t) 73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74enum tcmu_genl_cmd { 75 TCMU_CMD_UNSPEC, 76 TCMU_CMD_ADDED_DEVICE, 77 TCMU_CMD_REMOVED_DEVICE, 78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79 __TCMU_CMD_MAX, 80}; 81#define TCMU_CMD_MAX (__TCMU_CMD_MAX - 1) 82enum tcmu_genl_attr { 83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 84 TCMU_ATTR_UNSPEC, 85 TCMU_ATTR_DEVICE, 86 TCMU_ATTR_MINOR, 87 __TCMU_ATTR_MAX, 88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 89}; 90#define TCMU_ATTR_MAX (__TCMU_ATTR_MAX - 1) 91#endif 92