MFH@260988.
This commit is contained in:
parent
e1172e7ec6
commit
271437b190
@ -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;
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -1,33 +1,20 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!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">
|
||||
%release;
|
||||
]>
|
||||
<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>
|
||||
|
||||
<pubdate>$FreeBSD$</pubdate>
|
||||
|
||||
<copyright>
|
||||
<year>2000</year>
|
||||
<year>2001</year>
|
||||
<year>2002</year>
|
||||
<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>
|
||||
<year>2014</year>
|
||||
<holder role="mailto:doc@FreeBSD.org">The &os; Documentation
|
||||
Project</holder>
|
||||
</copyright>
|
||||
|
||||
<legalnotice xml:id="trademarks" role="trademarks">
|
||||
@ -40,13 +27,13 @@
|
||||
</legalnotice>
|
||||
|
||||
<abstract>
|
||||
<para>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.</para>
|
||||
<para>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.</para>
|
||||
</abstract>
|
||||
</info>
|
||||
|
||||
@ -54,30 +41,32 @@
|
||||
<title>Introduction</title>
|
||||
|
||||
<para>This 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;.</para>
|
||||
&release.current;. It describes recently added, changed, or
|
||||
deleted features of &os;. It also provides some notes on
|
||||
upgrading from previous versions of &os;.</para>
|
||||
|
||||
<para releasetype="current">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 <uri xlink:href="&release.url;">&release.url;</uri>.</para>
|
||||
<para releasetype="current">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 <uri
|
||||
xlink:href="&release.url;">&release.url;</uri>.</para>
|
||||
|
||||
<para releasetype="snapshot">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 <uri xlink:href="&release.url;">&release.url;</uri>.</para>
|
||||
<para releasetype="snapshot">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
|
||||
<uri xlink:href="&release.url;">&release.url;</uri>.</para>
|
||||
|
||||
<para releasetype="release">This distribution of &os; &release.current; is a
|
||||
&release.type; distribution. It can be found at <uri xlink:href="&release.url;">&release.url;</uri> or any of its mirrors. More
|
||||
information on obtaining this (or other) &release.type;
|
||||
distributions of &os; can be found in the <link 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 releasetype="release">This distribution of &os;
|
||||
&release.current; is a &release.type; distribution. It can be
|
||||
found at <uri xlink:href="&release.url;">&release.url;</uri> or
|
||||
any of its mirrors. More information on obtaining this (or other)
|
||||
&release.type; distributions of &os; can be found in the <link
|
||||
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
|
||||
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.</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1 xml:id="new">
|
||||
<title>What's New</title>
|
||||
|
||||
<para>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.
|
||||
</para>
|
||||
<para>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.</para>
|
||||
|
||||
<para>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.</para>
|
||||
<para>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.</para>
|
||||
|
||||
<sect2 xml:id="security">
|
||||
<title>Security Advisories</title>
|
||||
|
||||
<para/>
|
||||
<para>No advisories.</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="kernel">
|
||||
<title>Kernel Changes</title>
|
||||
|
||||
<para revision="248508">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.</para>
|
||||
<para revision="260903">Support for GPS ports has been added to
|
||||
&man.uhso.4;.</para>
|
||||
|
||||
<para arch="amd64" revision="254466">The maximum amount of memory the &os; kernel
|
||||
can address has been increased from 1TB to 4TB.</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>
|
||||
<para revision="260888">The <filename>VT</filename> kernel
|
||||
configuration file has been added, which enables the new
|
||||
<literal>vt</literal> console driver.</para>
|
||||
|
||||
<sect3 xml:id="kernel-virtualization">
|
||||
<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.
|
||||
&man.vmx.4; is a VMware VMXNET3 ethernet driver ported from
|
||||
OpenBSD.</para>
|
||||
<para revision="260847">The &man.virtio_random.4; driver has
|
||||
been added to harvest entropy from the host system.</para>
|
||||
|
||||
<para revision="255744" arch="amd64,i386">Xen PVHVM virtualization is now
|
||||
part of the GENERIC kernel.</para>
|
||||
<para revision="260583">Unmapped IO support has been added to
|
||||
&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; 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 xml:id="kernel-arm">
|
||||
<title>ARM support</title>
|
||||
|
||||
<para revision="239922">Raspberry PI support has been added.
|
||||
Refer to these <link xlink:href="http://kernelnomicon.org/?p=164">setup instructions</link>
|
||||
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>
|
||||
|
||||
<para revision="260921">The &man.nand.4; device is enabled for
|
||||
ARM devices by default.</para>
|
||||
</sect3>
|
||||
|
||||
<sect3 xml:id="boot">
|
||||
<title>Boot Loader Changes</title>
|
||||
|
||||
<para arch="amd64,i386" role="merged">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.</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>
|
||||
|
||||
<para> </para>
|
||||
</sect3>
|
||||
|
||||
<sect3 xml:id="proc">
|
||||
<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">
|
||||
<title>Multimedia Support</title>
|
||||
|
||||
<para revision="240609">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.</para>
|
||||
|
||||
<para> </para>
|
||||
</sect4>
|
||||
|
||||
<sect4 xml:id="net-if">
|
||||
<title>Network Interface Support</title>
|
||||
|
||||
<para>The &man.ale.4; driver has been added to provide support
|
||||
for Atheros AR8121/AR8113/AR8114 Gigabit/Fast Ethernet controllers.</para>
|
||||
<para revision="260552">Firmware for &intel;
|
||||
Centrino™ Wireless-N 105 devices has been added
|
||||
to the base system.</para>
|
||||
|
||||
<para>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.</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="260448">Support for the &intel;
|
||||
Centrino™ Wireless-N 135 chipset has been
|
||||
added.</para>
|
||||
|
||||
<para revision="258830">Support for Broadcom chipsets
|
||||
BCM57764, BCM57767, BCM57782, BCM57786 and BCM57787 has
|
||||
been added to &man.bge.4;.</para>
|
||||
</sect4>
|
||||
</sect3>
|
||||
|
||||
<sect3 xml:id="net-proto">
|
||||
<title>Network Protocols</title>
|
||||
|
||||
<para revision="228571">&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.</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>
|
||||
|
||||
<para> </para>
|
||||
</sect3>
|
||||
|
||||
<sect3 xml:id="disks">
|
||||
<title>Disks and Storage</title>
|
||||
|
||||
<para role="merged">The &man.aac.4; driver now supports volumes larger than
|
||||
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>
|
||||
|
||||
<para> </para>
|
||||
</sect3>
|
||||
|
||||
<sect3 xml:id="fs">
|
||||
<title>File Systems</title>
|
||||
|
||||
<para revision="255570">A new kernel-based iSCSI target and initiator has been
|
||||
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>
|
||||
<para> </para>
|
||||
|
||||
<sect4 xml:id="fs-zfs">
|
||||
<title>ZFS</title>
|
||||
|
||||
<para revision="">&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.</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>
|
||||
|
||||
<para> </para>
|
||||
</sect4>
|
||||
|
||||
</sect3>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="userland">
|
||||
<title>Userland Changes</title>
|
||||
|
||||
<para revision="255321">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.
|
||||
</para>
|
||||
<para revision="260926">Support for displaying VPD for PCI devices
|
||||
via &man.pciconf.8; has been added.</para>
|
||||
|
||||
<para revision="251662">&man.clang.1; and llvm have been updated to
|
||||
version 3.3 release. Please refer to
|
||||
<link xlink:href="http://llvm.org/releases/3.3/tools/clang/docs/ReleaseNotes.html">
|
||||
Clang 3.3 Release Notes.</link></para>
|
||||
<para revision="260913">A new flag, <quote>onifconsole</quote> has
|
||||
been added to <filename>/etc/ttys</filename>. 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 <literal>off</literal>.</para>
|
||||
|
||||
<para role="merged" revision="255949">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.</para>
|
||||
<para revision="260910">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 <literal>-l</literal> flag
|
||||
to restrict the output to only listing details about a single
|
||||
device.</para>
|
||||
|
||||
<para revision="225937">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;.</para>
|
||||
<para revision="260594">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
|
||||
<quote>Exec format error.</quote>.</para>
|
||||
|
||||
<para revision="256106">&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.</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 "emacs" 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>
|
||||
<para revision="258838">The &man.casperd.8; daemon has been added,
|
||||
which provides access to functionality that is not available in
|
||||
the <quote>capability mode</quote> sandbox.</para>
|
||||
|
||||
<sect3 xml:id="rc-scripts">
|
||||
<title><filename>/etc/rc.d</filename> Scripts</title>
|
||||
|
||||
<para/>
|
||||
|
||||
<para> </para>
|
||||
</sect3>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="contrib">
|
||||
<title>Contributed Software</title>
|
||||
|
||||
<para revision="251300">&man.jemalloc.3; has been updated to 3.4.0.
|
||||
See <link xlink:href="http://www.facebook.com/jemalloc/">this link</link>.
|
||||
for more details.</para>
|
||||
<para revision="260445">&man.byacc.1; has been updated to version
|
||||
20140101.</para>
|
||||
|
||||
<para role="merged"><application>AMD</application> has been updated from 6.0.10
|
||||
to 6.1.5.</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="259626">Timezone data files have been updated to
|
||||
version 2013i.</para>
|
||||
|
||||
<para revision="258884">&man.lldb.1; has been updated to upstream
|
||||
snapshot version r196259.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="ports">
|
||||
<title>Ports/Packages Collection Infrastructure</title>
|
||||
|
||||
<para revision="257444">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".</para>
|
||||
|
||||
<para> </para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="releng">
|
||||
<title>Release Engineering and Integration</title>
|
||||
|
||||
<para role="merged">The supported version of
|
||||
the <application>GNOME</application> desktop environment
|
||||
(<package>x11/gnome2</package>) has been
|
||||
updated from 2.20.1 to 2.22.</para>
|
||||
|
||||
<para> </para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="doc">
|
||||
<title>Documentation</title>
|
||||
|
||||
<para/>
|
||||
|
||||
<para> </para>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
@ -737,9 +288,8 @@ hv_vmbus_load="YES"</programlisting> Alternatively, the Hyper-V drivers can be
|
||||
<filename>/usr/src/UPDATING</filename>.</para>
|
||||
|
||||
<important>
|
||||
<para>Upgrading &os; should only be attempted after
|
||||
backing up <emphasis>all</emphasis> data and configuration
|
||||
files.</para>
|
||||
<para>Upgrading &os; should only be attempted after backing up
|
||||
<emphasis>all</emphasis> data and configuration files.</para>
|
||||
</important>
|
||||
</sect1>
|
||||
</article>
|
||||
|
@ -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
|
||||
------------------------
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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"]
|
||||
|
@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/types.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/bus.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
#include <dev/pci/pcivar.h>
|
||||
#include <dev/pci/pcireg.h>
|
||||
@ -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
|
||||
|
@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/pciio.h>
|
||||
#include <sys/rman.h>
|
||||
#include <sys/smp.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
#include <dev/pci/pcivar.h>
|
||||
#include <dev/pci/pcireg.h>
|
||||
@ -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;
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
@ -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 */
|
||||
|
@ -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.
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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++)
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
*
|
||||
|
@ -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));
|
||||
|
@ -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
|
||||
|
@ -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_ */
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
@ -45,8 +45,9 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <machine/cputypes.h>
|
||||
#include <machine/md_var.h>
|
||||
#include <machine/pci_cfgreg.h>
|
||||
#include <machine/specialreg.h>
|
||||
#include <x86/legacyvar.h>
|
||||
#include <x86/pci_cfgreg.h>
|
||||
#include <x86/specialreg.h>
|
||||
|
||||
#include <dev/pci/pcireg.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
|
||||
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),
|
||||
|
||||
|
@ -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),
|
||||
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
*/
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/utsname.h>
|
||||
#include <sys/queue.h>
|
||||
#include <net/if.h>
|
||||
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user