Commit graph

41619 commits

Author SHA1 Message Date
David E. O'Brien 047c5be3e7 FICL doesn't build on PowerPC yet, so disable. 2003-08-16 02:48:20 +00:00
Marcel Moolenaar c6d402d3f2 Fix a range check bug. Don't left-shift the integer argument 'data'.
Sign extension happens after the shift, not before so that boundary
cases like 0x40000000 will not be caught properly.
Instead, right shift ndirty. It is guaranteed to be a multiple of 8.
While here, do some manual code motion and code commoning.

Range check bug pointed out by: iedowse
2003-08-16 01:49:38 +00:00
Bill Paul 51e110b154 Argh. Last commit only had the __FBSDID() fix. Really add the device ID
for the 8100 this time.
2003-08-15 22:47:55 +00:00
Bill Paul 7d673c8636 It appears in some configurations with an on-board RTL8100 chip (in this
case, a "Vortex86" mini PC), the PCI device ID value in the EEPROM (0x8100)
does not agree with the PCI device ID returned by pci_get_device() (0x8139).
This means that while rl_probe() matches the device, rl_attach() doesn't.
Work around this by adding an entry to the rl_devs table for the 8100 with
a device ID of 0x8100.

Also, get rid of extra instance of __FBSDID(). One is enough.
2003-08-15 22:46:47 +00:00
John Baldwin 70fca4277e - Various style fixes in both code and comments.
- Update some stale comments.
- Sort a couple of includes.
- Only set 'newcpu' in updatepri() if we use it.
- No functional changes.

Obtained from:	bde (via an old diff I got a long time ago)
2003-08-15 21:29:06 +00:00
Poul-Henning Kamp 5c24d6ee26 Eliminate the i_devvp field from the incore UFS inodes, we can
get the same value from ip->i_ump->um_devvp.

This saves a pointer in the memory copies of inodes, which can
easily run into several hundred kilobytes.

The extra indirection is unmeasurable in benchmarks.

Approved by:	mckusick
2003-08-15 20:03:19 +00:00
Marcel Moolenaar 7b50deb12e Add ptrace_machdep.c. 2003-08-15 18:01:10 +00:00
Robert Watson 4ac9fbcf79 #ifdef __i386__ the "int slice" definition that became i386-only with
recent Vinum changes.  Fixes non-i386 build on vinumio.c.

Accidental oversight of:	grog
Fix hopefully not minded by:	grog
2003-08-15 17:56:44 +00:00
Poul-Henning Kamp 8dcee923b5 remove acquire_timer0() and release_timer0() and related stuff. 2003-08-15 15:50:49 +00:00
John Baldwin 77f7a374d6 - Fix a typo in a comment.
- Use macros for MSR register indexes as well as the bitfields in the
  APICBASE MSR.
2003-08-15 15:25:19 +00:00
John Baldwin 6d84ef820f - Add macros describing some new MSR's in the Pentium 4 and some older
MSR's in the original Pentium.
- Add macros describing the bit fields in the APICBASE MSR.
2003-08-15 15:24:23 +00:00
John Baldwin 594dfbc391 - Fix a duplicated typo.
- Add a macro for the logical shift needed to extract an APIC ID from
  either from the local APIC ICR Hi register or the APIC ID registers of
  the local and IO APICs.
2003-08-15 15:23:13 +00:00
John Baldwin 426db9b60f - Remove redundant <sys/sysctl.h> include.
- Move the <machine/vm86.h> include up to the other <machine/*> includes.
2003-08-15 15:20:27 +00:00
John Baldwin b37e8a903c Adjust the style of the #ifdef SMP in casuptr() so that the #ifdef SMP
just covers the lock prefix to match the existing style in other asm files
in i386.
2003-08-15 15:19:21 +00:00
John Baldwin 1b1a896518 - Update location of PCI headers.
- Use macros for PCI config registers instead of magic numbers.
- Small whitespace nits.
2003-08-15 15:18:29 +00:00
Poul-Henning Kamp c43001fc56 As warned: Initiate deorbit burn for the pcaudio driver. 2003-08-15 14:56:05 +00:00
John Baldwin 606c689b95 Remove a few ushorts I missed in my earlier pass.
Requested by:	bde
2003-08-15 14:55:50 +00:00
Poul-Henning Kamp 395714feb7 Eliminate unnecessary udev_t variable: we can derive it from the dev_t
when we need it.
2003-08-15 13:14:25 +00:00
Poul-Henning Kamp 89dc784fa3 Make swaponvp() static to the swap_pager. 2003-08-15 12:04:29 +00:00
Poul-Henning Kamp 0bddf4c8e9 Remove the magic way of configuring NFS backed swap.
This code dates back to the very first diskless support on FreeBSD,
back when swapon(8) couldn't simply be run on a NFS backed file.

Suggested replacement command sequence on the client:

        dd if=/dev/zero of=/swapfile bs=1k count=1 oseek=100000
        swapon /swapfile
        rm -f /swapfile

For whatever value of 100000 you want.
2003-08-15 12:04:02 +00:00
Mike Silbersack 2f823fa326 Lock down arc4random so it can be safely called w/o Giant.
Minor code reorganization was required, but the only functional
change was that the first 1024 bytes of output are thrown out
after each reseed, rather than just the initial seed.
2003-08-15 06:34:47 +00:00
Nate Lawson 92aa3b6885 Revert part of rev. 1.16 -- reinstate system notify handler. It turns out
at least the Casio FIVA requires this.

Requested by:	takawata
2003-08-15 06:33:11 +00:00
Warner Losh 3cc12f33f4 Improve the C3 CPU identification. I didn't notice that the CPU id
was masked.  However KIMURA Yasuhiro-san noticed my mistake and was
kind enough to provide a better patch in PR 55581.  I've merged that
into the routine.  Hopefully I've not overlooked anything this time.

MFC After: 5 days
2003-08-15 06:02:24 +00:00
Marcel Moolenaar 1fdb0ba9bb Fix the generation of coredumps. We did not take the dirty registers
that were on the kernel stack into account. For now we write them
out to the register stack of the process before creating the dump.
This however is not the final solution. The problem is that we may
invalidate the coredump by overwriting vital information due to an
invalid backing store pointer. Instead we need to write the dirty
registers to an unused region of VM which will result in a seperate
segment in the coredump. For now we can at least get to all the
registers from a coredump.
2003-08-15 05:52:48 +00:00
Marcel Moolenaar b00555136c Add an instruction group break after the move to application register
and the move to control register to avoid dependency violations when
these functions are used. Note that explicit data and instruction
serialization also need to be in a subsequent instruction group.
This too requires that we have an igrp break here.
2003-08-15 05:46:33 +00:00
Marcel Moolenaar 60518ee41c Introduce two machine specific ptrace(2) requests: PT_GETKSTACK and
PT_SETKSTACK. These requests allow the tracing process to access the
dirty registers of the traced process that are on the kernel stack.

Note that there's currently no way to access the rnat register for
those dirty registers that are not (yet) covered by a nat collection
point. The interface for this is still being slept on.

Also note that implied by these requests is the division of work:
The tracing process has to keep track of where registers are spilled
and is responsible to figure out where the NaT bit of the stacked
registers are at any time during the execution of the traced process.
The kernel provides the interfaces but will not abstract the fact
that the register stack can be split. This model does not follow
the approach taken in Linux where PT_PEEK and PT_POKE deals with
this automagically.
2003-08-15 05:40:59 +00:00
Marcel Moolenaar 1c843354aa Add or finish support for machine dependent ptrace requests. When we
check for permissions, do it for all requests, not the known requests.
Later when we actually service the request we deal with the invalid
requests we previously caught earlier.

This commit changes the behaviour of the ptrace(2) interface for
boundary cases such as an unknown request without proper permissions.
Previously we would return EINVAL. Now we return EBUSY or EPERM.

Platforms need to define __HAVE_PTRACE_MACHDEP when they have MD
requests. This makes the prototype of cpu_ptrace() visible and
introduces a call to this function for all requests greater or
equal to PT_FIRSTMACH.

Silence on: audit
2003-08-15 05:25:06 +00:00
Alan Cox 3e1b578a28 Extend the scope of the page queues lock in vm_pageout_scan() to cover
the traversal of the PQ_INACTIVE queue.
2003-08-15 05:13:36 +00:00
Greg Lehey d4bd229fa5 vinum_scandisk:
Correctly handle additional disks without BIOS partition tables.
  Previously, vinum_scandisk stopped scanning additional disks for
  native partitions after any good partition was found.  This applies
  to all platforms, but was a particular problem on systems without
  BIOS partition tables.

Submitted by: harti
2003-08-15 04:36:53 +00:00
John-Mark Gurney fc8684cd46 if we got this far, we definately don't have an EBADF. Return a more
sane result of EPIPE.

Reported by:	nCircle dev team
MFC after:	3 day
2003-08-15 04:31:01 +00:00
Greg Lehey 5466a9cb4c Drop Giant when calling the disk drivers directly, and reacquire
afterwards.  This fixes the Vinum breakage in -CURRENT.

Breakage explained by: phk
2003-08-15 03:57:15 +00:00
Cameron Grant b9c6d8cdcf modify comments 2003-08-15 02:31:13 +00:00
Nate Lawson ec2e60b457 De-inline functions which do not need to be inline. Move the DEVMETHOD
block to where it is in similar drivers.
2003-08-15 02:18:15 +00:00
Nate Lawson e9247df73d Don't install a system notify handler. Move the device notify handler
installation to just before we're ready to handle events.  Make a loop
more readable (no functional change).
2003-08-15 02:17:23 +00:00
Nate Lawson 59ddeb18b8 Fix a couple changes that were incorrect in updating for 0619. Only unlock
the hardware mutex if it is held.  Re-add calls to Enable/Clear fixed events.

This is not known to have caused problems.  Bug symptoms might have included
instability after an aborted suspend attempt or power/sleep buttons not
being enabled.
2003-08-15 02:10:38 +00:00
Cameron Grant 754c48756f add a few missing bits for future use 2003-08-15 01:24:36 +00:00
Cameron Grant 8e01d384af disable resume code implementing panic().
this needs to be reimplemented properly.
2003-08-14 22:09:10 +00:00
Cameron Grant 828447e0ca add a read-only sysctl to display the number of entries in the fixed size
kobj global method table; also kassert that the table has not overflowed
when defining a new method.

there are indications that the table is being overflowed in certain
situations as we gain more kobj consumers- this will allow us to check
whether kobj is at fault.  symptoms would be incorrect methods being called.
2003-08-14 21:16:46 +00:00
Robert Watson 946e86b7e1 Add p_candebug() check to access a process map file in procfs; limit
access to map information for processes that you wouldn't otherwise
have debug rights on.

Tested by:	bms
2003-08-14 15:26:44 +00:00
Warner Losh 0d210565df Add many new VIA C3 CPU types now that they appear to be available in
machines (at least in Japan).

Submitted by: Masahiko KIMOTO-san
PR: 55578
2003-08-14 15:17:49 +00:00
Alexander Kabaev 2724bce2d2 Add safe _FOREACH iterators to the rest of the queue.h types. 2003-08-14 14:49:26 +00:00
Pierre Beyssac 4530e20aae Add support for the newer Moxa PCI 8-port, 16550-compatible based
CP-168U board. It initializes and attaches in the same way as the
older (but higher performance) C168H. The only difference is the
board ID, which is 0x1681.

PR:		kern/53548
Submitted by:	regnauld@catpipe.net
MFC after:	1 week
2003-08-14 14:15:16 +00:00
Warner Losh fbe1513849 trivial optimization: use nameunit here. 2003-08-14 07:15:19 +00:00
Warner Losh 88755a2793 Add microsoft mn-520 wlan card.
Submitted by: Kirk Strauser
2003-08-14 06:30:06 +00:00
Warner Losh 610a3fb7a9 resync to pcarddevs 1.63 2003-08-14 06:27:48 +00:00
Warner Losh 190320c7eb add microsoft mn-520 wlan card.
submitted by: Kirk Strauser
2003-08-14 06:26:58 +00:00
Alan Cox d8df7ab7ea Eliminate pmap_page_lookup() and its uses. Instead, use PHYS_TO_VM_PAGE()
to convert the pte's physical address into a vm page.

Reviewed by:	peter
2003-08-14 05:18:38 +00:00
Peter Grehan eac100658a Update powerpc to use the (old thread,new thread) calling convention
for cpu_throw() and cpu_switch().
2003-08-14 03:56:24 +00:00
Josef Karthauser 338a591019 Crank down UVISORBUFSIZE from 1024 to 64 to avoid a problem where
the Palm device and the USB host controller deadlock. The USB host
controller is expecting an early-end-of-transmission packet with 0
data, and the Palm doesn't send one because it's already communicated
the amount of data it's going to send in a header (which ucom/uvisor
are oblivious to). This is the problem that has been known on the
pilot-link lists as the "[Free]BSD USB problem", but not understood.

Submitted by:	Nathan J. Williams <nathanw@MIT.EDU>
2003-08-14 00:15:23 +00:00
Bill Paul f3300b2f0b Set the TX hardware checksum offload bits on all the descriptors of a
multi-fragment transmission. I'm not sure if this is a bug or a requirement
that I overlooked with going through the documentation, but the sample
8169 NIC that I have seems to require it at least some of the time or
else it botches TCP checksums on segments that span multiple descriptors.
2003-08-13 22:39:21 +00:00