summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ndiscvt
Commit message (Collapse)AuthorAgeFilesLines
* Assorted markup, grammar, and spelling fixes.ru2004-06-131-32/+66
|
* Add preliminary support for PCMCIA devices in addition to PCI/cardbus.wpaul2004-03-072-9/+159
| | | | | | | | | | | | if_ndis.c has been split into if_ndis_pci.c and if_ndis_pccard.c. The ndiscvt(8) utility should be able to parse device info for PCMCIA devices now. The ndis_alloc_amem() has moved from kern_ndis.c to if_ndis_pccard.c so that kern_ndis.c no longer depends on pccard. NOTE: this stuff is not guaranteed to work 100% correctly yet. So far I have been able to load/init my PCMCIA Cisco Aironet 340 card, but it crashes in the interrupt handler. The existing support for PCI/cardbus devices should still work as before.
* style.Makefile(5):johan2004-02-231-1/+1
| | | | Use WARNS?= instead of WARNS=.
* Some Windows .INF files are deliberately sabotaged to prevent them fromwpaul2004-01-271-1/+22
| | | | | | | | | | | | | | | | | | | | | | | loading on a particular version of Windows. For example, a .INF file for a Windows 2000 driver may have an empty [foo.NT.5.1] section which will be ingored on Win2K (whose .INF parser won't look for sections decorated with .NT.5.1) in favor of a [foo] section. Likewise, a WinXP file will have an empty [foo] section which will be ignored in favor of [foo.NT.5.1]. The problem is, we can handle both Win2K and WinXP drivers, and we don't want to exclude either one. As a workaround, we try to pretend we are WinXP by default and search for sections decorated with .NT.5.1, but if we don't turn up any records, we assume that maybe we're being fooled by a sabotaged .INF file and make one more pass looking for undecorated sections instead. This allows us to parse the .INF files for both the Win2K and the WinXP Centrino wireless drivers. I'd give anything for 5 minutes alone in a room with whoever wrote Microsoft's .INF file parser. Just 5 minutes. That's all.
* Deal with keys with descriptions that have empty fields in some ofwpaul2004-01-231-4/+12
| | | | | | | | their lines. Properly discard PCMCIA device declarations. I plan to support PCMCIA cards, but they don't work yet, and it appears some .INF files declare both PCI and PCMCIA device instances.
* Yet another inf file handling tweak: when checking for Ndi\Params\foowpaul2004-01-131-2/+2
| | | | | | | | keys, don't just do a substring match on "Ndi\Params". Instead, check explicitly for strings that begin with "Ndi\Params". Why? Because it's possible to create your own keys with different paths, like "PROSetNdi\NdiExt\Params" which is what Intel does in their PRO/1000 driver's .INF file.
* - Handle doubled double quotes:mdodd2004-01-111-1/+11
| | | | | | | `"""foo"" bar"' -> `"foo" bar' - Handle C++ style comments. Requested by: wpaul
* Tweak ndiscvt to support yet another flavor of .INF files (look forwpaul2004-01-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | the NTx86 section decoration). subr_ndis.c: correct the behavior of ndis_query_resources(): if the caller doesn't provide enough space to return the resources, tell it how much it needs to provide and return an error. subr_hal.c & subr_ntoskrnl.c: implement/stub a bunch of new routines; ntoskrnl: KefAcquireSpinLockAtDpcLevel KefReleaseSpinLockFromDpcLevel MmMapLockedPages InterlockedDecrement InterlockedIncrement IoFreeMdl KeInitializeSpinLock HAL: KfReleaseSpinLock KeGetCurrentIrql KfAcquireSpinLock Lastly, correct spelling of "_aullshr" in the ntoskrnl functable.
* Fix usage() (-d is really -n).green2004-01-021-1/+1
|
* Handle WinNT .inf files with a $windows nt$ signature but no .NT decoratedwpaul2004-01-022-2/+10
| | | | | | AddReg sections. Also insert extra newline after emitting device name overrides.
* Clean up ndiscvt a bit (leaving out the -i flag didn't work) and addwpaul2004-01-025-8/+115
| | | | | | | | | | | | | | | | | | 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
* Remember to use stringcvt() to expand %foo% strings in registry values inwpaul2003-12-301-1/+1
| | | | | | dump_defaultinfo(). Noticed by: green@freebsd.org
* Correct a typo in the text.wpaul2003-12-231-9/+2
| | | | | Remove BUGS section since the bug it describes has been fixed. Spell Matt Dodd's name correctly. (Oops.)
* Make ndiscvt(8) emit the binary image array as inline assembly code ratherwpaul2003-12-181-8/+16
| | | | | | | | | | | | | | | | | | | 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.
* Grrrr. Remove -g flag that snuck in.wpaul2003-12-181-1/+1
|
* Deal with the duplicate sysctl leaf problem. A .inf file may containwpaul2003-12-182-33/+27
| | | | | | | | | | | | | | | | | | 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.
* Support yet another variant of WinXP .INF files.wpaul2003-12-131-5/+11
|
* Attempt to handle WinXP .INF files. Also, in dump_regvals(), handlewpaul2003-12-121-9/+36
| | | | | | | | | | | | 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.
* Fix handling of .INF files with more than one PCI ID defined.wpaul2003-12-111-2/+3
|
* Fix getopt() string so -o works.wpaul2003-12-111-1/+1
|
* Grrr. Put the right .PATH statements in the right Makefiles.wpaul2003-12-111-1/+1
|
* Commit the ndiscvt(8) utility too. (Missed it in the last import.)wpaul2003-12-117-0/+1138
OpenPOWER on IntegriCloud