RFC: if_ndis on amd64
obrien at freebsd.org
Wed Jan 12 15:33:32 PST 2005
On Thu, Jan 13, 2005 at 12:37:17AM +0200, Ville-Pertti Keinonen wrote:
> Now that 64-bit Windows WLAN drivers are actually available, I decided
> to see if it would be relatively simple to get a 64-bit driver to work
> on FreeBSD/amd64.
> It turns out Microsoft doesn't even use the same calling conventions as
> everybody else,
What are "calling conventions that everyone else uses"?? Such things
really don't exist as x86 CPU's don't force a particular way. It is up
to the compiler writer to do what he wants.
On the i386 there are three types available with MS and Borland C
compilers: (1) pass thru registers, (2) pass on the stack in reverse
order with the caller cleaning up the stack, (3) pass parameters on the
stack (typically in order) with the callee cleaning up the stack. In the
MSwin world, these are "FASTCALL", "CDECL", and "PASCAL".
Both the AMD64 ELF and AMD64 PE (mswin) ABI's specify that the first X
parameters are passed in registers (beyond that on the stack). So both
ELF (ie, FreeBSD) and MSwin passes parameters differently on 32-bit
"i386" vs. 64-bit AMD64.
> Before I start cleaning things up I'd like some comments on what kind of
> solution to this would be preferred and have a chance of actually being
> committed (e.g. having an ndis_static that is empty on amd64).
> A patch against a recent -current is available at
It is good to see NDIS progress on AMD64.
I'll take a look at this patch and see how it matches the approach I was
initially working on.
> The .inf file needed some editing for ndiscvt to do anything useful with
> it (asciification and getting rid of the NTamd64 strings).
We should probably make ndiscvt accept the NTamd64 string as all MSwin64
drivers are required to have this now.
-- David (obrien at FreeBSD.org)
More information about the freebsd-amd64