9.1 Table and target quirks

Syscalls in Ironclad have an architecture-dependent ABI, but the table and its indexes are always the same, this is done to simplify development. and here is a list of the supported architectures and the ABI for each of them. Here is the table:

  1. exit.
  2. arch_prctl.
  3. open.
  4. close.
  5. read.
  6. write.
  7. seek.
  8. mmap.
  9. munmap.
  10. getpid.
  11. getppid.
  12. exec.
  13. fork.
  14. wait.
  15. socket.
  16. sethostname.
  17. unlink.
  18. fstat.
  19. pivot_root.
  20. chdir.
  21. ioctl.
  22. sched_yield.
  23. get_min_priority.
  24. pipe.
  25. getuid.
  26. rename.
  27. listprocs.
  28. getsid.
  29. gettid.
  30. get_max_priority.
  31. fcntl.
  32. exit_thread.
  33. getentropy.
  34. mprotect.
  35. sync.
  36. set_mac_capabilities.
  37. get_mac_capabilities.
  38. add_mac_permissions.
  39. set_mac_enforcement.
  40. mount.
  41. umount.
  42. readlink.
  43. getdents.
  44. mknod.
  45. truncate.
  46. bind.
  47. symlink.
  48. connect.
  49. openpty.
  50. fsync.
  51. link.
  52. ptrace.
  53. listen.
  54. accept.
  55. rlimit.
  56. sched_rr_interval.
  57. access.
  58. ppoll.
  59. geteuid.
  60. setuids.
  61. fchmod.
  62. umask.
  63. reboot.
  64. fchown.
  65. getpgid.
  66. setpgid.
  67. getsockname.
  68. getpeername.
  69. shutdown.
  70. futex.
  71. clock.
  72. clock_nanosleep.
  73. getrusage.
  74. recvfrom.
  75. sendto.
  76. config_netinter.
  77. utimes.
  78. get_scheduler.
  79. set_scheduler.
  80. sigprogmask.
  81. sigaction.
  82. send_signal.
  83. getprio.
  84. setprio.
  85. getgid.
  86. getegid.
  87. setgids.
  88. getgroups.
  89. setgroups.
  90. ttyname.
  91. fadvise.
  92. shmat.
  93. shmctl.
  94. shmdl.
  95. shmget.
  96. getsockopt.
  97. setsockopt.
  98. gettidid.
  99. settidid.
  100. failure_policy.
  101. create_thread.
  102. signal_return.
  103. sigaltstack.
  104. Empty.
  105. listmounts
  106. uname
  107. listthreads
  108. Empty.
  109. listnetinter
  110. dumplogs
  111. listflocks
  112. loadavg
  113. meminfo
  114. listpci
  115. getcpuinfo
  116. socketpair
  117. madvise
  118. nvmm_capability
  119. nvmm_machine_create
  120. nvmm_machine_destroy
  121. nvmm_machine_configure
  122. nvmm_vcpu_create
  123. nvmm_vcpu_destroy
  124. nvmm_vcpu_configure
  125. nvmm_vcpu_setstate
  126. nvmm_vcpu_getstate
  127. nvmm_vcpu_inject
  128. nvmm_vcpu_run
  129. nvmm_gpa_map
  130. nvmm_gpa_unmap
  131. nvmm_hva_map
  132. nvmm_hva_unmap
  133. nvmm_gva_2_gpa
  134. nvmm_gpa_2_hva
  135. nvmm_assist_io
  136. nvmm_assist_mem
  137. nvmm_vcpu_dump
  138. nvmm_vcpu_stop
  139. setsid.

9.1.1 riscv64-limine

Syscalls are invoked in Ironclad by using ecall.

The index of the syscall is passed over x17, while the return value is returned in x10, errno is returned in x11, arguments are passed over x10, x11, x12, x13, x14, x15, and x16.

9.1.2 x86_64-limine

Syscalls are invoked in Ironclad by using syscall.

The index of the syscall is passed over %rax, while the return value is returned in %rax, errno is returned on %rdx, arguments are passed over %rdi, %rsi, %rdx, %r12, %r8, %r9, and %r10, following the SysV ABI.