Other FreeBSD AMD64 ABI

Hello,
background:
I'm Assembly programmer for both Intel's x86 and AMD64 architectures, been programming for these architecture for more than 10 years in non-UNIX-like operating systems; to be more precise: Windows NT based operating systems.


I was able to find the numeric kernel services somewhere inside /usr/src/.. a header file under ../sys directory.
however, I could not find any reference on my machine, nor the internet regarding which interrupt interface*i FreeBSD use and the calling conventions*ii when operating in long-mode*iii.

simply put, the question:
where is the AMD64 ABI documentation?

i: interrupt interface: INT n, SYSENTER, SYSCALL.
ii: calling conventions: volatile and non volatile registers, order of argument passing, stack cleaning.
iii: long-mode: 64-bit.
 
Ali.Z : Your topic is not exactly 'Userland Programming and Scripting'. I think it belongs in Base System / System Hardware section of the forums.
--
Having said that, FreeBSD forums is generally not a bad place to ask, but it's more of a user-focused place than dev-focused. So it's mostly users helping other users. One manual page that I think you might find helpful is arch(7). It does mention some interesting pitfalls relating to the nomenclature of the 64-bit architectures. Below is an example of what I'm talking about:
Code:
MACHINE_ARCH     Represents the CPU processor architecture.  This is the
              same as the native platforms uname(1) -p output.    It de-
              fines the CPU instruction family supported.
...
              It is unfortunate that amd64 specifies the
              64-bit evolution of the x86 platform (it matches the
              'first rule') as everybody else uses x86_64.  There is
              no standard name for the processor: each OS selects its
              own conventions.
 
Back
Top