peter [Wed, 24 Dec 2003 00:32:07 +0000 (00:32 +0000)]
GC unused 'syshide' override to /dev/null. This was here to disable
the output of the namespc column. Its functionality was removed some time
ago, but the overrides and the namespc column remained.
peter [Wed, 24 Dec 2003 00:15:20 +0000 (00:15 +0000)]
Regen. (This should have been a NOP except it hasn't been regenerated
after makesyscalls.sh changes and the last few syscall.master changes, and
there have been some tree-sweeps that have touched generated files).
wpaul [Tue, 23 Dec 2003 18:41:34 +0000 (18:41 +0000)]
Set up the interrupt earlier in ndis_attach(), because calling the
driver's initfunc may cause an interrupt to be generated. This avoids
the occasional 'stray irqXXX' messages on load.
wpaul [Tue, 23 Dec 2003 18:31:04 +0000 (18:31 +0000)]
Correct the definitions for NDIS_80211_NET_INFRA_IBSS and
NDIS_80211_NET_INFRA_BSS: I accidentally reversed them during
transcription from the Microsoft headers. Note that the
driver will default to BSS mode, and you need to specify
'mediaopt adhoc' to get it into IBSS mode.
schweikh [Tue, 23 Dec 2003 15:01:12 +0000 (15:01 +0000)]
Fix a case of undefined behavior due to overlapping buf objects in
snprintf (buf, size, fmt, buf, etc). This only works by chance with our
libc, but fails (with a truncated string) on e.g. glibc.
alfred [Tue, 23 Dec 2003 14:06:24 +0000 (14:06 +0000)]
I asked Bosko Milekic for help with 'peak' reporting, and he suggested
using the old 'cached' value but reporting it as 'cached'.
I've decided to report the 'cached' as 'peak', why? Well because
it is the peak, the peak of what is actually allocated. 'cached'
doesn't make sense to me as a user.
alfred [Tue, 23 Dec 2003 13:54:16 +0000 (13:54 +0000)]
Introduce mp_maxcpus which can be used by libkvm utils to find out
how many CPUs the system was compiled for.
Export the variable via a sysctl node 'kern.smp.maxcpus' as well.
ru [Tue, 23 Dec 2003 13:33:23 +0000 (13:33 +0000)]
Fix a problem introduced in revision 1.84: m_pullup() does not
necessarily return the same mbuf chain so we need to recompute
mtod() consumers after pulling up.
wpaul [Tue, 23 Dec 2003 04:08:22 +0000 (04:08 +0000)]
Re-do the handling of ndis_buffers. The NDIS_BUFFER structure is
supposed to be opaque to the driver, however it is exposed through
several macros which expect certain behavior. In my original
implementation, I used the mappedsystemva member of the structure
to hold a pointer to the buffer and bytecount to hold the length.
It turns out you must use the startva pointer to point to the
page containing the start of the buffer and set byteoffset to
the offset within the page where the buffer starts. So, for a buffer
with address 'baseva,' startva is baseva & ~(PAGE_SIZE -1) and
byteoffset is baseva & (PAGE_SIZE -1). We have to maintain this
convention everywhere that ndis_buffers are used.
Fortunately, Microsoft defines some macros for initializing and
manipulating NDIS_BUFFER structures in ntddk.h. I adapted some
of them for use here and used them where appropriate.
This fixes the discrepancy I observed between how RX'ed packet sizes
were being reported in the Broadcom wireless driver and the sample
ethernet drivers that I've tested. This should also help the
Intel Centrino wireless driver work.
Also try to properly initialize the 802.11 BSS and IBSS channels.
(Sadly, the channel value is meaningless since there's no way
in the existing NDIS API to get/set the channel, but this should
take care of any 'invalid channel (NULL)' messages printed on
the console.
peter [Tue, 23 Dec 2003 03:50:43 +0000 (03:50 +0000)]
Remove the namespace column from the syscalls tables. We don't actually
use it, if we ever did. They have been been VERY poorly maintained for
some time, possibly because they were a NOP. FWIW, This brings our table
formats back closer to the other *BSD's.
peter [Tue, 23 Dec 2003 03:20:49 +0000 (03:20 +0000)]
Rather than screw around with the (unsafe) stackgap, call vn_stat/fo_stat
directly for stat/fstat/lstat syscall emulation. It turns out not only
safer, but the code is smaller this way too.
peter [Tue, 23 Dec 2003 02:48:11 +0000 (02:48 +0000)]
Eliminate stackgap usage for the (woefully incomplete) path translations
since it isn't needed here anymore.
Use standard open(2)/access(2) and chflags(2) syscalls now.
peter [Tue, 23 Dec 2003 02:45:24 +0000 (02:45 +0000)]
Forced commit; previous commit also included:
- eliminate a malloc()/snprintf()/free() in the native exec(2) case and
in the easy emulation environments.
- Allow the brand emul_path (ie: /compat/xxx) to be NULL rather than
needing it to be an empty string that is always referenced.
peter [Tue, 23 Dec 2003 02:42:39 +0000 (02:42 +0000)]
Add an additional field to the elf brandinfo structure to support
quicker exec-time replacement of the elf interpreter on an emulation
environment where an entire /compat/* tree isn't really warranted.
peter [Tue, 23 Dec 2003 02:34:25 +0000 (02:34 +0000)]
Don peril sensitive sunglasses and set NULL to an actual pointer type,
but *only* for the kernel. We can do this because the kernel is not a
standard C application environment. This would have stopped the recent
mtx_* arg NULL/MTX_DEF mixups from going unnoticed for so long.
shiba [Mon, 22 Dec 2003 15:40:10 +0000 (15:40 +0000)]
Fixed incomplete initialization in some ohci controllers with
broken BIOS. Separate ohci_controller_init() from ohci_init(),
and call ohci_controller_init() at resume process once more.
Discussed on [bsd-nomads:16737] - [bsd-nomads:16746].
Submitted by Hiroyuki Aizu <eyes@navi.org> [bsd-nomads:16741]
scottl [Mon, 22 Dec 2003 15:19:45 +0000 (15:19 +0000)]
Put the em and vx drivers back into the kernel so that the mfsroot stops
overflowing. We are one again on the brink of the floppies having major
overflow problems.
shiba [Mon, 22 Dec 2003 15:18:46 +0000 (15:18 +0000)]
Enable support for DEVICE_SUSPEND, DEVICE_RESUME and DEVICE_SHUTDOWN
methods for USB devices in the same way of uhci driver. But this change
is not complete because some ohci controlers are not initialized completely.
So "kernel: usb0: 1 scheduling overruns" interrupt will generate many times.
This change will be same one in PR kern/60099.
Discussed on [bsd-nomads:16737] - [bsd-nomads:16746].
wpaul [Mon, 22 Dec 2003 08:24:32 +0000 (08:24 +0000)]
Now that I finally have power back, implement a couple more NDIS API
routines: NdisUnchainBufferAtBack(), NdisGetFirstBufferFromPacketSafe()
and NdisGetFirstBufferFromPacket(). This should bring us a little
closer to getting the Intel centrino wireless NIC to work.
Note: I have not actually tested these additions since I don't
have a driver that calls them, however they're pretty simple, and
one of them is taken pretty much directly from the Windows ndis.h
header file, so I'm fairly confident they work, but disclaimers
apply.
kan [Mon, 22 Dec 2003 04:27:17 +0000 (04:27 +0000)]
Fix ASM_OUTPUT_LABELREF to deal with TSL model prefixes GCC
started to use internally. They need to be stripped before
the name of the label or symbol is printed.
alc [Mon, 22 Dec 2003 02:04:08 +0000 (02:04 +0000)]
- Create an unmapped guard page to trap access to vm_page_array[-1].
This guard page would have trapped the problems with the MFC of the PAE
support to RELENG_4 at an earlier point in the sequence of events.
alc [Mon, 22 Dec 2003 01:01:32 +0000 (01:01 +0000)]
- Significantly reduce the number of preallocated pv entries in
pmap_init(). Such a large preallocation is unnecessary and wastes
nearly eight megabytes of kernel virtual address space per gigabyte
of managed physical memory.
- Increase UMA_BOOT_PAGES by two. This enables the removal of
pmap_pv_allocf(). (Note: this function was only used during
initialization, specifically, after pmap_init() but before
pmap_init2(). During pmap_init2(), a new allocator is installed.)
scottl [Sun, 21 Dec 2003 17:16:44 +0000 (17:16 +0000)]
Teach the Fixit environment how to deal with a dynamic root. Symlink
/libexec to /mnt2/libexec, and execute /mnt2/rescue/ldconfig to add
the /mnt2/lib and /mnt2/usr/lib library directories. Thanks to John Baldwin
for working to track this down.
grehan [Sun, 21 Dec 2003 12:38:25 +0000 (12:38 +0000)]
- Add ':' as a separator between the OpenFirmware device space and
the file path. Commonly used on Macs e.g. "hd:9".
- Update the ofw_setcurrdev routine to match libstand setenv prototype
grehan [Sun, 21 Dec 2003 12:27:01 +0000 (12:27 +0000)]
Make __elfN(ofw_loadfile) match parameter declaration for file_format
in boot/common/bootstrap.h. Having a 32-bit size when a 64-bit param
is declared wreaks havoc on PPC.
grehan [Sun, 21 Dec 2003 12:11:31 +0000 (12:11 +0000)]
- use correct pointer arithmetic in heapsize calculation
- handle multiple Ofw memory regions when determining mem size
- allow currdev to be set as a loader command-line option.
parse() is used to allow future options to be processed.
alc [Sun, 21 Dec 2003 06:03:40 +0000 (06:03 +0000)]
- Correct an error in mincore(2) that has existed since its introduction:
mincore(2) should check that the page is valid, not just allocated.
Otherwise, it can return a false positive for a page that is not yet
resident because it is being read from disk.
wpaul [Sun, 21 Dec 2003 00:00:08 +0000 (00:00 +0000)]
Big round of updates:
- Make ndis_get_info()/ndis_set_info() sleep on the setdone/getdone
routines if they get back NDIS_STATUS_PENDING.
- Add a bunch of net80211 support so that 802.11 cards can be twiddled
with ifconfig. This still needs more work and is not guaranteed to
work for everyone. It works on my 802.11b/g card anyway.
The problem here is Microsoft doesn't provide a good way to a) learn
all the rates that a card supports (if it has more than 8, you're
kinda hosed) and b) doesn't provide a good way to distinguish between
802.11b, 802.11b/g an 802.11a/b/g cards, so you sort of have to guess.
Setting the SSID and switching between infrastructure/adhoc modes
should work. WEP still needs to be implemented. I can't find any API
for getting/setting the channel other than the registry/sysctl keys.
jeff [Sat, 20 Dec 2003 22:35:20 +0000 (22:35 +0000)]
- Make our transfer decisions based on load and not transferable load. A
cpu could have been bogged down with non-transferable load and still not
migrated a new thread to an idle cpu. This required some benchmarking and
tuning to get right as the comment above it suggests.
jeff [Sat, 20 Dec 2003 20:36:19 +0000 (20:36 +0000)]
- Enable ithread migration on x86. This is done to work around a bug in the
IO APIC on Xeons that prevents round-robin interrupt assignment from
working.
sam [Sat, 20 Dec 2003 18:32:48 +0000 (18:32 +0000)]
o move mutex init/destroy logic to the module load/unload hooks;
otherwise they are initialized twice when the code is statically
configured in the kernel because the module load method gets
invoked before the user application calls ip_mrouter_init
o add a mutex to synchronize the module init/done operations; this
sort of was done using the value of ip_mroute but X_ip_mrouter_done
sets it to NULL very early on which can lead to a race against
ip_mrouter_init--using the additional mutex means this is safe now
o don't call ip_mrouter_reset from ip_mrouter_init; this now happens
once at module load and X_ip_mrouter_done does the appropriate
cleanup work to insure the data structures are in a consistent
state so that a subsequent init operation inherits good state
jhb [Sat, 20 Dec 2003 16:34:45 +0000 (16:34 +0000)]
Do an update mount operation to mount the mfsroot as read/write rather
than read/only when sysinstall is running as init. This fixes several
install issues.
jeff [Sat, 20 Dec 2003 14:03:14 +0000 (14:03 +0000)]
- In kseq_transfer() return if smp has not been started.
- In sched_add(), do the idle check prior to the transfer check so that we
don't try to transfer load from an idle cpu. This fixes panics caused by
IPIs on UP machines running SMP kernels.
jeff [Sat, 20 Dec 2003 12:54:35 +0000 (12:54 +0000)]
- Running interactive tasks with the minimum time-slice is fine for vi and
sh, but not so great for mozilla, X, etc. Add a fixed define for the slice
size granted to interactive KSEs.