Source: opendevices.sony.net, "Open source archive for 73.1.A.2.74" (Xperia 1 VIII: XQ-GE74, XQ-GE54, SO-51G, SOG17, A601SO, XQ-GE44), unmodified. Co-Authored-By: Claude Opus 5.5 <[email protected]>
210 lines
3.4 KiB
C
210 lines
3.4 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
|
|
/*
|
|
* Copyright (c) 2016-2018, 2021, The Linux Foundation. All rights reserved.
|
|
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
|
|
*/
|
|
#ifndef _HAB_IOCTL_H
|
|
#define _HAB_IOCTL_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
struct hab_send {
|
|
__u64 data;
|
|
__s32 vcid;
|
|
__u32 sizebytes;
|
|
__u32 flags;
|
|
};
|
|
|
|
struct hab_recv {
|
|
__u64 data;
|
|
__s32 vcid;
|
|
__u32 sizebytes;
|
|
__u32 timeout;
|
|
__u32 flags;
|
|
};
|
|
|
|
struct hab_open {
|
|
__s32 vcid;
|
|
__u32 mmid;
|
|
__u32 timeout;
|
|
__u32 flags;
|
|
};
|
|
|
|
struct hab_close {
|
|
__s32 vcid;
|
|
__u32 flags;
|
|
};
|
|
|
|
struct hab_virq_register {
|
|
__s32 virq_handle;
|
|
__u32 vmid;
|
|
__u32 virq_num;
|
|
__s32 efd;
|
|
__u32 flags;
|
|
};
|
|
|
|
struct hab_virq_unregister {
|
|
__s32 virq_handle;
|
|
__u32 flags;
|
|
};
|
|
|
|
struct hab_virq {
|
|
__s32 virq_handle;
|
|
__u32 flags;
|
|
};
|
|
|
|
struct hab_export {
|
|
__u64 buffer;
|
|
__s32 vcid;
|
|
__u32 sizebytes;
|
|
__u32 exportid;
|
|
__u32 flags;
|
|
};
|
|
|
|
struct hab_import {
|
|
__u64 index;
|
|
__u64 kva;
|
|
__s32 vcid;
|
|
__u32 sizebytes;
|
|
__u32 exportid;
|
|
__u32 flags;
|
|
};
|
|
|
|
struct hab_unexport {
|
|
__s32 vcid;
|
|
__u32 exportid;
|
|
__u32 flags;
|
|
};
|
|
|
|
|
|
struct hab_unimport {
|
|
__s32 vcid;
|
|
__u32 exportid;
|
|
__u64 kva;
|
|
__u32 flags;
|
|
};
|
|
|
|
struct hab_info {
|
|
__s32 vcid;
|
|
__u64 ids; /* high part remote; low part local */
|
|
__u64 names;
|
|
__u32 namesize; /* single name length */
|
|
__u32 flags;
|
|
};
|
|
|
|
struct vhost_hab_config {
|
|
__u8 vm_name[32];
|
|
};
|
|
|
|
#define HAB_IOC_TYPE 0x0A
|
|
|
|
#define IOCTL_HAB_SEND \
|
|
_IOW(HAB_IOC_TYPE, 0x2, struct hab_send)
|
|
|
|
#define IOCTL_HAB_RECV \
|
|
_IOWR(HAB_IOC_TYPE, 0x3, struct hab_recv)
|
|
|
|
#define IOCTL_HAB_VC_OPEN \
|
|
_IOWR(HAB_IOC_TYPE, 0x4, struct hab_open)
|
|
|
|
#define IOCTL_HAB_VC_CLOSE \
|
|
_IOW(HAB_IOC_TYPE, 0x5, struct hab_close)
|
|
|
|
#define IOCTL_HAB_VC_EXPORT \
|
|
_IOWR(HAB_IOC_TYPE, 0x6, struct hab_export)
|
|
|
|
#define IOCTL_HAB_VC_IMPORT \
|
|
_IOWR(HAB_IOC_TYPE, 0x7, struct hab_import)
|
|
|
|
#define IOCTL_HAB_VC_UNEXPORT \
|
|
_IOW(HAB_IOC_TYPE, 0x8, struct hab_unexport)
|
|
|
|
#define IOCTL_HAB_VC_UNIMPORT \
|
|
_IOW(HAB_IOC_TYPE, 0x9, struct hab_unimport)
|
|
|
|
#define IOCTL_HAB_VC_QUERY \
|
|
_IOWR(HAB_IOC_TYPE, 0xA, struct hab_info)
|
|
|
|
#define IOCTL_HAB_VIRQ_REGISTER \
|
|
_IOWR(HAB_IOC_TYPE, 0xB, struct hab_virq_register)
|
|
|
|
#define IOCTL_HAB_SEND_VIRQ \
|
|
_IOW(HAB_IOC_TYPE, 0xC, struct hab_virq)
|
|
|
|
#define IOCTL_HAB_VIRQ_UNREGISTER \
|
|
_IOW(HAB_IOC_TYPE, 0xD, struct hab_virq_unregister)
|
|
|
|
#define HAB_MMID_MAP_NODE(mmid) ( \
|
|
{\
|
|
const char *__mptr = NULL;\
|
|
int __mmid = (mmid) / 100;\
|
|
switch (__mmid) {\
|
|
case 0:\
|
|
__mptr = "hab";\
|
|
break;\
|
|
case 1:\
|
|
__mptr = "hab-aud";\
|
|
break;\
|
|
case 2:\
|
|
__mptr = "hab-cam";\
|
|
break;\
|
|
case 3:\
|
|
__mptr = "hab-disp";\
|
|
break;\
|
|
case 4:\
|
|
__mptr = "hab-ogles";\
|
|
break;\
|
|
case 5:\
|
|
__mptr = "hab-vid";\
|
|
break;\
|
|
case 6:\
|
|
__mptr = "hab-misc";\
|
|
break;\
|
|
case 7:\
|
|
__mptr = "hab-qcpe";\
|
|
break;\
|
|
case 8:\
|
|
__mptr = "hab-clock";\
|
|
break;\
|
|
case 9:\
|
|
__mptr = "hab-fde";\
|
|
break;\
|
|
case 10:\
|
|
__mptr = "hab-bufferq";\
|
|
break;\
|
|
case 11:\
|
|
__mptr = "hab-network";\
|
|
break;\
|
|
case 12:\
|
|
__mptr = "hab-hsi2s";\
|
|
break;\
|
|
case 13:\
|
|
__mptr = "hab-xvm";\
|
|
break;\
|
|
case 14:\
|
|
__mptr = "hab-vnw";\
|
|
break;\
|
|
case 15:\
|
|
__mptr = "hab-ext";\
|
|
break;\
|
|
case 16:\
|
|
__mptr = "hab-gpce";\
|
|
break;\
|
|
case 17:\
|
|
__mptr = "hab-soccp";\
|
|
break;\
|
|
case 18:\
|
|
__mptr = "hab-dprx";\
|
|
break;\
|
|
case 19:\
|
|
__mptr = "hab-eva";\
|
|
break;\
|
|
default:\
|
|
__mptr = NULL;\
|
|
} \
|
|
__mptr;\
|
|
} \
|
|
)
|
|
|
|
#endif /* _HAB_IOCTL_H */
|