Commit Graph

5 Commits

Author SHA1 Message Date
Bill Paul
ade996adb6 Handle WinNT .inf files with a $windows nt$ signature but no .NT decorated
AddReg sections.

Also insert extra newline after emitting device name overrides.
2004-01-02 21:13:21 +00:00
Bill Paul
f07cc658a4 Clean up ndiscvt a bit (leaving out the -i flag didn't work) and add
copyrights to the inf parser files.

Add a -n flag to ndiscvt to allow the user to override the default
device name of NDIS devices. Instead of "ndis0, ndis1, etc..."
you can have "foo0, foo1, etc..." This allows you to have more than
one kind of NDIS device in the kernel at the same time.

Convert from printf() to device_printf() in if_ndis.c, kern_ndis.c
and subr_ndis.c.

Create UMA zones for ndis_packet and ndis_buffer structs allocated
on transmit. The zones are created and destroyed in the modevent
handler in kern_ndis.c.

printf() and UMA changes submitted by green@freebsd.org
2004-01-02 04:31:06 +00:00
Bill Paul
b6a67367fa Make ndiscvt(8) emit the binary image array as inline assembly code rather
than a char array. Emitting the data as a big char array works fine in
the typical case, where a .sys file may be ~50K in size. Unfortunately,
some .sys files can be several hundred Kbytes in size, or even several
megabytes in size. One extreme case is the Intel centrino wireless
driver, which is 2.4MB. This causes us to emit an ndis_driver_data.h
file that's on the order of 15MB in size, and gcc consumes enormous
amounts of virtual memory while trying to compile it. On my laptop,
with 128MB of RAM and 256MB of swap space, gcc consumed all available
VM and crashed without being able to compile if_ndis.o.

By emitting the array as assembler, we bypass the C compiler and consume
much less memory. I was able to easily test compile if_ndis.ko with the
centrino driver on my laptop after this change.

This is merely a convenience, and should not have any operational effect
on the NDISulator itself.
2003-12-18 21:47:14 +00:00
Bill Paul
895ac9675f Fix getopt() string so -o works. 2003-12-11 23:30:36 +00:00
Bill Paul
d934c8b0de Commit the ndiscvt(8) utility too. (Missed it in the last import.) 2003-12-11 22:38:14 +00:00