iedowse [Mon, 2 Aug 2004 12:56:01 +0000 (12:56 +0000)]
Attempt to follow the correct procedure for synchronising with the
system BIOS to disable legacy device emulation as per the "EHCI
Extended Capability: Pre-OS to OS Handoff Synchronisation" section
of the EHCI spec. BIOSes that implement legacy emulation using SMIs
are supposed to disable the emulation when this procedure is performed.
alc [Mon, 2 Aug 2004 03:31:05 +0000 (03:31 +0000)]
Eliminate the acquisition and release of Giant around the call to
pmap_mincore() in mincore(2). Either pmap locking exists (alpha, amd64,
i386, ia64) or pmap_mincore() is unimplemented (arm, powerpc, sparc64).
pjd [Mon, 2 Aug 2004 00:37:40 +0000 (00:37 +0000)]
- Fix unloading by the same way it is done in my other classes:
set gp->softc to NULL and return ENXIO when it is NULL, so GEOM
will not panic or hang, but unload one device on every 'unload'.
This make 'unload' command usable, but it have to be executed
<number of devices> + 1 times.
- Made use of 'pp' variable.
green [Mon, 2 Aug 2004 00:18:36 +0000 (00:18 +0000)]
* Add a "how" argument to uma_zone constructors and initialization functions
so that they know whether the allocation is supposed to be able to sleep
or not.
* Allow uma_zone constructors and initialation functions to return either
success or error. Almost all of the ones in the tree currently return
success unconditionally, but mbuf is a notable exception: the packet
zone constructor wants to be able to fail if it cannot suballocate an
mbuf cluster, and the mbuf allocators want to be able to fail in general
in a MAC kernel if the MAC mbuf initializer fails. This fixes the
panics people are seeing when they run out of memory for mbuf clusters.
* Allow debug.nosleepwithlocks on WITNESS to be disabled, without changing
the default.
Both bmilekic and jeff have reviewed the changes made to make failable
zone allocations work.
wpaul [Sun, 1 Aug 2004 22:25:12 +0000 (22:25 +0000)]
The watchdog callout executes with the (non-sleepable) ifnet lock held
now, but it's possible for ndis_reset_nic() to sleep (sometimes the
MiniportReset() method returns NDIS_STATUS_PENDING and we have
to wait for completion). To get around this, execute the ndis_reset_nic()
routine in the NDIS_TASKQUEUE thread.
pjd [Sun, 1 Aug 2004 22:24:07 +0000 (22:24 +0000)]
After changing LIBDIR to SHLIBDIR, because of dependencies problems,
new problem shows up: symblic links (<libname>.so) are created under
/usr/lib/ now, instead of under /lib/geom/ where geom(8) looks for them.
Introduce a workaround to fix this by teaching geom(8) to open libraries
via /lib/geom/<libname>.so.<major_number> instead of /lib/geom/<libname>.so.
markm [Sun, 1 Aug 2004 21:33:47 +0000 (21:33 +0000)]
UUCP's uucico(8) has not been in the base system for some time now,
so reflect this in the default. The uucp uid is a bit funny, and
is used by mtree in /var/spool for locks, so we can't remove it
without thinking about it a bit harder.
wpaul [Sun, 1 Aug 2004 21:15:29 +0000 (21:15 +0000)]
In ndis_alloc_bufpool() and ndis_alloc_packetpool(), the test to see if
allocating pool memory succeeded was checking the wrong pointer (should
have been looking at *pool, not pool). Corrected this.
gad [Sun, 1 Aug 2004 20:45:54 +0000 (20:45 +0000)]
Import of a BSD-licensed version of `patch', which will eventually
replace the version we currently have in src/gnu/usr.bin/patch/.
Among other things, this version includes a --posix option for strict
POSIX conformance.
This version is the current source from OpenBSD as of today. It is
their 3.5-release, plus a few updates to patch.c and pch.c that they
made about three weeks ago.
wpaul [Sun, 1 Aug 2004 20:04:31 +0000 (20:04 +0000)]
Big mess 'o changes:
- Give ndiscvt(8) the ability to process a .SYS file directly into
a .o file so that we don't have to emit big messy char arrays into
the ndis_driver_data.h file. This behavior is currently optional, but
may become the default some day.
- Give ndiscvt(8) the ability to turn arbitrary files into .ko files
so that they can be pre-loaded or kldloaded. (Both this and the
previous change involve using objcopy(1)).
- Give NdisOpenFile() the ability to 'read' files out of kernel memory
that have been kldloaded or pre-loaded, and disallow the use of
the normal vn_open() file opening method during bootstrap (when no
filesystems have been mounted yet). Some people have reported that
kldloading if_ndis.ko works fine when the system is running multiuser
but causes a panic when the modile is pre-loaded by /boot/loader. This
happens with drivers that need to use NdisOpenFile() to access
external files (i.e. firmware images). NdisOpenFile() won't work
during kernel bootstrapping because no filesystems have been mounted.
To get around this, you can now do the following:
o Say you have a firmware file called firmware.img
o Do: ndiscvt -f firmware.img -- this creates firmware.img.ko
o Put the firmware.img.ko in /boot/kernel
o add firmware.img_load="YES" in /boot/loader.conf
o add if_ndis_load="YES" and ndis_load="YES" as well
Now the loader will suck the additional file into memory as a .ko. The
phony .ko has two symbols in it: filename_start and filename_end, which
are generated by objcopy(1). ndis_open_file() will traverse each module
in the module list looking for these symbols and, if it finds them, it'll
use them to generate the file mapping address and length values that
the caller of NdisOpenFile() wants.
As a bonus, this will even work if the file has been statically linked
into the kernel itself, since the "kernel" module is searched too.
(ndiscvt(8) will generate both filename.o and filename.ko for you).
- Modify the mechanism used to provide make-pretend FASTCALL support.
Rather than using inline assembly to yank the first two arguments
out of %ecx and %edx, we now use the __regparm__(3) attribute (and
the __stdcall__ attribute) and use some macro magic to re-order
the arguments and provide dummy arguments as needed so that the
arguments passed in registers end up in the right place. Change
taken from DragonflyBSD version of the NDISulator.
kientzle [Sun, 1 Aug 2004 19:30:56 +0000 (19:30 +0000)]
For the "portable" distribution, the configure script will overwrite
"Makefile," so I'm moving all the FreeBSD build machinery to
"Makefile.freebsd", with the default "Makefile" containing a single
include.
simon [Sun, 1 Aug 2004 19:26:42 +0000 (19:26 +0000)]
Make the HARDWARE section better suited to the upcoming auto generated
Hardware Notes:
- Only include text related the device listings and hardware support
in the HARDWARE section.
- Make the HARDWARE section preamble text have a call to the Nm macro,
so the driver name will appear in the Hardware Notes.
- Add the manufacturer name to each item in the device list, where
appropriate.
- Clean trailing punctuation characters from the lists.
iedowse [Sun, 1 Aug 2004 18:47:42 +0000 (18:47 +0000)]
Implement basic support for EHCI interrupt pipes. This is unlikely
to be particularly correct or optimal, but it seems to be enough
to allow the attachment of USB2 hubs and USB2 devices connected via
USB2 hubs. None of the split transaction support is implemented in
our USB stack, so USB1 peripherals will definitely not work when
connected via USB2 hubs.
scottl [Sun, 1 Aug 2004 14:31:45 +0000 (14:31 +0000)]
Turn off PREEMPTION by default while it gets debugged. It's been causing
4 weeks of problems including deadlocks and instant panics. Note that the
real bugs are likely in the scheduler.
markm [Sun, 1 Aug 2004 11:40:54 +0000 (11:40 +0000)]
Break out the MI part of the /dev/[k]mem and /dev/io drivers into
their own directory and module, leaving the MD parts in the MD
area (the MD parts _are_ part of the modules). /dev/mem and /dev/io
are now loadable modules, thus taking us one step further towards
a kernel created entirely out of modules. Of course, there is nothing
preventing the kernel from having these statically compiled.
Handle spoil event in dedicated function: g_mirror_spoiled().
The different between the new function and g_mirror_orphan() (which was
used previously) is that syncid is bumped immediately, instead of on
first write, because when consumer was spoiled, it means, that its
provider was opened for writing, so we can't trust that its data
will be valid when it will be connected again.
Kill a small herd of casts to off_t where they were not needed.
Thank Fortune, the C compiler can figure out by itself the proper
conversion for assignments, comparisons, and prototyped function
arguments.