XNU syscall numbers

From: mothcompute <mothcompute_at_protonmail.com>
Date: Wed, 21 May 2025 17:02:25 UTC
I've been looking into writing a module for FreeBSD that adds a sysentvec for XNU syscalls, but XNU syscall numbers contain two fields so syscall numbers can be as many as 26 bits long. Does FreeBSD have some mechanism to 'fix' the syscall number before dispatching it to a sysent, and if not, what would be the best way to go about implementing this without slowing down existing ABIs?