Date: Wed, 19 Jun 2019 22:58:28 +0200 From: Polytropon <freebsd@edvax.de> To: Alexandru Goia <goia.i.alexandru@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: FreeBSD kernel system call Message-ID: <20190619225828.e5a78fdf.freebsd@edvax.de> In-Reply-To: <CADmgqaj1crHz6Eq5EyAhpib%2BPiyYEAOFCW5zJOPy5DY%2BsVDofg@mail.gmail.com> References: <CADmgqaj1crHz6Eq5EyAhpib%2BPiyYEAOFCW5zJOPy5DY%2BsVDofg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 19 Jun 2019 16:12:51 +0300, Alexandru Goia wrote: > I am trying to write the code to a Unix system call, on the > FreeBSD 12.0 system. I managed to do that on Linux : > > http://romania-acknowledges-stars.blogspot.com/2018/10/angel-call-in-kernel.html > > but I find hard, without proper documentation, to implement it > on FreeBSD. There is documentation available: https://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/x86-system-calls.html https://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/x86-first-program.html Maybe this is a better entry point: https://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/x86.html > I am in trouble understanding the presence of SYSCALL_MODULE(9), and > its meaning and usage. Does the command "man 9 SYSCALL_MODULE" provide any help? From the description: The SYSCALL_MODULE() macro declares a new syscall. SYSCALL_MODULE() expands into a kernel module declaration named as name. If you have obtained the FreeBSD sources, also have a look at the file /usr/share/examples/kld/syscall/module/syscall.c where you can find an illustration of how a kernel module can be created to provide an additional system call. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190619225828.e5a78fdf.freebsd>