Commit Graph

102686 Commits

Author SHA1 Message Date
Garance A Drosehn
2631c7774f Fix the kludge-old-options processing so `ps tpt' will be treated the
same as `ps -tpt', instead of being changed into `ps -tpT'.

PR:		bin/52489
Submitted by:	Jilles Tjoelker
MFC after:	1 week
2004-05-23 21:21:07 +00:00
Yaroslav Tykhiy
25fbb2c38c A handler for ioctl(SIOCSIFCAP) should not alter a bit in
if_capenable unless the interface driver is actually able
to toggle the respective capability on and off.

Reviewed by:	ru
2004-05-23 21:05:08 +00:00
Yaroslav Tykhiy
a5820ecb77 According to the design of checksum offloading framework,
if_hwassist should be in accord with the IFCAP_TXCSUM bit
of if_capenable.
2004-05-23 20:22:40 +00:00
Yaroslav Tykhiy
88b404a610 Mark the VLAN_MTU capability as initially enabled since it's
hardcoded to "ON" for these interfaces.
2004-05-23 19:21:48 +00:00
Bruce Evans
7a9e253666 Added profiling support for Xint0x80_syscall. 2004-05-23 19:06:15 +00:00
Maxim Konovalov
5cbcfccb41 o Fix usage example.
PR:		docs/67065
Submitted by:	David Syphers
2004-05-23 19:05:59 +00:00
Doug Rabson
7b1f628606 Don't try to copy out the result payload if there isn't one. This ioctl
interface really needs changing to split out the various async request
types.
2004-05-23 18:43:44 +00:00
Bruce Evans
478fee28e6 Build prof_machdep.c if profiling.
Kernel profiling for amd64's (normal and high resolution) should now
compile and work as (un)well as on i386's.  It works better than user
profiling because:
- it uses _cyg_profile_func_*() instead of .mcount(), so it doesn't suffer
  from gcc misspelling .mcount as mcount.
- it doesn't neglect saving %rax in .mcount().

The SMP case hasn't been tested.  The high resolution subcase of this uses
the i8254, and as on i386's, the locking for this is deficient and the
i8254 is too inefficient.  The acpi timer is also too inefficient.
2004-05-23 18:38:27 +00:00
Bruce Evans
be8282ba22 Build kgmon for amd64. 2004-05-23 18:30:08 +00:00
Bruce Evans
5eb1e23a45 Adjusted for amd64 after repo-copy. The adjustments are routine, except:
- perfmon headers must be avoided until perfmon is supported.
- all call-used registers including return registers must be preserved
  by .mcount(), etc., not quite as in profile.h.  __cyg_profile_func_*()
  don't require this, but they are (mis)implemented as aliases for
  .mcount(), etc. so they preserve the registers.
- i386 ifdefs related to perfmon have not been adjusted yet.
2004-05-23 18:27:14 +00:00
Bruce Evans
c39f62a459 MFamd64 (1.117: made the FAKE_MCOUNT() in doreti work non-accidentally,
and removed buggy unnecessary FAKE_MCOUNT() in calltrap).
2004-05-23 17:25:46 +00:00
Bruce Evans
03d5ca33db Restored FAKE_MCOUNT() and MEXITCOUNT invocations and adjusted them for
amd64 as necessary.  This is routine, except:
- the FAKE_MCOUNT($bintr) in doreti was missing the '$'.  This gave a
  a garbage address made up of padding bytes (with the nop byte 0x90 as
  the MSB) instead of the intended address of bintr.  This accidentally
  worked on i386's because (0x90 << 24) is close enough to bintr, but
  it doesn't work on amd64's because (0x90 << 56) is much further away
  from bintr.
- the FAKE_MCOUNT($btrap) in calltrap was similarly broken.  It hasn't
  been needed since FreeBSD-1, so just delete it.
2004-05-23 17:18:48 +00:00
Lukas Ertl
29d81b7db1 Update URL to HID spec.
Obtained from:  NetBSD
2004-05-23 17:09:07 +00:00
Lukas Ertl
b04f1772b7 Update URL to HID spec.
Obtained from:  NetBSD
2004-05-23 16:55:28 +00:00
Bruce Evans
6670fdb155 MFamd64 (put TF_EIP in assym.s and use it instead of a magic offset in
FAKE_MCOUNT()s).
2004-05-23 16:50:55 +00:00
Bruce Evans
a2c50ac453 Removed a garbage reference to i386's.
Submitted by:	ru
2004-05-23 16:27:40 +00:00
Bruce Evans
5423714950 Adjusted FAKE_MCOUNT()s for amd64. This is needed for both ordinary
and high resolution profiling of interrupt handlers.  The adjustments
are routine once the magic stack offset 13*4 is decoded to be TF_RIP
(there were originally more types of stack frames so using TF_EIP for
one of them wouldn't have been much simpler).

Removed garbage comments attached to some of the FAKE_MCOUNT()s.
2004-05-23 16:23:29 +00:00
Bruce Evans
cf5a37b816 Fixed misspelling of "cy".
Submitted by:	ru
2004-05-23 16:15:25 +00:00
Maxime Henrion
866a788cc2 We don't need to initialize if_output, ether_ifattach() does it
for us.
2004-05-23 16:11:53 +00:00
Bruce Evans
c94dd84382 MFamd64 (1.111: fixed missing call to .mexitcount in lgdt()). 2004-05-23 15:37:21 +00:00
Bruce Evans
23c2ef4344 Updated for removal of the "count" arg in device lines.
Organized the synopsis for PCI cards better.
2004-05-23 15:22:53 +00:00
Bruce Evans
956b25b74a Remove man4/man4.i386/cy.4 and adjust makefiles after repo-copying cy.4 up
to man4.
2004-05-23 15:02:08 +00:00
Bruce Evans
e2960917e1 Spell "retq" as "ret" in pagezero() like it is everywhere, else so
that the usual macro for "ret" hides the detail of calling .mexitcount
before returning.

Fixed missing call to .mexitcount in lgdt().  This was missing on
i386's, mainly because lgdt() uses lret[q] insted of ret.  This is
very unimportant since lgdt() is not (normally?) called until after
profiling is initialized.
2004-05-23 14:56:02 +00:00
Doug Rabson
c0e9efacfe Initialise OHCI_CROMHDR and OHCI_BUS_OPT in fwohci_ibr to make sure that
they have the right values at the first bus reset.
2004-05-23 14:22:11 +00:00
Lukas Ertl
b113636e68 MFNetBSD 1.80; author: wiz
URL updates, from Jared Yanovich and jmc@openbsd, forwarded by the latter.

Obtained from:  NetBSD
2004-05-23 14:01:23 +00:00
Josef El-Rayes
df38fbe11f Add localized calendar file for holidays in Austria.
Approved by:	le
2004-05-23 13:22:01 +00:00
Tim J. Robbins
675e7ddbee Grab all the information we need about a character with one call to
__maskrune() instead of one direct call and one through iswprint().
2004-05-23 13:20:09 +00:00
Ian Dowse
eadf519a78 Replace the static "qdat" structure with a per-instance softc field
in all USB ethernet drivers. The qdat structure contains a pointer
to the interface's struct ifnet and is used to process incoming
packets, so simultaneous use of two similar devices caused crashes
and confusion.

The if_udav driver appeared in the tree since Daan's PR, so I made
similar changes to that driver too.

PR:		kern/59290
Submitted by:	Daan Vreeken <Danovitsch@Vitsch.net>
2004-05-23 12:35:25 +00:00
Lukas Ertl
5ac85402da Diff reduction to NetBSD.
MFNetBSD 1.177; author: toshii
   Use the correct wValue to get hub desriptors.
   Also, make wValue checks of root hub codes less strict.

MFNetBSD 1.178: author: martin
   Interrupt descriptors might become invalid while being processed in
   uhci_check_intr - so remember their next pointer before calling it.
   Patch provided by Matthew Orgass in PR kern/24542.

Obtained from:   NetBSD
2004-05-23 11:43:34 +00:00
Maxime Henrion
e0026a65f9 Use __FBSDID. 2004-05-23 10:57:11 +00:00
Doug Rabson
3d7b1b4143 Don't crash if the CROM is all zeros. 2004-05-23 10:06:33 +00:00
Christian Brueffer
9a6a20eeff Fix typo
Submitted by:	edwin
2004-05-23 08:40:52 +00:00
Duncan Barclay
62a9464c76 Apply fix for long timeouts on driver initialisation.
PR:		64656
Submitted by:	Jianqin Qu <jqu@its.brooklyn.cuny.edu>
Reviewed by:	dmlb
2004-05-23 08:35:07 +00:00
Maxime Henrion
eb3259747a In agp_generic_bind_memory(), grab the needed pages before acquiring
the agp mutex.  We do this because vm_page_grab() called with the
VM_ALLOC_RETRY flag can sleep.

Pointed out by:	alc
2004-05-23 00:00:10 +00:00
Garance A Drosehn
7bd421650b Change `ps' to use the KERN_PROC_RGID and KERN_PROC_SESSION options
(if trying to match only one real-group or one session-id), now that
those options are implemented in src/sys/kern/kern_proc.c (v1.203).

PR:		bin/65803  (a very tiny piece of the PR)
Submitted by:	Cyrille Lefevre
2004-05-22 23:13:58 +00:00
Garance A Drosehn
b8fdc89d79 Implement the new KERN_PROC_RGID option, and also implement the
KERN_PROC_SESSION option which had been previously defined but
never implemented.

PR:		bin/65803  (a very tiny piece of the PR)`
Submitted by:	Cyrille Lefevre
2004-05-22 23:11:44 +00:00
Garance A Drosehn
524b369bc7 Define a KERN_PROC_RGID option for kvm_getprocs().
Submitted by:	Cyrille Lefevre
2004-05-22 23:08:49 +00:00
Tim Kientzle
26eddc7f41 Add --no-same-owner as a synonym for -o.
Note that bsdtar's -o (which follows SUSv2) is not the same as GNU tar's -o.
In GNU tar, -o and --no-same-owner are not synonyms.

Pointed out by: Kris Kennaway (required by xpenguins port)
2004-05-22 17:49:54 +00:00
Nate Lawson
12957d4991 Revert the previous commit. The bus accessor macros do not check the
return value for BUS_READ_IVAR and thus don't generate the proper NULL
in cases where a device (i.e. on PCI) does not have a handle.

Found by:	peadar, tjr
2004-05-22 17:19:59 +00:00
Marius Strobl
458e5419e6 - Add a reference to eeprom(8).
- Spell Open Firmware as "Open Firmware", the way it's done on
  OpenFirmware.org.
2004-05-22 17:06:54 +00:00
Marius Strobl
156e1dec14 Hook eeprom(8) up to the FreeBSD/sparc64 build. 2004-05-22 17:03:52 +00:00
Pawel Jakub Dawidek
b70eccf3bd Add standard command "help" to print usage. 2004-05-22 16:57:39 +00:00
Marius Strobl
96818a07a7 Add eeprom(8), a utility to display and modify system configurations
stored in EEPROM or NVRAM. It's inspired by the NetBSD eeprom(8) and
the SunOS/Solaris eeprom(1M) utilities. Currently, this eeprom(8)
only supports systems equipped with Open Firmware and is only tested
on Sun machines but should work on any platform using Open Firmware.
A bit more specific, eeprom(8) can be used on these systems to do the
same under FreeBSD as can be done using the printenv and setenv
commandos in the boot monitor. One thing that only hardly can be done
using the boot monitor but easily with eeprom(8) is to write a logo
to the "oem-logo" property. eeprom(8) may also be useful to recover
the boot monitor password (in the default configuration only as root,
of course), i.e. when the boot monitor allows you to boot but you
can't alter the configuration because the password is unknown. The
man page may also be a useful reference of the various configuration
variables.

The idea of eeprom(8) is that handlers can be written to add support
for any firmware that stores such configuration in EEPROM or NVRAM;
sort of e.g. eeprom(1M) on Solaris/x86 is used to turn PAE-support
on and off (stored in a file then, not hardware). In FreeBSD, a
candidate for this would be a handler for the EFI boot environment
for FreeBSD/ia64.

eeprom(8) uses some code from NetBSD (eeprom.c and the base for
eeprom.8), the handler for the Open Firmware /options node
(ofw_options.[c,h]) was written using ofw_util.[c,h] from ofwdump(8).

Reviewed by:	ru (slightly earlier version of the man page)
2004-05-22 16:56:04 +00:00
Marius Strobl
8cc2c16287 - Change ofwdump(8) to use sysexits(3) exit codes.
- Make the code use the new OFIOCMAXVALUE instead of defining the maximum
  length of property values locally.
- Move the application specific parts from ofw_util.c to ofwdump.c in
  order to make ofw_util.c more library-like. While ofw_dump_properties()
  could be made non-specific to ofwdump(8) it's currently optimized for
  use in ofwdump(8) and making it a library-like function would just
  complicate the code unnecessarily.
- Minor clean-up in ofw_util.c, e.g. make its use of getopt(3) the way
  it's described in style(9), make its usage() static, etc.
- Add a comment in ofw_util.c about why it doesn't call usage() when
  neither the "-a" option nor a node-name where given.
- Add ofw_optnode() and ofw_setprop(), helper functions for the
  OFIOCGETOPTNODE and OFIOCSET ioctls respectively, to ofw_util.[c,h].
- Be consistent with the use of 'const' in ofw_util.[c,h] and add 'const'
  to the function arguments that are acutally const but weren't declared
  as such.
- Mark WARNS=6 clean.

Approved by:	tmm
2004-05-22 16:51:11 +00:00
Marius Strobl
a32a374caf - Rearrange a comment to fit in 80 chars per line, like the rest of this
file.
- Remove a superfluous ';'.
2004-05-22 16:45:19 +00:00
Marius Strobl
073e8552f8 - Move OFW_NAME_MAX, used as a limit for OFW property names and device
identifiers, to openfirmio.h as OFIOCMAXNAME, so programs can use it
  for buffer sizes etc.
  Note: Although this is only a rough upper limit to make the code more
  robust and to prevent the allocation of ridiculous amounts of memory,
  the current limit of one page (8191 + '\0' in openfirm_getstr()) still
  appears a bit high. The maximum length of OFW property names is 31.
  I didn't find a maximum length for the device identifiers in the OFW
  documentation but it certainly is much smaller than 8191, too.
- Enable the OFIOCSET ioctl, i.e. move it out from under #if 0.
- Don't use openfirm_getstr() for the property value in OFIOCSET, there
  are also properties whose values aren't strings and it makes sense to
  use a different maximum length for property values than OFW_NAME_MAX/
  OFIOCMAXNAME. The maximum accepted property value is defined in
  openfirmio.h as OFIOCMAXVALUE (currently the maximum size of the value
  of the nvramrc property).
- Make OFIOCSET not return EINVAL when OF_setprop() returns a different
  length for the written value than it was told to write, this is normal
  for the text string values of the properties in the OFW /options node.
  Instead, only return EINVAL if OF_setprop() returned -1 (value could
  not be written or property could not be created). Add a comment about
  the specialty of the OFW /options node.
- Make OFIOCSET return the length of the written value returned by
  OF_setprop(), just like OF_getprop() does. Quite useful, at least for
  debugging.

Reviewed by:	tmm
2004-05-22 16:43:42 +00:00
Pawel Jakub Dawidek
7f21753e25 Actually we are also able to list only choosen providers. 2004-05-22 16:17:57 +00:00
Doug Rabson
03161bbcf6 Change u_intXX_t to uintXX_t. Change a couple of 'unsigned long's to
uint32_t where appropriate.
2004-05-22 16:14:17 +00:00
Tim J. Robbins
d6ed810a67 Perform conversions straight from the stream buffer instead of scanning
through byte by byte with mbrtowc(). In the usual case (buffer is big
enough to contain the multibyte character, character does not straddle
buffer boundary) this results in only one call to mbrtowc() for each
wide character read.
2004-05-22 15:41:03 +00:00
Tim J. Robbins
87275e436a Associate a multibyte conversion state object with each stream. Reset it
to the initial state when a stream is opened or seeked upon. Use the
stream's conversion state object instead of a freshly-zeroed one in
fgetwc(), fputwc() and ungetwc().

This is only a performance improvement for now, but it would also be
required in order to support state-dependent encodings.
2004-05-22 15:19:41 +00:00