Remove our override on the default time that a looked up name remains
cached when not in use. This changes the FreeBSD default from 30 minutes
to 5 minutes. JKH was the one that added the override to amd_flags, but
there was no reason given other to serve as an example of what could be
done.
Peter Wemm [Thu, 31 Aug 2000 23:11:35 +0000 (23:11 +0000)]
Take a shot at fixing multiple pci busses on i386.
pcib_set_bus() cannot be used on the new child because it is
meant to be used on the *pci* device (it looks at the parent internally)
not the pcib being added. Bite the bullet and use ivars for the bus
number to avoid any doubts about whether the softc is consistant between
probe and attach. This should not break the Alpha code.
Andrew Gallatin [Thu, 31 Aug 2000 16:19:27 +0000 (16:19 +0000)]
Introduce explicit break statements in the various chipsets'
foo_pcib_[read|write]_config() functions rather than relying on
a break or return being in the CFG macro.
This fixes a panic later in the boot process on a UP1000. From
inspection, it looks like this fixes a similar problem in the tsunami code.
Robert Watson [Thu, 31 Aug 2000 15:55:17 +0000 (15:55 +0000)]
o p_cansee() wasn't setting privused when suser() was required to override
kern.ps_showallprocs. Apparently got lost in the merge process from
the capability patches. Now fixed.
Ruslan Ermilov [Thu, 31 Aug 2000 12:47:57 +0000 (12:47 +0000)]
Create aliasing links for incoming ICMP echo/timestamp requests.
This makes outgoing ICMP echo/timestamp replies to be de-aliased
with the right source IP, not exactly the primary aliasing IP.
Mitsuru IWASAKI [Thu, 31 Aug 2000 11:16:42 +0000 (11:16 +0000)]
Modified PCI config space access code via pcib_if rather than using
pci_cfg{read|write}.
- Obtain device_t pcib instance by calling device_find_child().
- Call PCIB_{READ|WRITE}_CONFIG() to access to pcib interfaces.
Mitsuru IWASAKI [Thu, 31 Aug 2000 11:15:03 +0000 (11:15 +0000)]
Cleanup on power off code under ACPI.
- Remove DELAY() kludge before power off.
- Move EVENTHANDLER_REGISTER to acpi_attach().
- Pass RB_POWEROFF flag to shutdown_nice().
KATO Takenori [Thu, 31 Aug 2000 10:33:06 +0000 (10:33 +0000)]
Improved Cyrix 486DX supports for NEC PC-98.
- Enable WB cache via CCR2 and CR0.
- Set the need_pre_dma_flush when the CPU_I486_ON_386 option is
defined.
KATO Takenori [Thu, 31 Aug 2000 10:24:06 +0000 (10:24 +0000)]
The INT 1B BIOS call is used to obtain geometries of SASI/IDE hard
drives. Some IDE cards don't set propler information into BIOS work
are and their sector size were always recognized as 256 bytes/sector.
Mike Smith [Thu, 31 Aug 2000 00:08:50 +0000 (00:08 +0000)]
Make it possible to pass boot()'s flags to shutdown_nice() so that the
kernel can instigate an orderly shutdown but still determine the form of
that shutdown. Make it possible eg. to cleanly shutdown and power off the
system under ACPI when the power button is pressed.
Robert Watson [Wed, 30 Aug 2000 13:23:19 +0000 (13:23 +0000)]
o Update linprocfs to include similar changes as those in procfs, fixing
the build (oops!): replace calls to p_trespass() and PRISON_CHECK()
with p_can(..., {P_CAN_SEE, P_CAN_DEBUG}, NULL)
o Remove volatile usage from procfs_readdir() to remove warnings
o Apply bp's CREATE fix to linprocfs, causing EROFS to be returned on
CREATE calls to procfs_lookup()
o Some further synchronization still needs to occur: only existing
access checks were replaced, to fix the build--the new ones were not
added. I'll do this later today, this is a "fix the build quickly"
commit. This means that, in the interim, some information leakage
can still occur via linprocfs when using jail or kern.ps_showallprocs
Submitted by: knu
Approved by: des
Obtained from: TrustedBSD Project
Ruslan Ermilov [Wed, 30 Aug 2000 13:14:32 +0000 (13:14 +0000)]
Only install `divert natd' rule for predefined firewall types,
not when ${firewall_type} is set to a filename, as we know
nothing about user's script specifics.
Reported by: Bernhard Valenti <bernhard.valenti@gmx.net>
Mike Smith [Wed, 30 Aug 2000 07:52:50 +0000 (07:52 +0000)]
Major update to the AMI MegaRAID driver.
- New support for 40LD firmware found in Series 475 and 471 adapters.
- Better support for 8LD firmware adapters
- Ioctl passthrough interface for userland utilities.
- Improved error handling and queueing.
- Several bugfixes (including the 'still open' shutdown bug and
closing some small race conditions).
- Zone-style command allocator, reducing memory wasted under heavy
load conditions.
- CAM interface (disabled and not fully working) for SCSI passthrough
access to non-disk devices
Thanks to AMI for supplying a pile of new adapters and various other
help in making this happen.
Warner Losh [Wed, 30 Aug 2000 07:27:46 +0000 (07:27 +0000)]
Remove pcic and oldcard from files built. Oldcard desn't work, so
shouldn't be built by default. pcic and pccard are going to go
through some changes and I'll not be testing them on the alpha so I
don't want to break them for the FreeBSD/alpha folks.
Robert Watson [Wed, 30 Aug 2000 04:49:09 +0000 (04:49 +0000)]
o Centralize inter-process access control, introducing:
int p_can(p1, p2, operation, privused)
which allows specification of subject process, object process,
inter-process operation, and an optional call-by-reference privused
flag, allowing the caller to determine if privilege was required
for the call to succeed. This allows jail, kern.ps_showallprocs and
regular credential-based interaction checks to occur in one block of
code. Possible operations are P_CAN_SEE, P_CAN_SCHED, P_CAN_KILL,
and P_CAN_DEBUG. p_can currently breaks out as a wrapper to a
series of static function checks in kern_prot, which should not
be invoked directly.
o Commented out capabilities entries are included for some checks.
o Update most inter-process authorization to make use of p_can() instead
of manual checks, PRISON_CHECK(), P_TRESPASS(), and
kern.ps_showallprocs.
o Modify suser{,_xxx} to use const arguments, as it no longer modifies
process flags due to the disabling of ASU.
o Modify some checks/errors in procfs so that ENOENT is returned instead
of ESRCH, further improving concealment of processes that should not
be visible to other processes. Also introduce new access checks to
improve hiding of processes for procfs_lookup(), procfs_getattr(),
procfs_readdir(). Correct a bug reported by bp concerning not
handling the CREATE case in procfs_lookup(). Remove volatile flag in
procfs that caused apparently spurious qualifier warnigns (approved by
bde).
o Add comment noting that ktrace() has not been updated, as its access
control checks are different from ptrace(), whereas they should
probably be the same. Further discussion should happen on this topic.
Robert Watson [Wed, 30 Aug 2000 04:35:32 +0000 (04:35 +0000)]
o Disable flagging of ASU in suser_xxx() authorization check. For the
time being, the ASU accounting flag will no longer be available, but
may be reinstituted in the future once authorization have been redone.
As it is, the kernel went through contortions in access control to
avoid calling suser, which always set the flag. This will also allow
suser to accept const struct *{cred, proc} arguments.
Kenneth D. Merry [Tue, 29 Aug 2000 22:11:39 +0000 (22:11 +0000)]
Change the "Duplicate Wired Device entry" printout in camperiphnextunit to
also mention the peripheral name, bus, target and lun of the device we
attempted to put in that slot. This gives the user a little more
information about what is going on.
Tested by: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
Discussed with: gibbs
Kenneth D. Merry [Tue, 29 Aug 2000 22:09:23 +0000 (22:09 +0000)]
Add quirk entries from Andre Albsmeier to disable the sync cache command
for the Quantum "MAVERICK 540S" and "LPS525S".
Also, add common string variables, since we seem to have a few Quantum and
Micropolis drives in here.
Fix the 'quantum' variable usage in scsi_all.c that likely got broken when
someone staticized things in cam_xpt.c. (That particular problem would
cause Quantum Fireball ST drives to not get spun up if they were not
already spinning.)
Submitted by: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
strtok() -> strsep() (no strtok() in libraries allowed)
small cleanup in nearby area:
pointer 0 -> NULL, according to manpages
hardcoded constant -> sizeof(buf)
Mitsuru IWASAKI [Tue, 29 Aug 2000 20:38:31 +0000 (20:38 +0000)]
Refine implementation of PowerResource manipulation sub-routines.
- Add new funcions for device state stuff;
acpi_get_current_device_state() and acpi_set_device_state()
- Add new funcions for power resource stuff;
acpi_powerres_init(), acpi_powerres_debug(),
acpi_get_current_powerres_state() and acpi_set_powerres_state()
These were implemented based on 7.1, 7.2, 7.2.2, 7.2.3, 7.2.4, 7.3,
7.3.3, 7.4, 7.4.1, 7.4.2, 7.4.3 and 7.5 of ACPI spec 1.0b.
Mitsuru IWASAKI [Tue, 29 Aug 2000 20:30:54 +0000 (20:30 +0000)]
A lot of changes on acpi driver code.
- The "Osd*" stuff went away from acpi driver code, use the bus_space
functions directly instead.
- Fix minor english bugs.
acpi_registers_input -> acpi_register_input
acpi_registers_output -> acpi_register_output
- Remove all magic numbers for the sleeping states. We now have
#defines for these.
- NULL is treated the same as the return from aml_get_rootname in
aml_find_from_namespace().
Cameron Grant [Tue, 29 Aug 2000 16:32:26 +0000 (16:32 +0000)]
make the test for hwptr going backwards more picky- now it only triggers if
15/16 of the buffer is skipped or we go backwards by < 1/16 of buffer size.
Cameron Grant [Tue, 29 Aug 2000 16:21:33 +0000 (16:21 +0000)]
add devfs support. when devfs is enabled, sysctl hw.sndunit is used to set
which sound unit the /dev/{dsp,mixer,dspW,audio} links point at. this can
also be set from the loader.
Robert Watson [Tue, 29 Aug 2000 14:45:49 +0000 (14:45 +0000)]
o Restructure vaccess() so as to check for DAC permission to modify the
object before falling back on privilege. Make vaccess() accept an
additional optional argument, privused, to determine whether
privilege was required for vaccess() to return 0. Add commented
out capability checks for reference. Rename some variables to make
it more clear which modes/uids/etc are associated with the object,
and which with the access mode.
o Update file system use of vaccess() to pass NULL as the optional
privused argument. Once additional patches are applied, suser()
will no longer set ASU, so privused will permit passing of
privilege information up the stack to the caller.
Brian Feldman [Tue, 29 Aug 2000 11:28:06 +0000 (11:28 +0000)]
Remove any possibility of hiwat-related race conditions by changing
the chgsbsize() call to use a "subject" pointer (&sb.sb_hiwat) and
a u_long target to set it to. The whole thing is splnet().
This fixes a problem that jdp has been able to provoke.
Warner Losh [Tue, 29 Aug 2000 06:35:46 +0000 (06:35 +0000)]
Expand information about device.hints. Add information in the
cookbook section about needing to copy GENERIC.hints to
/boot/device.hints, as well as a footnote about exceptions to this
rule.
Warner Losh [Tue, 29 Aug 2000 04:40:17 +0000 (04:40 +0000)]
Add TI-1031 id. It doesn't work yet, but it is nice to have it.
These were on cards that were pci pccard (not cardbus) bridges that
lived in SparcUltras that picked up on ebay.