Commit Graph

9 Commits

Author SHA1 Message Date
wpaul
9916b5df7f 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
wpaul
513bd20d82 Grrrr. Remove -g flag that snuck in. 2003-12-18 03:52:40 +00:00
wpaul
74b1363ea9 Deal with the duplicate sysctl leaf problem. A .inf file may contain
definitions for more than one device (usually differentiated by
the PCI subvendor/subdevice ID). Each device also has its own tree
of registry keys. In some cases, each device has the same keys, but
sometimes each device has a unique tree but with overlap. Originally,
I just had ndiscvt(8) dump out all the keys it could find, and we
would try to apply them to every device we could find. Now, each key
has an index number that matches it to a device in the device ID list.
This lets us create just the keys that apply to a particular device.

I also added an extra field to the device list to hold the subvendor
and subdevice ID.

Some devices are generic, i.e. there is no subsystem definition. If
we have a device that doesn't match a specific subsystem value and
we have a generic entry, we use the generic entry.
2003-12-18 03:51:21 +00:00
wpaul
2dcb6042e5 Support yet another variant of WinXP .INF files. 2003-12-13 08:48:35 +00:00
wpaul
361276aef1 Attempt to handle WinXP .INF files. Also, in dump_regvals(), handle
the case where there's an entry in the manufacturer's device list but
no corresponding installation section (and hence no AddReg assignments),
i.e. if dev = find_assign(sname, "AddReg"); returns NULL, then
don't try to dereference dev.

There is a fundamental problem with the handling of .INF files that
contain definitions for multiple devices: right now we dump all the
AddReg sections that we find, but don't distinguish what device they
belong to. This often results in duplicate keys.
2003-12-12 03:40:05 +00:00
wpaul
27c6ad83ce Fix handling of .INF files with more than one PCI ID defined. 2003-12-11 23:37:56 +00:00
wpaul
128923bf90 Fix getopt() string so -o works. 2003-12-11 23:30:36 +00:00
wpaul
df43a2fd36 Grrr. Put the right .PATH statements in the right Makefiles. 2003-12-11 23:22:44 +00:00
wpaul
4b660977b3 Commit the ndiscvt(8) utility too. (Missed it in the last import.) 2003-12-11 22:38:14 +00:00