MFH@260988.

This commit is contained in:
kaiw 2014-01-21 20:48:02 +00:00
parent e1172e7ec6
commit 271437b190
38 changed files with 568 additions and 707 deletions

View File

@ -652,7 +652,7 @@ asn_put_objid(struct asn_buf *b, const struct asn_oid *oid)
err = ASN_ERR_RANGE; err = ASN_ERR_RANGE;
} }
if (oid->subs[0] > 2 || 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)", asn_error(NULL, "oid out of range (%u,%u)",
oid->subs[0], oid->subs[1]); oid->subs[0], oid->subs[1]);
err = ASN_ERR_RANGE; err = ASN_ERR_RANGE;

View File

@ -27,7 +27,9 @@ sysctl_start()
esac esac
for _f in /etc/sysctl.conf /etc/sysctl.conf.local; do 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 done
} }

View File

@ -1,33 +1,20 @@
<?xml version="1.0" encoding="iso-8859-1"?> <?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE article PUBLIC "-//FreeBSD//DTD DocBook XML V5.0-Based Extension//EN" <!DOCTYPE article PUBLIC "-//FreeBSD//DTD DocBook XML V5.0-Based Extension//EN"
"../../../share/xml/freebsd50.dtd" [ "../../../share/xml/freebsd50.dtd" [
<!ENTITY % release PUBLIC "-//FreeBSD//ENTITIES Release Specification//EN" "release.ent"> <!ENTITY % release PUBLIC "-//FreeBSD//ENTITIES Release Specification//EN" "release.ent">
%release; %release;
]> ]>
<article xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"> <article xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0">
<info><title>&os; &release.current; Release Notes</title> <info><title>&os; &release.current; Release Notes</title>
<author><orgname>The &os; Project</orgname></author> <author><orgname>The &os; Project</orgname></author>
<pubdate>$FreeBSD$</pubdate> <pubdate>$FreeBSD$</pubdate>
<copyright> <copyright>
<year>2000</year> <year>2014</year>
<year>2001</year> <holder role="mailto:doc@FreeBSD.org">The &os; Documentation
<year>2002</year> Project</holder>
<year>2003</year>
<year>2004</year>
<year>2005</year>
<year>2006</year>
<year>2007</year>
<year>2008</year>
<year>2009</year>
<year>2010</year>
<year>2011</year>
<year>2012</year>
<year>2013</year>
<holder role="mailto:doc@FreeBSD.org">The &os; Documentation Project</holder>
</copyright> </copyright>
<legalnotice xml:id="trademarks" role="trademarks"> <legalnotice xml:id="trademarks" role="trademarks">
@ -40,13 +27,13 @@
</legalnotice> </legalnotice>
<abstract> <abstract>
<para>The release notes for &os; &release.current; contain a summary <para>The release notes for &os; &release.current; contain
of the changes made to the &os; base system on the a summary of the changes made to the &os; base system on the
&release.branch; development line. &release.branch; development line. This document lists
This document lists applicable security advisories that were issued since applicable security advisories that were issued since the last
the last release, as well as significant changes to the &os; release, as well as significant changes to the &os; kernel and
kernel and userland. userland. Some brief remarks on upgrading are also
Some brief remarks on upgrading are also presented.</para> presented.</para>
</abstract> </abstract>
</info> </info>
@ -54,30 +41,32 @@
<title>Introduction</title> <title>Introduction</title>
<para>This document contains the release notes for &os; <para>This document contains the release notes for &os;
&release.current;. It &release.current;. It describes recently added, changed, or
describes recently added, changed, or deleted features of &os;. deleted features of &os;. It also provides some notes on
It also provides some notes on upgrading upgrading from previous versions of &os;.</para>
from previous versions of &os;.</para>
<para releasetype="current">The &release.type; distribution to which these release notes <para releasetype="current">The &release.type; distribution to which
apply represents the latest point along the &release.branch; development these release notes apply represents the latest point along the
branch since &release.branch; was created. Information regarding pre-built, binary &release.branch; development branch since &release.branch; was
&release.type; distributions along this branch created. Information regarding pre-built, binary &release.type;
can be found at <uri xlink:href="&release.url;">&release.url;</uri>.</para> distributions along this branch can be found at <uri
xlink:href="&release.url;">&release.url;</uri>.</para>
<para releasetype="snapshot">The &release.type; distribution to which these release notes <para releasetype="snapshot">The &release.type; distribution to
apply represents a point along the &release.branch; development which these release notes apply represents a point along the
branch between &release.prev; and the future &release.next;. &release.branch; development branch between &release.prev; and the
Information regarding future &release.next;. Information regarding pre-built, binary
pre-built, binary &release.type; distributions along this branch &release.type; distributions along this branch can be found at
can be found at <uri xlink:href="&release.url;">&release.url;</uri>.</para> <uri xlink:href="&release.url;">&release.url;</uri>.</para>
<para releasetype="release">This distribution of &os; &release.current; is a <para releasetype="release">This distribution of &os;
&release.type; distribution. It can be found at <uri xlink:href="&release.url;">&release.url;</uri> or any of its mirrors. More &release.current; is a &release.type; distribution. It can be
information on obtaining this (or other) &release.type; found at <uri xlink:href="&release.url;">&release.url;</uri> or
distributions of &os; can be found in the <link xlink:href="&url.books.handbook;/mirrors.html"><quote>Obtaining any of its mirrors. More information on obtaining this (or other)
&os;</quote> appendix</link> to the <link xlink:href="&url.books.handbook;/">&os; &release.type; distributions of &os; can be found in the <link
Handbook</link>.</para> xlink:href="&url.books.handbook;/mirrors.html"><quote>Obtaining
&os;</quote> appendix</link> to the <link
xlink:href="&url.books.handbook;/">&os; Handbook</link>.</para>
<para>All users are encouraged to consult the release errata before <para>All users are encouraged to consult the release errata before
installing &os;. The errata document is updated with installing &os;. The errata document is updated with
@ -86,637 +75,199 @@
information on known bugs, security advisories, and corrections to information on known bugs, security advisories, and corrections to
documentation. An up-to-date copy of the errata for &os; documentation. An up-to-date copy of the errata for &os;
&release.current; can be found on the &os; Web site.</para> &release.current; can be found on the &os; Web site.</para>
</sect1> </sect1>
<sect1 xml:id="new"> <sect1 xml:id="new">
<title>What's New</title> <title>What's New</title>
<para>This section describes <para>This section describes the most user-visible new or changed
the most user-visible new or changed features in &os; features in &os; since &release.prev;. In general, changes
since &release.prev;. described here are unique to the &release.branch; branch unless
In general, changes described here are unique to the &release.branch; specifically marked as &merged; features.</para>
branch unless specifically marked as &merged; features.
</para>
<para>Typical release note items <para>Typical release note items document recent security advisories
document recent security advisories issued after issued after &release.prev;, new drivers or hardware support, new
&release.prev;, commands or options, major bug fixes, or contributed software
new drivers or hardware support, new commands or options, upgrades. They may also list changes to major ports/packages or
major bug fixes, or contributed software upgrades. They may also release engineering practices. Clearly the release notes cannot
list changes to major ports/packages or release engineering list every single change made to &os; between releases; this
practices. Clearly the release notes cannot list every single document focuses primarily on security advisories, user-visible
change made to &os; between releases; this document focuses changes, and major architectural improvements.</para>
primarily on security advisories, user-visible changes, and major
architectural improvements.</para>
<sect2 xml:id="security"> <sect2 xml:id="security">
<title>Security Advisories</title> <title>Security Advisories</title>
<para/> <para>No advisories.</para>
</sect2> </sect2>
<sect2 xml:id="kernel"> <sect2 xml:id="kernel">
<title>Kernel Changes</title> <title>Kernel Changes</title>
<para revision="248508">The use of unmapped VMIO buffers eliminates the need to perform <para revision="260903">Support for GPS ports has been added to
TLB shootdown for mapping on buffer creation and reuse, greatly reducing the &man.uhso.4;.</para>
amount of IPIs for shootdown on big-SMP machines and eliminating up to 25-30%
of the system time on i/o intensive workloads.</para>
<para arch="amd64" revision="254466">The maximum amount of memory the &os; kernel <para revision="260888">The <filename>VT</filename> kernel
can address has been increased from 1TB to 4TB.</para> configuration file has been added, which enables the new
<literal>vt</literal> console driver.</para>
<para>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.</para>
<para role="merged">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 <command>capture</command> command controls
this feature.</para>
<para role="merged">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.</para>
<para role="merged">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.</para>
<para>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.</para>
<para>The &os; kernel now exports information about certain kernel
features via the <varname>kern.features</varname> sysctl tree.
The &man.feature.present.3; library call provides a convenient
interface for user applications to test the presence of
features.</para>
<para arch="amd64">The &os; kernel now has support for large
memory page mappings (<quote>superpages</quote>).</para>
<para arch="amd64,i386,ia64,powerpc" role="merged">The ULE
scheduler is now the default process scheduler
in <filename>GENERIC</filename> kernels.</para>
<para arch="amd64,i386" revision="240135">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.</para>
<sect3 xml:id="kernel-virtualization"> <sect3 xml:id="kernel-virtualization">
<title>Virtualization support</title> <title>Virtualization support</title>
<para arch="amd64" revision="245652">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.</para>
<para revision="227652">&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;.</para>
<para arch="amd64,i386" revision="255524">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
<filename>/boot/loader.conf</filename> to load these drivers:
<programlisting>hv_ata_pci_disengage_load="YES"
hv_netsvc_load="YES"
hv_utils_load="YES"
hv_vmbus_load="YES"</programlisting> Alternatively, the Hyper-V drivers can be added to the i386
kernel by adding <literal>device hyperv</literal> to the kernel config, and then
recompiling the kernel. Please refer to:
<link xlink:href="http://wiki.freebsd.org/HyperV">FreeBSD and Microsoft Windows Server Hyper-V support</link>
for full instructions on how to set up Hyper-V support under FreeBSD.</para>
<para revision="254738">The &man.vmx.4; driver has been added. <para revision="260847">The &man.virtio_random.4; driver has
&man.vmx.4; is a VMware VMXNET3 ethernet driver ported from been added to harvest entropy from the host system.</para>
OpenBSD.</para>
<para revision="255744" arch="amd64,i386">Xen PVHVM virtualization is now <para revision="260583">Unmapped IO support has been added to
part of the GENERIC kernel.</para> &man.virtio_scsi.4;.</para>
<para revision="260582">Unmapped IO support has been added to
&man.virtio_blk.4;.</para>
<para revision="260532">Support for <quote>Posted Interrupt
Processing</quote> is enabled if supported by the CPU. This
feature can be disabled by running <literal>sysctl
hw.vmm.vmx.use_apic_pir=0</literal>. Additionally, to
persist this setting across reboots, add
<literal>hw.vmm.vmx.use_apic_pir=0</literal> to
<filename>/etc/sysctl.conf</filename>.</para>
<para revision="260410">Support for the <quote>Virtual Interrupt
Delivery</quote> feature of &intel;&nbsp;VT-x is enabled if
supported by the CPU. This feature can be disabled by running
<literal>sysctl hw.vmm.vmx.use_apic_vid=0</literal>.
Additionally, to persist this setting across reboots, add
<literal>hw.vmm.vmx.use_apic_vid=0</literal> to
<filename>/etc/sysctl.conf</filename>.</para>
</sect3> </sect3>
<sect3 xml:id="kernel-arm"> <sect3 xml:id="kernel-arm">
<title>ARM support</title> <title>ARM support</title>
<para revision="239922">Raspberry PI support has been added. <para revision="260921">The &man.nand.4; device is enabled for
Refer to these <link xlink:href="http://kernelnomicon.org/?p=164">setup instructions</link> ARM devices by default.</para>
and <link xlink:href="http://www.raspberrypi.org/quick-start-guide">quick start
guide</link>.</para>
<para revision="253396">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.</para>
<para revision="239268">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 <link xlink:href="http://lists.freebsd.org/pipermail/freebsd-arm/2012-August/003757.html">this announcement</link>
for further details.</para>
<para revision="254918">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 <link xlink:href="https://wiki.freebsd.org/ARMSuperpages">this page</link>
for further details.</para>
</sect3> </sect3>
<sect3 xml:id="boot"> <sect3 xml:id="boot">
<title>Boot Loader Changes</title> <title>Boot Loader Changes</title>
<para arch="amd64,i386" role="merged">The BTX kernel used by the boot <para>&nbsp;</para>
loader has been changed to invoke BIOS routines from real
mode. This change makes it possible to boot &os; from USB
devices.</para>
<para arch="amd64,i386" role="merged">A new gptboot boot loader has
been added to support booting from a GPT labeled disk. A
new <command>boot</command> 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.</para>
</sect3> </sect3>
<sect3 xml:id="proc"> <sect3 xml:id="proc">
<title>Hardware Support</title> <title>Hardware Support</title>
<para role="merged">The &man.cmx.4; driver, a driver for Omnikey CardMan 4040
PCMCIA smartcard readers, has been added.</para>
<para>The &man.syscons.4; driver now supports Colemak keyboard layout.</para>
<para role="merged">The &man.uslcom.4; driver, a driver for Silicon
Laboratories CP2101/CP2102-based USB serial adapters, has been
imported from OpenBSD.</para>
<sect4 xml:id="mm"> <sect4 xml:id="mm">
<title>Multimedia Support</title> <title>Multimedia Support</title>
<para revision="240609">Support for version 2.0 of the USB Audio reference design <para>&nbsp;</para>
has been added. New devices should support higher bandwidth,
increased sampling frequency and wider dynamic range.</para>
</sect4> </sect4>
<sect4 xml:id="net-if"> <sect4 xml:id="net-if">
<title>Network Interface Support</title> <title>Network Interface Support</title>
<para>The &man.ale.4; driver has been added to provide support <para revision="260552">Firmware for &intel;
for Atheros AR8121/AR8113/AR8114 Gigabit/Fast Ethernet controllers.</para> Centrino&trade; Wireless-N 105 devices has been added
to the base system.</para>
<para>The &man.em.4; driver has been split into two drivers <para revision="260448">Support for the &intel;
with some common parts. The &man.em.4; driver will continue Centrino&trade; Wireless-N 135 chipset has been
to support adapters up to the 82575, as well as new added.</para>
client/desktop adapters. A new &man.igb.4; driver
will support new server adapters.</para>
<para>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.</para>
<para>The &man.malo.4; driver has been added to provide
support for Marvell Libertas 88W8335 based PCI network
adapters.</para>
<para>The firmware for the &man.mxge.4; driver has been
updated from 1.4.25 to 1.4.29.</para>
<para>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.</para>
<para>The &man.re.4; driver has been overhauled to fix a
number of issues. This driver now has Wake On LAN (WOL)
support.</para>
<para>The &man.vr.4; driver has been overhauled to fix a
number of outstanding issues. It also now works on all
architectures.</para>
<para arch="amd64,i386" role="merged">The &man.wpi.4; driver has
been updated to include a number of stability fixes.</para>
<para revision="248925">The &man.cxgbe.4; driver has been updated to support
40G/10G Ethernet NICs based on Chelsio's Terminator 5 (T5) ASIC.</para>
<para revision="256694">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.</para>
<para revision="255932">The Open Fabrics Enterprise Distribution (OFED) and
OFED Infiniband core has been
updated to the same version as supplied by Linux version 3.7</para>
<para revision="255932">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).</para>
<para revision="227614">&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:
<link xlink:href="http://info.iet.unipi.it/~luigi/netmap/">Netmap Project</link>.</para>
<para revision="258830">Support for Broadcom chipsets
BCM57764, BCM57767, BCM57782, BCM57786 and BCM57787 has
been added to &man.bge.4;.</para>
</sect4> </sect4>
</sect3> </sect3>
<sect3 xml:id="net-proto"> <sect3 xml:id="net-proto">
<title>Network Protocols</title> <title>Network Protocols</title>
<para revision="228571">&man.carp.4; has been rewritten to make addresses <para>&nbsp;</para>
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.</para>
<para revision="240233">The &man.pf.4; firewall now supports fine-grain locking
and better utilization on multi-cpu machines resulting in
significant improvements in performance.</para>
<para revision="250700">Support for up to 65536 routing tables has been
introduced.</para>
<para revision="248552">Support for setting/matching differentiated services
codepoints (DSCP) in IP header has been added to
&man.ipfw.8;.</para>
</sect3> </sect3>
<sect3 xml:id="disks"> <sect3 xml:id="disks">
<title>Disks and Storage</title> <title>Disks and Storage</title>
<para role="merged">The &man.aac.4; driver now supports volumes larger than <para>&nbsp;</para>
2TB in size.</para>
<para>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 <command>spindown</command> command to configure
this feature.</para>
<para role="merged">The &man.hptrr.4; driver has been updated to version 1.2
from Highpoint.</para>
<para revision="240616">&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 <link xlink:href="http://http://www.nvmexpress.org/">nvmexpress.org</link>.</para>
</sect3> </sect3>
<sect3 xml:id="fs"> <sect3 xml:id="fs">
<title>File Systems</title> <title>File Systems</title>
<para revision="255570">A new kernel-based iSCSI target and initiator has been <para>&nbsp;</para>
added</para>
<para revision="243246">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.</para>
<para revision="241519">A state of the art FUSE implementation is now part of the
base system. It allows the use of nearly all fusefs file
systems</para>
<sect4 xml:id="fs-zfs"> <sect4 xml:id="fs-zfs">
<title>ZFS</title> <title>ZFS</title>
<para revision="">&man.bsdinstall.8; now supports installing <para>&nbsp;</para>
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.</para>
<para revision="240868">TRIM support has been added for
ZFS.</para>
<para revision="246586">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</para>
<para revision="252140">Support for L2ARC compression has been added to ZFS.</para>
<para revision="243524">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.</para>
<para>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.</para>
</sect4> </sect4>
</sect3> </sect3>
</sect2> </sect2>
<sect2 xml:id="userland"> <sect2 xml:id="userland">
<title>Userland Changes</title> <title>Userland Changes</title>
<para revision="255321">On platforms where &man.clang.1; is the default <para revision="260926">Support for displaying VPD for PCI devices
system compiler, (such as i386, amd64, arm) GCC and GNU libstdc++ are no via &man.pciconf.8; has been added.</para>
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.
</para>
<para revision="251662">&man.clang.1; and llvm have been updated to <para revision="260913">A new flag, <quote>onifconsole</quote> has
version 3.3 release. Please refer to been added to <filename>/etc/ttys</filename>. This allows the
<link xlink:href="http://llvm.org/releases/3.3/tools/clang/docs/ReleaseNotes.html"> system to provide a login prompt via serial console if the
Clang 3.3 Release Notes.</link></para> device is an active kernel console, otherwise it is equivalent
to <literal>off</literal>.</para>
<para role="merged" revision="255949">BIND has been replaced by &man.unbound.8; for <para revision="260910">Allow &man.pciconf.8; to identify PCI
local dns resolution in the base system. With this change, nslookup devices that are attached to a driver to be identified by their
and dig are no longer a part of the base system. Users should device name instead of just the selector. Additionally, an
instead use &man.host.1; and &man.drill.1; Alternatively, optional device argument to the <literal>-l</literal> flag
nslookup and dig can be obtained by installing the to restrict the output to only listing details about a single
dns/bind-tools port.</para> device.</para>
<para revision="225937">sysinstall has been removed from the base system. <para revision="260594">When unable to load a kernel module with
Auxiliary libraries and tools used by sysinstall such as libdisk, libftpio, &man.kldload.8;, a message informing to view output of
and sade have also been removed. sysinstall has been replaced by &man.dmesg.8; is now printed, opposed to the previous output
&man.bsdinstall.8; and &man.bsdconfig.8;.</para> <quote>Exec format error.</quote>.</para>
<para revision="256106">&man.freebsd-version.1; has been added. This tool <para revision="258838">The &man.casperd.8; daemon has been added,
makes a best effort to determine the version and patch level of which provides access to functionality that is not available in
the installed kernel and userland.</para> the <quote>capability mode</quote> sandbox.</para>
<para revision="255191">GNU patch has been removed from the base system, and replaced
by a BSD-licensed &man.patch.1; program.</para>
<para revision="241511">GNU sort has been removed from the base system, and replaced
by a BSD-licensed &man.sort.1; program.</para>
<para revision="235723">Berkely yacc (byacc) has been imported
from <link xlink:href="http://invisible-island.net/byacc/">invisible island</link>.
This brings bison compatibilities to &man.yacc.1; while preserving full
backwards compatibility with previous version of &man.yacc.1;.</para>
<para revision="250881">&man.lex.1; has been replaced by flex 2.5.37</para>
<para revision="250699">&man.make.1; has been replaced with the
"Portable" BSD make tool (bmake) from NetBSD.</para>
<para role="merged">The &man.adduser.8; utility now supports
a <option>-M</option> option to set the mode of a new user's
home directory.</para>
<para>BSD-licensed versions of &man.ar.1; and &man.ranlib.1;,
based on <filename>libarchive</filename>, have replaced the GNU
Binutils versions of these utilities.</para>
<para>BSD-licensed versions of &man.bc.1; and &man.dc.1; have
replaced their GNU counterparts.</para>
<para role="merged">&man.chflags.1; now supports a <option>-v</option> flag for
verbose output and a <option>-f</option> flag to ignore errors
with the same semantics as (for example)
&man.chmod.1;.</para>
<para>For compatibility with other implementations, &man.cp.1; now
supports a <option>-a</option> flag, which is equivalent to
specifying the <option>-RrP</option> flags.</para>
<para>BSD-licensed version of &man.cpio.1; based on
<filename>libarchive</filename>, has replaced the GNU cpio.
Note that the GNU cpio is still installed as
<filename>gcpio</filename>.</para>
<para>The &man.env.1; program now supports <option>-u
<replaceable>name</replaceable></option>
which will completely unset the given variable
<replaceable>name</replaceable> by removing it from the environment,
instead of just setting it to a null value.</para>
<para>The &man.fdopendir.3; library function has been added.</para>
<para role="merged">The &man.fetch.3; library now support HTTP 1.1
If-Modified-Since behavior. The &man.fetch.1; program now
supports <option>-i <replaceable>filename</replaceable></option>
which will only download the specified HTTP URL if the content
is newer than <replaceable>filename</replaceable>.</para>
<para>&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;.</para>
<para>&man.kgdb.1; now supports a new <command>add-kld</command>
command to make it easier to debug crash dumps with kernel
modules.</para>
<para>The &man.ls.1; program now supports a <option>-D</option>
option to specify a date format string to be used with the long
format (<option>-l</option>) output.</para>
<para>&man.nc.1; now supports a <option>-O</option> switch to
disable the use of TCP options.</para>
<para>&man.nc.1;'s <option>-o</option> switch has been deprecated.
It will be removed in a future release.</para>
<para>The &man.ping6.8; utility now returns <literal>2</literal>
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.</para>
<para>The &man.procstat.1; utility has been added to display
detailed information about processes.</para>
<para role="merged">The &man.realpath.1; utility now supports
a <option>-q</option> flag to suppress warnings; it now also
accepts multiple paths on its command line.</para>
<para>&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 &quot;emacs&quot; editing
mode.</para>
<para>The &man.split.1; utility now supports a <option>-n</option>
flag to split a file into a certain number of chunks.</para>
<para>The &man.tar.1; utility now supports a <option>-Z</option>
flag to enable &man.compress.1;-style
compression/decompression.</para>
<para>The &man.tar.1; utility now supports a
<option>--numeric-owner</option> flag to ignore user/group names
on create and extract.</para>
<para>The &man.tar.1; utility now supports an
<option>-S</option> flag to sparsify files on extraction.</para>
<para>The &man.tar.1; utility now supports a <option>-s</option>
flag to substitute filenames based on the specified regular
expression.</para>
<para>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).</para>
<para>&man.top.1; now supports a <option>-P</option> flag to
provide per-CPU usage statistics.</para>
<para>&man.zdump.8; is now working properly on 64 bit architectures.
</para>
<para>&man.traceroute.8; now has the ability to print the AS
number for each hop with the new <option>-a</option> switch; a
new <option>-A</option> option allows selecting a particular
WHOIS server.</para>
<para>&man.traceroute6.8; now supports a <option>-U</option> flag
to send probe packets with no upper-layer protocol, rather than
the usual UDP probe packets.</para>
<sect3 xml:id="rc-scripts"> <sect3 xml:id="rc-scripts">
<title><filename>/etc/rc.d</filename> Scripts</title> <title><filename>/etc/rc.d</filename> Scripts</title>
<para/> <para>&nbsp;</para>
</sect3> </sect3>
</sect2> </sect2>
<sect2 xml:id="contrib"> <sect2 xml:id="contrib">
<title>Contributed Software</title> <title>Contributed Software</title>
<para revision="251300">&man.jemalloc.3; has been updated to 3.4.0. <para revision="260445">&man.byacc.1; has been updated to version
See <link xlink:href="http://www.facebook.com/jemalloc/">this link</link>. 20140101.</para>
for more details.</para>
<para role="merged"><application>AMD</application> has been updated from 6.0.10 <para revision="259626">Timezone data files have been updated to
to 6.1.5.</para> version 2013i.</para>
<para role="merged"><application>awk</application> has been updated from 1 May
2007 release to the 23 October 2007 release.</para>
<para role="merged"><application>bzip2</application> has been updated from 1.0.4
to 1.0.5.</para>
<para revision="251794"><application>CVS</application> has been removed from the
base system, but is still available from ports</para>
<para revision="251886">Subversion has been imported into the base system and
is installed as <application>svnlite</application>. <application>svnlite</application>
should only be used for checking out &os; source and committing, and does not
replace the full Subversion port.</para>
<para revision="234449"><application>file</application> has been updated to 5.11.</para>
<para revision="252726"><application>hostapd</application> has been
updated from 0.5.8 to 0.5.10.</para>
<para><application>IPFilter</application> has been updated to 5.1.2.</para>
<para revision="250592"><application>less</application> has been updated to
v458.</para>
<para><application>ncurses</application> has been updated from
to 5.7-20081102.</para>
<para role="merged"><application>OpenSSH</application> has been updated
to 6.4.</para>
<para revision="236109"><application>OpenPAM</application> has been updated to
the Micrampelis release.</para>
<para role="merged"><application>sendmail</application> has been updated from
8.14.1 to 8.14.7.</para>
<para role="merged">The timezone database has been updated from
the <application>tzdata2008h</application> release to
the <application>tzdata2009m</application> release.</para>
<para>The stdtime part of libc, &man.zdump.8; and &man.zic.8;
have been updated from the <application>tzcode2004a</application>
release to the <application>tzcode2009h</application> 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.
</para>
<para revision="252726"><application>WPA Supplicant</application> has been
updated to 2.0.</para>
<para role="merged"><application>xz</application> has been updated
from snapshot as of 12 April 2010 to 5.0.0.</para>
<para revision="258231" role="merged">&man.nvi.1; has been updated to 2.1.2.</para>
<para revision="254225">&man.nvi.1; supports wide character locales.</para>
<para revision="258884">&man.lldb.1; has been updated to upstream
snapshot version r196259.</para>
</sect2> </sect2>
<sect2 xml:id="ports"> <sect2 xml:id="ports">
<title>Ports/Packages Collection Infrastructure</title> <title>Ports/Packages Collection Infrastructure</title>
<para revision="257444">The pkg_add, pkg_create, pkg_delete, pkg_info, <para>&nbsp;</para>
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".</para>
</sect2> </sect2>
<sect2 xml:id="releng"> <sect2 xml:id="releng">
<title>Release Engineering and Integration</title> <title>Release Engineering and Integration</title>
<para role="merged">The supported version of <para>&nbsp;</para>
the <application>GNOME</application> desktop environment
(<package>x11/gnome2</package>) has been
updated from 2.20.1 to 2.22.</para>
</sect2> </sect2>
<sect2 xml:id="doc"> <sect2 xml:id="doc">
<title>Documentation</title> <title>Documentation</title>
<para/> <para>&nbsp;</para>
</sect2> </sect2>
</sect1> </sect1>
@ -737,9 +288,8 @@ hv_vmbus_load="YES"</programlisting> Alternatively, the Hyper-V drivers can be
<filename>/usr/src/UPDATING</filename>.</para> <filename>/usr/src/UPDATING</filename>.</para>
<important> <important>
<para>Upgrading &os; should only be attempted after <para>Upgrading &os; should only be attempted after backing up
backing up <emphasis>all</emphasis> data and configuration <emphasis>all</emphasis> data and configuration files.</para>
files.</para>
</important> </important>
</sect1> </sect1>
</article> </article>

View File

@ -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 Time
---------------- ----------------
@ -605,6 +612,7 @@ NetBSD 6.1.2 2013-09-30 [NBD]
Mac OS X 10.9 2013-10-22 [APL] Mac OS X 10.9 2013-10-22 [APL]
OpenBSD 5.4 2013-11-01 [OBD] OpenBSD 5.4 2013-11-01 [OBD]
DragonFly 3.6.0 2013-11-25 [DFB] DragonFly 3.6.0 2013-11-25 [DFB]
FreeBSD 10.0 2014-01-20 [FBD]
Bibliography Bibliography
------------------------ ------------------------

View File

@ -68,6 +68,7 @@ gavin [label="Gavin Atkinson\ngavin@FreeBSD.org\n2011/07/18"]
gjb [label="Glen Barber\ngjb@FreeBSD.org\n2010/09/01"] gjb [label="Glen Barber\ngjb@FreeBSD.org\n2010/09/01"]
hrs [label="Hiroki Sato\nhrs@FreeBSD.org\n2000/07/06"] hrs [label="Hiroki Sato\nhrs@FreeBSD.org\n2000/07/06"]
issyl0 [label="Isabell Long\nissyl0@FreeBSD.org\n2012/04/25"] 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"] jkois [label="Johann Kois\njkois@FreeBSD.org\n2004/11/11"]
joel [label="Joel Dahl\njoel@FreeBSD.org\n2005/04/05"] joel [label="Joel Dahl\njoel@FreeBSD.org\n2005/04/05"]
keramida [label="Giorgos Keramidas\nkeramida@FreeBSD.org\n2001/10/12"] keramida [label="Giorgos Keramidas\nkeramida@FreeBSD.org\n2001/10/12"]
@ -97,6 +98,7 @@ bcr -> wblock
bcr -> eadler bcr -> eadler
bcr -> dru bcr -> dru
bcr -> crees bcr -> crees
bcr -> jgh
blackend -> ale blackend -> ale
@ -163,10 +165,13 @@ nik -> keramida
remko -> jkois remko -> jkois
remko -> rene remko -> rene
remko -> jgh
simon -> josef simon -> josef
simon -> remko simon -> remko
trhodes -> danger trhodes -> danger
trhodes -> jcamou trhodes -> jcamou
wblock -> jgh
} }

View File

@ -105,6 +105,7 @@ gerald [label="Gerald Pfeifer\ngerald@FreeBSD.org\n2002/04/03"]
gjb [label="Glen Barber\ngjb@FreeBSD.org\n2012/06/19"] gjb [label="Glen Barber\ngjb@FreeBSD.org\n2012/06/19"]
glarkin [label="Greg Larkin\nglarkin@FreeBSD.org\n2008/07/17"] glarkin [label="Greg Larkin\nglarkin@FreeBSD.org\n2008/07/17"]
glewis [label="Greg Lewis\nglewis@FreeBSD.org\n2002/04/08"] 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"] gnn [label="George Neville-Neil\ngnn@FreeBSD.org\n2013/09/04"]
hq [label="Herve Quiroz\nhq@FreeBSD.org\n2004/08/05"] hq [label="Herve Quiroz\nhq@FreeBSD.org\n2004/08/05"]
ijliao [label="Ying-Chieh Liao\nijliao@FreeBSD.org\n2001/01/20"] ijliao [label="Ying-Chieh Liao\nijliao@FreeBSD.org\n2001/01/20"]

View File

@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$");
#include <sys/types.h> #include <sys/types.h>
#include <sys/systm.h> #include <sys/systm.h>
#include <sys/bus.h> #include <sys/bus.h>
#include <sys/sysctl.h>
#include <dev/pci/pcivar.h> #include <dev/pci/pcivar.h>
#include <dev/pci/pcireg.h> #include <dev/pci/pcireg.h>
@ -43,7 +44,13 @@ __FBSDID("$FreeBSD$");
#include "vmm_mem.h" #include "vmm_mem.h"
#include "iommu.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 struct iommu_ops *ops;
static void *host_domain; static void *host_domain;
@ -160,7 +167,7 @@ iommu_init(void)
if (error) if (error)
return; return;
iommu_avail = TRUE; iommu_avail = 1;
/* /*
* Create a domain for the devices owned by the host * Create a domain for the devices owned by the host

View File

@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$");
#include <sys/pciio.h> #include <sys/pciio.h>
#include <sys/rman.h> #include <sys/rman.h>
#include <sys/smp.h> #include <sys/smp.h>
#include <sys/sysctl.h>
#include <dev/pci/pcivar.h> #include <dev/pci/pcivar.h>
#include <dev/pci/pcireg.h> #include <dev/pci/pcireg.h>
@ -100,7 +101,12 @@ static struct pptdev {
} msix; } msix;
} pptdevs[64]; } pptdevs[64];
SYSCTL_DECL(_hw_vmm);
SYSCTL_NODE(_hw_vmm, OID_AUTO, ppt, CTLFLAG_RW, 0, "bhyve passthru devices");
static int num_pptdevs; static int num_pptdevs;
SYSCTL_INT(_hw_vmm_ppt, OID_AUTO, devices, CTLFLAG_RD, &num_pptdevs, 0,
"number of pci passthru devices");
static int static int
ppt_probe(device_t dev) ppt_probe(device_t dev)
@ -282,7 +288,14 @@ ppt_teardown_msix(struct pptdev *ppt)
} }
int int
ppt_num_devices(struct vm *vm) ppt_avail_devices(void)
{
return (num_pptdevs);
}
int
ppt_assigned_devices(struct vm *vm)
{ {
int i, num; int i, num;

View File

@ -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); uint64_t addr, uint64_t msg, int numvec);
int ppt_setup_msix(struct vm *vm, int vcpu, int bus, int slot, int func, 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 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); 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. * The following functions should never be called directly.
* Use 'vm_assign_pptdev()' and 'vm_unassign_pptdev()' instead. * Use 'vm_assign_pptdev()' and 'vm_unassign_pptdev()' instead.

View File

@ -266,7 +266,8 @@ vmm_handler(module_t mod, int what, void *arg)
switch (what) { switch (what) {
case MOD_LOAD: case MOD_LOAD:
vmmdev_init(); vmmdev_init();
iommu_init(); if (ppt_avail_devices() > 0)
iommu_init();
error = vmm_init(); error = vmm_init();
if (error == 0) if (error == 0)
vmm_initialized = 1; vmm_initialized = 1;
@ -604,7 +605,7 @@ vm_unassign_pptdev(struct vm *vm, int bus, int slot, int func)
if (error) if (error)
return (error); return (error);
if (ppt_num_devices(vm) == 0) { if (ppt_assigned_devices(vm) == 0) {
vm_iommu_unmap(vm); vm_iommu_unmap(vm);
vm_gpa_unwire(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. * 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, KASSERT(vm->iommu == NULL,
("vm_assign_pptdev: iommu must be NULL")); ("vm_assign_pptdev: iommu must be NULL"));
maxaddr = vmm_mem_maxaddr(); maxaddr = vmm_mem_maxaddr();

View File

@ -60,6 +60,7 @@ device at91_board_sam9g20ek
device at91_board_sam9x25ek device at91_board_sam9x25ek
device at91_board_tsc4370 device at91_board_tsc4370
device at91rm9200 device at91rm9200
device nand
device board_ln2410sbc device board_ln2410sbc
nooptions SMP nooptions SMP

View File

@ -181,8 +181,7 @@ comc_speed_set(struct env_var *ev, int flags, const void *value)
return (CMD_ERROR); return (CMD_ERROR);
} }
if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) != 0 && if (comc_curspeed != speed)
comc_curspeed != speed)
comc_setup(speed, comc_port); comc_setup(speed, comc_port);
env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); 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); return (CMD_ERROR);
} }
if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) != 0 && if (comc_port != port)
comc_port != port)
comc_setup(comc_curspeed, port); comc_setup(comc_curspeed, port);
env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); 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"); unsetenv("hw.uart.console");
comc_curspeed = speed; comc_curspeed = speed;
comc_port = port; 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_cfcr, CFCR_DLAB | COMC_FMT);
outb(comc_port + com_dlbl, COMC_BPS(speed) & 0xff); outb(comc_port + com_dlbl, COMC_BPS(speed) & 0xff);

View File

@ -181,8 +181,7 @@ comc_speed_set(struct env_var *ev, int flags, const void *value)
return (CMD_ERROR); return (CMD_ERROR);
} }
if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) != 0 && if (comc_curspeed != speed)
comc_curspeed != speed)
comc_setup(speed, comc_port); comc_setup(speed, comc_port);
env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); 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); return (CMD_ERROR);
} }
if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) != 0 && if (comc_port != port)
comc_port != port)
comc_setup(comc_curspeed, port); comc_setup(comc_curspeed, port);
env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); 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"); unsetenv("hw.uart.console");
comc_curspeed = speed; comc_curspeed = speed;
comc_port = port; 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_cfcr, CFCR_DLAB | COMC_FMT);
outb(comc_port + com_dlbl, COMC_BPS(speed) & 0xff); outb(comc_port + com_dlbl, COMC_BPS(speed) & 0xff);

View File

@ -985,7 +985,7 @@ pci_read_vpd(device_t pcib, pcicfgregs *cfg)
state = -2; state = -2;
break; break;
} }
dflen = byte2; cfg->vpd.vpd_ros[off].len = dflen = byte2;
if (dflen == 0 && if (dflen == 0 &&
strncmp(cfg->vpd.vpd_ros[off].keyword, "RV", strncmp(cfg->vpd.vpd_ros[off].keyword, "RV",
2) == 0) { 2) == 0) {
@ -1179,6 +1179,17 @@ pci_get_vpd_readonly_method(device_t dev, device_t child, const char *kw,
return (ENXIO); 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 * Find the requested HyperTransport capability and return the offset
* in configuration space via the pointer provided. The function * in configuration space via the pointer provided. The function

View File

@ -406,6 +406,89 @@ pci_conf_match_old32(struct pci_match_conf_old32 *matches, int num_matches,
#endif /* COMPAT_FREEBSD32 */ #endif /* COMPAT_FREEBSD32 */
#endif /* PRE7_COMPAT */ #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 static int
pci_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) 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_devinfo *dinfo;
struct pci_io *io; struct pci_io *io;
struct pci_bar_io *bio; struct pci_bar_io *bio;
struct pci_list_vpd_io *lvio;
struct pci_match_conf *pattern_buf; struct pci_match_conf *pattern_buf;
struct pci_map *pm; struct pci_map *pm;
size_t confsz, iolen, pbufsz; 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; struct pci_match_conf_old *pattern_buf_old = NULL;
io_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 #endif
switch(cmd) { if (!(flag & FWRITE)) {
switch (cmd) {
#ifdef PRE7_COMPAT #ifdef PRE7_COMPAT
#ifdef COMPAT_FREEBSD32 #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; cio32 = (struct pci_conf_io32 *)data;
cio = malloc(sizeof(struct pci_conf_io), M_TEMP, M_WAITOK); cio = malloc(sizeof(struct pci_conf_io), M_TEMP, M_WAITOK);
cio->pat_buf_len = cio32->pat_buf_len; 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; cio = (struct pci_conf_io *)data;
} }
switch(cmd) { switch (cmd) {
#ifdef PRE7_COMPAT #ifdef PRE7_COMPAT
#ifdef COMPAT_FREEBSD32 #ifdef COMPAT_FREEBSD32
case PCIOCGETCONF_OLD32: case PCIOCGETCONF_OLD32:
@ -912,6 +1006,22 @@ pci_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *t
else else
error = ENODEV; error = ENODEV;
break; 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: default:
error = ENOTTY; error = ENOTTY;
break; break;

View File

@ -57,6 +57,7 @@ struct pci_map {
struct vpd_readonly { struct vpd_readonly {
char keyword[2]; char keyword[2];
char *value; char *value;
int len;
}; };
struct vpd_write { struct vpd_write {
@ -525,6 +526,7 @@ extern uint32_t pci_generation;
struct pci_map *pci_find_bar(device_t dev, int reg); struct pci_map *pci_find_bar(device_t dev, int reg);
int pci_bar_enabled(device_t dev, struct pci_map *pm); 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_ADDR 0xC0000
#define VGA_PCI_BIOS_SHADOW_SIZE 131072 #define VGA_PCI_BIOS_SHADOW_SIZE 131072

View File

@ -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)); return (info->fb_ioctl(info->fb_cdev, cmd, data, 0, td));
} }
static int vt_fb_mmap(struct vt_device *vd, vm_ooffset_t offset, static int
vm_paddr_t *paddr, int prot, vm_memattr_t *memattr) 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; struct fb_info *info;

View File

@ -74,7 +74,7 @@ ext2_bmap(struct vop_bmap_args *ap)
if (ap->a_bnp == NULL) if (ap->a_bnp == NULL)
return (0); 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, error = ext4_bmapext(ap->a_vp, ap->a_bn, &blkno,
ap->a_runp, ap->a_runb); ap->a_runp, ap->a_runb);
else else

View File

@ -50,22 +50,24 @@
/* /*
* Inode flags * 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_SECRM 0x00000001 /* Secure deletion */
#define EXT2_UNRM 0x00000002 /* Undelete */ #define EXT2_UNRM 0x00000002 /* Undelete */
#define EXT2_COMPR 0x00000004 /* Compress file */ #define EXT2_COMPR 0x00000004 /* Compress file */
#define EXT2_SYNC 0x00000008 /* Synchronous updates */ #define EXT2_SYNC 0x00000008 /* Synchronous updates */
#define EXT2_IMMUTABLE 0x00000010 /* Immutable file */ #define EXT2_IMMUTABLE 0x00000010 /* Immutable file */
#define EXT2_APPEND 0x00000020 /* writes to file may only append */ #define EXT2_APPEND 0x00000020 /* Writes to file may only append */
#define EXT2_NODUMP 0x00000040 /* do not dump file */ #define EXT2_NODUMP 0x00000040 /* Do not dump file */
#define EXT2_NOATIME 0x00000080 /* do not update atime */ #define EXT2_NOATIME 0x00000080 /* Do not update atime */
#define EXT4_INDEX 0x00001000 /* Hash-indexed directory */
#define EXT4_INDEX 0x00001000 /* hash-indexed directory */
#define EXT4_IMAGIC 0x00002000 /* AFS directory */ #define EXT4_IMAGIC 0x00002000 /* AFS directory */
#define EXT4_JOURNAL_DATA 0x00004000 /* file data should be journaled */ #define EXT4_JOURNAL_DATA 0x00004000 /* File data should be journaled */
#define EXT4_NOTAIL 0x00008000 /* file tail should not be merged */ #define EXT4_NOTAIL 0x00008000 /* File tail should not be merged */
#define EXT4_DIRSYNC 0x00010000 /* dirsync behaviour */ #define EXT4_DIRSYNC 0x00010000 /* Dirsync behaviour */
#define EXT4_TOPDIR 0x00020000 /* Top of directory hierarchies*/ #define EXT4_TOPDIR 0x00020000 /* Top of directory hierarchies*/
#define EXT4_HUGE_FILE 0x00040000 /* Set to each huge file */ #define EXT4_HUGE_FILE 0x00040000 /* Set to each huge file */
#define EXT4_EXTENTS 0x00080000 /* Inode uses extents */ #define EXT4_EXTENTS 0x00080000 /* Inode uses extents */

View File

@ -91,7 +91,7 @@ ext2_htree_has_idx(struct inode *ip)
{ {
#ifdef EXT2FS_HTREE #ifdef EXT2FS_HTREE
if (EXT2_HAS_COMPAT_FEATURE(ip->i_e2fs, EXT2F_COMPAT_DIRHASHINDEX) && if (EXT2_HAS_COMPAT_FEATURE(ip->i_e2fs, EXT2F_COMPAT_DIRHASHINDEX) &&
ip->i_flags & EXT4_INDEX) ip->i_flags & E4_INDEX)
return (1); return (1);
else else
#endif #endif
@ -656,7 +656,7 @@ ext2_htree_create_index(struct vnode *vp, struct componentname *cnp,
((char *)ep + ep->e2d_reclen); ((char *)ep + ep->e2d_reclen);
ep->e2d_reclen = buf1 + blksize - (char *)ep; ep->e2d_reclen = buf1 + blksize - (char *)ep;
dp->i_flags |= EXT4_INDEX; dp->i_flags |= E4_INDEX;
/* /*
* Initialize index root. * Initialize index root.

View File

@ -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_APPEND) ? SF_APPEND : 0;
ip->i_flags |= (ei->e2di_flags & EXT2_IMMUTABLE) ? SF_IMMUTABLE : 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 & 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; ip->i_blocks = ei->e2di_nblock;
if (E2DI_HAS_HUGE_FILE(ip)) { if (E2DI_HAS_HUGE_FILE(ip)) {
ip->i_blocks |= (uint64_t)ei->e2di_nblock_high << 32; ip->i_blocks |= (uint64_t)ei->e2di_nblock_high << 32;

View File

@ -888,8 +888,9 @@ ext2_direnter(struct inode *ip, struct vnode *dvp, struct componentname *cnp)
if (ext2_htree_has_idx(dp)) { if (ext2_htree_has_idx(dp)) {
error = ext2_htree_add_entry(dvp, &newdir, cnp); error = ext2_htree_add_entry(dvp, &newdir, cnp);
if (error) { 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 |= IN_CHANGE | IN_UPDATE;
dp->i_flags &= ~E4_INDEX;
} }
return (error); return (error);
} }

View File

@ -82,10 +82,10 @@ ext2_blkatoff(struct vnode *vp, off_t offset, char **res, struct buf **bpp)
*bpp = NULL; *bpp = NULL;
/* /*
* The EXT4_EXTENTS requires special treatment, otherwise we can * E4_EXTENTS requires special treatment otherwise we can fall
* fall back to the normal path. * back to the normal path.
*/ */
if (!(ip->i_flags & EXT4_EXTENTS)) if (!(ip->i_flags & E4_EXTENTS))
goto normal; goto normal;
memset(&path, 0, sizeof(path)); memset(&path, 0, sizeof(path));
@ -110,7 +110,7 @@ ext2_blkatoff(struct vnode *vp, off_t offset, char **res, struct buf **bpp)
if (res) if (res)
*res = (char *)bp->b_data + blkoff(fs, offset); *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. * reset b_offset here.
*/ */
bp->b_offset = lbn * bsize; bp->b_offset = lbn * bsize;

View File

@ -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 * blocks are zeroed out - ext2_balloc depends on this
* although for regular files and directories only * although for regular files and directories only
* *
* If EXT4_EXTENTS flag is enabled, unused blocks aren't * If E4_EXTENTS is enabled, unused blocks are not zeroed
* zeroed out because we could corrupt the extent tree. * 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))) { (S_ISDIR(ip->i_mode) || S_ISREG(ip->i_mode))) {
used_blocks = (ip->i_size+fs->e2fs_bsize-1) / fs->e2fs_bsize; used_blocks = (ip->i_size+fs->e2fs_bsize-1) / fs->e2fs_bsize;
for (i = used_blocks; i < EXT2_NDIR_BLOCKS; i++) for (i = used_blocks; i < EXT2_NDIR_BLOCKS; i++)

View File

@ -344,6 +344,8 @@ ext2_getattr(struct vop_getattr_args *ap)
vap->va_birthtime.tv_nsec = ip->i_birthnsec; vap->va_birthtime.tv_nsec = ip->i_birthnsec;
} }
vap->va_flags = ip->i_flags; 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_gen = ip->i_gen;
vap->va_blocksize = vp->v_mount->mnt_stat.f_iosize; vap->va_blocksize = vp->v_mount->mnt_stat.f_iosize;
vap->va_bytes = dbtob((u_quad_t)ip->i_blocks); vap->va_bytes = dbtob((u_quad_t)ip->i_blocks);
@ -1615,7 +1617,7 @@ ext2_read(struct vop_read_args *ap)
ip = VTOI(vp); ip = VTOI(vp);
/*EXT4_EXT_LOCK(ip);*/ /*EXT4_EXT_LOCK(ip);*/
if (ip->i_flags & EXT4_EXTENTS) if (ip->i_flags & E4_EXTENTS)
error = ext4_ext_read(ap); error = ext4_ext_read(ap);
else else
error = ext2_ind_read(ap); error = ext2_ind_read(ap);

View File

@ -153,6 +153,13 @@ struct inode {
#define IN_LAZYACCESS 0x0100 /* Process IN_ACCESS after the #define IN_LAZYACCESS 0x0100 /* Process IN_ACCESS after the
suspension finished */ 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 #define i_devvp i_ump->um_devvp
#ifdef _KERNEL #ifdef _KERNEL

View File

@ -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 * of the maximal space buffer map. This roughly corresponds
* to the amount of the buffer mapped for typical UFS load. * to the amount of the buffer mapped for typical UFS load.
* *

View File

@ -236,13 +236,45 @@ macio_add_intr(phandle_t devnode, struct macio_devinfo *dinfo)
static void static void
macio_add_reg(phandle_t devnode, struct macio_devinfo *dinfo) macio_add_reg(phandle_t devnode, struct macio_devinfo *dinfo)
{ {
struct macio_reg *reg; struct macio_reg *reg, *regp;
int i, nreg; phandle_t child;
char buf[8];
int i, layout_id = 0, nreg, res;
nreg = OF_getprop_alloc(devnode, "reg", sizeof(*reg), (void **)&reg); nreg = OF_getprop_alloc(devnode, "reg", sizeof(*reg), (void **)&reg);
if (nreg == -1) if (nreg == -1)
return; 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 **)&regp);
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++) { for (i = 0; i < nreg; i++) {
resource_list_add(&dinfo->mdi_resources, SYS_RES_MEMORY, i, resource_list_add(&dinfo->mdi_resources, SYS_RES_MEMORY, i,
reg[i].mr_base, reg[i].mr_base + reg[i].mr_size, reg[i].mr_base, reg[i].mr_base + reg[i].mr_size,
@ -284,6 +316,7 @@ macio_attach(device_t dev)
phandle_t subchild; phandle_t subchild;
device_t cdev; device_t cdev;
u_int reg[3]; u_int reg[3];
char compat[32];
int error, quirks; int error, quirks;
sc = device_get_softc(dev); sc = device_get_softc(dev);
@ -297,6 +330,9 @@ macio_attach(device_t dev)
return (ENXIO); 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_base = reg[2];
sc->sc_size = MACIO_REG_SIZE; sc->sc_size = MACIO_REG_SIZE;
@ -378,6 +414,21 @@ macio_attach(device_t dev)
bus_write_4(sc->sc_memr, HEATHROW_FCR, fcr); 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)); return (bus_generic_attach(dev));

View File

@ -48,6 +48,9 @@
#define FCR_ENET_ENABLE 0x60000000 #define FCR_ENET_ENABLE 0x60000000
#define FCR_ENET_RESET 0x80000000 #define FCR_ENET_RESET 0x80000000
#define FCR1_I2S0_CLK_ENABLE 0x00001000
#define FCR1_I2S0_ENABLE 0x00002000
/* Used only by macio_enable_wireless() for now. */ /* Used only by macio_enable_wireless() for now. */
#define KEYLARGO_GPIO_BASE 0x6a #define KEYLARGO_GPIO_BASE 0x6a
#define KEYLARGO_EXTINT_GPIO_REG_BASE 0x58 #define KEYLARGO_EXTINT_GPIO_REG_BASE 0x58

View File

@ -116,10 +116,31 @@ struct pci_bar_io {
uint64_t pbi_length; /* length of BAR */ 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 PCIOCGETCONF _IOWR('p', 5, struct pci_conf_io)
#define PCIOCREAD _IOWR('p', 2, struct pci_io) #define PCIOCREAD _IOWR('p', 2, struct pci_io)
#define PCIOCWRITE _IOWR('p', 3, struct pci_io) #define PCIOCWRITE _IOWR('p', 3, struct pci_io)
#define PCIOCATTACHED _IOWR('p', 4, struct pci_io) #define PCIOCATTACHED _IOWR('p', 4, struct pci_io)
#define PCIOCGETBAR _IOWR('p', 6, struct pci_bar_io) #define PCIOCGETBAR _IOWR('p', 6, struct pci_bar_io)
#define PCIOCLISTVPD _IOWR('p', 7, struct pci_list_vpd_io)
#endif /* !_SYS_PCIIO_H_ */ #endif /* !_SYS_PCIIO_H_ */

View File

@ -1121,7 +1121,7 @@ vm_pageout_scan(struct vm_domain *vmd, int pass)
} else if ((m->flags & PG_WINATCFLS) == 0 && pass < 2) { } else if ((m->flags & PG_WINATCFLS) == 0 && pass < 2) {
/* /*
* Dirty pages need to be paged out, but flushing * 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 * a clean page. Rather then artificially limiting
* the number of pages we can flush, we instead give * the number of pages we can flush, we instead give
* dirty pages extra priority on the inactive queue * 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 * to be freed and dirty pages to be moved to the end
* of the queue. Since dirty pages are also moved to * of the queue. Since dirty pages are also moved to
* the end of the queue once-cleaned, this gives * 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. * of dirty pages.
* *
* We can't wait forever for the vnode lock, we might * We can't wait forever for the vnode lock, we might

View File

@ -57,6 +57,9 @@ int legacy_pcib_write_ivar(device_t dev, device_t child, int which,
uintptr_t value); uintptr_t value);
struct resource *legacy_pcib_alloc_resource(device_t dev, device_t child, 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 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, int legacy_pcib_map_msi(device_t pcib, device_t dev, int irq,
uint64_t *addr, uint32_t *data); uint64_t *addr, uint32_t *data);

View File

@ -92,7 +92,7 @@ legacy_pcib_route_interrupt(device_t pcib, device_t dev, int pin)
/* Pass MSI requests up to the nexus. */ /* Pass MSI requests up to the nexus. */
static int int
legacy_pcib_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, legacy_pcib_alloc_msi(device_t pcib, device_t dev, int count, int maxcount,
int *irqs) int *irqs)
{ {
@ -103,7 +103,7 @@ legacy_pcib_alloc_msi(device_t pcib, device_t dev, int count, int maxcount,
irqs)); irqs));
} }
static int int
legacy_pcib_alloc_msix(device_t pcib, device_t dev, int *irq) legacy_pcib_alloc_msix(device_t pcib, device_t dev, int *irq)
{ {
device_t bus; device_t bus;

View File

@ -45,8 +45,9 @@ __FBSDID("$FreeBSD$");
#include <machine/cputypes.h> #include <machine/cputypes.h>
#include <machine/md_var.h> #include <machine/md_var.h>
#include <machine/pci_cfgreg.h> #include <x86/legacyvar.h>
#include <machine/specialreg.h> #include <x86/pci_cfgreg.h>
#include <x86/specialreg.h>
#include <dev/pci/pcireg.h> #include <dev/pci/pcireg.h>
#include <dev/pci/pcivar.h> #include <dev/pci/pcivar.h>
@ -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 static int
qpi_pcib_map_msi(device_t pcib, device_t dev, int irq, uint64_t *addr, qpi_pcib_map_msi(device_t pcib, device_t dev, int irq, uint64_t *addr,
uint32_t *data) uint32_t *data)
@ -302,11 +267,11 @@ static device_method_t qpi_pcib_methods[] = {
/* pcib interface */ /* pcib interface */
DEVMETHOD(pcib_maxslots, pcib_maxslots), DEVMETHOD(pcib_maxslots, pcib_maxslots),
DEVMETHOD(pcib_read_config, qpi_pcib_read_config), DEVMETHOD(pcib_read_config, legacy_pcib_read_config),
DEVMETHOD(pcib_write_config, qpi_pcib_write_config), DEVMETHOD(pcib_write_config, legacy_pcib_write_config),
DEVMETHOD(pcib_alloc_msi, qpi_pcib_alloc_msi), DEVMETHOD(pcib_alloc_msi, legacy_pcib_alloc_msi),
DEVMETHOD(pcib_release_msi, pcib_release_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_release_msix, pcib_release_msix),
DEVMETHOD(pcib_map_msi, qpi_pcib_map_msi), DEVMETHOD(pcib_map_msi, qpi_pcib_map_msi),

View File

@ -76,27 +76,6 @@ mptable_hostb_attach(device_t dev)
return (bus_generic_attach(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 #ifdef NEW_PCIB
static int static int
mptable_is_isa_range(u_long start, u_long end) 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_read_config, legacy_pcib_read_config),
DEVMETHOD(pcib_write_config, legacy_pcib_write_config), DEVMETHOD(pcib_write_config, legacy_pcib_write_config),
DEVMETHOD(pcib_route_interrupt, mptable_pci_route_interrupt), 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_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_release_msix, pcib_release_msix),
DEVMETHOD(pcib_map_msi, legacy_pcib_map_msi), DEVMETHOD(pcib_map_msi, legacy_pcib_map_msi),

View File

@ -33,7 +33,7 @@
.Nd diagnostic utility for the PCI bus .Nd diagnostic utility for the PCI bus
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm .Nm
.Fl l Oo Fl bcev Oc Op Ar device .Fl l Oo Fl bcevV Oc Op Ar device
.Nm .Nm
.Fl a Ar device .Fl a Ar device
.Nm .Nm
@ -182,6 +182,28 @@ option is supplied,
will attempt to load the vendor/device information database, and print will attempt to load the vendor/device information database, and print
vendor, device, class and subclass identification strings for each device. vendor, device, class and subclass identification strings for each device.
.Pp .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 If the optional
.Ar device .Ar device
argument is given with the argument is given with the

View File

@ -71,8 +71,9 @@ TAILQ_HEAD(,pci_vendor_info) pci_vendors;
static struct pcisel getsel(const char *str); static struct pcisel getsel(const char *str);
static void list_bars(int fd, struct pci_conf *p); static void list_bars(int fd, struct pci_conf *p);
static void list_devs(const char *name, int verbose, int bars, int caps, 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_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_class(struct pci_conf *p);
static const char *guess_subclass(struct pci_conf *p); static const char *guess_subclass(struct pci_conf *p);
static int load_vendors(void); static int load_vendors(void);
@ -86,7 +87,7 @@ static void
usage(void) usage(void)
{ {
fprintf(stderr, "%s\n%s\n%s\n%s\n", fprintf(stderr, "%s\n%s\n%s\n%s\n",
"usage: pciconf -l [-bcev] [device]", "usage: pciconf -l [-bcevV] [device]",
" pciconf -a device", " pciconf -a device",
" pciconf -r [-b | -h] device addr[:addr2]", " pciconf -r [-b | -h] device addr[:addr2]",
" pciconf -w [-b | -h] device addr value"); " pciconf -w [-b | -h] device addr value");
@ -98,13 +99,13 @@ main(int argc, char **argv)
{ {
int c; int c;
int listmode, readmode, writemode, attachedmode; int listmode, readmode, writemode, attachedmode;
int bars, caps, errors, verbose; int bars, caps, errors, verbose, vpd;
int byte, isshort; int byte, isshort;
listmode = readmode = writemode = attachedmode = 0; 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) { switch(c) {
case 'a': case 'a':
attachedmode = 1; attachedmode = 1;
@ -143,6 +144,10 @@ main(int argc, char **argv)
verbose = 1; verbose = 1;
break; break;
case 'V':
vpd = 1;
break;
default: default:
usage(); usage();
} }
@ -156,7 +161,7 @@ main(int argc, char **argv)
if (listmode) { if (listmode) {
list_devs(optind + 1 == argc ? argv[optind] : NULL, verbose, list_devs(optind + 1 == argc ? argv[optind] : NULL, verbose,
bars, caps, errors); bars, caps, errors, vpd);
} else if (attachedmode) { } else if (attachedmode) {
chkattached(argv[optind]); chkattached(argv[optind]);
} else if (readmode) { } else if (readmode) {
@ -173,7 +178,8 @@ main(int argc, char **argv)
} }
static void 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; int fd;
struct pci_conf_io pc; 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); list_caps(fd, p);
if (errors) if (errors)
list_errors(fd, p); list_errors(fd, p);
if (vpd)
list_vpd(fd, p);
} }
} while (pc.status == PCI_GETCONF_MORE_DEVS); } while (pc.status == PCI_GETCONF_MORE_DEVS);
@ -339,6 +347,63 @@ list_verbose(struct pci_conf *p)
printf(" subclass = %s\n", dp); 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. * This is a direct cut-and-paste from the table in sys/dev/pci/pci.c.
*/ */

View File

@ -34,6 +34,7 @@
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/sysctl.h>
#include <sys/utsname.h> #include <sys/utsname.h>
#include <sys/queue.h> #include <sys/queue.h>
#include <net/if.h> #include <net/if.h>
@ -780,6 +781,23 @@ usage(void)
exit(EX_USAGE); 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 int
main(int argc, char *argv[]) main(int argc, char *argv[])
{ {
@ -872,6 +890,8 @@ main(int argc, char *argv[])
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
} }
check_usb_pf_sysctl();
p->fd = fd = open("/dev/bpf", O_RDONLY); p->fd = fd = open("/dev/bpf", O_RDONLY);
if (p->fd < 0) if (p->fd < 0)
err(EXIT_FAILURE, "Could not open BPF device"); err(EXIT_FAILURE, "Could not open BPF device");