cvs commit: src/sys/compat/ndis hal_var.h kern_ndis.c
kern_windrv.c ndis_var.h ntoskrnl_var.h pe_var.h resource_var.h
wpaul at FreeBSD.ORG
Wed Feb 16 17:49:53 GMT 2005
> On Wed, 16 Feb 2005 21:14, Dag-Erling Sm_rgrav wrote:
> > Bill Paul <wpaul at FreeBSD.org> writes:
> > > Log:
> > > Add support for Windows/x86-64 binaries to Project Evil.
> > > [...]
> > > The original patches provided macros to wrap every single routine at
> > > compile time, providing a secondary jump table with a customized
> > > wrapper for each exported routine. I decided to use a different
> > > approach: the call wrapper for each function is created from a template
> > > at runtime, and the routine to jump to is patched into the wrapper as it
> > > is created. [...]
> > I think this qualifies as "Project Eviler". I can't wait to find out
> > what you'll come up with next...
> "Pure Evil" (like in Time Bandits)
That's "Pure, _Concentrated_ Evil" to you, mister.
Note that the runtime wrapper construction is only for the cases
where the Windows binary has to call Project Evil routines. There is
only one wrapper template, which can handle up to 16 arguments.
This is kind of gross because it always translates 16 arguments,
even if the function requires less than that. It was the best
compromise I could come up with, especially given that I need to
handle some varadic functions too.
For the other direction, where Project Evil invokes a function
in the Windows binary (MiniportInitialize(), etc...), the wrapping
is done at compile time with macros. There are 6 small assembly wrappers
that can handle from 1 to 6 arguments (MSCALL1() to MSCALL6()). It
happens none of the functions we need to call take more than 6
I'm hoping to get IRP support and, as a consequence, USB devices
working next. Last on the hit list is WPA support. Note: the
document at http://www.freebsd.org/~wpaul/80211.ps is a copy of
Microsoft's 802.11 adapter design guide for Windows XP, which describes
the API for using WPA with NDIS 5.1 drivers. If some enterprising
individual wants to step in and do the WPA support, I wouldn't say
-Bill Paul (510) 749-2329 | Senior Engineer, Master of Unix-Fu
wpaul at windriver.com | Wind River Systems
<adamw> you're just BEGGING to face the moose
More information about the cvs-src