PATH: //proc/self/root/proc/self/root/proc/self/root/usr/include/linux
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
📄 a.out.h
↓
X
📄 acct.h
↓
X
📄 acrn.h
↓
X
📄 adb.h
↓
X
📄 adfs_fs.h
↓
X
📄 affs_hardblocks.h
↓
X
📄 agpgart.h
↓
X
📄 aio_abi.h
↓
X
📄 am437x-vpfe.h
↓
X
📁 android/
X
📄 apm_bios.h
↓
X
📄 arcfb.h
↓
X
📄 arm_sdei.h
↓
X
📄 aspeed-lpc-ctrl.h
↓
X
📄 aspeed-p2a-ctrl.h
↓
X
📄 atalk.h
↓
X
📄 atm.h
↓
X
📄 atm_eni.h
↓
X
📄 atm_he.h
↓
X
📄 atm_idt77105.h
↓
X
📄 atm_nicstar.h
↓
X
📄 atm_tcp.h
↓
X
📄 atm_zatm.h
↓
X
📄 atmapi.h
↓
X
📄 atmarp.h
↓
X
📄 atmbr2684.h
↓
X
📄 atmclip.h
↓
X
📄 atmdev.h
↓
X
📄 atmioc.h
↓
X
📄 atmlec.h
↓
X
📄 atmmpc.h
↓
X
📄 atmppp.h
↓
X
📄 atmsap.h
↓
X
📄 atmsvc.h
↓
X
📄 audit.h
↓
X
📄 auto_dev-ioctl.h
↓
X
📄 auto_fs.h
↓
X
📄 auto_fs4.h
↓
X
📄 auxvec.h
↓
X
📄 ax25.h
↓
X
📄 batadv_packet.h
↓
X
📄 batman_adv.h
↓
X
📄 baycom.h
↓
X
📄 bcm933xx_hcs.h
↓
X
📄 bfs_fs.h
↓
X
📄 binfmts.h
↓
X
📄 bits.h
↓
X
📄 blkpg.h
↓
X
📄 blktrace_api.h
↓
X
📄 blkzoned.h
↓
X
📄 bpf.h
↓
X
📄 bpf_common.h
↓
X
📄 bpf_perf_event.h
↓
X
📄 bpfilter.h
↓
X
📄 bpqether.h
↓
X
📄 bsg.h
↓
X
📄 bt-bmc.h
↓
X
📄 btf.h
↓
X
📄 btrfs.h
↓
X
📄 btrfs_tree.h
↓
X
📁 byteorder/
X
📄 cachefiles.h
↓
X
📁 caif/
X
📁 can/
X
📄 can.h
↓
X
📄 capability.h
↓
X
📄 capi.h
↓
X
📄 cciss_defs.h
↓
X
📄 cciss_ioctl.h
↓
X
📄 ccs.h
↓
X
📄 cdrom.h
↓
X
📄 cec-funcs.h
↓
X
📄 cec.h
↓
X
📄 cfm_bridge.h
↓
X
📄 cgroupstats.h
↓
X
📄 chio.h
↓
X
📁 cifs/
X
📄 close_range.h
↓
X
📄 cm4000_cs.h
↓
X
📄 cn_proc.h
↓
X
📄 coda.h
↓
X
📄 coff.h
↓
X
📄 connector.h
↓
X
📄 const.h
↓
X
📄 coresight-stm.h
↓
X
📄 cramfs_fs.h
↓
X
📄 cryptouser.h
↓
X
📄 cuda.h
↓
X
📄 cxl_mem.h
↓
X
📄 cycx_cfm.h
↓
X
📄 dcbnl.h
↓
X
📄 dccp.h
↓
X
📄 devlink.h
↓
X
📄 dlm.h
↓
X
📄 dlm_device.h
↓
X
📄 dlm_netlink.h
↓
X
📄 dlm_plock.h
↓
X
📄 dlmconstants.h
↓
X
📄 dm-ioctl.h
↓
X
📄 dm-log-userspace.h
↓
X
📄 dma-buf.h
↓
X
📄 dma-heap.h
↓
X
📄 dn.h
↓
X
📄 dns_resolver.h
↓
X
📄 dpll.h
↓
X
📄 dqblk_xfs.h
↓
X
📁 dvb/
X
📄 edd.h
↓
X
📄 efs_fs_sb.h
↓
X
📄 elf-em.h
↓
X
📄 elf-fdpic.h
↓
X
📄 elf.h
↓
X
📄 errno.h
↓
X
📄 errqueue.h
↓
X
📄 erspan.h
↓
X
📄 ethtool.h
↓
X
📄 ethtool_netlink.h
↓
X
📄 ethtool_netlink_generated.h
↓
X
📄 eventfd.h
↓
X
📄 eventpoll.h
↓
X
📄 f2fs.h
↓
X
📄 fadvise.h
↓
X
📄 falloc.h
↓
X
📄 fanotify.h
↓
X
📄 fb.h
↓
X
📄 fcntl.h
↓
X
📄 fd.h
↓
X
📄 fdreg.h
↓
X
📄 fib_rules.h
↓
X
📄 fiemap.h
↓
X
📄 filter.h
↓
X
📄 firewire-cdev.h
↓
X
📄 firewire-constants.h
↓
X
📄 fou.h
↓
X
📄 fpga-dfl.h
↓
X
📄 fs.h
↓
X
📄 fscrypt.h
↓
X
📄 fsi.h
↓
X
📄 fsl_hypervisor.h
↓
X
📄 fsl_mc.h
↓
X
📄 fsmap.h
↓
X
📄 fsverity.h
↓
X
📄 fuse.h
↓
X
📄 futex.h
↓
X
📄 gameport.h
↓
X
📄 gen_stats.h
↓
X
📄 genetlink.h
↓
X
📁 genwqe/
X
📄 gfs2_ondisk.h
↓
X
📄 gpio.h
↓
X
📄 gsmmux.h
↓
X
📄 gtp.h
↓
X
📄 handshake.h
↓
X
📄 hash_info.h
↓
X
📁 hdlc/
X
📄 hdlc.h
↓
X
📄 hdlcdrv.h
↓
X
📄 hdreg.h
↓
X
📄 hid.h
↓
X
📄 hiddev.h
↓
X
📄 hidraw.h
↓
X
📄 hpet.h
↓
X
📁 hsi/
X
📄 hsr_netlink.h
↓
X
📄 hw_breakpoint.h
↓
X
📄 hyperv.h
↓
X
📄 i2c-dev.h
↓
X
📄 i2c.h
↓
X
📄 i2o-dev.h
↓
X
📄 i8k.h
↓
X
📄 icmp.h
↓
X
📄 icmpv6.h
↓
X
📄 idxd.h
↓
X
📄 if.h
↓
X
📄 if_addr.h
↓
X
📄 if_addrlabel.h
↓
X
📄 if_alg.h
↓
X
📄 if_arcnet.h
↓
X
📄 if_arp.h
↓
X
📄 if_bonding.h
↓
X
📄 if_bridge.h
↓
X
📄 if_cablemodem.h
↓
X
📄 if_eql.h
↓
X
📄 if_ether.h
↓
X
📄 if_fc.h
↓
X
📄 if_fddi.h
↓
X
📄 if_hippi.h
↓
X
📄 if_infiniband.h
↓
X
📄 if_link.h
↓
X
📄 if_ltalk.h
↓
X
📄 if_macsec.h
↓
X
📄 if_packet.h
↓
X
📄 if_phonet.h
↓
X
📄 if_plip.h
↓
X
📄 if_ppp.h
↓
X
📄 if_pppol2tp.h
↓
X
📄 if_pppox.h
↓
X
📄 if_slip.h
↓
X
📄 if_team.h
↓
X
📄 if_tun.h
↓
X
📄 if_tunnel.h
↓
X
📄 if_vlan.h
↓
X
📄 if_x25.h
↓
X
📄 if_xdp.h
↓
X
📄 ife.h
↓
X
📄 igmp.h
↓
X
📁 iio/
X
📄 ila.h
↓
X
📄 in.h
↓
X
📄 in6.h
↓
X
📄 in_route.h
↓
X
📄 inet_diag.h
↓
X
📄 inotify.h
↓
X
📄 input-event-codes.h
↓
X
📄 input.h
↓
X
📄 io_uring.h
↓
X
📄 ioctl.h
↓
X
📄 iommufd.h
↓
X
📄 ioprio.h
↓
X
📄 ip.h
↓
X
📄 ip6_tunnel.h
↓
X
📄 ip_vs.h
↓
X
📄 ipc.h
↓
X
📄 ipmi.h
↓
X
📄 ipmi_bmc.h
↓
X
📄 ipmi_msgdefs.h
↓
X
📄 ipmi_ssif_bmc.h
↓
X
📄 ipsec.h
↓
X
📄 ipv6.h
↓
X
📄 ipv6_route.h
↓
X
📄 ipx.h
↓
X
📄 irqnr.h
↓
X
📁 isdn/
X
📄 iso_fs.h
↓
X
📄 isst_if.h
↓
X
📄 ivtv.h
↓
X
📄 ivtvfb.h
↓
X
📄 jffs2.h
↓
X
📄 joystick.h
↓
X
📄 kcm.h
↓
X
📄 kcmp.h
↓
X
📄 kcov.h
↓
X
📄 kd.h
↓
X
📄 kdev_t.h
↓
X
📄 kernel-page-flags.h
↓
X
📄 kernel.h
↓
X
📄 kernelcapi.h
↓
X
📄 kexec.h
↓
X
📄 keyboard.h
↓
X
📄 keyctl.h
↓
X
📄 kfd_ioctl.h
↓
X
📄 kfd_sysfs.h
↓
X
📄 kvm.h
↓
X
📄 kvm_para.h
↓
X
📄 l2tp.h
↓
X
📄 landlock.h
↓
X
📄 libc-compat.h
↓
X
📄 limits.h
↓
X
📄 lirc.h
↓
X
📄 llc.h
↓
X
📄 loadpin.h
↓
X
📄 loop.h
↓
X
📄 lp.h
↓
X
📄 lsm.h
↓
X
📄 lwtunnel.h
↓
X
📄 magic.h
↓
X
📄 major.h
↓
X
📄 map_to_7segment.h
↓
X
📄 matroxfb.h
↓
X
📄 max2175.h
↓
X
📄 mdio.h
↓
X
📄 media-bus-format.h
↓
X
📄 media.h
↓
X
📄 mei.h
↓
X
📄 mei_uuid.h
↓
X
📄 membarrier.h
↓
X
📄 memfd.h
↓
X
📄 mempolicy.h
↓
X
📄 meye.h
↓
X
📄 mii.h
↓
X
📄 minix_fs.h
↓
X
📁 misc/
X
📄 mman.h
↓
X
📁 mmc/
X
📄 mmtimer.h
↓
X
📄 module.h
↓
X
📄 mount.h
↓
X
📄 mpls.h
↓
X
📄 mpls_iptunnel.h
↓
X
📄 mptcp.h
↓
X
📄 mptcp_pm.h
↓
X
📄 mqueue.h
↓
X
📄 mroute.h
↓
X
📄 mroute6.h
↓
X
📄 mrp_bridge.h
↓
X
📄 msdos_fs.h
↓
X
📄 msg.h
↓
X
📄 mshv.h
↓
X
📄 mtio.h
↓
X
📄 nbd-netlink.h
↓
X
📄 nbd.h
↓
X
📄 ncsi.h
↓
X
📄 ndctl.h
↓
X
📄 neighbour.h
↓
X
📄 net.h
↓
X
📄 net_dropmon.h
↓
X
📄 net_namespace.h
↓
X
📄 net_shaper.h
↓
X
📄 net_tstamp.h
↓
X
📄 netconf.h
↓
X
📄 netdev.h
↓
X
📄 netdevice.h
↓
X
📁 netfilter/
X
📄 netfilter.h
↓
X
📁 netfilter_arp/
X
📄 netfilter_arp.h
↓
X
📁 netfilter_bridge/
X
📄 netfilter_bridge.h
↓
X
📄 netfilter_decnet.h
↓
X
📁 netfilter_ipv4/
X
📄 netfilter_ipv4.h
↓
X
📁 netfilter_ipv6/
X
📄 netfilter_ipv6.h
↓
X
📄 netlink.h
↓
X
📄 netlink_diag.h
↓
X
📄 netrom.h
↓
X
📄 nexthop.h
↓
X
📄 nfc.h
↓
X
📄 nfs.h
↓
X
📄 nfs2.h
↓
X
📄 nfs3.h
↓
X
📄 nfs4.h
↓
X
📄 nfs4_mount.h
↓
X
📄 nfs_fs.h
↓
X
📄 nfs_idmap.h
↓
X
📄 nfs_mount.h
↓
X
📄 nfsacl.h
↓
X
📁 nfsd/
X
📄 nfsd_netlink.h
↓
X
📄 nilfs2_api.h
↓
X
📄 nilfs2_ondisk.h
↓
X
📄 nitro_enclaves.h
↓
X
📄 nl80211.h
↓
X
📄 nsfs.h
↓
X
📄 nubus.h
↓
X
📄 nvme_ioctl.h
↓
X
📄 nvram.h
↓
X
📄 omap3isp.h
↓
X
📄 omapfb.h
↓
X
📄 oom.h
↓
X
📄 openat2.h
↓
X
📄 openvswitch.h
↓
X
📄 packet_diag.h
↓
X
📄 param.h
↓
X
📄 parport.h
↓
X
📄 patchkey.h
↓
X
📄 pci.h
↓
X
📄 pci_regs.h
↓
X
📄 pcitest.h
↓
X
📄 perf_event.h
↓
X
📄 personality.h
↓
X
📄 pfkeyv2.h
↓
X
📄 pfrut.h
↓
X
📄 pg.h
↓
X
📄 phantom.h
↓
X
📄 phonet.h
↓
X
📄 pidfd.h
↓
X
📄 pkt_cls.h
↓
X
📄 pkt_sched.h
↓
X
📄 pktcdvd.h
↓
X
📄 pmu.h
↓
X
📄 poll.h
↓
X
📄 posix_acl.h
↓
X
📄 posix_acl_xattr.h
↓
X
📄 posix_types.h
↓
X
📄 ppdev.h
↓
X
📄 ppp-comp.h
↓
X
📄 ppp-ioctl.h
↓
X
📄 ppp_defs.h
↓
X
📄 pps.h
↓
X
📄 pr.h
↓
X
📄 prctl.h
↓
X
📄 psample.h
↓
X
📄 psci.h
↓
X
📄 psp-dbc.h
↓
X
📄 psp-sev.h
↓
X
📄 ptp_clock.h
↓
X
📄 ptrace.h
↓
X
📄 qemu_fw_cfg.h
↓
X
📄 qnx4_fs.h
↓
X
📄 qnxtypes.h
↓
X
📄 qrtr.h
↓
X
📄 quota.h
↓
X
📄 radeonfb.h
↓
X
📁 raid/
X
📄 random.h
↓
X
📄 rds.h
↓
X
📄 reboot.h
↓
X
📄 reiserfs_fs.h
↓
X
📄 reiserfs_xattr.h
↓
X
📄 remoteproc_cdev.h
↓
X
📄 resource.h
↓
X
📄 rfkill.h
↓
X
📄 rio_cm_cdev.h
↓
X
📄 rio_mport_cdev.h
↓
X
📄 rkisp1-config.h
↓
X
📄 romfs_fs.h
↓
X
📄 rose.h
↓
X
📄 route.h
↓
X
📄 rpl.h
↓
X
📄 rpl_iptunnel.h
↓
X
📄 rpmsg.h
↓
X
📄 rpmsg_types.h
↓
X
📄 rseq.h
↓
X
📄 rtc.h
↓
X
📄 rtnetlink.h
↓
X
📄 rxrpc.h
↓
X
📄 scc.h
↓
X
📁 sched/
X
📄 sched.h
↓
X
📄 scif_ioctl.h
↓
X
📄 screen_info.h
↓
X
📄 sctp.h
↓
X
📄 seccomp.h
↓
X
📄 securebits.h
↓
X
📄 sed-opal.h
↓
X
📄 seg6.h
↓
X
📄 seg6_genl.h
↓
X
📄 seg6_hmac.h
↓
X
📄 seg6_iptunnel.h
↓
X
📄 seg6_local.h
↓
X
📄 selinux_netlink.h
↓
X
📄 sem.h
↓
X
📄 serial.h
↓
X
📄 serial_core.h
↓
X
📄 serial_reg.h
↓
X
📄 serio.h
↓
X
📄 sev-guest.h
↓
X
📄 shm.h
↓
X
📄 signal.h
↓
X
📄 signalfd.h
↓
X
📄 smc.h
↓
X
📄 smc_diag.h
↓
X
📄 smiapp.h
↓
X
📄 snmp.h
↓
X
📄 sock_diag.h
↓
X
📄 socket.h
↓
X
📄 sockios.h
↓
X
📄 sonet.h
↓
X
📄 sonypi.h
↓
X
📄 sound.h
↓
X
📄 soundcard.h
↓
X
📁 spi/
X
📄 stat.h
↓
X
📄 stddef.h
↓
X
📄 stm.h
↓
X
📄 string.h
↓
X
📁 sunrpc/
X
📁 surface_aggregator/
X
📄 suspend_ioctls.h
↓
X
📄 swab.h
↓
X
📄 switchtec_ioctl.h
↓
X
📄 sync_file.h
↓
X
📄 synclink.h
↓
X
📄 sysctl.h
↓
X
📄 sysinfo.h
↓
X
📄 target_core_user.h
↓
X
📄 taskstats.h
↓
X
📁 tc_act/
X
📁 tc_ematch/
X
📄 tcp.h
↓
X
📄 tcp_metrics.h
↓
X
📄 tdx-guest.h
↓
X
📄 tee.h
↓
X
📄 termios.h
↓
X
📄 thermal.h
↓
X
📄 time.h
↓
X
📄 time_types.h
↓
X
📄 timerfd.h
↓
X
📄 times.h
↓
X
📄 timex.h
↓
X
📄 tiocl.h
↓
X
📄 tipc.h
↓
X
📄 tipc_config.h
↓
X
📄 tipc_netlink.h
↓
X
📄 tipc_sockets_diag.h
↓
X
📄 tls.h
↓
X
📄 toshiba.h
↓
X
📄 tps6594_pfsm.h
↓
X
📄 tty.h
↓
X
📄 tty_flags.h
↓
X
📄 types.h
↓
X
📄 udf_fs_i.h
↓
X
📄 udmabuf.h
↓
X
📄 udp.h
↓
X
📄 uhid.h
↓
X
📄 uinput.h
↓
X
📄 uio.h
↓
X
📄 uleds.h
↓
X
📄 ultrasound.h
↓
X
📄 um_timetravel.h
↓
X
📄 un.h
↓
X
📄 unistd.h
↓
X
📄 unix_diag.h
↓
X
📁 usb/
X
📄 usbdevice_fs.h
↓
X
📄 usbip.h
↓
X
📄 userfaultfd.h
↓
X
📄 userio.h
↓
X
📄 utime.h
↓
X
📄 utsname.h
↓
X
📄 uuid.h
↓
X
📄 uvcvideo.h
↓
X
📄 v4l2-common.h
↓
X
📄 v4l2-controls.h
↓
X
📄 v4l2-dv-timings.h
↓
X
📄 v4l2-mediabus.h
↓
X
📄 v4l2-subdev.h
↓
X
📄 vbox_err.h
↓
X
📄 vbox_vmmdev_types.h
↓
X
📄 vboxguest.h
↓
X
📄 vdpa.h
↓
X
📄 vduse.h
↓
X
📄 version.h
↓
X
📄 veth.h
↓
X
📄 vfio.h
↓
X
📄 vfio_ccw.h
↓
X
📄 vfio_zdev.h
↓
X
📄 vhost.h
↓
X
📄 vhost_types.h
↓
X
📄 videodev2.h
↓
X
📄 virtio_9p.h
↓
X
📄 virtio_balloon.h
↓
X
📄 virtio_blk.h
↓
X
📄 virtio_bt.h
↓
X
📄 virtio_config.h
↓
X
📄 virtio_console.h
↓
X
📄 virtio_crypto.h
↓
X
📄 virtio_fs.h
↓
X
📄 virtio_gpio.h
↓
X
📄 virtio_gpu.h
↓
X
📄 virtio_i2c.h
↓
X
📄 virtio_ids.h
↓
X
📄 virtio_input.h
↓
X
📄 virtio_iommu.h
↓
X
📄 virtio_mem.h
↓
X
📄 virtio_mmio.h
↓
X
📄 virtio_net.h
↓
X
📄 virtio_pci.h
↓
X
📄 virtio_pcidev.h
↓
X
📄 virtio_pmem.h
↓
X
📄 virtio_ring.h
↓
X
📄 virtio_rng.h
↓
X
📄 virtio_scmi.h
↓
X
📄 virtio_scsi.h
↓
X
📄 virtio_snd.h
↓
X
📄 virtio_types.h
↓
X
📄 virtio_vsock.h
↓
X
📄 vm_sockets.h
↓
X
📄 vm_sockets_diag.h
↓
X
📄 vmcore.h
↓
X
📄 vsockmon.h
↓
X
📄 vt.h
↓
X
📄 vtpm_proxy.h
↓
X
📄 wait.h
↓
X
📄 watch_queue.h
↓
X
📄 watchdog.h
↓
X
📄 wireguard.h
↓
X
📄 wireless.h
↓
X
📄 wmi.h
↓
X
📄 wwan.h
↓
X
📄 x25.h
↓
X
📄 xattr.h
↓
X
📄 xdp_diag.h
↓
X
📄 xfrm.h
↓
X
📄 xilinx-v4l2-controls.h
↓
X
📄 zorro.h
↓
X
📄 zorro_ids.h
↓
X
SAVING...
BERHASIL DIUBAH!
EDITING: tee.h
/* * Copyright (c) 2015-2016, Linaro Limited * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __TEE_H #define __TEE_H #include <linux/ioctl.h> #include <linux/types.h> /* * This file describes the API provided by a TEE driver to user space. * * Each TEE driver defines a TEE specific protocol which is used for the * data passed back and forth using TEE_IOC_CMD. */ /* Helpers to make the ioctl defines */ #define TEE_IOC_MAGIC 0xa4 #define TEE_IOC_BASE 0 #define TEE_MAX_ARG_SIZE 1024 #define TEE_GEN_CAP_GP (1 << 0)/* GlobalPlatform compliant TEE */ #define TEE_GEN_CAP_PRIVILEGED (1 << 1)/* Privileged device (for supplicant) */ #define TEE_GEN_CAP_REG_MEM (1 << 2)/* Supports registering shared memory */ #define TEE_GEN_CAP_MEMREF_NULL (1 << 3)/* NULL MemRef support */ #define TEE_MEMREF_NULL (__u64)(-1) /* NULL MemRef Buffer */ /* * TEE Implementation ID */ #define TEE_IMPL_ID_OPTEE 1 #define TEE_IMPL_ID_AMDTEE 2 /* * OP-TEE specific capabilities */ #define TEE_OPTEE_CAP_TZ (1 << 0) /** * struct tee_ioctl_version_data - TEE version * @impl_id: [out] TEE implementation id * @impl_caps: [out] Implementation specific capabilities * @gen_caps: [out] Generic capabilities, defined by TEE_GEN_CAPS_* above * * Identifies the TEE implementation, @impl_id is one of TEE_IMPL_ID_* above. * @impl_caps is implementation specific, for example TEE_OPTEE_CAP_* * is valid when @impl_id == TEE_IMPL_ID_OPTEE. */ struct tee_ioctl_version_data { __u32 impl_id; __u32 impl_caps; __u32 gen_caps; }; /** * TEE_IOC_VERSION - query version of TEE * * Takes a tee_ioctl_version_data struct and returns with the TEE version * data filled in. */ #define TEE_IOC_VERSION _IOR(TEE_IOC_MAGIC, TEE_IOC_BASE + 0, \ struct tee_ioctl_version_data) /** * struct tee_ioctl_shm_alloc_data - Shared memory allocate argument * @size: [in/out] Size of shared memory to allocate * @flags: [in/out] Flags to/from allocation. * @id: [out] Identifier of the shared memory * * The flags field should currently be zero as input. Updated by the call * with actual flags as defined by TEE_IOCTL_SHM_* above. * This structure is used as argument for TEE_IOC_SHM_ALLOC below. */ struct tee_ioctl_shm_alloc_data { __u64 size; __u32 flags; __s32 id; }; /** * TEE_IOC_SHM_ALLOC - allocate shared memory * * Allocates shared memory between the user space process and secure OS. * * Returns a file descriptor on success or < 0 on failure * * The returned file descriptor is used to map the shared memory into user * space. The shared memory is freed when the descriptor is closed and the * memory is unmapped. */ #define TEE_IOC_SHM_ALLOC _IOWR(TEE_IOC_MAGIC, TEE_IOC_BASE + 1, \ struct tee_ioctl_shm_alloc_data) /** * struct tee_ioctl_buf_data - Variable sized buffer * @buf_ptr: [in] A pointer to a buffer * @buf_len: [in] Length of the buffer above * * Used as argument for TEE_IOC_OPEN_SESSION, TEE_IOC_INVOKE, * TEE_IOC_SUPPL_RECV, and TEE_IOC_SUPPL_SEND below. */ struct tee_ioctl_buf_data { __u64 buf_ptr; __u64 buf_len; }; /* * Attributes for struct tee_ioctl_param, selects field in the union */ #define TEE_IOCTL_PARAM_ATTR_TYPE_NONE 0 /* parameter not used */ /* * These defines value parameters (struct tee_ioctl_param_value) */ #define TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INPUT 1 #define TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_OUTPUT 2 #define TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT 3 /* input and output */ /* * These defines shared memory reference parameters (struct * tee_ioctl_param_memref) */ #define TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT 5 #define TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT 6 #define TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INOUT 7 /* input and output */ /* * Mask for the type part of the attribute, leaves room for more types */ #define TEE_IOCTL_PARAM_ATTR_TYPE_MASK 0xff /* Meta parameter carrying extra information about the message. */ #define TEE_IOCTL_PARAM_ATTR_META 0x100 /* Mask of all known attr bits */ #define TEE_IOCTL_PARAM_ATTR_MASK \ (TEE_IOCTL_PARAM_ATTR_TYPE_MASK | TEE_IOCTL_PARAM_ATTR_META) /* * Matches TEEC_LOGIN_* in GP TEE Client API * Are only defined for GP compliant TEEs */ #define TEE_IOCTL_LOGIN_PUBLIC 0 #define TEE_IOCTL_LOGIN_USER 1 #define TEE_IOCTL_LOGIN_GROUP 2 #define TEE_IOCTL_LOGIN_APPLICATION 4 #define TEE_IOCTL_LOGIN_USER_APPLICATION 5 #define TEE_IOCTL_LOGIN_GROUP_APPLICATION 6 /* * Disallow user-space to use GP implementation specific login * method range (0x80000000 - 0xBFFFFFFF). This range is rather * being reserved for REE kernel clients or TEE implementation. */ #define TEE_IOCTL_LOGIN_REE_KERNEL_MIN 0x80000000 #define TEE_IOCTL_LOGIN_REE_KERNEL_MAX 0xBFFFFFFF /* Private login method for REE kernel clients */ #define TEE_IOCTL_LOGIN_REE_KERNEL 0x80000000 /** * struct tee_ioctl_param - parameter * @attr: attributes * @a: if a memref, offset into the shared memory object, else a value parameter * @b: if a memref, size of the buffer, else a value parameter * @c: if a memref, shared memory identifier, else a value parameter * * @attr & TEE_PARAM_ATTR_TYPE_MASK indicates if memref or value is used in * the union. TEE_PARAM_ATTR_TYPE_VALUE_* indicates value and * TEE_PARAM_ATTR_TYPE_MEMREF_* indicates memref. TEE_PARAM_ATTR_TYPE_NONE * indicates that none of the members are used. * * Shared memory is allocated with TEE_IOC_SHM_ALLOC which returns an * identifier representing the shared memory object. A memref can reference * a part of a shared memory by specifying an offset (@a) and size (@b) of * the object. To supply the entire shared memory object set the offset * (@a) to 0 and size (@b) to the previously returned size of the object. * * A client may need to present a NULL pointer in the argument * passed to a trusted application in the TEE. * This is also a requirement in GlobalPlatform Client API v1.0c * (section 3.2.5 memory references), which can be found at * http://www.globalplatform.org/specificationsdevice.asp * * If a NULL pointer is passed to a TA in the TEE, the (@c) * IOCTL parameters value must be set to TEE_MEMREF_NULL indicating a NULL * memory reference. */ struct tee_ioctl_param { __u64 attr; __u64 a; __u64 b; __u64 c; }; #define TEE_IOCTL_UUID_LEN 16 /** * struct tee_ioctl_open_session_arg - Open session argument * @uuid: [in] UUID of the Trusted Application * @clnt_uuid: [in] UUID of client * @clnt_login: [in] Login class of client, TEE_IOCTL_LOGIN_* above * @cancel_id: [in] Cancellation id, a unique value to identify this request * @session: [out] Session id * @ret: [out] return value * @ret_origin [out] origin of the return value * @num_params [in] number of parameters following this struct */ struct tee_ioctl_open_session_arg { __u8 uuid[TEE_IOCTL_UUID_LEN]; __u8 clnt_uuid[TEE_IOCTL_UUID_LEN]; __u32 clnt_login; __u32 cancel_id; __u32 session; __u32 ret; __u32 ret_origin; __u32 num_params; /* num_params tells the actual number of element in params */ struct tee_ioctl_param params[]; }; /** * TEE_IOC_OPEN_SESSION - opens a session to a Trusted Application * * Takes a struct tee_ioctl_buf_data which contains a struct * tee_ioctl_open_session_arg followed by any array of struct * tee_ioctl_param */ #define TEE_IOC_OPEN_SESSION _IOR(TEE_IOC_MAGIC, TEE_IOC_BASE + 2, \ struct tee_ioctl_buf_data) /** * struct tee_ioctl_invoke_func_arg - Invokes a function in a Trusted * Application * @func: [in] Trusted Application function, specific to the TA * @session: [in] Session id * @cancel_id: [in] Cancellation id, a unique value to identify this request * @ret: [out] return value * @ret_origin [out] origin of the return value * @num_params [in] number of parameters following this struct */ struct tee_ioctl_invoke_arg { __u32 func; __u32 session; __u32 cancel_id; __u32 ret; __u32 ret_origin; __u32 num_params; /* num_params tells the actual number of element in params */ struct tee_ioctl_param params[]; }; /** * TEE_IOC_INVOKE - Invokes a function in a Trusted Application * * Takes a struct tee_ioctl_buf_data which contains a struct * tee_invoke_func_arg followed by any array of struct tee_param */ #define TEE_IOC_INVOKE _IOR(TEE_IOC_MAGIC, TEE_IOC_BASE + 3, \ struct tee_ioctl_buf_data) /** * struct tee_ioctl_cancel_arg - Cancels an open session or invoke ioctl * @cancel_id: [in] Cancellation id, a unique value to identify this request * @session: [in] Session id, if the session is opened, else set to 0 */ struct tee_ioctl_cancel_arg { __u32 cancel_id; __u32 session; }; /** * TEE_IOC_CANCEL - Cancels an open session or invoke */ #define TEE_IOC_CANCEL _IOR(TEE_IOC_MAGIC, TEE_IOC_BASE + 4, \ struct tee_ioctl_cancel_arg) /** * struct tee_ioctl_close_session_arg - Closes an open session * @session: [in] Session id */ struct tee_ioctl_close_session_arg { __u32 session; }; /** * TEE_IOC_CLOSE_SESSION - Closes a session */ #define TEE_IOC_CLOSE_SESSION _IOR(TEE_IOC_MAGIC, TEE_IOC_BASE + 5, \ struct tee_ioctl_close_session_arg) /** * struct tee_iocl_supp_recv_arg - Receive a request for a supplicant function * @func: [in] supplicant function * @num_params [in/out] number of parameters following this struct * * @num_params is the number of params that tee-supplicant has room to * receive when input, @num_params is the number of actual params * tee-supplicant receives when output. */ struct tee_iocl_supp_recv_arg { __u32 func; __u32 num_params; /* num_params tells the actual number of element in params */ struct tee_ioctl_param params[]; }; /** * TEE_IOC_SUPPL_RECV - Receive a request for a supplicant function * * Takes a struct tee_ioctl_buf_data which contains a struct * tee_iocl_supp_recv_arg followed by any array of struct tee_param */ #define TEE_IOC_SUPPL_RECV _IOR(TEE_IOC_MAGIC, TEE_IOC_BASE + 6, \ struct tee_ioctl_buf_data) /** * struct tee_iocl_supp_send_arg - Send a response to a received request * @ret: [out] return value * @num_params [in] number of parameters following this struct */ struct tee_iocl_supp_send_arg { __u32 ret; __u32 num_params; /* num_params tells the actual number of element in params */ struct tee_ioctl_param params[]; }; /** * TEE_IOC_SUPPL_SEND - Send a response to a received request * * Takes a struct tee_ioctl_buf_data which contains a struct * tee_iocl_supp_send_arg followed by any array of struct tee_param */ #define TEE_IOC_SUPPL_SEND _IOR(TEE_IOC_MAGIC, TEE_IOC_BASE + 7, \ struct tee_ioctl_buf_data) /** * struct tee_ioctl_shm_register_data - Shared memory register argument * @addr: [in] Start address of shared memory to register * @length: [in/out] Length of shared memory to register * @flags: [in/out] Flags to/from registration. * @id: [out] Identifier of the shared memory * * The flags field should currently be zero as input. Updated by the call * with actual flags as defined by TEE_IOCTL_SHM_* above. * This structure is used as argument for TEE_IOC_SHM_REGISTER below. */ struct tee_ioctl_shm_register_data { __u64 addr; __u64 length; __u32 flags; __s32 id; }; /** * TEE_IOC_SHM_REGISTER - Register shared memory argument * * Registers shared memory between the user space process and secure OS. * * Returns a file descriptor on success or < 0 on failure * * The shared memory is unregisterred when the descriptor is closed. */ #define TEE_IOC_SHM_REGISTER _IOWR(TEE_IOC_MAGIC, TEE_IOC_BASE + 9, \ struct tee_ioctl_shm_register_data) /* * Five syscalls are used when communicating with the TEE driver. * open(): opens the device associated with the driver * ioctl(): as described above operating on the file descriptor from open() * close(): two cases * - closes the device file descriptor * - closes a file descriptor connected to allocated shared memory * mmap(): maps shared memory into user space using information from struct * tee_ioctl_shm_alloc_data * munmap(): unmaps previously shared memory */ #endif /*__TEE_H*/
SIMPAN PERUBAHAN