1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-23 11:18:54 +00:00
freebsd/sys/compat/ndis
Bill Paul 450a94af7a Deal with a few bootstrap issues:
We can't call KeFlushQueuedDpcs() during bootstrap (cold == 1), since
the flush operation sleeps to wait for completion, and we can't sleep
here (clowns will eat us).

On an i386 SMP system, if we're loaded/probed/attached during bootstrap,
smp_rendezvous() won't run us anywhere except CPU 0 (since the other CPUs
aren't launched until later), which means we won't be able to set up
the GDTs anywhere except CPU 0. To deal with this case, ctxsw_utow()
now checks to see if the TID for the current processor has been properly
initialized and sets up the GTD for the current CPU if not.

Lastly, in if_ndis.c:ndis_shutdown(), do an ndis_stop() to insure we
really halt the NIC and stop interrupts from happening.

Note that loading a driver during bootstrap is, unfortunately, kind of
a hit or miss sort of proposition. In Windows, the expectation is that
by the time a given driver's MiniportInitialize() method is called,
the system is already in 'multiuser' state, i.e. it's up and running
enough to support all the stuff specified in the NDIS API, which includes
the underlying OS-supplied facilities it implicitly depends on, such as
having all CPUs running, having the DPC queues initialized, WorkItem
threads running, etc. But in UNIX, a lot of that stuff won't work during
bootstrap. This causes a problem since we need to call MiniportInitialize()
at least once during ndis_attach() in order to find out what kind of NIC
we have and learn its station address.

What this means is that some cards just plain won't work right if
you try to pre-load the driver along with the kernel: they'll only be
probed/attach correctly if the driver is kldloaded _after_ the system
has reached multiuser. I can't really think of a way around this that
would still preserve the ability to use an NDIS device for diskless
booting.
2005-05-20 04:00:50 +00:00
..
cfg_var.h
hal_var.h Create new i386 windows/bsd thunking layer, similar to the amd64 thunking 2005-04-11 02:02:35 +00:00
kern_ndis.c Deal with a few bootstrap issues: 2005-05-20 04:00:50 +00:00
kern_windrv.c More fixes for multibus drivers. When calling out to the match 2005-05-08 23:19:20 +00:00
ndis_var.h Correct some problems with workitem usage. NdisScheduleWorkItem() does 2005-05-16 15:29:21 +00:00
ntoskrnl_var.h Fix some of the things I broke so that the SMC2602W (AMD Am1772) driver 2005-05-19 04:44:26 +00:00
pe_var.h Create new i386 windows/bsd thunking layer, similar to the amd64 thunking 2005-04-11 02:02:35 +00:00
resource_var.h Add support for Windows/x86-64 binaries to Project Evil. 2005-02-16 05:41:18 +00:00
subr_hal.c Fix support for Windows drivers that support both PCI and PCMCIA devices at 2005-05-08 23:07:51 +00:00
subr_ndis.c Fix some of the things I broke so that the SMC2602W (AMD Am1772) driver 2005-05-19 04:44:26 +00:00
subr_ntoskrnl.c Fix some of the things I broke so that the SMC2602W (AMD Am1772) driver 2005-05-19 04:44:26 +00:00
subr_pe.c Couple of lessons learned during USB driver testing: 2005-02-24 17:58:27 +00:00
subr_usbd.c This commit makes a bunch of changes, some big, some not so big. 2005-05-05 03:56:09 +00:00
usbd_var.h - Correct one aspect of the driver_object/device_object/IRP framework: 2005-02-24 21:49:14 +00:00
winx32_wrap.S In winx32_wrap.S, preserve return values in the fastcall and regparm 2005-04-11 17:04:49 +00:00
winx64_wrap.S When setting up the new stack for a function in x86_64_wrap(), make 2005-04-16 04:47:15 +00:00