Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 39.31 KB | None | 0 0
  1. # Copyright 2019 The Fuchsia Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4.  
  5. # WARNING: THIS FILE IS MACHINE GENERATED. DO NOT EDIT.
  6. # Generated from the syscalls banjo file
  7.  
  8. #^ Acquire the current time.
  9. syscall clock_get
  10. (clock_id: zx_clock_t)
  11. returns (zx_time_t);
  12.  
  13. #^ Acquire the current time.
  14. syscall clock_get_new
  15. (clock_id: zx_clock_t)
  16. returns (zx_status_t, out: zx_time_t);
  17.  
  18. #^ Acquire the current monotonic time.
  19. syscall clock_get_monotonic
  20. ()
  21. returns (zx_time_t);
  22.  
  23. #^ High resolution sleep.
  24. #! None.
  25. syscall nanosleep blocking
  26. (deadline: zx_time_t)
  27. returns (zx_status_t);
  28.  
  29. #^ Read the number of high-precision timer ticks since boot.
  30. syscall ticks_get vdsocall
  31. ()
  32. returns (zx_ticks_t);
  33.  
  34. #^ Read the number of high-precision timer ticks in a second.
  35. syscall ticks_per_second vdsocall const
  36. ()
  37. returns (zx_ticks_t);
  38.  
  39. #^ Convert a time relative to now to an absolute deadline.
  40. syscall deadline_after vdsocall
  41. (nanoseconds: zx_duration_t)
  42. returns (zx_time_t);
  43.  
  44. #! handle must have resource kind ZX_RSRC_KIND_ROOT.
  45. syscall clock_adjust
  46. (handle: zx_handle_t, clock_id: zx_clock_t, offset: int64_t)
  47. returns (zx_status_t);
  48.  
  49. syscall system_get_dcache_line_size vdsocall const
  50. ()
  51. returns (uint32_t);
  52.  
  53. #^ Get number of logical processors on the system.
  54. syscall system_get_num_cpus vdsocall const
  55. ()
  56. returns (uint32_t);
  57.  
  58. #^ Get version string for system.
  59. syscall system_get_version vdsocall
  60. (version: char[version_size] OUT, version_size: size_t)
  61. returns (zx_status_t);
  62.  
  63. #^ Get amount of physical memory on the system.
  64. syscall system_get_physmem vdsocall
  65. ()
  66. returns (uint64_t);
  67.  
  68. #^ Get supported hardware capabilities.
  69. syscall system_get_features vdsocall
  70. (kind: uint32_t)
  71. returns (zx_status_t, features: uint32_t features);
  72.  
  73. #^ Flush CPU data and/or instruction caches.
  74. syscall cache_flush vdsocall
  75. (addr: any[size] IN, size: size_t, options: uint32_t)
  76. returns (zx_status_t);
  77.  
  78. #^ Close a handle.
  79. #! None.
  80. syscall handle_close
  81. (handle: zx_handle_t handle_release_always)
  82. returns (zx_status_t);
  83.  
  84. #^ Close a number of handles.
  85. #! None.
  86. syscall handle_close_many
  87. (handles: zx_handle_t[num_handles] IN, num_handles: size_t)
  88. returns (zx_status_t);
  89.  
  90. #^ Duplicate a handle.
  91. #! handle must have ZX_RIGHT_DUPLICATE.
  92. syscall handle_duplicate
  93. (handle: zx_handle_t, rights: zx_rights_t)
  94. returns (zx_status_t, out: zx_handle_t handle_acquire);
  95.  
  96. #^ Replace a handle.
  97. #! None.
  98. syscall handle_replace
  99. (handle: zx_handle_t handle_release_always, rights: zx_rights_t)
  100. returns (zx_status_t, out: zx_handle_t handle_acquire);
  101.  
  102. #^ Wait for signals on an object.
  103. #! handle must have ZX_RIGHT_WAIT.
  104. syscall object_wait_one blocking
  105. (handle: zx_handle_t, signals: zx_signals_t, deadline: zx_time_t)
  106. returns (zx_status_t, observed: zx_signals_t optional);
  107.  
  108. #^ Wait for signals on multiple objects.
  109. #! Every entry of items must have a handle field with ZX_RIGHT_WAIT.
  110. syscall object_wait_many blocking
  111. (items: zx_wait_item_t[count] INOUT, count: size_t, deadline: zx_time_t)
  112. returns (zx_status_t);
  113.  
  114. #^ Subscribe for signals on an object.
  115. #! handle must have ZX_RIGHT_WAIT.
  116. #! port must be of type ZX_OBJ_TYPE_PORT and have ZX_RIGHT_WRITE.
  117. syscall object_wait_async
  118. (handle: zx_handle_t, port: zx_handle_t, key: uint64_t, signals: zx_signals_t, options: uint32_t)
  119. returns (zx_status_t);
  120.  
  121. #^ Signal an object.
  122. #! handle must have ZX_RIGHT_SIGNAL.
  123. syscall object_signal
  124. (handle: zx_handle_t, clear_mask: uint32_t, set_mask: uint32_t)
  125. returns (zx_status_t);
  126.  
  127. #^ Signal an object's peer.
  128. #! handle must have ZX_RIGHT_SIGNAL_PEER.
  129. syscall object_signal_peer
  130. (handle: zx_handle_t, clear_mask: uint32_t, set_mask: uint32_t)
  131. returns (zx_status_t);
  132.  
  133. #^ Ask for various properties of various kernel objects.
  134. #! handle must have ZX_RIGHT_GET_PROPERTY.
  135. #! If property is ZX_PROP_PROCESS_DEBUG_ADDR, handle must be of type ZX_OBJ_TYPE_PROCESS.
  136. #! If property is ZX_PROP_PROCESS_VDSO_BASE_ADDRESS, handle must be of type ZX_OBJ_TYPE_PROCESS.
  137. #! If property is ZX_PROP_SOCKET_RX_THRESHOLD, handle must be of type ZX_OBJ_TYPE_SOCKET.
  138. #! If property is ZX_PROP_SOCKET_TX_THRESHOLD, handle must be of type ZX_OBJ_TYPE_SOCKET.
  139. syscall object_get_property
  140. (handle: zx_handle_t, property: uint32_t, value: any[value_size] OUT, value_size: size_t)
  141. returns (zx_status_t);
  142.  
  143. #^ Set various properties of various kernel objects.
  144. #! handle must have ZX_RIGHT_SET_PROPERTY.
  145. #! If property is ZX_PROP_PROCESS_DEBUG_ADDR, handle must be of type ZX_OBJ_TYPE_PROCESS.
  146. #! If property is ZX_PROP_SOCKET_RX_THRESHOLD, handle must be of type ZX_OBJ_TYPE_SOCKET.
  147. #! If property is ZX_PROP_SOCKET_TX_THRESHOLD, handle must be of type ZX_OBJ_TYPE_SOCKET.
  148. #! If property is ZX_PROP_JOB_KILL_ON_OOM, handle must be of type ZX_OBJ_TYPE_JOB.
  149. syscall object_set_property
  150. (handle: zx_handle_t, property: uint32_t, value: any[value_size] IN, value_size: size_t)
  151. returns (zx_status_t);
  152.  
  153. #^ Query information about an object.
  154. #! If topic is ZX_INFO_PROCESS, handle must be of type ZX_OBJ_TYPE_PROCESS and have ZX_RIGHT_INSPECT.
  155. #! If topic is ZX_INFO_JOB, handle must be of type ZX_OBJ_TYPE_JOB and have ZX_RIGHT_INSPECT.
  156. #! If topic is ZX_INFO_PROCESS_THREADS, handle must be of type ZX_OBJ_TYPE_PROCESS and have ZX_RIGHT_ENUMERATE.
  157. #! If topic is ZX_INFO_JOB_CHILDREN, handle must be of type ZX_OBJ_TYPE_JOB and have ZX_RIGHT_ENUMERATE.
  158. #! If topic is ZX_INFO_JOB_PROCESSES, handle must be of type ZX_OBJ_TYPE_JOB and have ZX_RIGHT_ENUMERATE.
  159. #! If topic is ZX_INFO_THREAD, handle must be of type ZX_OBJ_TYPE_THREAD and have ZX_RIGHT_INSPECT.
  160. #! If topic is ZX_INFO_THREAD_EXCEPTION_REPORT, handle must be of type ZX_OBJ_TYPE_THREAD and have ZX_RIGHT_INSPECT.
  161. #! If topic is ZX_INFO_THREAD_STATS, handle must be of type ZX_OBJ_TYPE_THREAD and have ZX_RIGHT_INSPECT.
  162. #! If topic is ZX_INFO_TASK_STATS, handle must be of type ZX_OBJ_TYPE_PROCESS and have ZX_RIGHT_INSPECT.
  163. #! If topic is ZX_INFO_PROCESS_MAPS, handle must be of type ZX_OBJ_TYPE_PROCESS and have ZX_RIGHT_INSPECT.
  164. #! If topic is ZX_INFO_PROCESS_VMOS, handle must be of type ZX_OBJ_TYPE_PROCESS and have ZX_RIGHT_INSPECT.
  165. #! If topic is ZX_INFO_VMO, handle must be of type ZX_OBJ_TYPE_VMO.
  166. #! If topic is ZX_INFO_VMAR, handle must be of type ZX_OBJ_TYPE_VMAR and have ZX_RIGHT_INSPECT.
  167. #! If topic is ZX_INFO_CPU_STATS, handle must have resource kind ZX_RSRC_KIND_ROOT.
  168. #! If topic is ZX_INFO_KMEM_STATS, handle must have resource kind ZX_RSRC_KIND_ROOT.
  169. #! If topic is ZX_INFO_RESOURCE, handle must be of type ZX_OBJ_TYPE_RESOURCE and have ZX_RIGHT_INSPECT.
  170. #! If topic is ZX_INFO_HANDLE_COUNT, handle must have ZX_RIGHT_INSPECT.
  171. #! If topic is ZX_INFO_BTI, handle must be of type ZX_OBJ_TYPE_BTI and have ZX_RIGHT_INSPECT.
  172. #! If topic is ZX_INFO_PROCESS_HANDLE_STATS, handle must be of type ZX_OBJ_TYPE_PROCESS and have ZX_RIGHT_INSPECT.
  173. #! If topic is ZX_INFO_SOCKET, handle must be of type ZX_OBJ_TYPE_SOCKET and have ZX_RIGHT_INSPECT.
  174. syscall object_get_info
  175. (handle: zx_handle_t, topic: uint32_t, buffer: any[buffer_size] OUT, buffer_size: size_t)
  176. returns (zx_status_t, actual: size_t optional, avail: size_t optional);
  177.  
  178. #^ Given a kernel object with children objects, obtain a handle to the child specified by the provided kernel object id.
  179. #! handle must have ZX_RIGHT_ENUMERATE.
  180. syscall object_get_child
  181. (handle: zx_handle_t, koid: uint64_t, rights: zx_rights_t)
  182. returns (zx_status_t, out: zx_handle_t);
  183.  
  184. #! handle must be of type ZX_OBJ_TYPE_THREAD and have ZX_RIGHT_MANAGE_THREAD.
  185. #! profile must be of type ZX_OBJ_TYPE_PROFILE and have ZX_RIGHT_APPLY_PROFILE.
  186. syscall object_set_profile
  187. (handle: zx_handle_t, profile: zx_handle_t, options: uint32_t)
  188. returns (zx_status_t);
  189.  
  190. #^ Create a channel.
  191. syscall channel_create
  192. (options: uint32_t)
  193. returns (zx_status_t, out0: zx_handle_t handle_acquire, out1: zx_handle_t handle_acquire);
  194.  
  195. #^ Read a message from a channel.
  196. #! handle must be of type ZX_OBJ_TYPE_CHANNEL and have ZX_RIGHT_READ.
  197. syscall channel_read
  198. (handle: zx_handle_t, options: uint32_t, bytes: any[num_bytes] OUT, handles: zx_handle_t[num_handles] OUT, num_bytes: uint32_t, num_handles: uint32_t)
  199. returns (zx_status_t, actual_bytes: uint32_t optional, actual_handles: uint32_t optional);
  200.  
  201. #^ Read a message from a channel.
  202. #! handle must be of type ZX_OBJ_TYPE_CHANNEL and have ZX_RIGHT_READ.
  203. syscall channel_read_etc
  204. (handle: zx_handle_t, options: uint32_t, bytes: any[num_bytes] OUT, handles: zx_handle_info_t[num_handles] OUT, num_bytes: uint32_t, num_handles: uint32_t)
  205. returns (zx_status_t, actual_bytes: uint32_t optional, actual_handles: uint32_t optional);
  206.  
  207. #^ Write a message to a channel.
  208. #! handle must be of type ZX_OBJ_TYPE_CHANNEL and have ZX_RIGHT_WRITE.
  209. #! Every entry of handles must have ZX_RIGHT_TRANSFER.
  210. syscall channel_write
  211. (handle: zx_handle_t, options: uint32_t, bytes: any[num_bytes] IN, num_bytes: uint32_t, handles: zx_handle_t[num_handles] IN, num_handles: uint32_t)
  212. returns (zx_status_t);
  213.  
  214. #^ Write a message to a channel.
  215. #! handle must be of type ZX_OBJ_TYPE_CHANNEL and have ZX_RIGHT_WRITE.
  216. #! Every entry of handles must have ZX_RIGHT_TRANSFER.
  217. syscall channel_write_etc
  218. (handle: zx_handle_t, options: uint32_t, bytes: any[num_bytes] IN, num_bytes: uint32_t, handles: zx_handle_disposition_t[num_handles] INOUT, num_handles: uint32_t)
  219. returns (zx_status_t);
  220.  
  221. #! handle must be of type ZX_OBJ_TYPE_CHANNEL and have ZX_RIGHT_READ and have ZX_RIGHT_WRITE.
  222. #! All wr_handles of args must have ZX_RIGHT_TRANSFER.
  223. syscall channel_call_noretry internal
  224. (handle: zx_handle_t, options: uint32_t, deadline: zx_time_t, args: zx_channel_call_args_t[1] IN)
  225. returns (zx_status_t, actual_bytes: uint32_t, actual_handles: uint32_t);
  226.  
  227. syscall channel_call_finish internal
  228. (deadline: zx_time_t, args: zx_channel_call_args_t[1] IN)
  229. returns (zx_status_t, actual_bytes: uint32_t, actual_handles: uint32_t);
  230.  
  231. #^ Send a message to a channel and await a reply.
  232. #! handle must be of type ZX_OBJ_TYPE_CHANNEL and have ZX_RIGHT_READ and have ZX_RIGHT_WRITE.
  233. #! All wr_handles of args must have ZX_RIGHT_TRANSFER.
  234. syscall channel_call blocking vdsocall
  235. (handle: zx_handle_t, options: uint32_t, deadline: zx_time_t, args: zx_channel_call_args_t[1] IN)
  236. returns (zx_status_t, actual_bytes: uint32_t, actual_handles: uint32_t);
  237.  
  238. #^ Create a socket.
  239. syscall socket_create
  240. (options: uint32_t)
  241. returns (zx_status_t, out0: zx_handle_t handle_acquire, out1: zx_handle_t handle_acquire);
  242.  
  243. #^ Write data to a socket.
  244. #! handle must be of type ZX_OBJ_TYPE_SOCKET and have ZX_RIGHT_WRITE.
  245. syscall socket_write
  246. (handle: zx_handle_t, options: uint32_t, buffer: any[buffer_size] IN, buffer_size: size_t)
  247. returns (zx_status_t, actual: size_t optional);
  248.  
  249. #^ Read data from a socket.
  250. #! handle must be of type ZX_OBJ_TYPE_SOCKET and have ZX_RIGHT_READ.
  251. syscall socket_read
  252. (handle: zx_handle_t, options: uint32_t, buffer: any[buffer_size] OUT, buffer_size: size_t)
  253. returns (zx_status_t, actual: size_t optional);
  254.  
  255. #^ Send another socket object via a socket.
  256. #! handle must be of type ZX_OBJ_TYPE_SOCKET and have ZX_RIGHT_WRITE.
  257. #! socket_to_share must be of type ZX_OBJ_TYPE_SOCKET and have ZX_RIGHT_TRANSFER.
  258. syscall socket_share
  259. (handle: zx_handle_t, socket_to_share: zx_handle_t)
  260. returns (zx_status_t);
  261.  
  262. #^ Receive another socket object via a socket.
  263. #! handle must be of type ZX_OBJ_TYPE_SOCKET and have ZX_RIGHT_READ.
  264. syscall socket_accept
  265. (handle: zx_handle_t)
  266. returns (zx_status_t, out_socket: zx_handle_t handle_acquire);
  267.  
  268. #^ Prevent reading or writing.
  269. #! handle must be of type ZX_OBJ_TYPE_SOCKET and have ZX_RIGHT_WRITE.
  270. syscall socket_shutdown
  271. (handle: zx_handle_t, options: uint32_t)
  272. returns (zx_status_t);
  273.  
  274. #^ Terminate the current running thread.
  275. syscall thread_exit noreturn
  276. ();
  277.  
  278. #^ Create a thread.
  279. #! process must be of type ZX_OBJ_TYPE_PROCESS and have ZX_RIGHT_MANAGE_THREAD.
  280. syscall thread_create
  281. (process: zx_handle_t, name: char[name_size] IN, name_size: size_t, options: uint32_t)
  282. returns (zx_status_t, out: zx_handle_t handle_acquire);
  283.  
  284. #^ Start execution on a thread.
  285. #! handle must be of type ZX_OBJ_TYPE_THREAD and have ZX_RIGHT_MANAGE_THREAD.
  286. syscall thread_start
  287. (handle: zx_handle_t, thread_entry: zx_vaddr_t, stack: zx_vaddr_t, arg1: uintptr_t, arg2: uintptr_t)
  288. returns (zx_status_t);
  289.  
  290. #^ Read one aspect of thread state.
  291. #! handle must be of type ZX_OBJ_TYPE_THREAD and have ZX_RIGHT_READ.
  292. syscall thread_read_state
  293. (handle: zx_handle_t, kind: uint32_t, buffer: any[buffer_size] OUT, buffer_size: size_t)
  294. returns (zx_status_t);
  295.  
  296. #^ Write one aspect of thread state.
  297. #! handle must be of type ZX_OBJ_TYPE_THREAD and have ZX_RIGHT_WRITE.
  298. syscall thread_write_state
  299. (handle: zx_handle_t, kind: uint32_t, buffer: any[buffer_size] IN, buffer_size: size_t)
  300. returns (zx_status_t);
  301.  
  302. #^ Exits the currently running process.
  303. syscall process_exit noreturn
  304. (retcode: int64_t);
  305.  
  306. #^ Create a new process.
  307. #! job must be of type ZX_OBJ_TYPE_JOB and have ZX_RIGHT_MANAGE_PROCESS.
  308. syscall process_create
  309. (job: zx_handle_t, name: char[name_size] IN, name_size: size_t, options: uint32_t)
  310. returns (zx_status_t, proc_handle: zx_handle_t handle_acquire, vmar_handle: zx_handle_t handle_acquire);
  311.  
  312. #^ Start execution on a process.
  313. #! handle must be of type ZX_OBJ_TYPE_PROCESS and have ZX_RIGHT_WRITE.
  314. #! thread must be of type ZX_OBJ_TYPE_THREAD and have ZX_RIGHT_WRITE.
  315. #! arg1 must have ZX_RIGHT_TRANSFER.
  316. syscall process_start
  317. (handle: zx_handle_t, thread: zx_handle_t, entry: zx_vaddr_t, stack: zx_vaddr_t, arg1: zx_handle_t handle_release_always, arg2: uintptr_t)
  318. returns (zx_status_t);
  319.  
  320. #^ Read from the given process's address space.
  321. #! handle must be of type ZX_OBJ_TYPE_PROCESS and have ZX_RIGHT_READ and have ZX_RIGHT_WRITE.
  322. syscall process_read_memory
  323. (handle: zx_handle_t, vaddr: zx_vaddr_t, buffer: any[buffer_size] OUT, buffer_size: size_t)
  324. returns (zx_status_t, actual: size_t);
  325.  
  326. #^ Write into the given process's address space.
  327. #! handle must be of type ZX_OBJ_TYPE_PROCESS and have ZX_RIGHT_WRITE.
  328. syscall process_write_memory
  329. (handle: zx_handle_t, vaddr: zx_vaddr_t, buffer: any[buffer_size] IN, buffer_size: size_t)
  330. returns (zx_status_t, actual: size_t);
  331.  
  332. #^ Create a new job.
  333. #! parent_job must be of type ZX_OBJ_TYPE_JOB and have ZX_RIGHT_MANAGE_JOB.
  334. syscall job_create
  335. (parent_job: zx_handle_t, options: uint32_t)
  336. returns (zx_status_t, out: zx_handle_t handle_acquire);
  337.  
  338. #^ Set job security and resource policies.
  339. #! handle must be of type ZX_OBJ_TYPE_JOB and have ZX_RIGHT_SET_POLICY.
  340. syscall job_set_policy
  341. (handle: zx_handle_t, options: uint32_t, topic: uint32_t, policy: any[count] IN, count: uint32_t)
  342. returns (zx_status_t);
  343.  
  344. #^ Bind to, or unbind from, the exception port corresponding to a given job, process, or thread.
  345. #! port must be of type ZX_OBJ_TYPE_PORT.
  346. syscall task_bind_exception_port
  347. (handle: zx_handle_t, port: zx_handle_t, key: uint64_t, options: uint32_t)
  348. returns (zx_status_t);
  349.  
  350. #^ Suspend the given task. Currently only thread or process handles may be suspended.
  351. #! handle must be of type ZX_OBJ_TYPE_THREAD or ZX_OBJ_TYPE_PROCESS and have ZX_RIGHT_WRITE.
  352. syscall task_suspend
  353. (handle: zx_handle_t)
  354. returns (zx_status_t, token: zx_handle_t handle_acquire);
  355.  
  356. #^ Suspend the given task. Currently only thread or process handles may be suspended.
  357. #! handle must be of type ZX_OBJ_TYPE_THREAD or ZX_OBJ_TYPE_PROCESS and have ZX_RIGHT_WRITE.
  358. syscall task_suspend_token
  359. (handle: zx_handle_t)
  360. returns (zx_status_t, token: zx_handle_t handle_acquire);
  361.  
  362. #^ Resume the given task after an exception has been reported.
  363. #! handle must be of type ZX_OBJ_TYPE_THREAD.
  364. #! port must be of type ZX_OBJ_TYPE_PORT.
  365. syscall task_resume_from_exception
  366. (handle: zx_handle_t, port: zx_handle_t, options: uint32_t)
  367. returns (zx_status_t);
  368.  
  369. #^ Create an exception channel for a given job, process, or thread.
  370. #! handle must have ZX_RIGHT_INSPECT and have ZX_RIGHT_DUPLICATE and have ZX_RIGHT_TRANSFER and have ZX_RIGHT_MANAGE_THREAD.
  371. #! If handle is of type ZX_OBJ_TYPE_JOB or ZX_OBJ_TYPE_PROCESS, it must have ZX_RIGHT_ENUMERATE.
  372. syscall task_create_exception_channel
  373. (handle: zx_handle_t, options: uint32_t)
  374. returns (zx_status_t, out: zx_handle_t handle_acquire);
  375.  
  376. #^ Kill the provided task (job, process, or thread).
  377. #! handle must have ZX_RIGHT_DESTROY.
  378. syscall task_kill
  379. (handle: zx_handle_t)
  380. returns (zx_status_t);
  381.  
  382. #^ Create a handle for the exception's thread.
  383. #! handle must be of type ZX_OBJ_TYPE_EXCEPTION.
  384. syscall exception_get_thread
  385. (handle: zx_handle_t)
  386. returns (zx_status_t, out: zx_handle_t handle_acquire);
  387.  
  388. #^ Create a handle for the exception's process.
  389. #! handle must be of type ZX_OBJ_TYPE_EXCEPTION.
  390. syscall exception_get_process
  391. (handle: zx_handle_t)
  392. returns (zx_status_t, out: zx_handle_t handle_acquire);
  393.  
  394. #^ Create an event.
  395. syscall event_create
  396. (options: uint32_t)
  397. returns (zx_status_t, out: zx_handle_t handle_acquire);
  398.  
  399. #^ Create an event pair.
  400. syscall eventpair_create
  401. (options: uint32_t)
  402. returns (zx_status_t, out0: zx_handle_t handle_acquire, out1: zx_handle_t handle_acquire);
  403.  
  404. #^ Wait on a futex.
  405. #! None.
  406. syscall futex_wait blocking
  407. (value_ptr: zx_futex_t[1] IN, current_value: zx_futex_t, new_futex_owner: zx_handle_t, deadline: zx_time_t)
  408. returns (zx_status_t);
  409.  
  410. #^ Wake some number of threads waiting on a futex, optionally transferring ownership to the thread which was woken in the process.
  411. #! None.
  412. syscall futex_wake
  413. (value_ptr: zx_futex_t[1] IN, wake_count: uint32_t)
  414. returns (zx_status_t);
  415.  
  416. #^ Wake some number of threads waiting on a futex, and move more waiters to another wait queue.
  417. #! None.
  418. syscall futex_requeue
  419. (value_ptr: zx_futex_t[1] IN, wake_count: uint32_t, current_value: zx_futex_t, requeue_ptr: zx_futex_t[1] IN, requeue_count: uint32_t, new_requeue_owner: zx_handle_t)
  420. returns (zx_status_t);
  421.  
  422. #^ Wake some number of threads waiting on a futex, optionally transferring ownership to the thread which was woken in the process.
  423. #! None.
  424. syscall futex_wake_single_owner
  425. (value_ptr: zx_futex_t[1] IN)
  426. returns (zx_status_t);
  427.  
  428. #^ Wake some number of threads waiting on a futex, and move more waiters to another wait queue.
  429. #! None.
  430. syscall futex_requeue_single_owner
  431. (value_ptr: zx_futex_t[1] IN, current_value: zx_futex_t, requeue_ptr: zx_futex_t[1] IN, requeue_count: uint32_t, new_requeue_owner: zx_handle_t)
  432. returns (zx_status_t);
  433.  
  434. #^ Fetch the koid current owner of a futex, if any.
  435. #! None.
  436. syscall futex_get_owner
  437. (value_ptr: zx_futex_t[1] IN, koid: zx_koid_t[1] OUT)
  438. returns (zx_status_t);
  439.  
  440. #^ Create an IO port.
  441. syscall port_create
  442. (options: uint32_t)
  443. returns (zx_status_t, out: zx_handle_t handle_acquire);
  444.  
  445. #^ Queue a packet to a port.
  446. #! handle must be of type ZX_OBJ_TYPE_PORT and have ZX_RIGHT_WRITE.
  447. syscall port_queue
  448. (handle: zx_handle_t, packet: zx_port_packet_t[1] IN)
  449. returns (zx_status_t);
  450.  
  451. #^ Wait for a packet arrival in a port.
  452. #! handle must be of type ZX_OBJ_TYPE_PORT and have ZX_RIGHT_READ.
  453. syscall port_wait blocking
  454. (handle: zx_handle_t, deadline: zx_time_t, packet: zx_port_packet_t[1] OUT)
  455. returns (zx_status_t);
  456.  
  457. #^ Cancels async port notifications on an object.
  458. #! handle must be of type ZX_OBJ_TYPE_PORT and have ZX_RIGHT_WRITE.
  459. syscall port_cancel
  460. (handle: zx_handle_t, source: zx_handle_t, key: uint64_t)
  461. returns (zx_status_t);
  462.  
  463. #^ Create a timer.
  464. syscall timer_create
  465. (options: uint32_t, clock_id: zx_clock_t)
  466. returns (zx_status_t, out: zx_handle_t handle_acquire);
  467.  
  468. #^ Start a timer.
  469. #! handle must be of type ZX_OBJ_TYPE_TIMER and have ZX_RIGHT_WRITE.
  470. syscall timer_set
  471. (handle: zx_handle_t, deadline: zx_time_t, slack: zx_duration_t)
  472. returns (zx_status_t);
  473.  
  474. #^ Cancel a timer.
  475. #! handle must be of type ZX_OBJ_TYPE_TIMER and have ZX_RIGHT_WRITE.
  476. syscall timer_cancel
  477. (handle: zx_handle_t)
  478. returns (zx_status_t);
  479.  
  480. #^ Create a VM object.
  481. syscall vmo_create
  482. (size: uint64_t, options: uint32_t)
  483. returns (zx_status_t, out: zx_handle_t handle_acquire);
  484.  
  485. #^ Read bytes from the VMO.
  486. #! handle must be of type ZX_OBJ_TYPE_VMO and have ZX_RIGHT_READ.
  487. syscall vmo_read blocking
  488. (handle: zx_handle_t, buffer: any[buffer_size] OUT, offset: uint64_t, buffer_size: size_t)
  489. returns (zx_status_t);
  490.  
  491. #^ Write bytes to the VMO.
  492. #! handle must be of type ZX_OBJ_TYPE_VMO and have ZX_RIGHT_WRITE.
  493. syscall vmo_write blocking
  494. (handle: zx_handle_t, buffer: any[buffer_size] IN, offset: uint64_t, buffer_size: size_t)
  495. returns (zx_status_t);
  496.  
  497. #^ Read the current size of a VMO object.
  498. syscall vmo_get_size
  499. (handle: zx_handle_t)
  500. returns (zx_status_t, size: uint64_t);
  501.  
  502. #^ Resize a VMO object.
  503. #! handle must be of type ZX_OBJ_TYPE_VMO and have ZX_RIGHT_WRITE.
  504. syscall vmo_set_size
  505. (handle: zx_handle_t, size: uint64_t)
  506. returns (zx_status_t);
  507.  
  508. #^ Perform an operation on a range of a VMO.
  509. #! If op is ZX_VMO_OP_COMMIT, handle must be of type ZX_OBJ_TYPE_VMO and have ZX_RIGHT_WRITE.
  510. #! If op is ZX_VMO_OP_DECOMMIT, handle must be of type ZX_OBJ_TYPE_VMO and have ZX_RIGHT_WRITE.
  511. #! If op is ZX_VMO_OP_CACHE_SYNC, handle must be of type ZX_OBJ_TYPE_VMO and have ZX_RIGHT_READ.
  512. #! If op is ZX_VMO_OP_CACHE_INVALIDATE, handle must be of type ZX_OBJ_TYPE_VMO and have ZX_RIGHT_WRITE.
  513. #! If op is ZX_VMO_OP_CACHE_CLEAN, handle must be of type ZX_OBJ_TYPE_VMO and have ZX_RIGHT_READ.
  514. #! If op is ZX_VMO_OP_CACHE_CLEAN_INVALIDATE, handle must be of type ZX_OBJ_TYPE_VMO and have ZX_RIGHT_READ.
  515. syscall vmo_op_range blocking
  516. (handle: zx_handle_t, op: uint32_t, offset: uint64_t, size: uint64_t, buffer: any[buffer_size] INOUT, buffer_size: size_t)
  517. returns (zx_status_t);
  518.  
  519. #^ Create a clone of a VM Object.
  520. #! handle must be of type ZX_OBJ_TYPE_VMO and have ZX_RIGHT_DUPLICATE and have ZX_RIGHT_READ.
  521. syscall vmo_clone
  522. (handle: zx_handle_t, options: uint32_t, offset: uint64_t, size: uint64_t)
  523. returns (zx_status_t, out: zx_handle_t handle_acquire);
  524.  
  525. #^ Set the caching policy for pages held by a VMO.
  526. #! handle must be of type ZX_OBJ_TYPE_VMO and have ZX_RIGHT_MAP.
  527. syscall vmo_set_cache_policy
  528. (handle: zx_handle_t, cache_policy: uint32_t)
  529. returns (zx_status_t);
  530.  
  531. #^ Add execute rights to a VMO.
  532. #! handle must be of type ZX_OBJ_TYPE_VMO.
  533. #! vmex must have resource kind ZX_RSRC_KIND_VMEX.
  534. syscall vmo_replace_as_executable
  535. (handle: zx_handle_t handle_release_always, vmex: zx_handle_t)
  536. returns (zx_status_t, out: zx_handle_t handle_acquire);
  537.  
  538. #^ Allocate a new subregion.
  539. #! If options & ZX_VM_CAN_MAP_READ, parent_vmar must be of type ZX_OBJ_TYPE_VMAR and have ZX_RIGHT_READ.
  540. #! If options & ZX_VM_CAN_MAP_WRITE, parent_vmar must be of type ZX_OBJ_TYPE_VMAR and have ZX_RIGHT_WRITE.
  541. #! If options & ZX_VM_CAN_MAP_EXECUTE, parent_vmar must be of type ZX_OBJ_TYPE_VMAR and have ZX_RIGHT_EXECUTE.
  542. syscall vmar_allocate
  543. (parent_vmar: zx_handle_t, options: zx_vm_option_t, offset: uint64_t, size: uint64_t)
  544. returns (zx_status_t, child_vmar: zx_handle_t handle_acquire, child_addr: zx_vaddr_t);
  545.  
  546. #^ Destroy a virtual memory address region.
  547. syscall vmar_destroy
  548. (handle: zx_handle_t)
  549. returns (zx_status_t);
  550.  
  551. #^ Add a memory mapping.
  552. #! handle must be of type ZX_OBJ_TYPE_VMAR.
  553. #! vmo must be of type ZX_OBJ_TYPE_VMO.
  554. syscall vmar_map
  555. (handle: zx_handle_t, options: zx_vm_option_t, vmar_offset: uint64_t, vmo: zx_handle_t, vmo_offset: uint64_t, len: uint64_t)
  556. returns (zx_status_t, mapped_addr: zx_vaddr_t);
  557.  
  558. #^ Unmap virtual memory pages.
  559. syscall vmar_unmap
  560. (handle: zx_handle_t, addr: zx_vaddr_t, len: uint64_t)
  561. returns (zx_status_t);
  562.  
  563. #^ Set protection of virtual memory pages.
  564. #! If options & ZX_VM_PERM_READ, handle must be of type ZX_OBJ_TYPE_VMAR and have ZX_RIGHT_READ.
  565. #! If options & ZX_VM_PERM_WRITE, handle must be of type ZX_OBJ_TYPE_VMAR and have ZX_RIGHT_WRITE.
  566. #! If options & ZX_VM_PERM_EXECUTE, handle must be of type ZX_OBJ_TYPE_VMAR and have ZX_RIGHT_EXECUTE.
  567. syscall vmar_protect
  568. (handle: zx_handle_t, options: zx_vm_option_t, addr: zx_vaddr_t, len: uint64_t)
  569. returns (zx_status_t);
  570.  
  571. syscall cprng_draw_once internal
  572. (buffer: any[buffer_size] OUT, buffer_size: size_t)
  573. returns (zx_status_t);
  574.  
  575. #^ Draw from the kernel's CPRNG.
  576. syscall cprng_draw vdsocall
  577. (buffer: any[buffer_size] OUT, buffer_size: size_t)
  578. returns ();
  579.  
  580. #^ Add entropy to the kernel CPRNG.
  581. syscall cprng_add_entropy
  582. (buffer: any[buffer_size] IN, buffer_size: size_t)
  583. returns (zx_status_t);
  584.  
  585. #^ Create a fifo.
  586. syscall fifo_create
  587. (elem_count: size_t, elem_size: size_t, options: uint32_t)
  588. returns (zx_status_t, out0: zx_handle_t handle_acquire, out1: zx_handle_t handle_acquire);
  589.  
  590. #^ Read data from a fifo.
  591. #! handle must be of type ZX_OBJ_TYPE_FIFO and have ZX_RIGHT_READ.
  592. syscall fifo_read
  593. (handle: zx_handle_t, elem_size: size_t, data: any[some] OUT, count: size_t)
  594. returns (zx_status_t, actual_count: size_t optional);
  595.  
  596. #^ Write data to a fifo.
  597. #! handle must be of type ZX_OBJ_TYPE_FIFO and have ZX_RIGHT_WRITE.
  598. syscall fifo_write
  599. (handle: zx_handle_t, elem_size: size_t, data: any[some] IN, count: size_t)
  600. returns (zx_status_t, actual_count: size_t optional);
  601.  
  602. #! root_job must be of type ZX_OBJ_TYPE_JOB and have ZX_RIGHT_MANAGE_PROCESS.
  603. syscall profile_create
  604. (root_job: zx_handle_t, profile: zx_profile_info_t[1] IN)
  605. returns (zx_status_t, out: zx_handle_t handle_acquire);
  606.  
  607. #^ Unmap memory, close handle, exit.
  608. syscall vmar_unmap_handle_close_thread_exit vdsocall
  609. (vmar_handle: zx_handle_t, addr: zx_vaddr_t, size: size_t, close_handle: zx_handle_t handle_release)
  610. returns (zx_status_t);
  611.  
  612. #^ Write to futex, wake futex, close handle, exit.
  613. syscall futex_wake_handle_close_thread_exit vdsocall noreturn
  614. (value_ptr: zx_futex_t[1] IN, wake_count: uint32_t, new_value: int32_t, close_handle: zx_handle_t handle_release);
  615.  
  616. #! resource must have resource kind ZX_RSRC_KIND_ROOT.
  617. syscall debuglog_create
  618. (resource: zx_handle_t, options: uint32_t)
  619. returns (zx_status_t, out: zx_handle_t handle_acquire);
  620.  
  621. #! handle must be of type ZX_OBJ_TYPE_LOG and have ZX_RIGHT_WRITE.
  622. syscall debuglog_write
  623. (handle: zx_handle_t, options: uint32_t, buffer: any[buffer_size] IN, buffer_size: size_t)
  624. returns (zx_status_t);
  625.  
  626. #! handle must be of type ZX_OBJ_TYPE_LOG and have ZX_RIGHT_READ.
  627. syscall debuglog_read
  628. (handle: zx_handle_t, options: uint32_t, buffer: any[buffer_size] OUT, buffer_size: size_t)
  629. returns (zx_status_t);
  630.  
  631. #! handle must have resource kind ZX_RSRC_KIND_ROOT.
  632. syscall ktrace_read
  633. (handle: zx_handle_t, data: any[data_size] OUT, offset: uint32_t, data_size: size_t)
  634. returns (zx_status_t, actual: size_t);
  635.  
  636. #! handle must have resource kind ZX_RSRC_KIND_ROOT.
  637. syscall ktrace_control
  638. (handle: zx_handle_t, action: uint32_t, options: uint32_t, ptr: any[action] INOUT)
  639. returns (zx_status_t);
  640.  
  641. #! handle must have resource kind ZX_RSRC_KIND_ROOT.
  642. syscall ktrace_write
  643. (handle: zx_handle_t, id: uint32_t, arg0: uint32_t, arg1: uint32_t)
  644. returns (zx_status_t);
  645.  
  646. #! handle must have resource kind ZX_RSRC_KIND_ROOT.
  647. syscall mtrace_control
  648. (handle: zx_handle_t, kind: uint32_t, action: uint32_t, options: uint32_t, ptr: any[ptr_size] INOUT, ptr_size: size_t)
  649. returns (zx_status_t);
  650.  
  651. #! handle must have resource kind ZX_RSRC_KIND_ROOT.
  652. syscall debug_read
  653. (handle: zx_handle_t, buffer: char[buffer_size] OUT, buffer_size: size_t[1] INOUT)
  654. returns (zx_status_t);
  655.  
  656. syscall debug_write
  657. (buffer: char[buffer_size] IN, buffer_size: size_t)
  658. returns (zx_status_t);
  659.  
  660. #! resource must have resource kind ZX_RSRC_KIND_ROOT.
  661. syscall debug_send_command
  662. (resource: zx_handle_t, buffer: char[buffer_size] IN, buffer_size: size_t)
  663. returns (zx_status_t);
  664.  
  665. #^ Create an interrupt object.
  666. #! src_obj must have resource kind ZX_RSRC_KIND_IRQ.
  667. syscall interrupt_create
  668. (src_obj: zx_handle_t, src_num: uint32_t, options: uint32_t)
  669. returns (zx_status_t, out_handle: zx_handle_t);
  670.  
  671. #^ Bind an interrupt object to a port.
  672. #! handle must be of type ZX_OBJ_TYPE_INTERRUPT and have ZX_RIGHT_READ.
  673. #! port_handle must be of type ZX_OBJ_TYPE_PORT and have ZX_RIGHT_WRITE.
  674. syscall interrupt_bind
  675. (handle: zx_handle_t, port_handle: zx_handle_t, key: uint64_t, options: uint32_t)
  676. returns (zx_status_t);
  677.  
  678. #^ Wait for an interrupt.
  679. #! handle must be of type ZX_OBJ_TYPE_INTERRUPT and have ZX_RIGHT_WAIT.
  680. syscall interrupt_wait blocking
  681. (handle: zx_handle_t)
  682. returns (zx_status_t, out_timestamp: zx_time_t optional);
  683.  
  684. #^ Destroys an interrupt object.
  685. syscall interrupt_destroy
  686. (handle: zx_handle_t)
  687. returns (zx_status_t);
  688.  
  689. #^ Acknowledge an interrupt and re-arm it.
  690. #! handle must be of type ZX_OBJ_TYPE_INTERRUPT and have ZX_RIGHT_WRITE.
  691. syscall interrupt_ack
  692. (handle: zx_handle_t)
  693. returns (zx_status_t);
  694.  
  695. #^ Triggers a virtual interrupt object.
  696. #! handle must be of type ZX_OBJ_TYPE_INTERRUPT and have ZX_RIGHT_SIGNAL.
  697. syscall interrupt_trigger
  698. (handle: zx_handle_t, options: uint32_t, timestamp: zx_time_t)
  699. returns (zx_status_t);
  700.  
  701. #^ Bind an interrupt object to a VCPU.
  702. #! handle must be of type ZX_OBJ_TYPE_INTERRUPT and have ZX_RIGHT_READ.
  703. #! vcpu must be of type ZX_OBJ_TYPE_VCPU and have ZX_RIGHT_WRITE.
  704. syscall interrupt_bind_vcpu
  705. (handle: zx_handle_t, vcpu: zx_handle_t, options: uint32_t)
  706. returns (zx_status_t);
  707.  
  708. #! resource must have resource kind ZX_RSRC_KIND_IOPORT.
  709. syscall ioports_request
  710. (resource: zx_handle_t, io_addr: uint16_t, len: uint32_t)
  711. returns (zx_status_t);
  712.  
  713. #! bti must be of type ZX_OBJ_TYPE_BTI and have ZX_RIGHT_MAP.
  714. syscall vmo_create_contiguous
  715. (bti: zx_handle_t, size: size_t, alignment_log2: uint32_t)
  716. returns (zx_status_t, out: zx_handle_t handle_acquire);
  717.  
  718. #^ Create a VM object referring to a specific contiguous range of physical memory.
  719. #! resource must have resource kind ZX_RSRC_KIND_MMIO.
  720. syscall vmo_create_physical
  721. (resource: zx_handle_t, paddr: zx_paddr_t, size: size_t)
  722. returns (zx_status_t, out: zx_handle_t handle_acquire);
  723.  
  724. #^ Create a new IOMMU object in the kernel.
  725. #! resource must have resource kind ZX_RSRC_KIND_ROOT.
  726. syscall iommu_create
  727. (resource: zx_handle_t, type: uint32_t, desc: any[desc_size] IN, desc_size: size_t)
  728. returns (zx_status_t, out: zx_handle_t handle_acquire);
  729.  
  730. #^ Create a new bus transaction initiator.
  731. #! iommu must be of type ZX_OBJ_TYPE_IOMMU and have ZX_RIGHT_NONE.
  732. syscall bti_create
  733. (iommu: zx_handle_t, options: uint32_t, bti_id: uint64_t)
  734. returns (zx_status_t, out: zx_handle_t handle_acquire);
  735.  
  736. #^ Pin pages and grant devices access to them.
  737. #! handle must be of type ZX_OBJ_TYPE_BTI and have ZX_RIGHT_MAP.
  738. #! vmo must be of type ZX_OBJ_TYPE_VMO and have ZX_RIGHT_MAP.
  739. #! If options & ZX_BTI_PERM_READ, vmo must be of type ZX_OBJ_TYPE_VMO and have ZX_RIGHT_READ.
  740. #! If options & ZX_BTI_PERM_WRITE, vmo must be of type ZX_OBJ_TYPE_VMO and have ZX_RIGHT_WRITE.
  741. #! If options & ZX_BTI_PERM_EXECUTE, vmo must be of type ZX_OBJ_TYPE_VMO and have ZX_RIGHT_READ.
  742. syscall bti_pin
  743. (handle: zx_handle_t, options: uint32_t, vmo: zx_handle_t, offset: uint64_t, size: uint64_t, addrs: zx_paddr_t[addrs_count] OUT, addrs_count: size_t)
  744. returns (zx_status_t, pmt: zx_handle_t handle_acquire);
  745.  
  746. #^ Releases all quarantined PMTs.
  747. #! handle must be of type ZX_OBJ_TYPE_BTI and have ZX_RIGHT_WRITE.
  748. syscall bti_release_quarantine
  749. (handle: zx_handle_t)
  750. returns (zx_status_t);
  751.  
  752. #^ Unpin pages and revoke device access to them.
  753. syscall pmt_unpin
  754. (handle: zx_handle_t handle_release_always)
  755. returns (zx_status_t);
  756.  
  757. #! resource must have resource kind ZX_RSRC_KIND_ROOT.
  758. syscall framebuffer_get_info
  759. (resource: zx_handle_t)
  760. returns (zx_status_t, format: uint32_t, width: uint32_t, height: uint32_t, stride: uint32_t);
  761.  
  762. #! resource must have resource kind ZX_RSRC_KIND_ROOT.
  763. syscall framebuffer_set_range
  764. (resource: zx_handle_t, vmo: zx_handle_t, len: uint32_t, format: uint32_t, width: uint32_t, height: uint32_t, stride: uint32_t)
  765. returns (zx_status_t);
  766.  
  767. #! handle must have resource kind ZX_RSRC_KIND_ROOT.
  768. syscall pci_get_nth_device
  769. (handle: zx_handle_t, index: uint32_t)
  770. returns (zx_status_t, out_info: zx_pcie_device_info_t, out_handle: zx_handle_t handle_acquire);
  771.  
  772. #! handle must be of type ZX_OBJ_TYPE_PCI_DEVICE and have ZX_RIGHT_WRITE.
  773. syscall pci_enable_bus_master
  774. (handle: zx_handle_t, enable: bool)
  775. returns (zx_status_t);
  776.  
  777. #! handle must be of type ZX_OBJ_TYPE_PCI_DEVICE and have ZX_RIGHT_WRITE.
  778. syscall pci_reset_device
  779. (handle: zx_handle_t)
  780. returns (zx_status_t);
  781.  
  782. #! handle must be of type ZX_OBJ_TYPE_PCI_DEVICE and have ZX_RIGHT_READ and have ZX_RIGHT_WRITE.
  783. syscall pci_config_read
  784. (handle: zx_handle_t, offset: uint16_t, width: size_t, out_val: uint32_t[1] OUT)
  785. returns (zx_status_t);
  786.  
  787. #! handle must be of type ZX_OBJ_TYPE_PCI_DEVICE and have ZX_RIGHT_READ and have ZX_RIGHT_WRITE.
  788. syscall pci_config_write
  789. (handle: zx_handle_t, offset: uint16_t, width: size_t, val: uint32_t)
  790. returns (zx_status_t);
  791.  
  792. #! handle must have resource kind ZX_RSRC_KIND_ROOT.
  793. syscall pci_cfg_pio_rw
  794. (handle: zx_handle_t, bus: uint8_t, dev: uint8_t, func: uint8_t, offset: uint8_t, val: uint32_t[1] INOUT, width: size_t, write: bool)
  795. returns (zx_status_t);
  796.  
  797. #! handle must be of type ZX_OBJ_TYPE_PCI_DEVICE and have ZX_RIGHT_READ and have ZX_RIGHT_WRITE.
  798. syscall pci_get_bar
  799. (handle: zx_handle_t, bar_num: uint32_t, out_bar: zx_pci_bar_t[1] OUT)
  800. returns (zx_status_t, out_handle: zx_handle_t handle_acquire);
  801.  
  802. #! handle must be of type ZX_OBJ_TYPE_PCI_DEVICE and have ZX_RIGHT_READ.
  803. syscall pci_map_interrupt
  804. (handle: zx_handle_t, which_irq: int32_t)
  805. returns (zx_status_t, out_handle: zx_handle_t handle_acquire);
  806.  
  807. #! handle must be of type ZX_OBJ_TYPE_PCI_DEVICE and have ZX_RIGHT_READ.
  808. syscall pci_query_irq_mode
  809. (handle: zx_handle_t, mode: uint32_t)
  810. returns (zx_status_t, out_max_irqs: uint32_t);
  811.  
  812. #! handle must be of type ZX_OBJ_TYPE_PCI_DEVICE and have ZX_RIGHT_WRITE.
  813. syscall pci_set_irq_mode
  814. (handle: zx_handle_t, mode: uint32_t, requested_irq_count: uint32_t)
  815. returns (zx_status_t);
  816.  
  817. #! handle must have resource kind ZX_RSRC_KIND_ROOT.
  818. syscall pci_init
  819. (handle: zx_handle_t, init_buf: zx_pci_init_arg_t[len] IN, len: uint32_t)
  820. returns (zx_status_t);
  821.  
  822. #! handle must have resource kind ZX_RSRC_KIND_ROOT.
  823. syscall pci_add_subtract_io_range
  824. (handle: zx_handle_t, mmio: bool, base: uint64_t, len: uint64_t, add: bool)
  825. returns (zx_status_t);
  826.  
  827. #! handle must have resource kind ZX_RSRC_KIND_ROOT.
  828. syscall pc_firmware_tables
  829. (handle: zx_handle_t)
  830. returns (zx_status_t, acpi_rsdp: zx_paddr_t, smbios: zx_paddr_t);
  831.  
  832. #^ Make Secure Monitor Call (SMC) from user space.
  833. syscall smc_call
  834. (handle: zx_handle_t, parameters: zx_smc_parameters_t[1] IN)
  835. returns (zx_status_t, out_smc_result: zx_smc_result_t OUT);
  836.  
  837. #^ Create a resource object.
  838. #! parent_rsrc must be of type ZX_OBJ_TYPE_RESOURCE and have ZX_RIGHT_WRITE.
  839. syscall resource_create
  840. (parent_rsrc: zx_handle_t, options: uint32_t, base: uint64_t, size: size_t, name: char[name_size] IN, name_size: size_t)
  841. returns (zx_status_t, resource_out: zx_handle_t handle_acquire);
  842.  
  843. #^ Create a guest.
  844. #! resource must have resource kind ZX_RSRC_KIND_HYPERVISOR.
  845. syscall guest_create
  846. (resource: zx_handle_t, options: uint32_t)
  847. returns (zx_status_t, guest_handle: zx_handle_t handle_acquire, vmar_handle: zx_handle_t handle_acquire);
  848.  
  849. #^ Sets a trap within a guest.
  850. #! handle must be of type ZX_OBJ_TYPE_GUEST and have ZX_RIGHT_WRITE.
  851. #! port_handle must be of type ZX_OBJ_TYPE_PORT and have ZX_RIGHT_WRITE.
  852. syscall guest_set_trap
  853. (handle: zx_handle_t, kind: uint32_t, addr: zx_vaddr_t, size: size_t, port_handle: zx_handle_t, key: uint64_t)
  854. returns (zx_status_t);
  855.  
  856. #^ Create a VCPU.
  857. #! guest must be of type ZX_OBJ_TYPE_GUEST and have ZX_RIGHT_MANAGE_PROCESS.
  858. syscall vcpu_create
  859. (guest: zx_handle_t, options: uint32_t, entry: zx_vaddr_t)
  860. returns (zx_status_t, out: zx_handle_t handle_acquire);
  861.  
  862. #^ Resume execution of a VCPU.
  863. #! handle must be of type ZX_OBJ_TYPE_VCPU and have ZX_RIGHT_EXECUTE.
  864. syscall vcpu_resume blocking
  865. (handle: zx_handle_t)
  866. returns (zx_status_t, packet: zx_port_packet_t OUT);
  867.  
  868. #^ Raise an interrupt on a VCPU.
  869. #! handle must be of type ZX_OBJ_TYPE_VCPU and have ZX_RIGHT_SIGNAL.
  870. syscall vcpu_interrupt
  871. (handle: zx_handle_t, vector: uint32_t)
  872. returns (zx_status_t);
  873.  
  874. #^ Read the state of a VCPU.
  875. #! handle must be of type ZX_OBJ_TYPE_VCPU and have ZX_RIGHT_READ.
  876. syscall vcpu_read_state
  877. (handle: zx_handle_t, kind: uint32_t, buffer: any[buffer_size] OUT, buffer_size: size_t)
  878. returns (zx_status_t);
  879.  
  880. #^ Write the state of a VCPU.
  881. #! handle must be of type ZX_OBJ_TYPE_VCPU and have ZX_RIGHT_WRITE.
  882. syscall vcpu_write_state
  883. (handle: zx_handle_t, kind: uint32_t, buffer: any[buffer_size] IN, buffer_size: size_t)
  884. returns (zx_status_t);
  885.  
  886. #^ Soft reboot the system with a new kernel and bootimage.
  887. #! resource must have resource kind ZX_RSRC_KIND_ROOT.
  888. #! kernel_vmo must be of type ZX_OBJ_TYPE_VMO and have ZX_RIGHT_READ.
  889. #! bootimage_vmo must be of type ZX_OBJ_TYPE_VMO and have ZX_RIGHT_READ.
  890. syscall system_mexec
  891. (resource: zx_handle_t, kernel_vmo: zx_handle_t, bootimage_vmo: zx_handle_t)
  892. returns (zx_status_t);
  893.  
  894. #^ Return a ZBI containing ZBI entries necessary to boot this system.
  895. #! resource must have resource kind ZX_RSRC_KIND_ROOT.
  896. syscall system_mexec_payload_get
  897. (resource: zx_handle_t, buffer: any[buffer_size] OUT, buffer_size: size_t)
  898. returns (zx_status_t);
  899.  
  900. #! resource must have resource kind ZX_RSRC_KIND_ROOT.
  901. syscall system_powerctl
  902. (resource: zx_handle_t, cmd: uint32_t, arg: zx_system_powerctl_arg_t[1] IN)
  903. returns (zx_status_t);
  904.  
  905. #^ Create a new pager object.
  906. #! None.
  907. syscall pager_create
  908. (options: uint32_t)
  909. returns (zx_status_t, out: zx_handle_t handle_acquire);
  910.  
  911. #^ Create a pager owned vmo.
  912. #! pager must be of type ZX_OBJ_TYPE_PAGER.
  913. #! port must be of type ZX_OBJ_TYPE_PORT and have ZX_RIGHT_WRITE.
  914. syscall pager_create_vmo
  915. (pager: zx_handle_t, options: uint32_t, port: zx_handle_t, key: uint64_t, size: uint64_t)
  916. returns (zx_status_t, out: zx_handle_t handle_acquire);
  917.  
  918. #^ Detaches a vmo from a pager.
  919. #! pager must be of type ZX_OBJ_TYPE_PAGER.
  920. #! vmo must be of type ZX_OBJ_TYPE_VMO.
  921. syscall pager_detach_vmo
  922. (pager: zx_handle_t, vmo: zx_handle_t)
  923. returns (zx_status_t);
  924.  
  925. #^ Supply pages into a pager owned vmo.
  926. #! pager must be of type ZX_OBJ_TYPE_PAGER.
  927. #! pager_vmo must be of type ZX_OBJ_TYPE_VMO.
  928. #! aux_vmo must be of type ZX_OBJ_TYPE_VMO and have ZX_RIGHT_READ and have ZX_RIGHT_WRITE.
  929. syscall pager_supply_pages
  930. (pager: zx_handle_t, pager_vmo: zx_handle_t, offset: uint64_t, length: uint64_t, aux_vmo: zx_handle_t, aux_offset: uint64_t)
  931. returns (zx_status_t);
  932.  
  933. syscall syscall_test_0
  934. ()
  935. returns (zx_status_t);
  936.  
  937. syscall syscall_test_1 test_category1
  938. (a: int32_t)
  939. returns (zx_status_t);
  940.  
  941. syscall syscall_test_2 test_category1
  942. (a: int32_t, b: int32_t)
  943. returns (zx_status_t);
  944.  
  945. syscall syscall_test_3 test_category2
  946. (a: int32_t, b: int32_t, c: int32_t)
  947. returns (zx_status_t);
  948.  
  949. syscall syscall_test_4
  950. (a: int32_t, b: int32_t, c: int32_t, d: int32_t)
  951. returns (zx_status_t);
  952.  
  953. syscall syscall_test_5
  954. (a: int32_t, b: int32_t, c: int32_t, d: int32_t, e: int32_t)
  955. returns (zx_status_t);
  956.  
  957. syscall syscall_test_6
  958. (a: int32_t, b: int32_t, c: int32_t, d: int32_t, e: int32_t, f: int32_t)
  959. returns (zx_status_t);
  960.  
  961. syscall syscall_test_7
  962. (a: int32_t, b: int32_t, c: int32_t, d: int32_t, e: int32_t, f: int32_t, g: int32_t)
  963. returns (zx_status_t);
  964.  
  965. syscall syscall_test_8
  966. (a: int32_t, b: int32_t, c: int32_t, d: int32_t, e: int32_t, f: int32_t, g: int32_t, h: int32_t)
  967. returns (zx_status_t);
  968.  
  969. syscall syscall_test_wrapper
  970. (a: int32_t, b: int32_t, c: int32_t)
  971. returns (zx_status_t);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement