From owner-freebsd-amd64@FreeBSD.ORG Wed Jan 12 23:33:32 2005 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6EEE116A4CE for ; Wed, 12 Jan 2005 23:33:32 +0000 (GMT) Received: from dragon.nuxi.com (trang.nuxi.com [66.93.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0952943D3F for ; Wed, 12 Jan 2005 23:33:32 +0000 (GMT) (envelope-from obrien@NUXI.com) Received: from dragon.nuxi.com (obrien@localhost [127.0.0.1]) by dragon.nuxi.com (8.13.1/8.13.1) with ESMTP id j0CNXOPa032835; Wed, 12 Jan 2005 15:33:24 -0800 (PST) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.13.1/8.13.1/Submit) id j0CNXNle032834; Wed, 12 Jan 2005 15:33:23 -0800 (PST) (envelope-from obrien) Date: Wed, 12 Jan 2005 15:33:23 -0800 From: "David O'Brien" To: Ville-Pertti Keinonen Message-ID: <20050112233323.GA29445@dragon.nuxi.com> References: <1105569437.670.45.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1105569437.670.45.camel@localhost> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 6.0-CURRENT Organization: The NUXI BSD Group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 cc: wpaul@windriver.com cc: freebsd-amd64@freebsd.org Subject: Re: RFC: if_ndis on amd64 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: freebsd-amd64@freebsd.org List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jan 2005 23:33:32 -0000 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)