Commit Graph

1521 Commits

Author SHA1 Message Date
Yoshihiro Takahashi
0b07d9aaa6 Don't build the nve on pc98. 2005-03-12 10:41:58 +00:00
David E. O'Brien
60554c2749 Due to a CVS misfire, I ended up committing the wrong version of this. 2005-03-12 08:02:06 +00:00
David E. O'Brien
1b1a07ad8b FreeBSD consumer bits of the nForce MCP NIC binary blob.
Demanded by:	DES
Encouraged by:	scottl
Obtained from:	q@onthenet.com.au (partially)
KNF'ed by:	obrien
2005-03-12 00:29:30 +00:00
Sam Leffler
e7d0dbaeea reorder ath_rate_onoe to after ath_rate_sample so it gets used as the
default rate control algorithm; this should be done differently but for
now use this simple solution
2005-03-11 19:40:34 +00:00
Hajimu UMEMOTO
df3c03a773 just use crypto/rijndael, and nuke opencrypto/rindael.[ch].
the two became almost identical since latest KAME merge.

Discussed with:	sam
2005-03-11 17:24:46 +00:00
Sam Leffler
fa20c23401 SampleRate rate control algorithm for the ath driver
Submitted by:	John Bicket
2005-03-11 01:39:57 +00:00
Sam Leffler
95ef8c711c connect wlan_acl to the build
Submitted by:	Alexey Zelkin
2005-03-09 15:53:27 +00:00
Scott Long
d38d9c9e5e Move all of the hptmv files to /sys/dev/hptmv so that they won't be mistaken
for being on a CVS vendor branch.  The files were moved via a repo-copy.
2005-03-02 05:14:28 +00:00
Hartmut Brandt
3f5ccaeca5 The chip specific functions have been split out in their own
C files to simplify adding of new PHY chips.
Include the split out .c files in the module build too.
2005-02-25 09:49:29 +00:00
Pyun YongHyeon
35113f4d80 Add missing ofw_bus_if.h to SRCS.
Submitted by:	joerg
2005-02-25 06:59:56 +00:00
Bill Paul
63ba67b69c - Correct one aspect of the driver_object/device_object/IRP framework:
when we create a PDO, the driver_object associated with it is that
  of the parent driver, not the driver we're trying to attach. For
  example, if we attach a PCI device, the PDO we pass to the NdisAddDevice()
  function should contain a pointer to fake_pci_driver, not to the NDIS
  driver itself. For PCI or PCMCIA devices this doesn't matter because
  the child never needs to talk to the parent bus driver, but for USB,
  the child needs to be able to send IRPs to the parent USB bus driver, and
  for that to work the parent USB bus driver has to be hung off the PDO.

  This involves modifying windrv_lookup() so that we can search for
  bus drivers by name, if necessary. Our fake bus drivers attach themselves
  as "PCI Bus," "PCCARD Bus" and "USB Bus," so we can search for them
  using those names.

  The individual attachment stubs now create and attach PDOs to the
  parent bus drivers instead of hanging them off the NDIS driver's
  object, and in if_ndis.c, we now search for the correct driver
  object depending on the bus type, and use that to find the correct PDO.

  With this fix, I can get my sample USB ethernet driver to deliver
  an IRP to my fake parent USB bus driver's dispatch routines.

- Add stub modules for USB support: subr_usbd.c, usbd_var.h and
  if_ndis_usb.c. The subr_usbd.c module is hooked up the build
  but currently doesn't do very much. It provides the stub USB
  parent driver object and a dispatch routine for
  IRM_MJ_INTERNAL_DEVICE_CONTROL. The only exported function at
  the moment is USBD_GetUSBDIVersion(). The if_ndis_usb.c stub
  compiles, but is not hooked up to the build yet. I'm putting
  these here so I can keep them under source code control as I
  flesh them out.
2005-02-24 21:49:14 +00:00
Nate Lawson
c6250ecfd7 Move acpi_perf and acpi_throttle into acpi.ko. Remove the acpi_perf
build structure.
2005-02-24 20:48:07 +00:00
Nate Lawson
e1b98c749d Hook p4tcc up to the module build. 2005-02-23 16:44:06 +00:00
Nate Lawson
f5a3ee3088 Hook EST up to the build. 2005-02-20 20:29:04 +00:00
Bill Paul
d8f2dda739 Add support for Windows/x86-64 binaries to Project Evil.
Ville-Pertti Keinonen (will at exomi dot comohmygodnospampleasekthx)
deserves a big thanks for submitting initial patches to make it
work. I have mangled his contributions appropriately.

The main gotcha with Windows/x86-64 is that Microsoft uses a different
calling convention than everyone else. The standard ABI requires using
6 registers for argument passing, with other arguments on the stack.
Microsoft uses only 4 registers, and requires the caller to leave room
on the stack for the register arguments incase the callee needs to
spill them. Unlike x86, where Microsoft uses a mix of _cdecl, _stdcall
and _fastcall, all routines on Windows/x86-64 uses the same convention.
This unfortunately means that all the functions we export to the
driver require an intermediate translation wrapper. Similarly, we have
to wrap all calls back into the driver binary itself.

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. The subr_pe module has been modified to patch in the
wrapped function instead of the original. (On x86, the wrapping
routine is a no-op.)

There are some minor API differences that had to be accounted for:

- KeAcquireSpinLock() is a real function on amd64, not a macro wrapper
  around KfAcquireSpinLock()
- NdisFreeBuffer() is actually IoFreeMdl(). I had to change the whole
  NDIS_BUFFER API a bit to accomodate this.

Bugs fixed along the way:
- IoAllocateMdl() always returned NULL
- kern_windrv.c:windrv_unload() wasn't releasing private driver object
  extensions correctly (found thanks to memguard)

This has only been tested with the driver for the Broadcom 802.11g
chipset, which was the only Windows/x86-64 driver I could find.
2005-02-16 05:41:18 +00:00
Ruslan Ermilov
db60a05a92 Connect ng_source(4) to the build. 2005-02-12 17:04:21 +00:00
Ruslan Ermilov
39621ad154 Connect ng_atmllc(4) to the build. 2005-02-12 12:49:32 +00:00
Ruslan Ermilov
9c4233a561 Don't export symbols, all netgraph modules appear to have
proper module dependencies.

While here, removed stray -Wall from CFLAGS.
2005-02-12 12:42:54 +00:00
Ruslan Ermilov
eee6c3361b Bitrot: the ethernet parse type is long standard. 2005-02-12 12:35:56 +00:00
Warner Losh
969eaf2179 Break out obscure ISA cards into their own files, as well as ne2000
and wd80x3 support.  Make the obscure ISA cards optional, and add
those options to NOTES on i386 (note: the ifdef around the whole code
is for module building).  Tweak pc98 ed support to include wd80x3 too.
Add goo for alpha too.

The affected cards are the 3Com 3C503, HP LAN+ and SIC (whatever that
is).  I couldn't find any of these for sale on ebay, so they are
untested.  If you have one of these cards, and send it to me, I'll
ensure that you have no future problems with it...

Minor cleanups as well by using functions rather than cut and paste
code for some probing operations (where the function call overhead is
lost in the noise).

Remove use of kvtop, since they aren't required anymore.  This driver
needs to get its memory mapped act together, however, and use bus
space.  It doesn't right now.

This reduces the size of if_ed.ko from about 51k to 33k on my laptop.
2005-02-09 20:03:40 +00:00
Ruslan Ermilov
da42b93280 Use CFLAGS+=. 2005-02-09 11:50:43 +00:00
David E. O'Brien
36c64d7c3e Fix the standalone module build. 2005-02-09 08:35:24 +00:00
Bill Paul
b545a3b822 Next step on the road to IRPs: create and use an imitation of the
Windows DRIVER_OBJECT and DEVICE_OBJECT mechanism so that we can
simulate driver stacking.

In Windows, each loaded driver image is attached to a DRIVER_OBJECT
structure. Windows uses the registry to match up a given vendor/device
ID combination with a corresponding DRIVER_OBJECT. When a driver image
is first loaded, its DriverEntry() routine is invoked, which sets up
the AddDevice() function pointer in the DRIVER_OBJECT and creates
a dispatch table (based on IRP major codes). When a Windows bus driver
detects a new device, it creates a Physical Device Object (PDO) for
it. This is a DEVICE_OBJECT structure, with semantics analagous to
that of a device_t in FreeBSD. The Windows PNP manager will invoke
the driver's AddDevice() function and pass it pointers to the DRIVER_OBJECT
and the PDO.

The AddDevice() function then creates a new DRIVER_OBJECT structure of
its own. This is known as the Functional Device Object (FDO) and
corresponds roughly to a private softc instance. The driver uses
IoAttachDeviceToDeviceStack() to add this device object to the
driver stack for this PDO. Subsequent drivers (called filter drivers
in Windows-speak) can be loaded which add themselves to the stack.
When someone issues an IRP to a device, it travel along the stack
passing through several possible filter drivers until it reaches
the functional driver (which actually knows how to talk to the hardware)
at which point it will be completed. This is how Windows achieves
driver layering.

Project Evil now simulates most of this. if_ndis now has a modevent
handler which will use MOD_LOAD and MOD_UNLOAD events to drive the
creation and destruction of DRIVER_OBJECTs. (The load event also
does the relocation/dynalinking of the image.) We don't have a registry,
so the DRIVER_OBJECTS are stored in a linked list for now. Eventually,
the list entry will contain the vendor/device ID list extracted from
the .INF file. When ndis_probe() is called and detectes a supported
device, it will create a PDO for the device instance and attach it
to the DRIVER_OBJECT just as in Windows. ndis_attach() will then call
our NdisAddDevice() handler to create the FDO. The NDIS miniport block
is now a device extension hung off the FDO, just as it is in Windows.
The miniport characteristics table is now an extension hung off the
DRIVER_OBJECT as well (the characteristics are the same for all devices
handled by a given driver, so they don't need to be per-instance.)
We also do an IoAttachDeviceToDeviceStack() to put the FDO on the
stack for the PDO. There are a couple of fake bus drivers created
for the PCI and pccard buses. Eventually, there will be one for USB,
which will actually accept USB IRP.s

Things should still work just as before, only now we do things in
the proper order and maintain the correct framework to support passing
IRPs between drivers.

Various changes:

- corrected the comments about IRQL handling in subr_hal.c to more
  accurately reflect reality
- update ndiscvt to make the drv_data symbol in ndis_driver_data.h a
  global so that if_ndis_pci.o and/or if_ndis_pccard.o can see it.
- Obtain the softc pointer from the miniport block by referencing
  the PDO rather than a private pointer of our own (nmb_ifp is no
  longer used)
- implement IoAttachDeviceToDeviceStack(), IoDetachDevice(),
  IoGetAttachedDevice(), IoAllocateDriverObjectExtension(),
  IoGetDriverObjectExtension(), IoCreateDevice(), IoDeleteDevice(),
  IoAllocateIrp(), IoReuseIrp(), IoMakeAssociatedIrp(), IoFreeIrp(),
  IoInitializeIrp()
- fix a few mistakes in the driver_object and device_object definitions
- add a new module, kern_windrv.c, to handle the driver registration
  and relocation/dynalinkign duties (which don't really belong in
  kern_ndis.c).
- made ndis_block and ndis_chars in the ndis_softc stucture pointers
  and modified all references to it
- fixed NdisMRegisterMiniport() and NdisInitializeWrapper() so they
  work correctly with the new driver_object mechanism
- changed ndis_attach() to call NdisAddDevice() instead of ndis_load_driver()
  (which is now deprecated)
- used ExAllocatePoolWithTag()/ExFreePool() in lookaside list routines
  instead of kludged up alloc/free routines
- added kern_windrv.c to sys/modules/ndis/Makefile and files.i386.
2005-02-08 17:23:25 +00:00
Nate Lawson
aca8665972 Hook acpi_throttle(4) up to the build. It's currently part of acpi_perf.ko
although this may change.
2005-02-06 21:13:41 +00:00
Gleb Smirnoff
aa70aaecdb Add ng_ipfw to kernel module build. 2005-02-05 12:09:38 +00:00
Scott Long
6ab93aca6d Only compile the cpufreq driver on i386 and amd64. 2005-02-05 08:01:10 +00:00
Nate Lawson
335e4ff3cd Hook up the cpufreq framework, acpi_perf(4), and cpufreq(4) drivers. 2005-02-04 05:49:36 +00:00
Matthew N. Dodd
1f005b6723 - Split out PCI support.
- Add previously removed ISA support.

Submitted by:	David S. Madole <david AT madole.net>
2005-02-03 23:01:01 +00:00
Ruslan Ermilov
2154e70d14 Connect ng_device(4) to the build. 2005-02-03 19:54:58 +00:00
Ruslan Ermilov
2f533ec052 Fix alignment in the last commit. 2005-02-03 08:07:22 +00:00
Peter Grehan
042bbe552f Don't build syscons, uart or vpo on PPC. 2005-02-03 06:12:43 +00:00
Ruslan Ermilov
40c378386c Build "digi" on i386, pc98, and amd64 only. 2005-01-30 19:41:12 +00:00
Maxim Sobolev
330179a423 Remove local hack which cowardly slipped into previous commit.
MFC after:	2 weeks
2005-01-29 23:21:00 +00:00
Maxim Sobolev
610ecfe035 o Split out kernel part of execve(2) syscall into two parts: one that
copies arguments into the kernel space and one that operates
  completely in the kernel space;

o use kernel-only version of execve(2) to kill another stackgap in
  linuxlator/i386.

Obtained from:  DragonFlyBSD (partially)
MFC after:      2 weeks
2005-01-29 23:12:00 +00:00
Ruslan Ermilov
4f05e3faf9 "pst" is not 64-bit clean for reasons specified in sys/amd64/conf/NOTES. 2005-01-27 11:07:13 +00:00
Ruslan Ermilov
0ec24a915e Comment out "lnc" on amd64 for reasons specified in sys/amd64/conf/NOTES. 2005-01-27 09:21:23 +00:00
Warner Losh
fe9ec26797 ar and sr (and their netgraph cousins) don't appear to be 64-bit clean, so
disable them on all but i386.
2005-01-27 01:45:15 +00:00
Warner Losh
614dbcfb8e The ar driver appears to do naughty things with pointers and integers
and so appears to not be 64-bit clean.  disable it on ia64 for the moment.
2005-01-27 01:12:58 +00:00
Warner Losh
659522d8a3 pcic is gone 2005-01-27 00:33:17 +00:00
Warner Losh
17d56bdd53 Add cs module. It has built in my tree for ages, and it just never
made it into FreeBSD's tree.
2005-01-26 21:27:26 +00:00
Warner Losh
c046033747 The tinderbox seems to have a different set of compiler options
enabled than my box, so the agp module gets different warnings than I
got when I built.  WERROR= to compensate.
2005-01-26 21:18:58 +00:00
Warner Losh
2879ce1de3 Add WERRROR= to work around the warnings 2005-01-26 16:29:07 +00:00
Wes Peters
ba2e59039d Provide a WITHOUT_MODULES variable that specifies a list of modules
to elide.  This is a somewhat more convenient way of specifying in
e.g. make.conf a list of modules you know you will never need.

PR:		kern/76225
Submitted by:	David Yeske <dyeske@yahoo.com>
MFC after:	2 weeks
2005-01-20 05:43:24 +00:00
Sam Leffler
6e0da4f753 Fix building for non-i386 platforms.
Submitted by:	Coleman Kane
2005-01-18 03:28:08 +00:00
Pawel Jakub Dawidek
560cb85703 Connect SHSEC GEOM class to the build. 2005-01-11 18:18:40 +00:00
Pawel Jakub Dawidek
080361d6b8 Introduce a new GEOM class - SHSEC. It provides sharing secret between
the given providers. Without even one of the configured components there
should be no way to get the secret.

Supported by:	WHEEL Sp. z o.o.
		http://www.wheel.pl
2005-01-11 18:06:44 +00:00
Nate Lawson
6e19953485 Back out previous commits. Installing new share/mk fixes this. 2005-01-03 07:27:17 +00:00
Nate Lawson
e87e3960b6 NO_MAN is now NOMAN. 2005-01-03 05:36:55 +00:00
Nate Lawson
182234f916 Fix kernel modules build. For some reason, this module now bails out with
an error that there is no aicasm.1 man page.
2005-01-03 05:35:58 +00:00
John Baldwin
8f11becb12 Add usbdevs_data.h to the SRCS list since usb_subr.c needs it. This forces
old usbdevs_data.h files to be updated as well as fixing the standalone
usb module build.
2004-12-31 16:05:07 +00:00