diff --git a/contrib/bsnmp/lib/asn1.c b/contrib/bsnmp/lib/asn1.c
index 4d9704f892f7..0c9d09aed700 100644
--- a/contrib/bsnmp/lib/asn1.c
+++ b/contrib/bsnmp/lib/asn1.c
@@ -652,7 +652,7 @@ asn_put_objid(struct asn_buf *b, const struct asn_oid *oid)
err = ASN_ERR_RANGE;
}
if (oid->subs[0] > 2 ||
- (oid->subs[0] < 2 && oid->subs[0] >= 40)) {
+ (oid->subs[0] < 2 && oid->subs[1] >= 40)) {
asn_error(NULL, "oid out of range (%u,%u)",
oid->subs[0], oid->subs[1]);
err = ASN_ERR_RANGE;
diff --git a/etc/rc.d/sysctl b/etc/rc.d/sysctl
index 2420414d4ad6..6e968f706c5d 100755
--- a/etc/rc.d/sysctl
+++ b/etc/rc.d/sysctl
@@ -27,7 +27,9 @@ sysctl_start()
esac
for _f in /etc/sysctl.conf /etc/sysctl.conf.local; do
- [ -r ${_f} ] && ${command} ${command_args} ${_f} > /dev/null
+ if [ -r ${_f} ]; then
+ ${command} ${command_args} ${_f} > /dev/null
+ fi
done
}
diff --git a/release/doc/en_US.ISO8859-1/relnotes/article.xml b/release/doc/en_US.ISO8859-1/relnotes/article.xml
index e522a9d8bdd8..f1edcb1efde6 100644
--- a/release/doc/en_US.ISO8859-1/relnotes/article.xml
+++ b/release/doc/en_US.ISO8859-1/relnotes/article.xml
@@ -1,33 +1,20 @@
%release;
]>
-&os; &release.current; Release Notes
-
+ &os; &release.current; Release NotesThe &os; Project$FreeBSD$
- 2000
- 2001
- 2002
- 2003
- 2004
- 2005
- 2006
- 2007
- 2008
- 2009
- 2010
- 2011
- 2012
- 2013
- The &os; Documentation Project
+ 2014
+ The &os; Documentation
+ Project
@@ -40,13 +27,13 @@
- The release notes for &os; &release.current; contain a summary
- of the changes made to the &os; base system on the
- &release.branch; development line.
- This document lists applicable security advisories that were issued since
- the last release, as well as significant changes to the &os;
- kernel and userland.
- Some brief remarks on upgrading are also presented.
+ The release notes for &os; &release.current; contain
+ a summary of the changes made to the &os; base system on the
+ &release.branch; development line. This document lists
+ applicable security advisories that were issued since the last
+ release, as well as significant changes to the &os; kernel and
+ userland. Some brief remarks on upgrading are also
+ presented.
@@ -54,30 +41,32 @@
IntroductionThis document contains the release notes for &os;
- &release.current;. It
- describes recently added, changed, or deleted features of &os;.
- It also provides some notes on upgrading
- from previous versions of &os;.
+ &release.current;. It describes recently added, changed, or
+ deleted features of &os;. It also provides some notes on
+ upgrading from previous versions of &os;.
- The &release.type; distribution to which these release notes
- apply represents the latest point along the &release.branch; development
- branch since &release.branch; was created. Information regarding pre-built, binary
- &release.type; distributions along this branch
- can be found at &release.url;.
+ The &release.type; distribution to which
+ these release notes apply represents the latest point along the
+ &release.branch; development branch since &release.branch; was
+ created. Information regarding pre-built, binary &release.type;
+ distributions along this branch can be found at &release.url;.
- The &release.type; distribution to which these release notes
- apply represents a point along the &release.branch; development
- branch between &release.prev; and the future &release.next;.
- Information regarding
- pre-built, binary &release.type; distributions along this branch
- can be found at &release.url;.
+ The &release.type; distribution to
+ which these release notes apply represents a point along the
+ &release.branch; development branch between &release.prev; and the
+ future &release.next;. Information regarding pre-built, binary
+ &release.type; distributions along this branch can be found at
+ &release.url;.
- This distribution of &os; &release.current; is a
- &release.type; distribution. It can be found at &release.url; or any of its mirrors. More
- information on obtaining this (or other) &release.type;
- distributions of &os; can be found in the Obtaining
- &os; appendix to the &os;
- Handbook.
+ This distribution of &os;
+ &release.current; is a &release.type; distribution. It can be
+ found at &release.url; or
+ any of its mirrors. More information on obtaining this (or other)
+ &release.type; distributions of &os; can be found in the Obtaining
+ &os; appendix to the &os; Handbook.All users are encouraged to consult the release errata before
installing &os;. The errata document is updated with
@@ -86,637 +75,199 @@
information on known bugs, security advisories, and corrections to
documentation. An up-to-date copy of the errata for &os;
&release.current; can be found on the &os; Web site.
-
What's New
- This section describes
- the most user-visible new or changed features in &os;
- since &release.prev;.
- In general, changes described here are unique to the &release.branch;
- branch unless specifically marked as &merged; features.
-
+ This section describes the most user-visible new or changed
+ features in &os; since &release.prev;. In general, changes
+ described here are unique to the &release.branch; branch unless
+ specifically marked as &merged; features.
- Typical release note items
- document recent security advisories issued after
- &release.prev;,
- new drivers or hardware support, new commands or options,
- major bug fixes, or contributed software upgrades. They may also
- list changes to major ports/packages or release engineering
- practices. Clearly the release notes cannot list every single
- change made to &os; between releases; this document focuses
- primarily on security advisories, user-visible changes, and major
- architectural improvements.
+ Typical release note items document recent security advisories
+ issued after &release.prev;, new drivers or hardware support, new
+ commands or options, major bug fixes, or contributed software
+ upgrades. They may also list changes to major ports/packages or
+ release engineering practices. Clearly the release notes cannot
+ list every single change made to &os; between releases; this
+ document focuses primarily on security advisories, user-visible
+ changes, and major architectural improvements.Security Advisories
-
+ No advisories.Kernel Changes
- The use of unmapped VMIO buffers eliminates the need to perform
- TLB shootdown for mapping on buffer creation and reuse, greatly reducing the
- amount of IPIs for shootdown on big-SMP machines and eliminating up to 25-30%
- of the system time on i/o intensive workloads.
+ Support for GPS ports has been added to
+ &man.uhso.4;.
- The maximum amount of memory the &os; kernel
- can address has been increased from 1TB to 4TB.
-
- A new &man.cpuset.2; API has been added
- for thread to CPU binding and CPU resource grouping and
- assignment. The &man.cpuset.1; userland utility has been added
- to allow manipulation of processor sets.
-
- The &man.ddb.4; kernel debugger now has an output capture
- facility. Input and output from &man.ddb.4; can now be captured
- to a memory buffer for later inspection using &man.sysctl.8; or
- a textdump. The new capture command controls
- this feature.
-
- The &man.ddb.4; debugger now supports a simple scripting
- facility, which supports a set of named scripts consisting of a
- set of &man.ddb.4; commands. These commands can be managed from
- within &man.ddb.4; or with the use of the new &man.ddb.8;
- utility. More details can be found in the &man.ddb.4; manual
- page.
-
- The kernel now supports a new textdump format of kernel
- dumps. A textdump provides higher-level information via
- mechanically generated/extracted debugging output, rather than a
- simple memory dump. This facility can be used to generate brief
- kernel bug reports that are rich in debugging information, but
- are not dependent on kernel symbol tables or precisely
- synchronized source code. More information can be found in the
- &man.textdump.4; manual page.
-
- Kernel support for M:N threading has been removed. While
- the KSE (Kernel Scheduled Entities) project was quite successful
- in bringing threading to FreeBSD, the M:N approach taken by the
- KSE library was never developed to its full potential.
- Backwards compatibility for applications using KSE threading
- will be provided via &man.libmap.conf.5; for dynamically linked
- binaries. The &os; Project greatly appreciates the work of
- &a.julian;, &a.deischen;, and &a.davidxu; on KSE support.
-
- The &os; kernel now exports information about certain kernel
- features via the kern.features sysctl tree.
- The &man.feature.present.3; library call provides a convenient
- interface for user applications to test the presence of
- features.
-
- The &os; kernel now has support for large
- memory page mappings (superpages).
-
- The ULE
- scheduler is now the default process scheduler
- in GENERIC kernels.
-
- Support was added for
- the new Intel on-CPU Bull Mountain random number
- generator, found on IvyBridge and supposedly later CPUs,
- accessible with RDRAND instruction.
+ The VT kernel
+ configuration file has been added, which enables the new
+ vt console driver.Virtualization support
- The BSD Hypervisor, &man.bhyve.8; is included
- with &os;. &man.bhyve.8; requires Intel CPUs with VT-x and Extended Page Table (EPT)
- support. These features are on all Nehalem models and beyond
- (e.g. Nehalem and newer), but not on the lower-end Atom CPUs.
-
- &man.virtio.4; support has been added. &man.virtio.4; is the
- name for the paravirtualization interface developed for the Linux KVM, but
- since adopted to other virtual machine hypervisors (with the notable exception of Xen).
- This work brings in a BSD-licensed clean-room implementation of the virtio kernel drivers
- for disk IO (&man.virtio_blk.4; and &man.virtio_scsi.4;), network IO (&man.vtnet.4;),
- memory ballooning (&man.virtio_balloon.4;), and PCI.
- Tested with on Qemu/KVM, VirtualBox, and &man.bhyve.4;.
-
- Paravirtualized drivers which
- support Microsoft Hyper-V have been imported and made
- part of the amd64 GENERIC kernel. For i386, these drivers are not part of
- GENERIC, so the following lines must be added to
- /boot/loader.conf to load these drivers:
- hv_ata_pci_disengage_load="YES"
-hv_netsvc_load="YES"
-hv_utils_load="YES"
-hv_vmbus_load="YES" Alternatively, the Hyper-V drivers can be added to the i386
- kernel by adding device hyperv to the kernel config, and then
- recompiling the kernel. Please refer to:
- FreeBSD and Microsoft Windows Server Hyper-V support
- for full instructions on how to set up Hyper-V support under FreeBSD.
- The &man.vmx.4; driver has been added.
- &man.vmx.4; is a VMware VMXNET3 ethernet driver ported from
- OpenBSD.
+ The &man.virtio_random.4; driver has
+ been added to harvest entropy from the host system.
- Xen PVHVM virtualization is now
- part of the GENERIC kernel.
+ Unmapped IO support has been added to
+ &man.virtio_scsi.4;.
+ Unmapped IO support has been added to
+ &man.virtio_blk.4;.
+
+ Support for Posted Interrupt
+ Processing is enabled if supported by the CPU. This
+ feature can be disabled by running sysctl
+ hw.vmm.vmx.use_apic_pir=0. Additionally, to
+ persist this setting across reboots, add
+ hw.vmm.vmx.use_apic_pir=0 to
+ /etc/sysctl.conf.
+
+ Support for the Virtual Interrupt
+ Delivery feature of &intel; VT-x is enabled if
+ supported by the CPU. This feature can be disabled by running
+ sysctl hw.vmm.vmx.use_apic_vid=0.
+ Additionally, to persist this setting across reboots, add
+ hw.vmm.vmx.use_apic_vid=0 to
+ /etc/sysctl.conf.ARM support
- Raspberry PI support has been added.
- Refer to these setup instructions
- and quick start
- guide.
-
- The default ABI on ARM is now the ARM EABI. This brings a number of
- improvements and allows future support for VFP and Thumb-2.
-
- ARM support has been greatly improved, including support
- for ARMv6 and ARMv7, SMP and thread-local storage (TLS).
- Additionally support for some newer SoC like the MV78x60 and OMAP4 was added.
- See this announcement
- for further details.
-
- Superpages support on ARM has been added. Superpages support
- provides improved performance and scalability by allowing TLB
- translations to dynamically cover large physical memory regions.
- All ARMv6 and ARMv7-based platforms can take advantage of this feature.
- See this page
- for further details.
-
+ The &man.nand.4; device is enabled for
+ ARM devices by default.Boot Loader Changes
- The BTX kernel used by the boot
- loader has been changed to invoke BIOS routines from real
- mode. This change makes it possible to boot &os; from USB
- devices.
-
- A new gptboot boot loader has
- been added to support booting from a GPT labeled disk. A
- new boot command has been added to
- &man.gpt.8;, which makes a GPT disk bootable by writing the
- required bits of the boot loader, creating a new boot
- partition if required.
-
+ Hardware Support
- The &man.cmx.4; driver, a driver for Omnikey CardMan 4040
- PCMCIA smartcard readers, has been added.
-
- The &man.syscons.4; driver now supports Colemak keyboard layout.
-
- The &man.uslcom.4; driver, a driver for Silicon
- Laboratories CP2101/CP2102-based USB serial adapters, has been
- imported from OpenBSD.
-
Multimedia Support
- Support for version 2.0 of the USB Audio reference design
- has been added. New devices should support higher bandwidth,
- increased sampling frequency and wider dynamic range.
-
+ Network Interface Support
- The &man.ale.4; driver has been added to provide support
- for Atheros AR8121/AR8113/AR8114 Gigabit/Fast Ethernet controllers.
+ Firmware for &intel;
+ Centrino™ Wireless-N 105 devices has been added
+ to the base system.
- The &man.em.4; driver has been split into two drivers
- with some common parts. The &man.em.4; driver will continue
- to support adapters up to the 82575, as well as new
- client/desktop adapters. A new &man.igb.4; driver
- will support new server adapters.
-
- The &man.jme.4; driver has been added to provide support
- for PCIe network adapters based on JMicron JMC250 Gigabit
- Ethernet and JMC260 Fast Ethernet controllers.
-
- The &man.malo.4; driver has been added to provide
- support for Marvell Libertas 88W8335 based PCI network
- adapters.
-
- The firmware for the &man.mxge.4; driver has been
- updated from 1.4.25 to 1.4.29.
-
- The &man.sf.4; driver has been overhauled to improve its
- performance and to add support for checksum offloading. It
- should also work on all architectures.
-
- The &man.re.4; driver has been overhauled to fix a
- number of issues. This driver now has Wake On LAN (WOL)
- support.
-
- The &man.vr.4; driver has been overhauled to fix a
- number of outstanding issues. It also now works on all
- architectures.
-
- The &man.wpi.4; driver has
- been updated to include a number of stability fixes.
-
- The &man.cxgbe.4; driver has been updated to support
- 40G/10G Ethernet NICs based on Chelsio's Terminator 5 (T5) ASIC.
-
- The iw_cxgbe driver has been added. This is an
- experimental iWARP/RDMA driver
- (kernel verbs only) for Chelsio's T4 and T5 based cards.
-
- The Open Fabrics Enterprise Distribution (OFED) and
- OFED Infiniband core has been
- updated to the same version as supplied by Linux version 3.7
-
- The Mellanox Infiniband driver has been updated to firmware
- version 2.30.3200 for ConnectX3 NICs. Support has been added for ConnectX3 VPI NICs, where
- each port can be used as Infiniband 56 GB/s or Ethernet 40 GB/s. Support has been added
- for dynamically loading kernel modules for Infiniband core (ibcore) and
- IP over Infiniband (ipoib).
-
- &man.netmap.4; has been added. &man.netmap.4; is a framework for
- high-performance direct-to-hardware packet IO, offering low latency and high PPS
- rates to userland applications while bypassing any kernel-side packet processing.
- With &man.netmap.4; it is trivially possible to fully saturate a 10 Gbps network interface with
- minimal packet sizes. For more information, see:
- Netmap Project.
+ Support for the &intel;
+ Centrino™ Wireless-N 135 chipset has been
+ added.
+ Support for Broadcom chipsets
+ BCM57764, BCM57767, BCM57782, BCM57786 and BCM57787 has
+ been added to &man.bge.4;.Network Protocols
- &man.carp.4; has been rewritten to make addresses
- more sane from the viewpoint of routing daemons such as
- quagga/zebra. It also brings support for a single redundant
- address on the subnet (carpdev), switching state with
- &man.ifconfig.8;, better locking and using modern kernel
- interfaces to allocate multicast memberships.
- Configuration of the CARP protocol via &man.ifconfig.8; has changed, as well as format
- of CARP events submitted to &man.devd.8; has changed. See &man.carp.4;
- for more information. The arpbalance feature of &man.carp.4; is currently
- not supported anymore.
-
- The &man.pf.4; firewall now supports fine-grain locking
- and better utilization on multi-cpu machines resulting in
- significant improvements in performance.
-
- Support for up to 65536 routing tables has been
- introduced.
-
- Support for setting/matching differentiated services
- codepoints (DSCP) in IP header has been added to
- &man.ipfw.8;.
-
+ Disks and Storage
- The &man.aac.4; driver now supports volumes larger than
- 2TB in size.
-
- The &man.ata.4; driver now supports a spindown command for
- disks; after a configurable amount of time, if no requests
- have been received for a disk, the disk will be spun down
- until the next request. The &man.atacontrol.8; utility now
- supports a spindown command to configure
- this feature.
-
- The &man.hptrr.4; driver has been updated to version 1.2
- from Highpoint.
-
- &man.nvme.4; has been added and provides NVM Express support.
- NVM Express is an optimized register interface, command set and feature set of
- PCI Express (PCIe)-based Solid-State Drives (SSDs). For more information,
- see nvmexpress.org.
-
+ File Systems
- A new kernel-based iSCSI target and initiator has been
- added
-
- UFS filesystems can now be enlarged with &man.growfs.8; while
- mounted read-write. This is especially useful for virtual
- machines, allowing the addition of more harddrive space without
- interruption of service.
-
- A state of the art FUSE implementation is now part of the
- base system. It allows the use of nearly all fusefs file
- systems
+ ZFS
- &man.bsdinstall.8; now supports installing
- ZFS on the root file system. It includes a single configuration menu
- that allows you to select all of the required details, including
- which drives to use, what ZFS RAID level to use (taking into consideration
- the selected number of drives), GPT or MBR, GELI encryption, forcing 4K sectors,
- pool name, etc.
-
- TRIM support has been added for
- ZFS.
-
- Support for the high performance LZ4 compression algorithm
- has been added to ZFS. LZ4 is usually faster and can achieve a
- higher compression ratio than LZJB, the default compression
- algorithm
-
- Support for L2ARC compression has been added to ZFS.
-
- The zio nop-write improvement from Illumos
- was imported into &os;. To reduce I/O, nop-write skips overwriting
- data if the checksum (cryptographically secure) of new data
- matches the checksum of existing data. It also saves space if
- snapshots are in use. This improvement only works only on
- datasets with enabled compression, disabled deduplication and
- sha256 checksums.
-
- ZFS will now compare the checksums of incoming writes to
- the checksum of the existing on-disk data and avoid issuing any
- write I/O for data that has not changed. This will reduce I/O
- as well as space usage because if the old block is referenced
- by a snapshot, both copies of the block are kept even though
- both contain the same data.
-
+
-
-
Userland Changes
- On platforms where &man.clang.1; is the default
- system compiler, (such as i386, amd64, arm) GCC and GNU libstdc++ are no
- longer built by default. &man.clang.1; and libc++ from LLVM are used on
- these platforms by instead. GCC 4.2.1 and libstdc++ are still built
- and used by default on pc98 and all other platforms where &man.clang.1;
- is not the default system compiler.
-
+ Support for displaying VPD for PCI devices
+ via &man.pciconf.8; has been added.
- &man.clang.1; and llvm have been updated to
- version 3.3 release. Please refer to
-
- Clang 3.3 Release Notes.
+ A new flag, onifconsole has
+ been added to /etc/ttys. This allows the
+ system to provide a login prompt via serial console if the
+ device is an active kernel console, otherwise it is equivalent
+ to off.
- BIND has been replaced by &man.unbound.8; for
- local dns resolution in the base system. With this change, nslookup
- and dig are no longer a part of the base system. Users should
- instead use &man.host.1; and &man.drill.1; Alternatively,
- nslookup and dig can be obtained by installing the
- dns/bind-tools port.
+ Allow &man.pciconf.8; to identify PCI
+ devices that are attached to a driver to be identified by their
+ device name instead of just the selector. Additionally, an
+ optional device argument to the -l flag
+ to restrict the output to only listing details about a single
+ device.
- sysinstall has been removed from the base system.
- Auxiliary libraries and tools used by sysinstall such as libdisk, libftpio,
- and sade have also been removed. sysinstall has been replaced by
- &man.bsdinstall.8; and &man.bsdconfig.8;.
+ When unable to load a kernel module with
+ &man.kldload.8;, a message informing to view output of
+ &man.dmesg.8; is now printed, opposed to the previous output
+ Exec format error..
- &man.freebsd-version.1; has been added. This tool
- makes a best effort to determine the version and patch level of
- the installed kernel and userland.
-
- GNU patch has been removed from the base system, and replaced
- by a BSD-licensed &man.patch.1; program.
-
- GNU sort has been removed from the base system, and replaced
- by a BSD-licensed &man.sort.1; program.
-
- Berkely yacc (byacc) has been imported
- from invisible island.
- This brings bison compatibilities to &man.yacc.1; while preserving full
- backwards compatibility with previous version of &man.yacc.1;.
-
- &man.lex.1; has been replaced by flex 2.5.37
-
- &man.make.1; has been replaced with the
- "Portable" BSD make tool (bmake) from NetBSD.
-
- The &man.adduser.8; utility now supports
- a option to set the mode of a new user's
- home directory.
-
- BSD-licensed versions of &man.ar.1; and &man.ranlib.1;,
- based on libarchive, have replaced the GNU
- Binutils versions of these utilities.
-
- BSD-licensed versions of &man.bc.1; and &man.dc.1; have
- replaced their GNU counterparts.
-
- &man.chflags.1; now supports a flag for
- verbose output and a flag to ignore errors
- with the same semantics as (for example)
- &man.chmod.1;.
-
- For compatibility with other implementations, &man.cp.1; now
- supports a flag, which is equivalent to
- specifying the flags.
-
- BSD-licensed version of &man.cpio.1; based on
- libarchive, has replaced the GNU cpio.
- Note that the GNU cpio is still installed as
- gcpio.
-
- The &man.env.1; program now supports
- which will completely unset the given variable
- name by removing it from the environment,
- instead of just setting it to a null value.
-
- The &man.fdopendir.3; library function has been added.
-
- The &man.fetch.3; library now support HTTP 1.1
- If-Modified-Since behavior. The &man.fetch.1; program now
- supports
- which will only download the specified HTTP URL if the content
- is newer than filename.
-
- &man.find.1; has been enhanced by the addition of a number
- of primaries that were present in GNU find but not &os;
- &man.find.1;.
-
- &man.kgdb.1; now supports a new add-kld
- command to make it easier to debug crash dumps with kernel
- modules.
-
- The &man.ls.1; program now supports a
- option to specify a date format string to be used with the long
- format () output.
-
- &man.nc.1; now supports a switch to
- disable the use of TCP options.
-
- &man.nc.1;'s switch has been deprecated.
- It will be removed in a future release.
-
- The &man.ping6.8; utility now returns 2
- when the packet transmission was successful but no responses
- were received (this is the same behavior as &man.ping.8;).
- It returned a non-zero value before this change.
-
- The &man.procstat.1; utility has been added to display
- detailed information about processes.
-
- The &man.realpath.1; utility now supports
- a flag to suppress warnings; it now also
- accepts multiple paths on its command line.
-
- &man.sh.1; has many bug fixes, some new features, and will now
- refuse to parse some invalid scripts. Additionally, it now
- has filename completion and defaults to the "emacs" editing
- mode.
-
- The &man.split.1; utility now supports a
- flag to split a file into a certain number of chunks.
-
- The &man.tar.1; utility now supports a
- flag to enable &man.compress.1;-style
- compression/decompression.
-
- The &man.tar.1; utility now supports a
- flag to ignore user/group names
- on create and extract.
-
- The &man.tar.1; utility now supports an
- flag to sparsify files on extraction.
-
- The &man.tar.1; utility now supports a
- flag to substitute filenames based on the specified regular
- expression.
-
- The &man.tcgetsid.3; library function has been added to
- return the process group ID for the session leader for the
- controlling terminal. It is defined in IEEE Std 1003.1-2001
- (POSIX).
-
- &man.top.1; now supports a flag to
- provide per-CPU usage statistics.
-
- &man.zdump.8; is now working properly on 64 bit architectures.
-
-
- &man.traceroute.8; now has the ability to print the AS
- number for each hop with the new switch; a
- new option allows selecting a particular
- WHOIS server.
-
- &man.traceroute6.8; now supports a flag
- to send probe packets with no upper-layer protocol, rather than
- the usual UDP probe packets.
+ The &man.casperd.8; daemon has been added,
+ which provides access to functionality that is not available in
+ the capability mode sandbox./etc/rc.d Scripts
-
-
+ Contributed Software
- &man.jemalloc.3; has been updated to 3.4.0.
- See this link.
- for more details.
+ &man.byacc.1; has been updated to version
+ 20140101.
- AMD has been updated from 6.0.10
- to 6.1.5.
-
- awk has been updated from 1 May
- 2007 release to the 23 October 2007 release.
-
- bzip2 has been updated from 1.0.4
- to 1.0.5.
-
- CVS has been removed from the
- base system, but is still available from ports
-
- Subversion has been imported into the base system and
- is installed as svnlite. svnlite
- should only be used for checking out &os; source and committing, and does not
- replace the full Subversion port.
-
- file has been updated to 5.11.
-
- hostapd has been
- updated from 0.5.8 to 0.5.10.
-
- IPFilter has been updated to 5.1.2.
-
- less has been updated to
- v458.
-
- ncurses has been updated from
- to 5.7-20081102.
-
- OpenSSH has been updated
- to 6.4.
-
- OpenPAM has been updated to
- the Micrampelis release.
-
- sendmail has been updated from
- 8.14.1 to 8.14.7.
-
- The timezone database has been updated from
- the tzdata2008h release to
- the tzdata2009m release.
-
- The stdtime part of libc, &man.zdump.8; and &man.zic.8;
- have been updated from the tzcode2004a
- release to the tzcode2009h release.
- If you have upgraded from source or via the &man.freebsd-update.8;,
- then please run &man.tzsetup.8; to install a new /etc/localtime.
-
-
- WPA Supplicant has been
- updated to 2.0.
-
- xz has been updated
- from snapshot as of 12 April 2010 to 5.0.0.
-
- &man.nvi.1; has been updated to 2.1.2.
-
- &man.nvi.1; supports wide character locales.
+ Timezone data files have been updated to
+ version 2013i.
+ &man.lldb.1; has been updated to upstream
+ snapshot version r196259.Ports/Packages Collection Infrastructure
- The pkg_add, pkg_create, pkg_delete, pkg_info,
- pkg_updating, and pkg_version utilities have been removed.
- &man.pkg.7; must now be used to install binary packages. &man.pkg.7;
- is the next generation &os; package manager, also referred to as "pkgng".
-
+ Release Engineering and Integration
- The supported version of
- the GNOME desktop environment
- (x11/gnome2) has been
- updated from 2.20.1 to 2.22.
-
+ Documentation
-
-
+
@@ -737,9 +288,8 @@ hv_vmbus_load="YES" Alternatively, the Hyper-V drivers can be
/usr/src/UPDATING.
- Upgrading &os; should only be attempted after
- backing up all data and configuration
- files.
+ Upgrading &os; should only be attempted after backing up
+ all data and configuration files.
diff --git a/share/misc/bsd-family-tree b/share/misc/bsd-family-tree
index b02351e0cbff..10ca66b88617 100644
--- a/share/misc/bsd-family-tree
+++ b/share/misc/bsd-family-tree
@@ -289,9 +289,16 @@ FreeBSD 5.2 | | | |
| | | | |
| | | | |
| | | | |
-FreeBSD 10 -current | NetBSD -current OpenBSD -current |
+ | | NetBSD -current OpenBSD -current |
| | | | |
- v v v v v
+ | v v v v
+ |
+ *--FreeBSD
+ | 10.0
+ |
+ |
+FreeBSD 11 -current
+ v
Time
----------------
@@ -605,6 +612,7 @@ NetBSD 6.1.2 2013-09-30 [NBD]
Mac OS X 10.9 2013-10-22 [APL]
OpenBSD 5.4 2013-11-01 [OBD]
DragonFly 3.6.0 2013-11-25 [DFB]
+FreeBSD 10.0 2014-01-20 [FBD]
Bibliography
------------------------
diff --git a/share/misc/committers-doc.dot b/share/misc/committers-doc.dot
index e408eb12ef4e..45cf447e4191 100644
--- a/share/misc/committers-doc.dot
+++ b/share/misc/committers-doc.dot
@@ -68,6 +68,7 @@ gavin [label="Gavin Atkinson\ngavin@FreeBSD.org\n2011/07/18"]
gjb [label="Glen Barber\ngjb@FreeBSD.org\n2010/09/01"]
hrs [label="Hiroki Sato\nhrs@FreeBSD.org\n2000/07/06"]
issyl0 [label="Isabell Long\nissyl0@FreeBSD.org\n2012/04/25"]
+jgh [label="Jason Helfman\njgh@FreeBSD.org\n2014/01/20"]
jkois [label="Johann Kois\njkois@FreeBSD.org\n2004/11/11"]
joel [label="Joel Dahl\njoel@FreeBSD.org\n2005/04/05"]
keramida [label="Giorgos Keramidas\nkeramida@FreeBSD.org\n2001/10/12"]
@@ -97,6 +98,7 @@ bcr -> wblock
bcr -> eadler
bcr -> dru
bcr -> crees
+bcr -> jgh
blackend -> ale
@@ -163,10 +165,13 @@ nik -> keramida
remko -> jkois
remko -> rene
+remko -> jgh
simon -> josef
simon -> remko
trhodes -> danger
trhodes -> jcamou
+
+wblock -> jgh
}
diff --git a/share/misc/committers-ports.dot b/share/misc/committers-ports.dot
index 5fedef1f3c53..e441eb8f005c 100644
--- a/share/misc/committers-ports.dot
+++ b/share/misc/committers-ports.dot
@@ -105,6 +105,7 @@ gerald [label="Gerald Pfeifer\ngerald@FreeBSD.org\n2002/04/03"]
gjb [label="Glen Barber\ngjb@FreeBSD.org\n2012/06/19"]
glarkin [label="Greg Larkin\nglarkin@FreeBSD.org\n2008/07/17"]
glewis [label="Greg Lewis\nglewis@FreeBSD.org\n2002/04/08"]
+grembo [label="Michael Gmelin\ngrembo@FreeBSD.org\n2014/01/21"]
gnn [label="George Neville-Neil\ngnn@FreeBSD.org\n2013/09/04"]
hq [label="Herve Quiroz\nhq@FreeBSD.org\n2004/08/05"]
ijliao [label="Ying-Chieh Liao\nijliao@FreeBSD.org\n2001/01/20"]
diff --git a/sys/amd64/vmm/io/iommu.c b/sys/amd64/vmm/io/iommu.c
index c8447cca934b..c4912324c492 100644
--- a/sys/amd64/vmm/io/iommu.c
+++ b/sys/amd64/vmm/io/iommu.c
@@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$");
#include
#include
#include
+#include
#include
#include
@@ -43,7 +44,13 @@ __FBSDID("$FreeBSD$");
#include "vmm_mem.h"
#include "iommu.h"
-static boolean_t iommu_avail;
+SYSCTL_DECL(_hw_vmm);
+SYSCTL_NODE(_hw_vmm, OID_AUTO, iommu, CTLFLAG_RW, 0, "bhyve iommu parameters");
+
+static int iommu_avail;
+SYSCTL_INT(_hw_vmm_iommu, OID_AUTO, initialized, CTLFLAG_RD, &iommu_avail,
+ 0, "bhyve iommu initialized?");
+
static struct iommu_ops *ops;
static void *host_domain;
@@ -160,7 +167,7 @@ iommu_init(void)
if (error)
return;
- iommu_avail = TRUE;
+ iommu_avail = 1;
/*
* Create a domain for the devices owned by the host
diff --git a/sys/amd64/vmm/io/ppt.c b/sys/amd64/vmm/io/ppt.c
index 32d59a0fbb50..a7ea091a1ccf 100644
--- a/sys/amd64/vmm/io/ppt.c
+++ b/sys/amd64/vmm/io/ppt.c
@@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$");
#include
#include
#include
+#include
#include
#include
@@ -100,7 +101,12 @@ static struct pptdev {
} msix;
} pptdevs[64];
+SYSCTL_DECL(_hw_vmm);
+SYSCTL_NODE(_hw_vmm, OID_AUTO, ppt, CTLFLAG_RW, 0, "bhyve passthru devices");
+
static int num_pptdevs;
+SYSCTL_INT(_hw_vmm_ppt, OID_AUTO, devices, CTLFLAG_RD, &num_pptdevs, 0,
+ "number of pci passthru devices");
static int
ppt_probe(device_t dev)
@@ -282,7 +288,14 @@ ppt_teardown_msix(struct pptdev *ppt)
}
int
-ppt_num_devices(struct vm *vm)
+ppt_avail_devices(void)
+{
+
+ return (num_pptdevs);
+}
+
+int
+ppt_assigned_devices(struct vm *vm)
{
int i, num;
diff --git a/sys/amd64/vmm/io/ppt.h b/sys/amd64/vmm/io/ppt.h
index 45ba323aa9aa..80788960950f 100644
--- a/sys/amd64/vmm/io/ppt.h
+++ b/sys/amd64/vmm/io/ppt.h
@@ -36,9 +36,15 @@ int ppt_setup_msi(struct vm *vm, int vcpu, int bus, int slot, int func,
uint64_t addr, uint64_t msg, int numvec);
int ppt_setup_msix(struct vm *vm, int vcpu, int bus, int slot, int func,
int idx, uint64_t addr, uint64_t msg, uint32_t vector_control);
-int ppt_num_devices(struct vm *vm);
+int ppt_assigned_devices(struct vm *vm);
boolean_t ppt_is_mmio(struct vm *vm, vm_paddr_t gpa);
+/*
+ * Returns the number of devices sequestered by the ppt driver for assignment
+ * to virtual machines.
+ */
+int ppt_avail_devices(void);
+
/*
* The following functions should never be called directly.
* Use 'vm_assign_pptdev()' and 'vm_unassign_pptdev()' instead.
diff --git a/sys/amd64/vmm/vmm.c b/sys/amd64/vmm/vmm.c
index e311ba3d43b5..95a1e1c24dfb 100644
--- a/sys/amd64/vmm/vmm.c
+++ b/sys/amd64/vmm/vmm.c
@@ -266,7 +266,8 @@ vmm_handler(module_t mod, int what, void *arg)
switch (what) {
case MOD_LOAD:
vmmdev_init();
- iommu_init();
+ if (ppt_avail_devices() > 0)
+ iommu_init();
error = vmm_init();
if (error == 0)
vmm_initialized = 1;
@@ -604,7 +605,7 @@ vm_unassign_pptdev(struct vm *vm, int bus, int slot, int func)
if (error)
return (error);
- if (ppt_num_devices(vm) == 0) {
+ if (ppt_assigned_devices(vm) == 0) {
vm_iommu_unmap(vm);
vm_gpa_unwire(vm);
}
@@ -624,7 +625,7 @@ vm_assign_pptdev(struct vm *vm, int bus, int slot, int func)
*
* We need to do this before the first pci passthru device is attached.
*/
- if (ppt_num_devices(vm) == 0) {
+ if (ppt_assigned_devices(vm) == 0) {
KASSERT(vm->iommu == NULL,
("vm_assign_pptdev: iommu must be NULL"));
maxaddr = vmm_mem_maxaddr();
diff --git a/sys/arm/conf/NOTES b/sys/arm/conf/NOTES
index fa36275fd922..50ea59e75327 100644
--- a/sys/arm/conf/NOTES
+++ b/sys/arm/conf/NOTES
@@ -60,6 +60,7 @@ device at91_board_sam9g20ek
device at91_board_sam9x25ek
device at91_board_tsc4370
device at91rm9200
+device nand
device board_ln2410sbc
nooptions SMP
diff --git a/sys/boot/i386/libi386/comconsole.c b/sys/boot/i386/libi386/comconsole.c
index e2710c163444..76a62401a9d2 100644
--- a/sys/boot/i386/libi386/comconsole.c
+++ b/sys/boot/i386/libi386/comconsole.c
@@ -181,8 +181,7 @@ comc_speed_set(struct env_var *ev, int flags, const void *value)
return (CMD_ERROR);
}
- if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) != 0 &&
- comc_curspeed != speed)
+ if (comc_curspeed != speed)
comc_setup(speed, comc_port);
env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL);
@@ -200,8 +199,7 @@ comc_port_set(struct env_var *ev, int flags, const void *value)
return (CMD_ERROR);
}
- if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) != 0 &&
- comc_port != port)
+ if (comc_port != port)
comc_setup(comc_curspeed, port);
env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL);
@@ -309,6 +307,8 @@ comc_setup(int speed, int port)
unsetenv("hw.uart.console");
comc_curspeed = speed;
comc_port = port;
+ if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) == 0)
+ return;
outb(comc_port + com_cfcr, CFCR_DLAB | COMC_FMT);
outb(comc_port + com_dlbl, COMC_BPS(speed) & 0xff);
diff --git a/sys/boot/pc98/libpc98/comconsole.c b/sys/boot/pc98/libpc98/comconsole.c
index e2128a2abc6f..1bf2d6a2ccb7 100644
--- a/sys/boot/pc98/libpc98/comconsole.c
+++ b/sys/boot/pc98/libpc98/comconsole.c
@@ -181,8 +181,7 @@ comc_speed_set(struct env_var *ev, int flags, const void *value)
return (CMD_ERROR);
}
- if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) != 0 &&
- comc_curspeed != speed)
+ if (comc_curspeed != speed)
comc_setup(speed, comc_port);
env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL);
@@ -200,8 +199,7 @@ comc_port_set(struct env_var *ev, int flags, const void *value)
return (CMD_ERROR);
}
- if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) != 0 &&
- comc_port != port)
+ if (comc_port != port)
comc_setup(comc_curspeed, port);
env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL);
@@ -309,6 +307,8 @@ comc_setup(int speed, int port)
unsetenv("hw.uart.console");
comc_curspeed = speed;
comc_port = port;
+ if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) == 0)
+ return;
outb(comc_port + com_cfcr, CFCR_DLAB | COMC_FMT);
outb(comc_port + com_dlbl, COMC_BPS(speed) & 0xff);
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 4d8837ff92cf..84aab9dad86f 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -985,7 +985,7 @@ pci_read_vpd(device_t pcib, pcicfgregs *cfg)
state = -2;
break;
}
- dflen = byte2;
+ cfg->vpd.vpd_ros[off].len = dflen = byte2;
if (dflen == 0 &&
strncmp(cfg->vpd.vpd_ros[off].keyword, "RV",
2) == 0) {
@@ -1179,6 +1179,17 @@ pci_get_vpd_readonly_method(device_t dev, device_t child, const char *kw,
return (ENXIO);
}
+struct pcicfg_vpd *
+pci_fetch_vpd_list(device_t dev)
+{
+ struct pci_devinfo *dinfo = device_get_ivars(dev);
+ pcicfgregs *cfg = &dinfo->cfg;
+
+ if (!cfg->vpd.vpd_cached && cfg->vpd.vpd_reg != 0)
+ pci_read_vpd(device_get_parent(device_get_parent(dev)), cfg);
+ return (&cfg->vpd);
+}
+
/*
* Find the requested HyperTransport capability and return the offset
* in configuration space via the pointer provided. The function
diff --git a/sys/dev/pci/pci_user.c b/sys/dev/pci/pci_user.c
index a5b58c3853b4..38290c13a81b 100644
--- a/sys/dev/pci/pci_user.c
+++ b/sys/dev/pci/pci_user.c
@@ -406,6 +406,89 @@ pci_conf_match_old32(struct pci_match_conf_old32 *matches, int num_matches,
#endif /* COMPAT_FREEBSD32 */
#endif /* PRE7_COMPAT */
+static int
+pci_list_vpd(device_t dev, struct pci_list_vpd_io *lvio)
+{
+ struct pci_vpd_element vpd_element, *vpd_user;
+ struct pcicfg_vpd *vpd;
+ size_t len;
+ int error, i;
+
+ vpd = pci_fetch_vpd_list(dev);
+ if (vpd->vpd_reg == 0 || vpd->vpd_ident == NULL)
+ return (ENXIO);
+
+ /*
+ * Calculate the amount of space needed in the data buffer. An
+ * identifier element is always present followed by the read-only
+ * and read-write keywords.
+ */
+ len = sizeof(struct pci_vpd_element) + strlen(vpd->vpd_ident);
+ for (i = 0; i < vpd->vpd_rocnt; i++)
+ len += sizeof(struct pci_vpd_element) + vpd->vpd_ros[i].len;
+ for (i = 0; i < vpd->vpd_wcnt; i++)
+ len += sizeof(struct pci_vpd_element) + vpd->vpd_w[i].len;
+
+ if (lvio->plvi_len == 0) {
+ lvio->plvi_len = len;
+ return (0);
+ }
+ if (lvio->plvi_len < len) {
+ lvio->plvi_len = len;
+ return (ENOMEM);
+ }
+
+ /*
+ * Copyout the identifier string followed by each keyword and
+ * value.
+ */
+ vpd_user = lvio->plvi_data;
+ vpd_element.pve_keyword[0] = '\0';
+ vpd_element.pve_keyword[1] = '\0';
+ vpd_element.pve_flags = PVE_FLAG_IDENT;
+ vpd_element.pve_datalen = strlen(vpd->vpd_ident);
+ error = copyout(&vpd_element, vpd_user, sizeof(vpd_element));
+ if (error)
+ return (error);
+ error = copyout(vpd->vpd_ident, vpd_user->pve_data,
+ strlen(vpd->vpd_ident));
+ if (error)
+ return (error);
+ vpd_user = PVE_NEXT(vpd_user);
+ vpd_element.pve_flags = 0;
+ for (i = 0; i < vpd->vpd_rocnt; i++) {
+ vpd_element.pve_keyword[0] = vpd->vpd_ros[i].keyword[0];
+ vpd_element.pve_keyword[1] = vpd->vpd_ros[i].keyword[1];
+ vpd_element.pve_datalen = vpd->vpd_ros[i].len;
+ error = copyout(&vpd_element, vpd_user, sizeof(vpd_element));
+ if (error)
+ return (error);
+ error = copyout(vpd->vpd_ros[i].value, vpd_user->pve_data,
+ vpd->vpd_ros[i].len);
+ if (error)
+ return (error);
+ vpd_user = PVE_NEXT(vpd_user);
+ }
+ vpd_element.pve_flags = PVE_FLAG_RW;
+ for (i = 0; i < vpd->vpd_wcnt; i++) {
+ vpd_element.pve_keyword[0] = vpd->vpd_w[i].keyword[0];
+ vpd_element.pve_keyword[1] = vpd->vpd_w[i].keyword[1];
+ vpd_element.pve_datalen = vpd->vpd_w[i].len;
+ error = copyout(&vpd_element, vpd_user, sizeof(vpd_element));
+ if (error)
+ return (error);
+ error = copyout(vpd->vpd_w[i].value, vpd_user->pve_data,
+ vpd->vpd_w[i].len);
+ if (error)
+ return (error);
+ vpd_user = PVE_NEXT(vpd_user);
+ }
+ KASSERT((char *)vpd_user - (char *)lvio->plvi_data == len,
+ ("length mismatch"));
+ lvio->plvi_len = len;
+ return (0);
+}
+
static int
pci_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td)
{
@@ -417,6 +500,7 @@ pci_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *t
struct pci_devinfo *dinfo;
struct pci_io *io;
struct pci_bar_io *bio;
+ struct pci_list_vpd_io *lvio;
struct pci_match_conf *pattern_buf;
struct pci_map *pm;
size_t confsz, iolen, pbufsz;
@@ -433,19 +517,29 @@ pci_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *t
struct pci_match_conf_old *pattern_buf_old = NULL;
io_old = NULL;
-
- if (!(flag & FWRITE) && cmd != PCIOCGETBAR &&
- cmd != PCIOCGETCONF && cmd != PCIOCGETCONF_OLD)
- return EPERM;
-#else
- if (!(flag & FWRITE) && cmd != PCIOCGETBAR && cmd != PCIOCGETCONF)
- return EPERM;
#endif
- switch(cmd) {
+ if (!(flag & FWRITE)) {
+ switch (cmd) {
#ifdef PRE7_COMPAT
#ifdef COMPAT_FREEBSD32
- case PCIOCGETCONF_OLD32:
+ case PCIOCGETCONF_OLD32:
+#endif
+ case PCIOCGETCONF_OLD:
+#endif
+ case PCIOCGETCONF:
+ case PCIOCGETBAR:
+ case PCIOCLISTVPD:
+ break;
+ default:
+ return (EPERM);
+ }
+ }
+
+ switch (cmd) {
+#ifdef PRE7_COMPAT
+#ifdef COMPAT_FREEBSD32
+ case PCIOCGETCONF_OLD32:
cio32 = (struct pci_conf_io32 *)data;
cio = malloc(sizeof(struct pci_conf_io), M_TEMP, M_WAITOK);
cio->pat_buf_len = cio32->pat_buf_len;
@@ -466,7 +560,7 @@ pci_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *t
cio = (struct pci_conf_io *)data;
}
- switch(cmd) {
+ switch (cmd) {
#ifdef PRE7_COMPAT
#ifdef COMPAT_FREEBSD32
case PCIOCGETCONF_OLD32:
@@ -912,6 +1006,22 @@ pci_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *t
else
error = ENODEV;
break;
+ case PCIOCLISTVPD:
+ lvio = (struct pci_list_vpd_io *)data;
+
+ /*
+ * Assume that the user-level bus number is
+ * in fact the physical PCI bus number.
+ */
+ pcidev = pci_find_dbsf(lvio->plvi_sel.pc_domain,
+ lvio->plvi_sel.pc_bus, lvio->plvi_sel.pc_dev,
+ lvio->plvi_sel.pc_func);
+ if (pcidev == NULL) {
+ error = ENODEV;
+ break;
+ }
+ error = pci_list_vpd(pcidev, lvio);
+ break;
default:
error = ENOTTY;
break;
diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h
index 8f93f96df4af..06e577124478 100644
--- a/sys/dev/pci/pcivar.h
+++ b/sys/dev/pci/pcivar.h
@@ -57,6 +57,7 @@ struct pci_map {
struct vpd_readonly {
char keyword[2];
char *value;
+ int len;
};
struct vpd_write {
@@ -525,6 +526,7 @@ extern uint32_t pci_generation;
struct pci_map *pci_find_bar(device_t dev, int reg);
int pci_bar_enabled(device_t dev, struct pci_map *pm);
+struct pcicfg_vpd *pci_fetch_vpd_list(device_t dev);
#define VGA_PCI_BIOS_SHADOW_ADDR 0xC0000
#define VGA_PCI_BIOS_SHADOW_SIZE 131072
diff --git a/sys/dev/vt/hw/fb/vt_fb.c b/sys/dev/vt/hw/fb/vt_fb.c
index 261d72b05076..2f0ffcb5727b 100644
--- a/sys/dev/vt/hw/fb/vt_fb.c
+++ b/sys/dev/vt/hw/fb/vt_fb.c
@@ -69,8 +69,9 @@ vt_fb_ioctl(struct vt_device *vd, u_long cmd, caddr_t data, struct thread *td)
return (info->fb_ioctl(info->fb_cdev, cmd, data, 0, td));
}
-static int vt_fb_mmap(struct vt_device *vd, vm_ooffset_t offset,
- vm_paddr_t *paddr, int prot, vm_memattr_t *memattr)
+static int
+vt_fb_mmap(struct vt_device *vd, vm_ooffset_t offset, vm_paddr_t *paddr,
+ int prot, vm_memattr_t *memattr)
{
struct fb_info *info;
diff --git a/sys/fs/ext2fs/ext2_bmap.c b/sys/fs/ext2fs/ext2_bmap.c
index 29cd7af64ea2..ca679c5a9baf 100644
--- a/sys/fs/ext2fs/ext2_bmap.c
+++ b/sys/fs/ext2fs/ext2_bmap.c
@@ -74,7 +74,7 @@ ext2_bmap(struct vop_bmap_args *ap)
if (ap->a_bnp == NULL)
return (0);
- if (VTOI(ap->a_vp)->i_flags & EXT4_EXTENTS)
+ if (VTOI(ap->a_vp)->i_flags & E4_EXTENTS)
error = ext4_bmapext(ap->a_vp, ap->a_bn, &blkno,
ap->a_runp, ap->a_runb);
else
diff --git a/sys/fs/ext2fs/ext2_dinode.h b/sys/fs/ext2fs/ext2_dinode.h
index 41b0236e732a..2f2a963f153d 100644
--- a/sys/fs/ext2fs/ext2_dinode.h
+++ b/sys/fs/ext2fs/ext2_dinode.h
@@ -50,22 +50,24 @@
/*
* Inode flags
- * The current implementation uses only EXT2_IMMUTABLE and EXT2_APPEND flags
+ * The system supports EXT2_IMMUTABLE, EXT2_APPEND and EXT2_NODUMP flags.
+ * The current implementation also uses EXT4_INDEX, EXT4_EXTENTS and
+ * EXT4_HUGE_FILE with some restrictions, imposed the lack of write
+ * support.
*/
#define EXT2_SECRM 0x00000001 /* Secure deletion */
#define EXT2_UNRM 0x00000002 /* Undelete */
#define EXT2_COMPR 0x00000004 /* Compress file */
#define EXT2_SYNC 0x00000008 /* Synchronous updates */
#define EXT2_IMMUTABLE 0x00000010 /* Immutable file */
-#define EXT2_APPEND 0x00000020 /* writes to file may only append */
-#define EXT2_NODUMP 0x00000040 /* do not dump file */
-#define EXT2_NOATIME 0x00000080 /* do not update atime */
-
-#define EXT4_INDEX 0x00001000 /* hash-indexed directory */
+#define EXT2_APPEND 0x00000020 /* Writes to file may only append */
+#define EXT2_NODUMP 0x00000040 /* Do not dump file */
+#define EXT2_NOATIME 0x00000080 /* Do not update atime */
+#define EXT4_INDEX 0x00001000 /* Hash-indexed directory */
#define EXT4_IMAGIC 0x00002000 /* AFS directory */
-#define EXT4_JOURNAL_DATA 0x00004000 /* file data should be journaled */
-#define EXT4_NOTAIL 0x00008000 /* file tail should not be merged */
-#define EXT4_DIRSYNC 0x00010000 /* dirsync behaviour */
+#define EXT4_JOURNAL_DATA 0x00004000 /* File data should be journaled */
+#define EXT4_NOTAIL 0x00008000 /* File tail should not be merged */
+#define EXT4_DIRSYNC 0x00010000 /* Dirsync behaviour */
#define EXT4_TOPDIR 0x00020000 /* Top of directory hierarchies*/
#define EXT4_HUGE_FILE 0x00040000 /* Set to each huge file */
#define EXT4_EXTENTS 0x00080000 /* Inode uses extents */
diff --git a/sys/fs/ext2fs/ext2_htree.c b/sys/fs/ext2fs/ext2_htree.c
index ff1e1a5ef61e..7eeab12d4e93 100644
--- a/sys/fs/ext2fs/ext2_htree.c
+++ b/sys/fs/ext2fs/ext2_htree.c
@@ -91,7 +91,7 @@ ext2_htree_has_idx(struct inode *ip)
{
#ifdef EXT2FS_HTREE
if (EXT2_HAS_COMPAT_FEATURE(ip->i_e2fs, EXT2F_COMPAT_DIRHASHINDEX) &&
- ip->i_flags & EXT4_INDEX)
+ ip->i_flags & E4_INDEX)
return (1);
else
#endif
@@ -656,7 +656,7 @@ ext2_htree_create_index(struct vnode *vp, struct componentname *cnp,
((char *)ep + ep->e2d_reclen);
ep->e2d_reclen = buf1 + blksize - (char *)ep;
- dp->i_flags |= EXT4_INDEX;
+ dp->i_flags |= E4_INDEX;
/*
* Initialize index root.
diff --git a/sys/fs/ext2fs/ext2_inode_cnv.c b/sys/fs/ext2fs/ext2_inode_cnv.c
index 67712d070cf7..2205e3ba6ed4 100644
--- a/sys/fs/ext2fs/ext2_inode_cnv.c
+++ b/sys/fs/ext2fs/ext2_inode_cnv.c
@@ -108,6 +108,8 @@ ext2_ei2i(struct ext2fs_dinode *ei, struct inode *ip)
ip->i_flags |= (ei->e2di_flags & EXT2_APPEND) ? SF_APPEND : 0;
ip->i_flags |= (ei->e2di_flags & EXT2_IMMUTABLE) ? SF_IMMUTABLE : 0;
ip->i_flags |= (ei->e2di_flags & EXT2_NODUMP) ? UF_NODUMP : 0;
+ ip->i_flags |= (ei->e2di_flags & EXT4_INDEX) ? E4_INDEX : 0;
+ ip->i_flags |= (ei->e2di_flags & EXT4_EXTENTS) ? E4_EXTENTS : 0;
ip->i_blocks = ei->e2di_nblock;
if (E2DI_HAS_HUGE_FILE(ip)) {
ip->i_blocks |= (uint64_t)ei->e2di_nblock_high << 32;
diff --git a/sys/fs/ext2fs/ext2_lookup.c b/sys/fs/ext2fs/ext2_lookup.c
index d6075542fa8d..02e66f76724a 100644
--- a/sys/fs/ext2fs/ext2_lookup.c
+++ b/sys/fs/ext2fs/ext2_lookup.c
@@ -888,8 +888,9 @@ ext2_direnter(struct inode *ip, struct vnode *dvp, struct componentname *cnp)
if (ext2_htree_has_idx(dp)) {
error = ext2_htree_add_entry(dvp, &newdir, cnp);
if (error) {
- dp->i_flags &= ~EXT4_INDEX;
+ /* XXX: These seem to be set in the wrong place. */
dp->i_flags |= IN_CHANGE | IN_UPDATE;
+ dp->i_flags &= ~E4_INDEX;
}
return (error);
}
diff --git a/sys/fs/ext2fs/ext2_subr.c b/sys/fs/ext2fs/ext2_subr.c
index ec10ea86dabf..09fcee80654e 100644
--- a/sys/fs/ext2fs/ext2_subr.c
+++ b/sys/fs/ext2fs/ext2_subr.c
@@ -82,10 +82,10 @@ ext2_blkatoff(struct vnode *vp, off_t offset, char **res, struct buf **bpp)
*bpp = NULL;
/*
- * The EXT4_EXTENTS requires special treatment, otherwise we can
- * fall back to the normal path.
+ * E4_EXTENTS requires special treatment otherwise we can fall
+ * back to the normal path.
*/
- if (!(ip->i_flags & EXT4_EXTENTS))
+ if (!(ip->i_flags & E4_EXTENTS))
goto normal;
memset(&path, 0, sizeof(path));
@@ -110,7 +110,7 @@ ext2_blkatoff(struct vnode *vp, off_t offset, char **res, struct buf **bpp)
if (res)
*res = (char *)bp->b_data + blkoff(fs, offset);
/*
- * If EXT4_EXTENTS is enabled we would get a wrong offset so
+ * If E4_EXTENTS is enabled we would get a wrong offset so
* reset b_offset here.
*/
bp->b_offset = lbn * bsize;
diff --git a/sys/fs/ext2fs/ext2_vfsops.c b/sys/fs/ext2fs/ext2_vfsops.c
index b4683564bd8f..3ad5786af495 100644
--- a/sys/fs/ext2fs/ext2_vfsops.c
+++ b/sys/fs/ext2fs/ext2_vfsops.c
@@ -964,10 +964,10 @@ ext2_vget(struct mount *mp, ino_t ino, int flags, struct vnode **vpp)
* blocks are zeroed out - ext2_balloc depends on this
* although for regular files and directories only
*
- * If EXT4_EXTENTS flag is enabled, unused blocks aren't
- * zeroed out because we could corrupt the extent tree.
+ * If E4_EXTENTS is enabled, unused blocks are not zeroed
+ * out because we could corrupt the extent tree.
*/
- if (!(ip->i_flags & EXT4_EXTENTS) &&
+ if (!(ip->i_flags & E4_EXTENTS) &&
(S_ISDIR(ip->i_mode) || S_ISREG(ip->i_mode))) {
used_blocks = (ip->i_size+fs->e2fs_bsize-1) / fs->e2fs_bsize;
for (i = used_blocks; i < EXT2_NDIR_BLOCKS; i++)
diff --git a/sys/fs/ext2fs/ext2_vnops.c b/sys/fs/ext2fs/ext2_vnops.c
index 04ef9e2b81d8..72a008bd3338 100644
--- a/sys/fs/ext2fs/ext2_vnops.c
+++ b/sys/fs/ext2fs/ext2_vnops.c
@@ -344,6 +344,8 @@ ext2_getattr(struct vop_getattr_args *ap)
vap->va_birthtime.tv_nsec = ip->i_birthnsec;
}
vap->va_flags = ip->i_flags;
+ /* E4_* flags are private to the driver */
+ vap->va_flags &= !(E4_INDEX | E4_EXTENTS);
vap->va_gen = ip->i_gen;
vap->va_blocksize = vp->v_mount->mnt_stat.f_iosize;
vap->va_bytes = dbtob((u_quad_t)ip->i_blocks);
@@ -1615,7 +1617,7 @@ ext2_read(struct vop_read_args *ap)
ip = VTOI(vp);
/*EXT4_EXT_LOCK(ip);*/
- if (ip->i_flags & EXT4_EXTENTS)
+ if (ip->i_flags & E4_EXTENTS)
error = ext4_ext_read(ap);
else
error = ext2_ind_read(ap);
diff --git a/sys/fs/ext2fs/inode.h b/sys/fs/ext2fs/inode.h
index e2016c51a02f..af244adecd2d 100644
--- a/sys/fs/ext2fs/inode.h
+++ b/sys/fs/ext2fs/inode.h
@@ -153,6 +153,13 @@ struct inode {
#define IN_LAZYACCESS 0x0100 /* Process IN_ACCESS after the
suspension finished */
+/*
+ * These are translation flags for some attributes that Ext4
+ * passes as inode flags but that we cannot pass directly.
+ */
+#define E4_INDEX 0x01000000
+#define E4_EXTENTS 0x02000000
+
#define i_devvp i_ump->um_devvp
#ifdef _KERNEL
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index e72f5e44bf52..8e4fdf88fb02 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -715,7 +715,7 @@ kern_vfs_bio_buffer_alloc(caddr_t v, long physmem_est)
}
/*
- * Ideal allocation size for the transient bio submap if 10%
+ * Ideal allocation size for the transient bio submap is 10%
* of the maximal space buffer map. This roughly corresponds
* to the amount of the buffer mapped for typical UFS load.
*
diff --git a/sys/powerpc/powermac/macio.c b/sys/powerpc/powermac/macio.c
index dad261cbbb32..6a0b9136fc8f 100644
--- a/sys/powerpc/powermac/macio.c
+++ b/sys/powerpc/powermac/macio.c
@@ -236,13 +236,45 @@ macio_add_intr(phandle_t devnode, struct macio_devinfo *dinfo)
static void
macio_add_reg(phandle_t devnode, struct macio_devinfo *dinfo)
{
- struct macio_reg *reg;
- int i, nreg;
+ struct macio_reg *reg, *regp;
+ phandle_t child;
+ char buf[8];
+ int i, layout_id = 0, nreg, res;
nreg = OF_getprop_alloc(devnode, "reg", sizeof(*reg), (void **)®);
if (nreg == -1)
return;
+ /*
+ * Some G5's have broken properties in the i2s-a area. If so we try
+ * to fix it. Right now we know of two different cases, one for
+ * sound layout-id 36 and the other one for sound layout-id 76.
+ * What is missing is the base address for the memory addresses.
+ * We take them from the parent node (i2s) and use the size
+ * information from the child.
+ */
+
+ if (reg[0].mr_base == 0) {
+ child = OF_child(devnode);
+ while (child != 0) {
+ res = OF_getprop(child, "name", buf, sizeof(buf));
+ if (res > 0 && strcmp(buf, "sound") == 0)
+ break;
+ child = OF_peer(child);
+ }
+
+ res = OF_getprop(child, "layout-id", &layout_id,
+ sizeof(layout_id));
+
+ if (res > 0 && (layout_id == 36 || layout_id == 76)) {
+ res = OF_getprop_alloc(OF_parent(devnode), "reg",
+ sizeof(*regp), (void **)®p);
+ reg[0] = regp[0];
+ reg[1].mr_base = regp[1].mr_base;
+ reg[2].mr_base = regp[1].mr_base + reg[1].mr_size;
+ }
+ }
+
for (i = 0; i < nreg; i++) {
resource_list_add(&dinfo->mdi_resources, SYS_RES_MEMORY, i,
reg[i].mr_base, reg[i].mr_base + reg[i].mr_size,
@@ -284,6 +316,7 @@ macio_attach(device_t dev)
phandle_t subchild;
device_t cdev;
u_int reg[3];
+ char compat[32];
int error, quirks;
sc = device_get_softc(dev);
@@ -297,6 +330,9 @@ macio_attach(device_t dev)
return (ENXIO);
}
+ /* Used later to see if we have to enable the I2S part. */
+ OF_getprop(root, "compatible", compat, sizeof(compat));
+
sc->sc_base = reg[2];
sc->sc_size = MACIO_REG_SIZE;
@@ -378,6 +414,21 @@ macio_attach(device_t dev)
bus_write_4(sc->sc_memr, HEATHROW_FCR, fcr);
}
+
+ /*
+ * Make sure the I2S0 and the I2S0_CLK are enabled.
+ * On certain G5's they are not.
+ */
+ if ((strcmp(ofw_bus_get_name(cdev), "i2s") == 0) &&
+ (strcmp(compat, "K2-Keylargo") == 0)) {
+
+ uint32_t fcr1;
+
+ fcr1 = bus_read_4(sc->sc_memr, KEYLARGO_FCR1);
+ fcr1 |= FCR1_I2S0_CLK_ENABLE | FCR1_I2S0_ENABLE;
+ bus_write_4(sc->sc_memr, KEYLARGO_FCR1, fcr1);
+ }
+
}
return (bus_generic_attach(dev));
diff --git a/sys/powerpc/powermac/maciovar.h b/sys/powerpc/powermac/maciovar.h
index 61fac469b37f..ed9c15d092d7 100644
--- a/sys/powerpc/powermac/maciovar.h
+++ b/sys/powerpc/powermac/maciovar.h
@@ -48,6 +48,9 @@
#define FCR_ENET_ENABLE 0x60000000
#define FCR_ENET_RESET 0x80000000
+#define FCR1_I2S0_CLK_ENABLE 0x00001000
+#define FCR1_I2S0_ENABLE 0x00002000
+
/* Used only by macio_enable_wireless() for now. */
#define KEYLARGO_GPIO_BASE 0x6a
#define KEYLARGO_EXTINT_GPIO_REG_BASE 0x58
diff --git a/sys/sys/pciio.h b/sys/sys/pciio.h
index a0c4560ea0b6..d70bfbcf6fc8 100644
--- a/sys/sys/pciio.h
+++ b/sys/sys/pciio.h
@@ -116,10 +116,31 @@ struct pci_bar_io {
uint64_t pbi_length; /* length of BAR */
};
+struct pci_vpd_element {
+ char pve_keyword[2];
+ uint8_t pve_flags;
+ uint8_t pve_datalen;
+ uint8_t pve_data[0];
+};
+
+#define PVE_FLAG_IDENT 0x01 /* Element is the string identifier */
+#define PVE_FLAG_RW 0x02 /* Element is read/write */
+
+#define PVE_NEXT(pve) \
+ ((struct pci_vpd_element *)((char *)(pve) + \
+ sizeof(struct pci_vpd_element) + (pve)->pve_datalen))
+
+struct pci_list_vpd_io {
+ struct pcisel plvi_sel; /* device to operate on */
+ size_t plvi_len; /* size of the data area */
+ struct pci_vpd_element *plvi_data;
+};
+
#define PCIOCGETCONF _IOWR('p', 5, struct pci_conf_io)
#define PCIOCREAD _IOWR('p', 2, struct pci_io)
#define PCIOCWRITE _IOWR('p', 3, struct pci_io)
#define PCIOCATTACHED _IOWR('p', 4, struct pci_io)
#define PCIOCGETBAR _IOWR('p', 6, struct pci_bar_io)
+#define PCIOCLISTVPD _IOWR('p', 7, struct pci_list_vpd_io)
#endif /* !_SYS_PCIIO_H_ */
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c
index 517491fe7efb..52d6abc7f4bb 100644
--- a/sys/vm/vm_pageout.c
+++ b/sys/vm/vm_pageout.c
@@ -1121,7 +1121,7 @@ vm_pageout_scan(struct vm_domain *vmd, int pass)
} else if ((m->flags & PG_WINATCFLS) == 0 && pass < 2) {
/*
* Dirty pages need to be paged out, but flushing
- * a page is extremely expensive verses freeing
+ * a page is extremely expensive versus freeing
* a clean page. Rather then artificially limiting
* the number of pages we can flush, we instead give
* dirty pages extra priority on the inactive queue
@@ -1183,7 +1183,7 @@ vm_pageout_scan(struct vm_domain *vmd, int pass)
* to be freed and dirty pages to be moved to the end
* of the queue. Since dirty pages are also moved to
* the end of the queue once-cleaned, this gives
- * way too large a weighting to defering the freeing
+ * way too large a weighting to deferring the freeing
* of dirty pages.
*
* We can't wait forever for the vnode lock, we might
diff --git a/sys/x86/include/legacyvar.h b/sys/x86/include/legacyvar.h
index 65828a5c014c..5f2e29c62595 100644
--- a/sys/x86/include/legacyvar.h
+++ b/sys/x86/include/legacyvar.h
@@ -57,6 +57,9 @@ int legacy_pcib_write_ivar(device_t dev, device_t child, int which,
uintptr_t value);
struct resource *legacy_pcib_alloc_resource(device_t dev, device_t child,
int type, int *rid, u_long start, u_long end, u_long count, u_int flags);
+int legacy_pcib_alloc_msi(device_t pcib, device_t dev, int count,
+ int maxcount, int *irqs);
+int legacy_pcib_alloc_msix(device_t pcib, device_t dev, int *irq);
int legacy_pcib_map_msi(device_t pcib, device_t dev, int irq,
uint64_t *addr, uint32_t *data);
diff --git a/sys/x86/pci/pci_bus.c b/sys/x86/pci/pci_bus.c
index af2619064480..53be8c20310b 100644
--- a/sys/x86/pci/pci_bus.c
+++ b/sys/x86/pci/pci_bus.c
@@ -92,7 +92,7 @@ legacy_pcib_route_interrupt(device_t pcib, device_t dev, int pin)
/* Pass MSI requests up to the nexus. */
-static int
+int
legacy_pcib_alloc_msi(device_t pcib, device_t dev, int count, int maxcount,
int *irqs)
{
@@ -103,7 +103,7 @@ legacy_pcib_alloc_msi(device_t pcib, device_t dev, int count, int maxcount,
irqs));
}
-static int
+int
legacy_pcib_alloc_msix(device_t pcib, device_t dev, int *irq)
{
device_t bus;
diff --git a/sys/x86/pci/qpi.c b/sys/x86/pci/qpi.c
index 08a95f523530..21b2c4301cfd 100644
--- a/sys/x86/pci/qpi.c
+++ b/sys/x86/pci/qpi.c
@@ -45,8 +45,9 @@ __FBSDID("$FreeBSD$");
#include
#include
-#include
-#include
+#include
+#include
+#include
#include
#include
@@ -237,42 +238,6 @@ qpi_pcib_read_ivar(device_t dev, device_t child, int which, uintptr_t *result)
}
}
-static uint32_t
-qpi_pcib_read_config(device_t dev, u_int bus, u_int slot, u_int func,
- u_int reg, int bytes)
-{
-
- return (pci_cfgregread(bus, slot, func, reg, bytes));
-}
-
-static void
-qpi_pcib_write_config(device_t dev, u_int bus, u_int slot, u_int func,
- u_int reg, uint32_t data, int bytes)
-{
-
- pci_cfgregwrite(bus, slot, func, reg, data, bytes);
-}
-
-static int
-qpi_pcib_alloc_msi(device_t pcib, device_t dev, int count, int maxcount,
- int *irqs)
-{
- device_t bus;
-
- bus = device_get_parent(pcib);
- return (PCIB_ALLOC_MSI(device_get_parent(bus), dev, count, maxcount,
- irqs));
-}
-
-static int
-qpi_pcib_alloc_msix(device_t pcib, device_t dev, int *irq)
-{
- device_t bus;
-
- bus = device_get_parent(pcib);
- return (PCIB_ALLOC_MSIX(device_get_parent(bus), dev, irq));
-}
-
static int
qpi_pcib_map_msi(device_t pcib, device_t dev, int irq, uint64_t *addr,
uint32_t *data)
@@ -302,11 +267,11 @@ static device_method_t qpi_pcib_methods[] = {
/* pcib interface */
DEVMETHOD(pcib_maxslots, pcib_maxslots),
- DEVMETHOD(pcib_read_config, qpi_pcib_read_config),
- DEVMETHOD(pcib_write_config, qpi_pcib_write_config),
- DEVMETHOD(pcib_alloc_msi, qpi_pcib_alloc_msi),
+ DEVMETHOD(pcib_read_config, legacy_pcib_read_config),
+ DEVMETHOD(pcib_write_config, legacy_pcib_write_config),
+ DEVMETHOD(pcib_alloc_msi, legacy_pcib_alloc_msi),
DEVMETHOD(pcib_release_msi, pcib_release_msi),
- DEVMETHOD(pcib_alloc_msix, qpi_pcib_alloc_msix),
+ DEVMETHOD(pcib_alloc_msix, legacy_pcib_alloc_msix),
DEVMETHOD(pcib_release_msix, pcib_release_msix),
DEVMETHOD(pcib_map_msi, qpi_pcib_map_msi),
diff --git a/sys/x86/x86/mptable_pci.c b/sys/x86/x86/mptable_pci.c
index 484acbfb093d..4b688ad0cd75 100644
--- a/sys/x86/x86/mptable_pci.c
+++ b/sys/x86/x86/mptable_pci.c
@@ -76,27 +76,6 @@ mptable_hostb_attach(device_t dev)
return (bus_generic_attach(dev));
}
-/* Pass MSI requests up to the nexus. */
-static int
-mptable_hostb_alloc_msi(device_t pcib, device_t dev, int count, int maxcount,
- int *irqs)
-{
- device_t bus;
-
- bus = device_get_parent(pcib);
- return (PCIB_ALLOC_MSI(device_get_parent(bus), dev, count, maxcount,
- irqs));
-}
-
-static int
-mptable_hostb_alloc_msix(device_t pcib, device_t dev, int *irq)
-{
- device_t bus;
-
- bus = device_get_parent(pcib);
- return (PCIB_ALLOC_MSIX(device_get_parent(bus), dev, irq));
-}
-
#ifdef NEW_PCIB
static int
mptable_is_isa_range(u_long start, u_long end)
@@ -200,9 +179,9 @@ static device_method_t mptable_hostb_methods[] = {
DEVMETHOD(pcib_read_config, legacy_pcib_read_config),
DEVMETHOD(pcib_write_config, legacy_pcib_write_config),
DEVMETHOD(pcib_route_interrupt, mptable_pci_route_interrupt),
- DEVMETHOD(pcib_alloc_msi, mptable_hostb_alloc_msi),
+ DEVMETHOD(pcib_alloc_msi, legacy_pcib_alloc_msi),
DEVMETHOD(pcib_release_msi, pcib_release_msi),
- DEVMETHOD(pcib_alloc_msix, mptable_hostb_alloc_msix),
+ DEVMETHOD(pcib_alloc_msix, legacy_pcib_alloc_msix),
DEVMETHOD(pcib_release_msix, pcib_release_msix),
DEVMETHOD(pcib_map_msi, legacy_pcib_map_msi),
diff --git a/usr.sbin/pciconf/pciconf.8 b/usr.sbin/pciconf/pciconf.8
index 7eacfaba841b..e0caf1fcb5bc 100644
--- a/usr.sbin/pciconf/pciconf.8
+++ b/usr.sbin/pciconf/pciconf.8
@@ -33,7 +33,7 @@
.Nd diagnostic utility for the PCI bus
.Sh SYNOPSIS
.Nm
-.Fl l Oo Fl bcev Oc Op Ar device
+.Fl l Oo Fl bcevV Oc Op Ar device
.Nm
.Fl a Ar device
.Nm
@@ -182,6 +182,28 @@ option is supplied,
will attempt to load the vendor/device information database, and print
vendor, device, class and subclass identification strings for each device.
.Pp
+If the
+.Fl V
+option is supplied,
+.Nm
+will list any vital product data
+.Pq VPD
+provided by each device.
+Each VPD keyword is enumerated via a line in the following format:
+.Bd -literal
+ VPD ro PN = '110114640C0 '
+.Ed
+.Pp
+The first string after the
+.Dq Li VPD
+prefix indicates if the keyword is read-only
+.Dq ro
+or read-write
+.Dq rw .
+The second string provides the keyword name.
+The text after the the equals sign lists the value of the keyword which is
+usually an ASCII string.
+.Pp
If the optional
.Ar device
argument is given with the
diff --git a/usr.sbin/pciconf/pciconf.c b/usr.sbin/pciconf/pciconf.c
index 0d1bbde382bc..0177dc98702f 100644
--- a/usr.sbin/pciconf/pciconf.c
+++ b/usr.sbin/pciconf/pciconf.c
@@ -71,8 +71,9 @@ TAILQ_HEAD(,pci_vendor_info) pci_vendors;
static struct pcisel getsel(const char *str);
static void list_bars(int fd, struct pci_conf *p);
static void list_devs(const char *name, int verbose, int bars, int caps,
- int errors);
+ int errors, int vpd);
static void list_verbose(struct pci_conf *p);
+static void list_vpd(int fd, struct pci_conf *p);
static const char *guess_class(struct pci_conf *p);
static const char *guess_subclass(struct pci_conf *p);
static int load_vendors(void);
@@ -86,7 +87,7 @@ static void
usage(void)
{
fprintf(stderr, "%s\n%s\n%s\n%s\n",
- "usage: pciconf -l [-bcev] [device]",
+ "usage: pciconf -l [-bcevV] [device]",
" pciconf -a device",
" pciconf -r [-b | -h] device addr[:addr2]",
" pciconf -w [-b | -h] device addr value");
@@ -98,13 +99,13 @@ main(int argc, char **argv)
{
int c;
int listmode, readmode, writemode, attachedmode;
- int bars, caps, errors, verbose;
+ int bars, caps, errors, verbose, vpd;
int byte, isshort;
listmode = readmode = writemode = attachedmode = 0;
- bars = caps = errors = verbose = byte = isshort = 0;
+ bars = caps = errors = verbose = vpd = byte = isshort = 0;
- while ((c = getopt(argc, argv, "abcehlrwv")) != -1) {
+ while ((c = getopt(argc, argv, "abcehlrwvV")) != -1) {
switch(c) {
case 'a':
attachedmode = 1;
@@ -143,6 +144,10 @@ main(int argc, char **argv)
verbose = 1;
break;
+ case 'V':
+ vpd = 1;
+ break;
+
default:
usage();
}
@@ -156,7 +161,7 @@ main(int argc, char **argv)
if (listmode) {
list_devs(optind + 1 == argc ? argv[optind] : NULL, verbose,
- bars, caps, errors);
+ bars, caps, errors, vpd);
} else if (attachedmode) {
chkattached(argv[optind]);
} else if (readmode) {
@@ -173,7 +178,8 @@ main(int argc, char **argv)
}
static void
-list_devs(const char *name, int verbose, int bars, int caps, int errors)
+list_devs(const char *name, int verbose, int bars, int caps, int errors,
+ int vpd)
{
int fd;
struct pci_conf_io pc;
@@ -246,6 +252,8 @@ list_devs(const char *name, int verbose, int bars, int caps, int errors)
list_caps(fd, p);
if (errors)
list_errors(fd, p);
+ if (vpd)
+ list_vpd(fd, p);
}
} while (pc.status == PCI_GETCONF_MORE_DEVS);
@@ -339,6 +347,63 @@ list_verbose(struct pci_conf *p)
printf(" subclass = %s\n", dp);
}
+static void
+list_vpd(int fd, struct pci_conf *p)
+{
+ struct pci_list_vpd_io list;
+ struct pci_vpd_element *vpd, *end;
+
+ list.plvi_sel = p->pc_sel;
+ list.plvi_len = 0;
+ list.plvi_data = NULL;
+ if (ioctl(fd, PCIOCLISTVPD, &list) < 0 || list.plvi_len == 0)
+ return;
+
+ list.plvi_data = malloc(list.plvi_len);
+ if (ioctl(fd, PCIOCLISTVPD, &list) < 0) {
+ free(list.plvi_data);
+ return;
+ }
+
+ vpd = list.plvi_data;
+ end = (struct pci_vpd_element *)((char *)vpd + list.plvi_len);
+ for (; vpd < end; vpd = PVE_NEXT(vpd)) {
+ if (vpd->pve_flags == PVE_FLAG_IDENT) {
+ printf(" VPD ident = '%.*s'\n",
+ (int)vpd->pve_datalen, vpd->pve_data);
+ continue;
+ }
+
+ /* Ignore the checksum keyword. */
+ if (!(vpd->pve_flags & PVE_FLAG_RW) &&
+ memcmp(vpd->pve_keyword, "RV", 2) == 0)
+ continue;
+
+ /* Ignore remaining read-write space. */
+ if (vpd->pve_flags & PVE_FLAG_RW &&
+ memcmp(vpd->pve_keyword, "RW", 2) == 0)
+ continue;
+
+ /* Handle extended capability keyword. */
+ if (!(vpd->pve_flags & PVE_FLAG_RW) &&
+ memcmp(vpd->pve_keyword, "CP", 2) == 0) {
+ printf(" VPD ro CP = ID %02x in map 0x%x[0x%x]\n",
+ (unsigned int)vpd->pve_data[0],
+ PCIR_BAR((unsigned int)vpd->pve_data[1]),
+ (unsigned int)vpd->pve_data[3] << 8 |
+ (unsigned int)vpd->pve_data[2]);
+ continue;
+ }
+
+ /* Remaining keywords should all have ASCII values. */
+ printf(" VPD %s %c%c = '%.*s'\n",
+ vpd->pve_flags & PVE_FLAG_RW ? "rw" : "ro",
+ vpd->pve_keyword[0], vpd->pve_keyword[1],
+ (int)vpd->pve_datalen, vpd->pve_data);
+ }
+ free(list.plvi_data);
+}
+
/*
* This is a direct cut-and-paste from the table in sys/dev/pci/pci.c.
*/
diff --git a/usr.sbin/usbdump/usbdump.c b/usr.sbin/usbdump/usbdump.c
index 7e7eae923eea..43fde90e88f5 100644
--- a/usr.sbin/usbdump/usbdump.c
+++ b/usr.sbin/usbdump/usbdump.c
@@ -34,6 +34,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -780,6 +781,23 @@ usage(void)
exit(EX_USAGE);
}
+static void
+check_usb_pf_sysctl(void)
+{
+ int error;
+ int no_pf_val = 0;
+ size_t no_pf_len = sizeof(int);
+
+ /* check "hw.usb.no_pf" sysctl for 8- and 9- stable */
+
+ error = sysctlbyname("hw.usb.no_pf", &no_pf_val,
+ &no_pf_len, NULL, 0);
+ if (error == 0 && no_pf_val != 0) {
+ warnx("The USB packet filter might be disabled.");
+ warnx("See the \"hw.usb.no_pf\" sysctl for more information.");
+ }
+}
+
int
main(int argc, char *argv[])
{
@@ -872,6 +890,8 @@ main(int argc, char *argv[])
exit(EXIT_SUCCESS);
}
+ check_usb_pf_sysctl();
+
p->fd = fd = open("/dev/bpf", O_RDONLY);
if (p->fd < 0)
err(EXIT_FAILURE, "Could not open BPF device");