Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Jan 2005 15:33:23 -0800
From:      "David O'Brien" <obrien@freebsd.org>
To:        Ville-Pertti Keinonen <will@exomi.com>
Cc:        freebsd-amd64@freebsd.org
Subject:   Re: RFC: if_ndis on amd64
Message-ID:  <20050112233323.GA29445@dragon.nuxi.com>
In-Reply-To: <1105569437.670.45.camel@localhost>
References:  <1105569437.670.45.camel@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help
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
> http://will.iki.fi/patches/ndis-amd64-20050112.diff

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@FreeBSD.org)



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