Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 May 2025 20:59:57 +0000
From:      Brooks Davis <brooks@freebsd.org>
To:        mothcompute <mothcompute@protonmail.com>
Cc:        "freebsd-emulation@FreeBSD.org" <freebsd-emulation@freebsd.org>
Subject:   Re: XNU syscall numbers
Message-ID:  <aC4-zfBwZPqB11YS@spindle.one-eyed-alien.net>
In-Reply-To: <t_hz3qyHCcVV7GmvUmD-U9w6eCrR5F0b4MnOLKQhCzEDTqBGu7ZB8rKEzkLaQsYVzjelhrPInKAyJ4Yz_1lT0mgcaV-uEeSvyGi3fHXEF5w=@protonmail.com>

index | next in thread | previous in thread | raw e-mail

On Wed, May 21, 2025 at 05:02:25PM +0000, mothcompute wrote:
> 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?
> 

You'll need to make the entries in syscalls.master compact as that
generates arrays like sysent, but you could likely implement a
transform between the real numbers and the compact set in your
sv_fetch_syscall_args function.  That's where we handle syscall(2), etc.

-- Brooks


help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?aC4-zfBwZPqB11YS>