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. delete_tcluster.
  24. pipe.
  25. getuid.
  26. rename.
  27. listprocs.
  28. Empty.
  29. gettid.
  30. manage_tcluster.
  31. fcntl.
  32. exit_thread.
  33. getrandom.
  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. getrlimit.
  56. setrlimit.
  57. access.
  58. ppoll.
  59. geteuid.
  60. setuids.
  61. fchmod.
  62. umask.
  63. reboot.
  64. fchown.
  65. pread.
  66. pwrite.
  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. create_tcluster.
  79. switch_tcluster.
  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. sigsuspend.
  105. listmounts
  106. uname
  107. listthreads
  108. listclusters
  109. listnetinter
  110. dumplogs
  111. listflocks
  112. loadavg
  113. meminfo
  114. listpci
  115. getcpuinfo
  116. socketpair

9.1.1 riscv64-limine

Syscalls are invoked in Ironclad by using ecall.

The index of the syscall is passed over a7, while the return value is returned in a0, errno is returned in a1, arguments are passed over a0 to a6.

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.