138062f954c637861348dd8078cefb73554e6f12cChristopher Ferris/**************************************************************************** 238062f954c637861348dd8078cefb73554e6f12cChristopher Ferris **************************************************************************** 338062f954c637861348dd8078cefb73554e6f12cChristopher Ferris *** 438062f954c637861348dd8078cefb73554e6f12cChristopher Ferris *** This header was automatically generated from a Linux kernel header 538062f954c637861348dd8078cefb73554e6f12cChristopher Ferris *** of the same name, to make information necessary for userspace to 638062f954c637861348dd8078cefb73554e6f12cChristopher Ferris *** call into the kernel available to libc. It contains only constants, 738062f954c637861348dd8078cefb73554e6f12cChristopher Ferris *** structures, and macros generated from the original header, and thus, 838062f954c637861348dd8078cefb73554e6f12cChristopher Ferris *** contains no copyrightable information. 938062f954c637861348dd8078cefb73554e6f12cChristopher Ferris *** 1038062f954c637861348dd8078cefb73554e6f12cChristopher Ferris *** To edit the content of this header, modify the corresponding 1138062f954c637861348dd8078cefb73554e6f12cChristopher Ferris *** source file (e.g. under external/kernel-headers/original/) then 1238062f954c637861348dd8078cefb73554e6f12cChristopher Ferris *** run bionic/libc/kernel/tools/update_all.py 1338062f954c637861348dd8078cefb73554e6f12cChristopher Ferris *** 1438062f954c637861348dd8078cefb73554e6f12cChristopher Ferris *** Any manual change here will be lost the next time this script will 1538062f954c637861348dd8078cefb73554e6f12cChristopher Ferris *** be run. You've been warned! 1638062f954c637861348dd8078cefb73554e6f12cChristopher Ferris *** 1738062f954c637861348dd8078cefb73554e6f12cChristopher Ferris **************************************************************************** 1838062f954c637861348dd8078cefb73554e6f12cChristopher Ferris ****************************************************************************/ 1938062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#ifndef __MIC_COMMON_H_ 2038062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define __MIC_COMMON_H_ 2138062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#include <linux/virtio_ring.h> 22d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define __mic_align(a,x) (((a) + (x) - 1) & ~((x) - 1)) 2338062f954c637861348dd8078cefb73554e6f12cChristopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 2438062f954c637861348dd8078cefb73554e6f12cChristopher Ferrisstruct mic_device_desc { 25d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __s8 type; 26d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __u8 num_vq; 27d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __u8 feature_len; 2838062f954c637861348dd8078cefb73554e6f12cChristopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __u8 config_len; 30d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __u8 status; 31d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __le64 config[0]; 32d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao} __attribute__((aligned(8))); 3338062f954c637861348dd8078cefb73554e6f12cChristopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 3438062f954c637861348dd8078cefb73554e6f12cChristopher Ferrisstruct mic_device_ctrl { 35d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __le64 vdev; 36d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __u8 config_change; 37d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __u8 vdev_reset; 3838062f954c637861348dd8078cefb73554e6f12cChristopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __u8 guest_ack; 40d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __u8 host_ack; 41d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __u8 used_address_updated; 42d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __s8 c2h_vdev_db; 4338062f954c637861348dd8078cefb73554e6f12cChristopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __s8 h2c_vdev_db; 45d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao} __attribute__((aligned(8))); 4638062f954c637861348dd8078cefb73554e6f12cChristopher Ferrisstruct mic_bootparam { 47d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __le32 magic; 4838062f954c637861348dd8078cefb73554e6f12cChristopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __s8 h2c_config_db; 5005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris __u8 node_id; 5105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris __u8 h2c_scif_db; 5205d08e9716b5974d6ed08973f44930804890b902Christopher Ferris __u8 c2h_scif_db; 5338062f954c637861348dd8078cefb73554e6f12cChristopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 5405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris __u64 scif_host_dma_addr; 5505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris __u64 scif_card_dma_addr; 56d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao} __attribute__((aligned(8))); 5738062f954c637861348dd8078cefb73554e6f12cChristopher Ferrisstruct mic_device_page { 5838062f954c637861348dd8078cefb73554e6f12cChristopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 5905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris struct mic_bootparam bootparam; 60d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao struct mic_device_desc desc[0]; 6138062f954c637861348dd8078cefb73554e6f12cChristopher Ferris}; 6238062f954c637861348dd8078cefb73554e6f12cChristopher Ferrisstruct mic_vqconfig { 6338062f954c637861348dd8078cefb73554e6f12cChristopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 6405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris __le64 address; 65d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __le64 used_address; 66d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __le16 num; 67d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao} __attribute__((aligned(8))); 6838062f954c637861348dd8078cefb73554e6f12cChristopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 6905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define MIC_VIRTIO_RING_ALIGN 4096 7038062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define MIC_MAX_VRINGS 4 7138062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define MIC_VRING_ENTRIES 128 7238062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define MIC_MAX_VRING_ENTRIES 128 7338062f954c637861348dd8078cefb73554e6f12cChristopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 7405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define MIC_MAX_DESC_BLK_SIZE 256 7538062f954c637861348dd8078cefb73554e6f12cChristopher Ferrisstruct _mic_vring_info { 76d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __u16 avail_idx; 77d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao __le32 magic; 7838062f954c637861348dd8078cefb73554e6f12cChristopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 7905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris}; 8038062f954c637861348dd8078cefb73554e6f12cChristopher Ferrisstruct mic_vring { 81d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao struct vring vr; 82d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao struct _mic_vring_info * info; 8338062f954c637861348dd8078cefb73554e6f12cChristopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 8405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris void * va; 85d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao int len; 8638062f954c637861348dd8078cefb73554e6f12cChristopher Ferris}; 8738062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define mic_aligned_desc_size(d) __mic_align(mic_desc_size(d), 8) 8838062f954c637861348dd8078cefb73554e6f12cChristopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 8905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#ifndef INTEL_MIC_CARD 9038062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#endif 9138062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define MIC_DP_SIZE 4096 9238062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define MIC_MAGIC 0xc0ffee00 9338062f954c637861348dd8078cefb73554e6f12cChristopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 9405d08e9716b5974d6ed08973f44930804890b902Christopher Ferrisenum mic_states { 9505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris MIC_READY = 0, 9605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris MIC_BOOTING, 97d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao MIC_ONLINE, 9805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 99d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao MIC_SHUTTING_DOWN, 10005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris MIC_RESETTING, 101d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao MIC_RESET_FAILED, 102d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao MIC_LAST 10338062f954c637861348dd8078cefb73554e6f12cChristopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 10405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris}; 10538062f954c637861348dd8078cefb73554e6f12cChristopher Ferrisenum mic_status { 106d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao MIC_NOP = 0, 107d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao MIC_CRASHED, 10838062f954c637861348dd8078cefb73554e6f12cChristopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 10905d08e9716b5974d6ed08973f44930804890b902Christopher Ferris MIC_HALTED, 110d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao MIC_POWER_OFF, 111d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao MIC_RESTART, 112d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao MIC_STATUS_LAST 11338062f954c637861348dd8078cefb73554e6f12cChristopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 11405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris}; 11538062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#endif 116