mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-18 03:06:43 +00:00
Merge branch 'linus' into x86/urgent, to pick up dependent changes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
commit
00f5764dbb
@ -387,14 +387,14 @@ ForEachMacros:
|
||||
- 'rhl_for_each_entry_rcu'
|
||||
- 'rhl_for_each_rcu'
|
||||
- 'rht_for_each'
|
||||
- 'rht_for_each_continue'
|
||||
- 'rht_for_each_from'
|
||||
- 'rht_for_each_entry'
|
||||
- 'rht_for_each_entry_continue'
|
||||
- 'rht_for_each_entry_from'
|
||||
- 'rht_for_each_entry_rcu'
|
||||
- 'rht_for_each_entry_rcu_continue'
|
||||
- 'rht_for_each_entry_rcu_from'
|
||||
- 'rht_for_each_entry_safe'
|
||||
- 'rht_for_each_rcu'
|
||||
- 'rht_for_each_rcu_continue'
|
||||
- 'rht_for_each_rcu_from'
|
||||
- '__rq_for_each_bio'
|
||||
- 'rq_for_each_bvec'
|
||||
- 'rq_for_each_segment'
|
||||
|
16
.gitignore
vendored
16
.gitignore
vendored
@ -58,6 +58,7 @@ modules.builtin
|
||||
/vmlinuz
|
||||
/System.map
|
||||
/Module.markers
|
||||
/modules.builtin.modinfo
|
||||
|
||||
#
|
||||
# RPM spec file (make rpm-pkg)
|
||||
@ -90,10 +91,10 @@ modules.builtin
|
||||
#
|
||||
# Generated include files
|
||||
#
|
||||
include/config
|
||||
include/generated
|
||||
include/ksym
|
||||
arch/*/include/generated
|
||||
/include/config/
|
||||
/include/generated/
|
||||
/include/ksym/
|
||||
/arch/*/include/generated/
|
||||
|
||||
# stgit generated dirs
|
||||
patches-*
|
||||
@ -129,7 +130,12 @@ signing_key.x509
|
||||
x509.genkey
|
||||
|
||||
# Kconfig presets
|
||||
all.config
|
||||
/all.config
|
||||
/alldef.config
|
||||
/allmod.config
|
||||
/allno.config
|
||||
/allrandom.config
|
||||
/allyes.config
|
||||
|
||||
# Kdevelop4
|
||||
*.kdev4
|
||||
|
16
.mailmap
16
.mailmap
@ -16,6 +16,11 @@ Alan Cox <alan@lxorguk.ukuu.org.uk>
|
||||
Alan Cox <root@hraefn.swansea.linux.org.uk>
|
||||
Aleksey Gorelov <aleksey_gorelov@phoenix.com>
|
||||
Aleksandar Markovic <aleksandar.markovic@mips.com> <aleksandar.markovic@imgtec.com>
|
||||
Alex Shi <alex.shi@linux.alibaba.com> <alex.shi@intel.com>
|
||||
Alex Shi <alex.shi@linux.alibaba.com> <alex.shi@linaro.org>
|
||||
Alexei Starovoitov <ast@kernel.org> <ast@plumgrid.com>
|
||||
Alexei Starovoitov <ast@kernel.org> <alexei.starovoitov@gmail.com>
|
||||
Alexei Starovoitov <ast@kernel.org> <ast@fb.com>
|
||||
Al Viro <viro@ftp.linux.org.uk>
|
||||
Al Viro <viro@zenIV.linux.org.uk>
|
||||
Andi Shyti <andi@etezian.org> <andi.shyti@samsung.com>
|
||||
@ -46,6 +51,12 @@ Christoph Hellwig <hch@lst.de>
|
||||
Christophe Ricard <christophe.ricard@gmail.com>
|
||||
Corey Minyard <minyard@acm.org>
|
||||
Damian Hobson-Garcia <dhobsong@igel.co.jp>
|
||||
Daniel Borkmann <daniel@iogearbox.net> <dborkman@redhat.com>
|
||||
Daniel Borkmann <daniel@iogearbox.net> <dborkmann@redhat.com>
|
||||
Daniel Borkmann <daniel@iogearbox.net> <danborkmann@iogearbox.net>
|
||||
Daniel Borkmann <daniel@iogearbox.net> <daniel.borkmann@tik.ee.ethz.ch>
|
||||
Daniel Borkmann <daniel@iogearbox.net> <danborkmann@googlemail.com>
|
||||
Daniel Borkmann <daniel@iogearbox.net> <dxchgb@gmail.com>
|
||||
David Brownell <david-b@pacbell.net>
|
||||
David Woodhouse <dwmw2@shinybook.infradead.org>
|
||||
Dengcheng Zhu <dzhu@wavecomp.com> <dengcheng.zhu@mips.com>
|
||||
@ -117,6 +128,8 @@ Leonid I Ananiev <leonid.i.ananiev@intel.com>
|
||||
Linas Vepstas <linas@austin.ibm.com>
|
||||
Linus Lüssing <linus.luessing@c0d3.blue> <linus.luessing@web.de>
|
||||
Linus Lüssing <linus.luessing@c0d3.blue> <linus.luessing@ascom.ch>
|
||||
Li Yang <leoyang.li@nxp.com> <leo@zh-kernel.org>
|
||||
Li Yang <leoyang.li@nxp.com> <leoli@freescale.com>
|
||||
Maciej W. Rozycki <macro@mips.com> <macro@imgtec.com>
|
||||
Marcin Nowakowski <marcin.nowakowski@mips.com> <marcin.nowakowski@imgtec.com>
|
||||
Mark Brown <broonie@sirena.org.uk>
|
||||
@ -189,6 +202,7 @@ Santosh Shilimkar <ssantosh@kernel.org>
|
||||
Santosh Shilimkar <santosh.shilimkar@oracle.org>
|
||||
Sascha Hauer <s.hauer@pengutronix.de>
|
||||
S.Çağlar Onur <caglar@pardus.org.tr>
|
||||
Sean Nyekjaer <sean@geanix.com> <sean.nyekjaer@prevas.dk>
|
||||
Sebastian Reichel <sre@kernel.org> <sre@debian.org>
|
||||
Sebastian Reichel <sre@kernel.org> <sebastian.reichel@collabora.co.uk>
|
||||
Shiraz Hashim <shiraz.linux.kernel@gmail.com> <shiraz.hashim@st.com>
|
||||
@ -207,6 +221,8 @@ Tejun Heo <htejun@gmail.com>
|
||||
Thomas Graf <tgraf@suug.ch>
|
||||
Thomas Pedersen <twp@codeaurora.org>
|
||||
Tony Luck <tony.luck@intel.com>
|
||||
TripleX Chung <xxx.phy@gmail.com> <zhongyu@18mail.cn>
|
||||
TripleX Chung <xxx.phy@gmail.com> <triplex@zh-kernel.org>
|
||||
Tsuneo Yoshioka <Tsuneo.Yoshioka@f-secure.com>
|
||||
Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
|
||||
Uwe Kleine-König <ukl@pengutronix.de>
|
||||
|
@ -1,3 +1,5 @@
|
||||
This ABI is deprecated and will be removed after 2021. It is
|
||||
replaced with the batadv generic netlink family.
|
||||
|
||||
What: /sys/class/net/<iface>/batman-adv/elp_interval
|
||||
Date: Feb 2014
|
@ -1,3 +1,5 @@
|
||||
This ABI is deprecated and will be removed after 2021. It is
|
||||
replaced with the batadv generic netlink family.
|
||||
|
||||
What: /sys/class/net/<mesh_iface>/mesh/aggregated_ogms
|
||||
Date: May 2010
|
@ -6,6 +6,8 @@ Description:
|
||||
This file allows user to read/write the raw NVMEM contents.
|
||||
Permissions for write to this file depends on the nvmem
|
||||
provider configuration.
|
||||
Note: This file is only present if CONFIG_NVMEM_SYSFS
|
||||
is enabled
|
||||
|
||||
ex:
|
||||
hexdump /sys/bus/nvmem/devices/qfprom0/nvmem
|
||||
|
@ -81,7 +81,9 @@ What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/latency
|
||||
Date: September. 2017
|
||||
KernelVersion: 4.14
|
||||
Contact: Stephen Hemminger <sthemmin@microsoft.com>
|
||||
Description: Channel signaling latency
|
||||
Description: Channel signaling latency. This file is available only for
|
||||
performance critical channels (storage, network, etc.) that use
|
||||
the monitor page mechanism.
|
||||
Users: Debugging tools
|
||||
|
||||
What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/out_mask
|
||||
@ -95,7 +97,9 @@ What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/pending
|
||||
Date: September. 2017
|
||||
KernelVersion: 4.14
|
||||
Contact: Stephen Hemminger <sthemmin@microsoft.com>
|
||||
Description: Channel interrupt pending state
|
||||
Description: Channel interrupt pending state. This file is available only for
|
||||
performance critical channels (storage, network, etc.) that use
|
||||
the monitor page mechanism.
|
||||
Users: Debugging tools
|
||||
|
||||
What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/read_avail
|
||||
@ -137,7 +141,9 @@ What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/monitor_id
|
||||
Date: January. 2018
|
||||
KernelVersion: 4.16
|
||||
Contact: Stephen Hemminger <sthemmin@microsoft.com>
|
||||
Description: Monitor bit associated with channel
|
||||
Description: Monitor bit associated with channel. This file is available only
|
||||
for performance critical channels (storage, network, etc.) that
|
||||
use the monitor page mechanism.
|
||||
Users: Debugging tools and userspace drivers
|
||||
|
||||
What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/ring
|
||||
|
@ -90,4 +90,89 @@ Date: December 2009
|
||||
Contact: Lee Schermerhorn <lee.schermerhorn@hp.com>
|
||||
Description:
|
||||
The node's huge page size control/query attributes.
|
||||
See Documentation/admin-guide/mm/hugetlbpage.rst
|
||||
See Documentation/admin-guide/mm/hugetlbpage.rst
|
||||
|
||||
What: /sys/devices/system/node/nodeX/accessY/
|
||||
Date: December 2018
|
||||
Contact: Keith Busch <keith.busch@intel.com>
|
||||
Description:
|
||||
The node's relationship to other nodes for access class "Y".
|
||||
|
||||
What: /sys/devices/system/node/nodeX/accessY/initiators/
|
||||
Date: December 2018
|
||||
Contact: Keith Busch <keith.busch@intel.com>
|
||||
Description:
|
||||
The directory containing symlinks to memory initiator
|
||||
nodes that have class "Y" access to this target node's
|
||||
memory. CPUs and other memory initiators in nodes not in
|
||||
the list accessing this node's memory may have different
|
||||
performance.
|
||||
|
||||
What: /sys/devices/system/node/nodeX/accessY/targets/
|
||||
Date: December 2018
|
||||
Contact: Keith Busch <keith.busch@intel.com>
|
||||
Description:
|
||||
The directory containing symlinks to memory targets that
|
||||
this initiator node has class "Y" access.
|
||||
|
||||
What: /sys/devices/system/node/nodeX/accessY/initiators/read_bandwidth
|
||||
Date: December 2018
|
||||
Contact: Keith Busch <keith.busch@intel.com>
|
||||
Description:
|
||||
This node's read bandwidth in MB/s when accessed from
|
||||
nodes found in this access class's linked initiators.
|
||||
|
||||
What: /sys/devices/system/node/nodeX/accessY/initiators/read_latency
|
||||
Date: December 2018
|
||||
Contact: Keith Busch <keith.busch@intel.com>
|
||||
Description:
|
||||
This node's read latency in nanoseconds when accessed
|
||||
from nodes found in this access class's linked initiators.
|
||||
|
||||
What: /sys/devices/system/node/nodeX/accessY/initiators/write_bandwidth
|
||||
Date: December 2018
|
||||
Contact: Keith Busch <keith.busch@intel.com>
|
||||
Description:
|
||||
This node's write bandwidth in MB/s when accessed from
|
||||
found in this access class's linked initiators.
|
||||
|
||||
What: /sys/devices/system/node/nodeX/accessY/initiators/write_latency
|
||||
Date: December 2018
|
||||
Contact: Keith Busch <keith.busch@intel.com>
|
||||
Description:
|
||||
This node's write latency in nanoseconds when access
|
||||
from nodes found in this class's linked initiators.
|
||||
|
||||
What: /sys/devices/system/node/nodeX/memory_side_cache/indexY/
|
||||
Date: December 2018
|
||||
Contact: Keith Busch <keith.busch@intel.com>
|
||||
Description:
|
||||
The directory containing attributes for the memory-side cache
|
||||
level 'Y'.
|
||||
|
||||
What: /sys/devices/system/node/nodeX/memory_side_cache/indexY/indexing
|
||||
Date: December 2018
|
||||
Contact: Keith Busch <keith.busch@intel.com>
|
||||
Description:
|
||||
The caches associativity indexing: 0 for direct mapped,
|
||||
non-zero if indexed.
|
||||
|
||||
What: /sys/devices/system/node/nodeX/memory_side_cache/indexY/line_size
|
||||
Date: December 2018
|
||||
Contact: Keith Busch <keith.busch@intel.com>
|
||||
Description:
|
||||
The number of bytes accessed from the next cache level on a
|
||||
cache miss.
|
||||
|
||||
What: /sys/devices/system/node/nodeX/memory_side_cache/indexY/size
|
||||
Date: December 2018
|
||||
Contact: Keith Busch <keith.busch@intel.com>
|
||||
Description:
|
||||
The size of this memory side cache in bytes.
|
||||
|
||||
What: /sys/devices/system/node/nodeX/memory_side_cache/indexY/write_policy
|
||||
Date: December 2018
|
||||
Contact: Keith Busch <keith.busch@intel.com>
|
||||
Description:
|
||||
The cache write policy: 0 for write-back, 1 for write-through,
|
||||
other or unknown.
|
||||
|
@ -1,23 +1,46 @@
|
||||
What: /sys/kernel/debug/wilco_ec/h1_gpio
|
||||
Date: April 2019
|
||||
KernelVersion: 5.2
|
||||
Description:
|
||||
As part of Chrome OS's FAFT (Fully Automated Firmware Testing)
|
||||
tests, we need to ensure that the H1 chip is properly setting
|
||||
some GPIO lines. The h1_gpio attribute exposes the state
|
||||
of the lines:
|
||||
- ENTRY_TO_FACT_MODE in BIT(0)
|
||||
- SPI_CHROME_SEL in BIT(1)
|
||||
|
||||
Output will formatted with "0x%02x\n".
|
||||
|
||||
What: /sys/kernel/debug/wilco_ec/raw
|
||||
Date: January 2019
|
||||
KernelVersion: 5.1
|
||||
Description:
|
||||
Write and read raw mailbox commands to the EC.
|
||||
|
||||
For writing:
|
||||
Bytes 0-1 indicate the message type:
|
||||
00 F0 = Execute Legacy Command
|
||||
00 F2 = Read/Write NVRAM Property
|
||||
Byte 2 provides the command code
|
||||
Bytes 3+ consist of the data passed in the request
|
||||
You can write a hexadecimal sentence to raw, and that series of
|
||||
bytes will be sent to the EC. Then, you can read the bytes of
|
||||
response by reading from raw.
|
||||
|
||||
At least three bytes are required, for the msg type and command,
|
||||
with additional bytes optional for additional data.
|
||||
For writing, bytes 0-1 indicate the message type, one of enum
|
||||
wilco_ec_msg_type. Byte 2+ consist of the data passed in the
|
||||
request, starting at MBOX[0]
|
||||
|
||||
At least three bytes are required for writing, two for the type
|
||||
and at least a single byte of data. Only the first
|
||||
EC_MAILBOX_DATA_SIZE bytes of MBOX will be used.
|
||||
|
||||
Example:
|
||||
// Request EC info type 3 (EC firmware build date)
|
||||
$ echo 00 f0 38 00 03 00 > raw
|
||||
// Corresponds with sending type 0x00f0 with
|
||||
// MBOX = [38, 00, 03, 00]
|
||||
$ echo 00 f0 38 00 03 00 > /sys/kernel/debug/wilco_ec/raw
|
||||
// View the result. The decoded ASCII result "12/21/18" is
|
||||
// included after the raw hex.
|
||||
$ cat raw
|
||||
00 31 32 2f 32 31 2f 31 38 00 38 00 01 00 2f 00 .12/21/18.8...
|
||||
// Corresponds with MBOX = [00, 00, 31, 32, 2f, 32, 31, 38, ...]
|
||||
$ cat /sys/kernel/debug/wilco_ec/raw
|
||||
00 00 31 32 2f 32 31 2f 31 38 00 38 00 01 00 2f 00 ..12/21/18.8...
|
||||
|
||||
Note that the first 32 bytes of the received MBOX[] will be
|
||||
printed, even if some of the data is junk. It is up to you to
|
||||
know how many of the first bytes of data are the actual
|
||||
response.
|
||||
|
230
Documentation/ABI/testing/sysfs-bus-counter
Normal file
230
Documentation/ABI/testing/sysfs-bus-counter
Normal file
@ -0,0 +1,230 @@
|
||||
What: /sys/bus/counter/devices/counterX/countY/count
|
||||
KernelVersion: 5.2
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Count data of Count Y represented as a string.
|
||||
|
||||
What: /sys/bus/counter/devices/counterX/countY/ceiling
|
||||
KernelVersion: 5.2
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Count value ceiling for Count Y. This is the upper limit for the
|
||||
respective counter.
|
||||
|
||||
What: /sys/bus/counter/devices/counterX/countY/floor
|
||||
KernelVersion: 5.2
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Count value floor for Count Y. This is the lower limit for the
|
||||
respective counter.
|
||||
|
||||
What: /sys/bus/counter/devices/counterX/countY/count_mode
|
||||
KernelVersion: 5.2
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Count mode for channel Y. The ceiling and floor values for
|
||||
Count Y are used by the count mode where required. The following
|
||||
count modes are available:
|
||||
|
||||
normal:
|
||||
Counting is continuous in either direction.
|
||||
|
||||
range limit:
|
||||
An upper or lower limit is set, mimicking limit switches
|
||||
in the mechanical counterpart. The upper limit is set to
|
||||
the Count Y ceiling value, while the lower limit is set
|
||||
to the Count Y floor value. The counter freezes at
|
||||
count = ceiling when counting up, and at count = floor
|
||||
when counting down. At either of these limits, the
|
||||
counting is resumed only when the count direction is
|
||||
reversed.
|
||||
|
||||
non-recycle:
|
||||
The counter is disabled whenever a counter overflow or
|
||||
underflow takes place. The counter is re-enabled when a
|
||||
new count value is loaded to the counter via a preset
|
||||
operation or direct write.
|
||||
|
||||
modulo-n:
|
||||
A count value boundary is set between the Count Y floor
|
||||
value and the Count Y ceiling value. The counter is
|
||||
reset to the Count Y floor value at count = ceiling when
|
||||
counting up, while the counter is set to the Count Y
|
||||
ceiling value at count = floor when counting down; the
|
||||
counter does not freeze at the boundary points, but
|
||||
counts continuously throughout.
|
||||
|
||||
What: /sys/bus/counter/devices/counterX/countY/count_mode_available
|
||||
What: /sys/bus/counter/devices/counterX/countY/error_noise_available
|
||||
What: /sys/bus/counter/devices/counterX/countY/function_available
|
||||
What: /sys/bus/counter/devices/counterX/countY/signalZ_action_available
|
||||
KernelVersion: 5.2
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Discrete set of available values for the respective Count Y
|
||||
configuration are listed in this file. Values are delimited by
|
||||
newline characters.
|
||||
|
||||
What: /sys/bus/counter/devices/counterX/countY/direction
|
||||
KernelVersion: 5.2
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Read-only attribute that indicates the count direction of Count
|
||||
Y. Two count directions are available: forward and backward.
|
||||
|
||||
Some counter devices are able to determine the direction of
|
||||
their counting. For example, quadrature encoding counters can
|
||||
determine the direction of movement by evaluating the leading
|
||||
phase of the respective A and B quadrature encoding signals.
|
||||
This attribute exposes such count directions.
|
||||
|
||||
What: /sys/bus/counter/devices/counterX/countY/enable
|
||||
KernelVersion: 5.2
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Whether channel Y counter is enabled. Valid attribute values are
|
||||
boolean.
|
||||
|
||||
This attribute is intended to serve as a pause/unpause mechanism
|
||||
for Count Y. Suppose a counter device is used to count the total
|
||||
movement of a conveyor belt: this attribute allows an operator
|
||||
to temporarily pause the counter, service the conveyor belt,
|
||||
and then finally unpause the counter to continue where it had
|
||||
left off.
|
||||
|
||||
What: /sys/bus/counter/devices/counterX/countY/error_noise
|
||||
KernelVersion: 5.2
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Read-only attribute that indicates whether excessive noise is
|
||||
present at the channel Y counter inputs.
|
||||
|
||||
What: /sys/bus/counter/devices/counterX/countY/function
|
||||
KernelVersion: 5.2
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Count function mode of Count Y; count function evaluation is
|
||||
triggered by conditions specified by the Count Y signalZ_action
|
||||
attributes. The following count functions are available:
|
||||
|
||||
increase:
|
||||
Accumulated count is incremented.
|
||||
|
||||
decrease:
|
||||
Accumulated count is decremented.
|
||||
|
||||
pulse-direction:
|
||||
Rising edges on signal A updates the respective count.
|
||||
The input level of signal B determines direction.
|
||||
|
||||
quadrature x1 a:
|
||||
If direction is forward, rising edges on quadrature pair
|
||||
signal A updates the respective count; if the direction
|
||||
is backward, falling edges on quadrature pair signal A
|
||||
updates the respective count. Quadrature encoding
|
||||
determines the direction.
|
||||
|
||||
quadrature x1 b:
|
||||
If direction is forward, rising edges on quadrature pair
|
||||
signal B updates the respective count; if the direction
|
||||
is backward, falling edges on quadrature pair signal B
|
||||
updates the respective count. Quadrature encoding
|
||||
determines the direction.
|
||||
|
||||
quadrature x2 a:
|
||||
Any state transition on quadrature pair signal A updates
|
||||
the respective count. Quadrature encoding determines the
|
||||
direction.
|
||||
|
||||
quadrature x2 b:
|
||||
Any state transition on quadrature pair signal B updates
|
||||
the respective count. Quadrature encoding determines the
|
||||
direction.
|
||||
|
||||
quadrature x4:
|
||||
Any state transition on either quadrature pair signals
|
||||
updates the respective count. Quadrature encoding
|
||||
determines the direction.
|
||||
|
||||
What: /sys/bus/counter/devices/counterX/countY/name
|
||||
KernelVersion: 5.2
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Read-only attribute that indicates the device-specific name of
|
||||
Count Y. If possible, this should match the name of the
|
||||
respective channel as it appears in the device datasheet.
|
||||
|
||||
What: /sys/bus/counter/devices/counterX/countY/preset
|
||||
KernelVersion: 5.2
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
If the counter device supports preset registers -- registers
|
||||
used to load counter channels to a set count upon device-defined
|
||||
preset operation trigger events -- the preset count for channel
|
||||
Y is provided by this attribute.
|
||||
|
||||
What: /sys/bus/counter/devices/counterX/countY/preset_enable
|
||||
KernelVersion: 5.2
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Whether channel Y counter preset operation is enabled. Valid
|
||||
attribute values are boolean.
|
||||
|
||||
What: /sys/bus/counter/devices/counterX/countY/signalZ_action
|
||||
KernelVersion: 5.2
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Action mode of Count Y for Signal Z. This attribute indicates
|
||||
the condition of Signal Z that triggers the count function
|
||||
evaluation for Count Y. The following action modes are
|
||||
available:
|
||||
|
||||
none:
|
||||
Signal does not trigger the count function. In
|
||||
Pulse-Direction count function mode, this Signal is
|
||||
evaluated as Direction.
|
||||
|
||||
rising edge:
|
||||
Low state transitions to high state.
|
||||
|
||||
falling edge:
|
||||
High state transitions to low state.
|
||||
|
||||
both edges:
|
||||
Any state transition.
|
||||
|
||||
What: /sys/bus/counter/devices/counterX/name
|
||||
KernelVersion: 5.2
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Read-only attribute that indicates the device-specific name of
|
||||
the Counter. This should match the name of the device as it
|
||||
appears in its respective datasheet.
|
||||
|
||||
What: /sys/bus/counter/devices/counterX/num_counts
|
||||
KernelVersion: 5.2
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Read-only attribute that indicates the total number of Counts
|
||||
belonging to the Counter.
|
||||
|
||||
What: /sys/bus/counter/devices/counterX/num_signals
|
||||
KernelVersion: 5.2
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Read-only attribute that indicates the total number of Signals
|
||||
belonging to the Counter.
|
||||
|
||||
What: /sys/bus/counter/devices/counterX/signalY/signal
|
||||
KernelVersion: 5.2
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Signal data of Signal Y represented as a string.
|
||||
|
||||
What: /sys/bus/counter/devices/counterX/signalY/name
|
||||
KernelVersion: 5.2
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Read-only attribute that indicates the device-specific name of
|
||||
Signal Y. If possible, this should match the name of the
|
||||
respective signal as it appears in the device datasheet.
|
36
Documentation/ABI/testing/sysfs-bus-counter-104-quad-8
Normal file
36
Documentation/ABI/testing/sysfs-bus-counter-104-quad-8
Normal file
@ -0,0 +1,36 @@
|
||||
What: /sys/bus/counter/devices/counterX/signalY/index_polarity
|
||||
KernelVersion: 5.2
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Active level of index input Signal Y; irrelevant in
|
||||
non-synchronous load mode.
|
||||
|
||||
What: /sys/bus/counter/devices/counterX/signalY/index_polarity_available
|
||||
What: /sys/bus/counter/devices/counterX/signalY/synchronous_mode_available
|
||||
KernelVersion: 5.2
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Discrete set of available values for the respective Signal Y
|
||||
configuration are listed in this file.
|
||||
|
||||
What: /sys/bus/counter/devices/counterX/signalY/synchronous_mode
|
||||
KernelVersion: 5.2
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Configure the counter associated with Signal Y for
|
||||
non-synchronous or synchronous load mode. Synchronous load mode
|
||||
cannot be selected in non-quadrature (Pulse-Direction) clock
|
||||
mode.
|
||||
|
||||
non-synchronous:
|
||||
A logic low level is the active level at this index
|
||||
input. The index function (as enabled via preset_enable)
|
||||
is performed directly on the active level of the index
|
||||
input.
|
||||
|
||||
synchronous:
|
||||
Intended for interfacing with encoder Index output in
|
||||
quadrature clock mode. The active level is configured
|
||||
via index_polarity. The index function (as enabled via
|
||||
preset_enable) is performed synchronously with the
|
||||
quadrature clock on the active level of the index input.
|
16
Documentation/ABI/testing/sysfs-bus-counter-ftm-quaddec
Normal file
16
Documentation/ABI/testing/sysfs-bus-counter-ftm-quaddec
Normal file
@ -0,0 +1,16 @@
|
||||
What: /sys/bus/counter/devices/counterX/countY/prescaler_available
|
||||
KernelVersion: 5.2
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Discrete set of available values for the respective Count Y
|
||||
configuration are listed in this file. Values are delimited by
|
||||
newline characters.
|
||||
|
||||
What: /sys/bus/counter/devices/counterX/countY/prescaler
|
||||
KernelVersion: 5.2
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Configure the prescaler value associated with Count Y.
|
||||
On the FlexTimer, the counter clock source passes through a
|
||||
prescaler (i.e. a counter). This acts like a clock
|
||||
divider.
|
20
Documentation/ABI/testing/sysfs-bus-i2c-devices-pca954x
Normal file
20
Documentation/ABI/testing/sysfs-bus-i2c-devices-pca954x
Normal file
@ -0,0 +1,20 @@
|
||||
What: /sys/bus/i2c/.../idle_state
|
||||
Date: January 2019
|
||||
KernelVersion: 5.2
|
||||
Contact: Robert Shearman <robert.shearman@att.com>
|
||||
Description:
|
||||
Value that exists only for mux devices that can be
|
||||
written to control the behaviour of the multiplexer on
|
||||
idle. Possible values:
|
||||
-2 - disconnect on idle, i.e. deselect the last used
|
||||
channel, which is useful when there is a device
|
||||
with an address that conflicts with another
|
||||
device on another mux on the same parent bus.
|
||||
-1 - leave the mux as-is, which is the most optimal
|
||||
setting in terms of I2C operations and is the
|
||||
default mode.
|
||||
0..<nchans> - set the mux to a predetermined channel,
|
||||
which is useful if there is one channel that is
|
||||
used almost always, and you want to reduce the
|
||||
latency for normal operations after rare
|
||||
transactions on other channels
|
@ -1656,6 +1656,8 @@ What: /sys/bus/iio/devices/iio:deviceX/in_countY_raw
|
||||
KernelVersion: 4.10
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
This interface is deprecated; please use the Counter subsystem.
|
||||
|
||||
Raw counter device counts from channel Y. For quadrature
|
||||
counters, multiplication by an available [Y]_scale results in
|
||||
the counts of a single quadrature signal phase from channel Y.
|
||||
@ -1664,6 +1666,8 @@ What: /sys/bus/iio/devices/iio:deviceX/in_indexY_raw
|
||||
KernelVersion: 4.10
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
This interface is deprecated; please use the Counter subsystem.
|
||||
|
||||
Raw counter device index value from channel Y. This attribute
|
||||
provides an absolute positional reference (e.g. a pulse once per
|
||||
revolution) which may be used to home positional systems as
|
||||
@ -1673,6 +1677,8 @@ What: /sys/bus/iio/devices/iio:deviceX/in_count_count_direction_available
|
||||
KernelVersion: 4.12
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
This interface is deprecated; please use the Counter subsystem.
|
||||
|
||||
A list of possible counting directions which are:
|
||||
- "up" : counter device is increasing.
|
||||
- "down": counter device is decreasing.
|
||||
@ -1681,6 +1687,8 @@ What: /sys/bus/iio/devices/iio:deviceX/in_countY_count_direction
|
||||
KernelVersion: 4.12
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
This interface is deprecated; please use the Counter subsystem.
|
||||
|
||||
Raw counter device counters direction for channel Y.
|
||||
|
||||
What: /sys/bus/iio/devices/iio:deviceX/in_phaseY_raw
|
||||
|
@ -6,6 +6,8 @@ What: /sys/bus/iio/devices/iio:deviceX/in_index_synchronous_mode_available
|
||||
KernelVersion: 4.10
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
This interface is deprecated; please use the Counter subsystem.
|
||||
|
||||
Discrete set of available values for the respective counter
|
||||
configuration are listed in this file.
|
||||
|
||||
@ -13,6 +15,8 @@ What: /sys/bus/iio/devices/iio:deviceX/in_countY_count_mode
|
||||
KernelVersion: 4.10
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
This interface is deprecated; please use the Counter subsystem.
|
||||
|
||||
Count mode for channel Y. Four count modes are available:
|
||||
normal, range limit, non-recycle, and modulo-n. The preset value
|
||||
for channel Y is used by the count mode where required.
|
||||
@ -47,6 +51,8 @@ What: /sys/bus/iio/devices/iio:deviceX/in_countY_noise_error
|
||||
KernelVersion: 4.10
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
This interface is deprecated; please use the Counter subsystem.
|
||||
|
||||
Read-only attribute that indicates whether excessive noise is
|
||||
present at the channel Y count inputs in quadrature clock mode;
|
||||
irrelevant in non-quadrature clock mode.
|
||||
@ -55,6 +61,8 @@ What: /sys/bus/iio/devices/iio:deviceX/in_countY_preset
|
||||
KernelVersion: 4.10
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
This interface is deprecated; please use the Counter subsystem.
|
||||
|
||||
If the counter device supports preset registers, the preset
|
||||
count for channel Y is provided by this attribute.
|
||||
|
||||
@ -62,6 +70,8 @@ What: /sys/bus/iio/devices/iio:deviceX/in_countY_quadrature_mode
|
||||
KernelVersion: 4.10
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
This interface is deprecated; please use the Counter subsystem.
|
||||
|
||||
Configure channel Y counter for non-quadrature or quadrature
|
||||
clock mode. Selecting non-quadrature clock mode will disable
|
||||
synchronous load mode. In quadrature clock mode, the channel Y
|
||||
@ -83,6 +93,8 @@ What: /sys/bus/iio/devices/iio:deviceX/in_countY_set_to_preset_on_index
|
||||
KernelVersion: 4.10
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
This interface is deprecated; please use the Counter subsystem.
|
||||
|
||||
Whether to set channel Y counter with channel Y preset value
|
||||
when channel Y index input is active, or continuously count.
|
||||
Valid attribute values are boolean.
|
||||
@ -91,6 +103,8 @@ What: /sys/bus/iio/devices/iio:deviceX/in_indexY_index_polarity
|
||||
KernelVersion: 4.10
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
This interface is deprecated; please use the Counter subsystem.
|
||||
|
||||
Active level of channel Y index input; irrelevant in
|
||||
non-synchronous load mode.
|
||||
|
||||
@ -98,6 +112,8 @@ What: /sys/bus/iio/devices/iio:deviceX/in_indexY_synchronous_mode
|
||||
KernelVersion: 4.10
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
This interface is deprecated; please use the Counter subsystem.
|
||||
|
||||
Configure channel Y counter for non-synchronous or synchronous
|
||||
load mode. Synchronous load mode cannot be selected in
|
||||
non-quadrature clock mode.
|
||||
|
@ -1,26 +1,31 @@
|
||||
What: /sys/bus/iio/devices/iio:deviceX/outY_freq_start
|
||||
What: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY_frequency_start
|
||||
Date: March 2019
|
||||
KernelVersion: 3.1.0
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Frequency sweep start frequency in Hz.
|
||||
|
||||
What: /sys/bus/iio/devices/iio:deviceX/outY_freq_increment
|
||||
What: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY_frequency_increment
|
||||
Date: March 2019
|
||||
KernelVersion: 3.1.0
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Frequency increment in Hz (step size) between consecutive
|
||||
frequency points along the sweep.
|
||||
|
||||
What: /sys/bus/iio/devices/iio:deviceX/outY_freq_points
|
||||
What: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY_frequency_points
|
||||
Date: March 2019
|
||||
KernelVersion: 3.1.0
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Number of frequency points (steps) in the frequency sweep.
|
||||
This value, in conjunction with the outY_freq_start and the
|
||||
outY_freq_increment, determines the frequency sweep range
|
||||
for the sweep operation.
|
||||
This value, in conjunction with the
|
||||
out_altvoltageY_frequency_start and the
|
||||
out_altvoltageY_frequency_increment, determines the frequency
|
||||
sweep range for the sweep operation.
|
||||
|
||||
What: /sys/bus/iio/devices/iio:deviceX/outY_settling_cycles
|
||||
What: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY_settling_cycles
|
||||
Date: March 2019
|
||||
KernelVersion: 3.1.0
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
@ -1,6 +1,6 @@
|
||||
What: /sys/bus/iio/devices/iio:deviceX/start_cleaning
|
||||
Date: December 2018
|
||||
KernelVersion: 4.22
|
||||
KernelVersion: 5.0
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Writing 1 starts sensor self cleaning. Internal fan accelerates
|
||||
|
24
Documentation/ABI/testing/sysfs-bus-iio-temperature-max31856
Normal file
24
Documentation/ABI/testing/sysfs-bus-iio-temperature-max31856
Normal file
@ -0,0 +1,24 @@
|
||||
What: /sys/bus/iio/devices/iio:deviceX/fault_oc
|
||||
KernelVersion: 5.1
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Open-circuit fault. The detection of open-circuit faults,
|
||||
such as those caused by broken thermocouple wires.
|
||||
Reading returns either '1' or '0'.
|
||||
'1' = An open circuit such as broken thermocouple wires
|
||||
has been detected.
|
||||
'0' = No open circuit or broken thermocouple wires are detected
|
||||
|
||||
What: /sys/bus/iio/devices/iio:deviceX/fault_ovuv
|
||||
KernelVersion: 5.1
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Overvoltage or Undervoltage Input Fault. The internal circuitry
|
||||
is protected from excessive voltages applied to the thermocouple
|
||||
cables by integrated MOSFETs at the T+ and T- inputs, and the
|
||||
BIAS output. These MOSFETs turn off when the input voltage is
|
||||
negative or greater than VDD.
|
||||
Reading returns either '1' or '0'.
|
||||
'1' = The input voltage is negative or greater than VDD.
|
||||
'0' = The input voltage is positive and less than VDD (normal
|
||||
state).
|
@ -30,4 +30,12 @@ Description: (RW) Configure MSC buffer size for "single" or "multi" modes.
|
||||
there are no active users and tracing is not enabled) and then
|
||||
allocates a new one.
|
||||
|
||||
What: /sys/bus/intel_th/devices/<intel_th_id>-msc<msc-id>/win_switch
|
||||
Date: May 2019
|
||||
KernelVersion: 5.2
|
||||
Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
Description: (RW) Trigger window switch for the MSC's buffer, in
|
||||
multi-window mode. In "multi" mode, accepts writes of "1", thereby
|
||||
triggering a window switch for the buffer. Returns an error in any
|
||||
other operating mode or attempts to write something other than "1".
|
||||
|
||||
|
@ -65,3 +65,18 @@ Description: Display the ME firmware version.
|
||||
<platform>:<major>.<minor>.<milestone>.<build_no>.
|
||||
There can be up to three such blocks for different
|
||||
FW components.
|
||||
|
||||
What: /sys/class/mei/meiN/dev_state
|
||||
Date: Mar 2019
|
||||
KernelVersion: 5.1
|
||||
Contact: Tomas Winkler <tomas.winkler@intel.com>
|
||||
Description: Display the ME device state.
|
||||
|
||||
The device state can have following values:
|
||||
INITIALIZING
|
||||
INIT_CLIENTS
|
||||
ENABLED
|
||||
RESETTING
|
||||
DISABLED
|
||||
POWER_DOWN
|
||||
POWER_UP
|
||||
|
@ -212,7 +212,7 @@ Description:
|
||||
Messages may be broken into parts if
|
||||
they are long.
|
||||
|
||||
receieved_messages: (RO) Number of message responses
|
||||
received_messages: (RO) Number of message responses
|
||||
received.
|
||||
|
||||
received_message_parts: (RO) Number of message fragments
|
||||
|
@ -484,6 +484,7 @@ What: /sys/devices/system/cpu/vulnerabilities
|
||||
/sys/devices/system/cpu/vulnerabilities/spectre_v2
|
||||
/sys/devices/system/cpu/vulnerabilities/spec_store_bypass
|
||||
/sys/devices/system/cpu/vulnerabilities/l1tf
|
||||
/sys/devices/system/cpu/vulnerabilities/mds
|
||||
Date: January 2018
|
||||
Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
|
||||
Description: Information about CPU vulnerabilities
|
||||
@ -496,8 +497,7 @@ Description: Information about CPU vulnerabilities
|
||||
"Vulnerable" CPU is affected and no mitigation in effect
|
||||
"Mitigation: $M" CPU is affected and mitigation $M is in effect
|
||||
|
||||
Details about the l1tf file can be found in
|
||||
Documentation/admin-guide/l1tf.rst
|
||||
See also: Documentation/admin-guide/hw-vuln/index.rst
|
||||
|
||||
What: /sys/devices/system/cpu/smt
|
||||
/sys/devices/system/cpu/smt/active
|
||||
|
6
Documentation/ABI/testing/sysfs-driver-ucsi-ccg
Normal file
6
Documentation/ABI/testing/sysfs-driver-ucsi-ccg
Normal file
@ -0,0 +1,6 @@
|
||||
What: /sys/bus/i2c/drivers/ucsi_ccg/.../do_flash
|
||||
Date: May 2019
|
||||
Contact: Ajay Gupta <ajayg@nvidia.com>
|
||||
Description:
|
||||
Tell the driver for Cypress CCGx Type-C controller to attempt
|
||||
firmware upgrade by writing [Yy1] to the file.
|
@ -45,7 +45,7 @@ Description:
|
||||
use this feature without a clearance from a patch
|
||||
distributor. Removal (rmmod) of patch modules is permanently
|
||||
disabled when the feature is used. See
|
||||
Documentation/livepatch/livepatch.txt for more information.
|
||||
Documentation/livepatch/livepatch.rst for more information.
|
||||
|
||||
What: /sys/kernel/livepatch/<patch>/<object>
|
||||
Date: Nov 2014
|
||||
|
27
Documentation/ABI/testing/usb-uevent
Normal file
27
Documentation/ABI/testing/usb-uevent
Normal file
@ -0,0 +1,27 @@
|
||||
What: Raise a uevent when a USB Host Controller has died
|
||||
Date: 2019-04-17
|
||||
KernelVersion: 5.2
|
||||
Contact: linux-usb@vger.kernel.org
|
||||
Description: When the USB Host Controller has entered a state where it is no
|
||||
longer functional a uevent will be raised. The uevent will
|
||||
contain ACTION=offline and ERROR=DEAD.
|
||||
|
||||
Here is an example taken using udevadm monitor -p:
|
||||
|
||||
KERNEL[130.428945] offline /devices/pci0000:00/0000:00:10.0/usb2 (usb)
|
||||
ACTION=offline
|
||||
BUSNUM=002
|
||||
DEVNAME=/dev/bus/usb/002/001
|
||||
DEVNUM=001
|
||||
DEVPATH=/devices/pci0000:00/0000:00:10.0/usb2
|
||||
DEVTYPE=usb_device
|
||||
DRIVER=usb
|
||||
ERROR=DEAD
|
||||
MAJOR=189
|
||||
MINOR=128
|
||||
PRODUCT=1d6b/2/414
|
||||
SEQNUM=2168
|
||||
SUBSYSTEM=usb
|
||||
TYPE=9/0/1
|
||||
|
||||
Users: chromium-os-dev@chromium.org
|
@ -147,7 +147,7 @@ networking subsystems make sure that the buffers they use are valid
|
||||
for you to DMA from/to.
|
||||
|
||||
DMA addressing capabilities
|
||||
==========================
|
||||
===========================
|
||||
|
||||
By default, the kernel assumes that your device can address 32-bits of DMA
|
||||
addressing. For a 64-bit capable device, this needs to be increased, and for
|
||||
@ -365,13 +365,12 @@ __get_free_pages() (but takes size instead of a page order). If your
|
||||
driver needs regions sized smaller than a page, you may prefer using
|
||||
the dma_pool interface, described below.
|
||||
|
||||
The consistent DMA mapping interfaces, for non-NULL dev, will by
|
||||
default return a DMA address which is 32-bit addressable. Even if the
|
||||
device indicates (via DMA mask) that it may address the upper 32-bits,
|
||||
consistent allocation will only return > 32-bit addresses for DMA if
|
||||
the consistent DMA mask has been explicitly changed via
|
||||
dma_set_coherent_mask(). This is true of the dma_pool interface as
|
||||
well.
|
||||
The consistent DMA mapping interfaces, will by default return a DMA address
|
||||
which is 32-bit addressable. Even if the device indicates (via the DMA mask)
|
||||
that it may address the upper 32-bits, consistent allocation will only
|
||||
return > 32-bit addresses for DMA if the consistent DMA mask has been
|
||||
explicitly changed via dma_set_coherent_mask(). This is true of the
|
||||
dma_pool interface as well.
|
||||
|
||||
dma_alloc_coherent() returns two values: the virtual address which you
|
||||
can use to access it from the CPU and dma_handle which you pass to the
|
||||
|
@ -28,8 +28,13 @@ ifeq ($(HAVE_SPHINX),0)
|
||||
|
||||
else # HAVE_SPHINX
|
||||
|
||||
# User-friendly check for pdflatex
|
||||
# User-friendly check for pdflatex and latexmk
|
||||
HAVE_PDFLATEX := $(shell if which $(PDFLATEX) >/dev/null 2>&1; then echo 1; else echo 0; fi)
|
||||
HAVE_LATEXMK := $(shell if which latexmk >/dev/null 2>&1; then echo 1; else echo 0; fi)
|
||||
|
||||
ifeq ($(HAVE_LATEXMK),1)
|
||||
PDFLATEX := latexmk -$(PDFLATEX)
|
||||
endif #HAVE_LATEXMK
|
||||
|
||||
# Internal variables.
|
||||
PAPEROPT_a4 = -D latex_paper_size=a4
|
||||
@ -82,7 +87,7 @@ pdfdocs:
|
||||
else # HAVE_PDFLATEX
|
||||
|
||||
pdfdocs: latexdocs
|
||||
$(foreach var,$(SPHINXDIRS), $(MAKE) PDFLATEX=$(PDFLATEX) LATEXOPTS="$(LATEXOPTS)" -C $(BUILDDIR)/$(var)/latex || exit;)
|
||||
$(foreach var,$(SPHINXDIRS), $(MAKE) PDFLATEX="$(PDFLATEX)" LATEXOPTS="$(LATEXOPTS)" -C $(BUILDDIR)/$(var)/latex || exit;)
|
||||
|
||||
endif # HAVE_PDFLATEX
|
||||
|
||||
|
@ -63,6 +63,110 @@ as well as medium and long term trends. The total absolute stall time
|
||||
spikes which wouldn't necessarily make a dent in the time averages,
|
||||
or to average trends over custom time frames.
|
||||
|
||||
Monitoring for pressure thresholds
|
||||
==================================
|
||||
|
||||
Users can register triggers and use poll() to be woken up when resource
|
||||
pressure exceeds certain thresholds.
|
||||
|
||||
A trigger describes the maximum cumulative stall time over a specific
|
||||
time window, e.g. 100ms of total stall time within any 500ms window to
|
||||
generate a wakeup event.
|
||||
|
||||
To register a trigger user has to open psi interface file under
|
||||
/proc/pressure/ representing the resource to be monitored and write the
|
||||
desired threshold and time window. The open file descriptor should be
|
||||
used to wait for trigger events using select(), poll() or epoll().
|
||||
The following format is used:
|
||||
|
||||
<some|full> <stall amount in us> <time window in us>
|
||||
|
||||
For example writing "some 150000 1000000" into /proc/pressure/memory
|
||||
would add 150ms threshold for partial memory stall measured within
|
||||
1sec time window. Writing "full 50000 1000000" into /proc/pressure/io
|
||||
would add 50ms threshold for full io stall measured within 1sec time window.
|
||||
|
||||
Triggers can be set on more than one psi metric and more than one trigger
|
||||
for the same psi metric can be specified. However for each trigger a separate
|
||||
file descriptor is required to be able to poll it separately from others,
|
||||
therefore for each trigger a separate open() syscall should be made even
|
||||
when opening the same psi interface file.
|
||||
|
||||
Monitors activate only when system enters stall state for the monitored
|
||||
psi metric and deactivates upon exit from the stall state. While system is
|
||||
in the stall state psi signal growth is monitored at a rate of 10 times per
|
||||
tracking window.
|
||||
|
||||
The kernel accepts window sizes ranging from 500ms to 10s, therefore min
|
||||
monitoring update interval is 50ms and max is 1s. Min limit is set to
|
||||
prevent overly frequent polling. Max limit is chosen as a high enough number
|
||||
after which monitors are most likely not needed and psi averages can be used
|
||||
instead.
|
||||
|
||||
When activated, psi monitor stays active for at least the duration of one
|
||||
tracking window to avoid repeated activations/deactivations when system is
|
||||
bouncing in and out of the stall state.
|
||||
|
||||
Notifications to the userspace are rate-limited to one per tracking window.
|
||||
|
||||
The trigger will de-register when the file descriptor used to define the
|
||||
trigger is closed.
|
||||
|
||||
Userspace monitor usage example
|
||||
===============================
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <poll.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/*
|
||||
* Monitor memory partial stall with 1s tracking window size
|
||||
* and 150ms threshold.
|
||||
*/
|
||||
int main() {
|
||||
const char trig[] = "some 150000 1000000";
|
||||
struct pollfd fds;
|
||||
int n;
|
||||
|
||||
fds.fd = open("/proc/pressure/memory", O_RDWR | O_NONBLOCK);
|
||||
if (fds.fd < 0) {
|
||||
printf("/proc/pressure/memory open error: %s\n",
|
||||
strerror(errno));
|
||||
return 1;
|
||||
}
|
||||
fds.events = POLLPRI;
|
||||
|
||||
if (write(fds.fd, trig, strlen(trig) + 1) < 0) {
|
||||
printf("/proc/pressure/memory write error: %s\n",
|
||||
strerror(errno));
|
||||
return 1;
|
||||
}
|
||||
|
||||
printf("waiting for events...\n");
|
||||
while (1) {
|
||||
n = poll(&fds, 1, -1);
|
||||
if (n < 0) {
|
||||
printf("poll error: %s\n", strerror(errno));
|
||||
return 1;
|
||||
}
|
||||
if (fds.revents & POLLERR) {
|
||||
printf("got POLLERR, event source is gone\n");
|
||||
return 0;
|
||||
}
|
||||
if (fds.revents & POLLPRI) {
|
||||
printf("event triggered!\n");
|
||||
} else {
|
||||
printf("unknown event received: 0x%x\n", fds.revents);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Cgroup2 interface
|
||||
=================
|
||||
|
||||
@ -71,3 +175,6 @@ mounted, pressure stall information is also tracked for tasks grouped
|
||||
into cgroups. Each subdirectory in the cgroupfs mountpoint contains
|
||||
cpu.pressure, memory.pressure, and io.pressure files; the format is
|
||||
the same as the /proc/pressure/ files.
|
||||
|
||||
Per-cgroup psi monitors can be specified and used the same way as
|
||||
system-wide ones.
|
||||
|
99
Documentation/acpi/dsd/leds.txt
Normal file
99
Documentation/acpi/dsd/leds.txt
Normal file
@ -0,0 +1,99 @@
|
||||
Describing and referring to LEDs in ACPI
|
||||
|
||||
Individual LEDs are described by hierarchical data extension [6] nodes under the
|
||||
device node, the LED driver chip. The "reg" property in the LED specific nodes
|
||||
tells the numerical ID of each individual LED output to which the LEDs are
|
||||
connected. [3] The hierarchical data nodes are named "led@X", where X is the
|
||||
number of the LED output.
|
||||
|
||||
Referring to LEDs in Device tree is documented in [4], in "flash-leds" property
|
||||
documentation. In short, LEDs are directly referred to by using phandles.
|
||||
|
||||
While Device tree allows referring to any node in the tree[1], in ACPI
|
||||
references are limited to device nodes only [2]. For this reason using the same
|
||||
mechanism on ACPI is not possible. A mechanism to refer to non-device ACPI nodes
|
||||
is documented in [7].
|
||||
|
||||
ACPI allows (as does DT) using integer arguments after the reference. A
|
||||
combination of the LED driver device reference and an integer argument,
|
||||
referring to the "reg" property of the relevant LED, is used to identify
|
||||
individual LEDs. The value of the "reg" property is a contract between the
|
||||
firmware and software, it uniquely identifies the LED driver outputs.
|
||||
|
||||
Under the LED driver device, The first hierarchical data extension package list
|
||||
entry shall contain the string "led@" followed by the number of the LED,
|
||||
followed by the referred object name. That object shall be named "LED" followed
|
||||
by the number of the LED.
|
||||
|
||||
An ASL example of a camera sensor device and a LED driver device for two LEDs.
|
||||
Objects not relevant for LEDs or the references to them have been omitted.
|
||||
|
||||
Device (LED)
|
||||
{
|
||||
Name (_DSD, Package () {
|
||||
ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
|
||||
Package () {
|
||||
Package () { "led@0", LED0 },
|
||||
Package () { "led@1", LED1 },
|
||||
}
|
||||
})
|
||||
Name (LED0, Package () {
|
||||
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
|
||||
Package () {
|
||||
Package () { "reg", 0 },
|
||||
Package () { "flash-max-microamp", 1000000 },
|
||||
Package () { "flash-timeout-us", 200000 },
|
||||
Package () { "led-max-microamp", 100000 },
|
||||
Package () { "label", "white:flash" },
|
||||
}
|
||||
})
|
||||
Name (LED1, Package () {
|
||||
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
|
||||
Package () {
|
||||
Package () { "reg", 1 },
|
||||
Package () { "led-max-microamp", 10000 },
|
||||
Package () { "label", "red:indicator" },
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Device (SEN)
|
||||
{
|
||||
Name (_DSD, Package () {
|
||||
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
|
||||
Package () {
|
||||
Package () {
|
||||
"flash-leds",
|
||||
Package () { ^LED, "led@0", ^LED, "led@1" },
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
where
|
||||
|
||||
LED LED driver device
|
||||
LED0 First LED
|
||||
LED1 Second LED
|
||||
SEN Camera sensor device (or another device the LED is
|
||||
related to)
|
||||
|
||||
[1] Device tree. <URL:http://www.devicetree.org>, referenced 2019-02-21.
|
||||
|
||||
[2] Advanced Configuration and Power Interface Specification.
|
||||
<URL:https://uefi.org/sites/default/files/resources/ACPI_6_3_final_Jan30.pdf>,
|
||||
referenced 2019-02-21.
|
||||
|
||||
[3] Documentation/devicetree/bindings/leds/common.txt
|
||||
|
||||
[4] Documentation/devicetree/bindings/media/video-interfaces.txt
|
||||
|
||||
[5] Device Properties UUID For _DSD.
|
||||
<URL:http://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf>,
|
||||
referenced 2019-02-21.
|
||||
|
||||
[6] Hierarchical Data Extension UUID For _DSD.
|
||||
<URL:http://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-data-extension-UUID-v1.1.pdf>,
|
||||
referenced 2019-02-21.
|
||||
|
||||
[7] Documentation/acpi/dsd/data-node-reference.txt
|
@ -864,6 +864,8 @@ All cgroup core files are prefixed with "cgroup."
|
||||
populated
|
||||
1 if the cgroup or its descendants contains any live
|
||||
processes; otherwise, 0.
|
||||
frozen
|
||||
1 if the cgroup is frozen; otherwise, 0.
|
||||
|
||||
cgroup.max.descendants
|
||||
A read-write single value files. The default is "max".
|
||||
@ -897,6 +899,31 @@ All cgroup core files are prefixed with "cgroup."
|
||||
A dying cgroup can consume system resources not exceeding
|
||||
limits, which were active at the moment of cgroup deletion.
|
||||
|
||||
cgroup.freeze
|
||||
A read-write single value file which exists on non-root cgroups.
|
||||
Allowed values are "0" and "1". The default is "0".
|
||||
|
||||
Writing "1" to the file causes freezing of the cgroup and all
|
||||
descendant cgroups. This means that all belonging processes will
|
||||
be stopped and will not run until the cgroup will be explicitly
|
||||
unfrozen. Freezing of the cgroup may take some time; when this action
|
||||
is completed, the "frozen" value in the cgroup.events control file
|
||||
will be updated to "1" and the corresponding notification will be
|
||||
issued.
|
||||
|
||||
A cgroup can be frozen either by its own settings, or by settings
|
||||
of any ancestor cgroups. If any of ancestor cgroups is frozen, the
|
||||
cgroup will remain frozen.
|
||||
|
||||
Processes in the frozen cgroup can be killed by a fatal signal.
|
||||
They also can enter and leave a frozen cgroup: either by an explicit
|
||||
move by a user, or if freezing of the cgroup races with fork().
|
||||
If a process is moved to a frozen cgroup, it stops. If a process is
|
||||
moved out of a frozen cgroup, it becomes running.
|
||||
|
||||
Frozen status of a cgroup doesn't affect any cgroup tree operations:
|
||||
it's possible to delete a frozen (and empty) cgroup, as well as
|
||||
create new sub-cgroups.
|
||||
|
||||
Controllers
|
||||
===========
|
||||
|
@ -91,10 +91,48 @@ Currently Available
|
||||
* large block (up to pagesize) support
|
||||
* efficient new ordered mode in JBD2 and ext4 (avoid using buffer head to force
|
||||
the ordering)
|
||||
* Case-insensitive file name lookups
|
||||
|
||||
[1] Filesystems with a block size of 1k may see a limit imposed by the
|
||||
directory hash tree having a maximum depth of two.
|
||||
|
||||
case-insensitive file name lookups
|
||||
======================================================
|
||||
|
||||
The case-insensitive file name lookup feature is supported on a
|
||||
per-directory basis, allowing the user to mix case-insensitive and
|
||||
case-sensitive directories in the same filesystem. It is enabled by
|
||||
flipping the +F inode attribute of an empty directory. The
|
||||
case-insensitive string match operation is only defined when we know how
|
||||
text in encoded in a byte sequence. For that reason, in order to enable
|
||||
case-insensitive directories, the filesystem must have the
|
||||
casefold feature, which stores the filesystem-wide encoding
|
||||
model used. By default, the charset adopted is the latest version of
|
||||
Unicode (12.1.0, by the time of this writing), encoded in the UTF-8
|
||||
form. The comparison algorithm is implemented by normalizing the
|
||||
strings to the Canonical decomposition form, as defined by Unicode,
|
||||
followed by a byte per byte comparison.
|
||||
|
||||
The case-awareness is name-preserving on the disk, meaning that the file
|
||||
name provided by userspace is a byte-per-byte match to what is actually
|
||||
written in the disk. The Unicode normalization format used by the
|
||||
kernel is thus an internal representation, and not exposed to the
|
||||
userspace nor to the disk, with the important exception of disk hashes,
|
||||
used on large case-insensitive directories with DX feature. On DX
|
||||
directories, the hash must be calculated using the casefolded version of
|
||||
the filename, meaning that the normalization format used actually has an
|
||||
impact on where the directory entry is stored.
|
||||
|
||||
When we change from viewing filenames as opaque byte sequences to seeing
|
||||
them as encoded strings we need to address what happens when a program
|
||||
tries to create a file with an invalid name. The Unicode subsystem
|
||||
within the kernel leaves the decision of what to do in this case to the
|
||||
filesystem, which select its preferred behavior by enabling/disabling
|
||||
the strict mode. When Ext4 encounters one of those strings and the
|
||||
filesystem did not require strict mode, it falls back to considering the
|
||||
entire string as an opaque byte sequence, which still allows the user to
|
||||
operate on that file, but the case-insensitive lookups won't work.
|
||||
|
||||
Options
|
||||
=======
|
||||
|
||||
|
13
Documentation/admin-guide/hw-vuln/index.rst
Normal file
13
Documentation/admin-guide/hw-vuln/index.rst
Normal file
@ -0,0 +1,13 @@
|
||||
========================
|
||||
Hardware vulnerabilities
|
||||
========================
|
||||
|
||||
This section describes CPU vulnerabilities and provides an overview of the
|
||||
possible mitigations along with guidance for selecting mitigations if they
|
||||
are configurable at compile, boot or run time.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
l1tf
|
||||
mds
|
@ -445,6 +445,7 @@ The default is 'cond'. If 'l1tf=full,force' is given on the kernel command
|
||||
line, then 'always' is enforced and the kvm-intel.vmentry_l1d_flush
|
||||
module parameter is ignored and writes to the sysfs file are rejected.
|
||||
|
||||
.. _mitigation_selection:
|
||||
|
||||
Mitigation selection guide
|
||||
--------------------------
|
308
Documentation/admin-guide/hw-vuln/mds.rst
Normal file
308
Documentation/admin-guide/hw-vuln/mds.rst
Normal file
@ -0,0 +1,308 @@
|
||||
MDS - Microarchitectural Data Sampling
|
||||
======================================
|
||||
|
||||
Microarchitectural Data Sampling is a hardware vulnerability which allows
|
||||
unprivileged speculative access to data which is available in various CPU
|
||||
internal buffers.
|
||||
|
||||
Affected processors
|
||||
-------------------
|
||||
|
||||
This vulnerability affects a wide range of Intel processors. The
|
||||
vulnerability is not present on:
|
||||
|
||||
- Processors from AMD, Centaur and other non Intel vendors
|
||||
|
||||
- Older processor models, where the CPU family is < 6
|
||||
|
||||
- Some Atoms (Bonnell, Saltwell, Goldmont, GoldmontPlus)
|
||||
|
||||
- Intel processors which have the ARCH_CAP_MDS_NO bit set in the
|
||||
IA32_ARCH_CAPABILITIES MSR.
|
||||
|
||||
Whether a processor is affected or not can be read out from the MDS
|
||||
vulnerability file in sysfs. See :ref:`mds_sys_info`.
|
||||
|
||||
Not all processors are affected by all variants of MDS, but the mitigation
|
||||
is identical for all of them so the kernel treats them as a single
|
||||
vulnerability.
|
||||
|
||||
Related CVEs
|
||||
------------
|
||||
|
||||
The following CVE entries are related to the MDS vulnerability:
|
||||
|
||||
============== ===== ===================================================
|
||||
CVE-2018-12126 MSBDS Microarchitectural Store Buffer Data Sampling
|
||||
CVE-2018-12130 MFBDS Microarchitectural Fill Buffer Data Sampling
|
||||
CVE-2018-12127 MLPDS Microarchitectural Load Port Data Sampling
|
||||
CVE-2019-11091 MDSUM Microarchitectural Data Sampling Uncacheable Memory
|
||||
============== ===== ===================================================
|
||||
|
||||
Problem
|
||||
-------
|
||||
|
||||
When performing store, load, L1 refill operations, processors write data
|
||||
into temporary microarchitectural structures (buffers). The data in the
|
||||
buffer can be forwarded to load operations as an optimization.
|
||||
|
||||
Under certain conditions, usually a fault/assist caused by a load
|
||||
operation, data unrelated to the load memory address can be speculatively
|
||||
forwarded from the buffers. Because the load operation causes a fault or
|
||||
assist and its result will be discarded, the forwarded data will not cause
|
||||
incorrect program execution or state changes. But a malicious operation
|
||||
may be able to forward this speculative data to a disclosure gadget which
|
||||
allows in turn to infer the value via a cache side channel attack.
|
||||
|
||||
Because the buffers are potentially shared between Hyper-Threads cross
|
||||
Hyper-Thread attacks are possible.
|
||||
|
||||
Deeper technical information is available in the MDS specific x86
|
||||
architecture section: :ref:`Documentation/x86/mds.rst <mds>`.
|
||||
|
||||
|
||||
Attack scenarios
|
||||
----------------
|
||||
|
||||
Attacks against the MDS vulnerabilities can be mounted from malicious non
|
||||
priviledged user space applications running on hosts or guest. Malicious
|
||||
guest OSes can obviously mount attacks as well.
|
||||
|
||||
Contrary to other speculation based vulnerabilities the MDS vulnerability
|
||||
does not allow the attacker to control the memory target address. As a
|
||||
consequence the attacks are purely sampling based, but as demonstrated with
|
||||
the TLBleed attack samples can be postprocessed successfully.
|
||||
|
||||
Web-Browsers
|
||||
^^^^^^^^^^^^
|
||||
|
||||
It's unclear whether attacks through Web-Browsers are possible at
|
||||
all. The exploitation through Java-Script is considered very unlikely,
|
||||
but other widely used web technologies like Webassembly could possibly be
|
||||
abused.
|
||||
|
||||
|
||||
.. _mds_sys_info:
|
||||
|
||||
MDS system information
|
||||
-----------------------
|
||||
|
||||
The Linux kernel provides a sysfs interface to enumerate the current MDS
|
||||
status of the system: whether the system is vulnerable, and which
|
||||
mitigations are active. The relevant sysfs file is:
|
||||
|
||||
/sys/devices/system/cpu/vulnerabilities/mds
|
||||
|
||||
The possible values in this file are:
|
||||
|
||||
.. list-table::
|
||||
|
||||
* - 'Not affected'
|
||||
- The processor is not vulnerable
|
||||
* - 'Vulnerable'
|
||||
- The processor is vulnerable, but no mitigation enabled
|
||||
* - 'Vulnerable: Clear CPU buffers attempted, no microcode'
|
||||
- The processor is vulnerable but microcode is not updated.
|
||||
|
||||
The mitigation is enabled on a best effort basis. See :ref:`vmwerv`
|
||||
* - 'Mitigation: Clear CPU buffers'
|
||||
- The processor is vulnerable and the CPU buffer clearing mitigation is
|
||||
enabled.
|
||||
|
||||
If the processor is vulnerable then the following information is appended
|
||||
to the above information:
|
||||
|
||||
======================== ============================================
|
||||
'SMT vulnerable' SMT is enabled
|
||||
'SMT mitigated' SMT is enabled and mitigated
|
||||
'SMT disabled' SMT is disabled
|
||||
'SMT Host state unknown' Kernel runs in a VM, Host SMT state unknown
|
||||
======================== ============================================
|
||||
|
||||
.. _vmwerv:
|
||||
|
||||
Best effort mitigation mode
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
If the processor is vulnerable, but the availability of the microcode based
|
||||
mitigation mechanism is not advertised via CPUID the kernel selects a best
|
||||
effort mitigation mode. This mode invokes the mitigation instructions
|
||||
without a guarantee that they clear the CPU buffers.
|
||||
|
||||
This is done to address virtualization scenarios where the host has the
|
||||
microcode update applied, but the hypervisor is not yet updated to expose
|
||||
the CPUID to the guest. If the host has updated microcode the protection
|
||||
takes effect otherwise a few cpu cycles are wasted pointlessly.
|
||||
|
||||
The state in the mds sysfs file reflects this situation accordingly.
|
||||
|
||||
|
||||
Mitigation mechanism
|
||||
-------------------------
|
||||
|
||||
The kernel detects the affected CPUs and the presence of the microcode
|
||||
which is required.
|
||||
|
||||
If a CPU is affected and the microcode is available, then the kernel
|
||||
enables the mitigation by default. The mitigation can be controlled at boot
|
||||
time via a kernel command line option. See
|
||||
:ref:`mds_mitigation_control_command_line`.
|
||||
|
||||
.. _cpu_buffer_clear:
|
||||
|
||||
CPU buffer clearing
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The mitigation for MDS clears the affected CPU buffers on return to user
|
||||
space and when entering a guest.
|
||||
|
||||
If SMT is enabled it also clears the buffers on idle entry when the CPU
|
||||
is only affected by MSBDS and not any other MDS variant, because the
|
||||
other variants cannot be protected against cross Hyper-Thread attacks.
|
||||
|
||||
For CPUs which are only affected by MSBDS the user space, guest and idle
|
||||
transition mitigations are sufficient and SMT is not affected.
|
||||
|
||||
.. _virt_mechanism:
|
||||
|
||||
Virtualization mitigation
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The protection for host to guest transition depends on the L1TF
|
||||
vulnerability of the CPU:
|
||||
|
||||
- CPU is affected by L1TF:
|
||||
|
||||
If the L1D flush mitigation is enabled and up to date microcode is
|
||||
available, the L1D flush mitigation is automatically protecting the
|
||||
guest transition.
|
||||
|
||||
If the L1D flush mitigation is disabled then the MDS mitigation is
|
||||
invoked explicit when the host MDS mitigation is enabled.
|
||||
|
||||
For details on L1TF and virtualization see:
|
||||
:ref:`Documentation/admin-guide/hw-vuln//l1tf.rst <mitigation_control_kvm>`.
|
||||
|
||||
- CPU is not affected by L1TF:
|
||||
|
||||
CPU buffers are flushed before entering the guest when the host MDS
|
||||
mitigation is enabled.
|
||||
|
||||
The resulting MDS protection matrix for the host to guest transition:
|
||||
|
||||
============ ===== ============= ============ =================
|
||||
L1TF MDS VMX-L1FLUSH Host MDS MDS-State
|
||||
|
||||
Don't care No Don't care N/A Not affected
|
||||
|
||||
Yes Yes Disabled Off Vulnerable
|
||||
|
||||
Yes Yes Disabled Full Mitigated
|
||||
|
||||
Yes Yes Enabled Don't care Mitigated
|
||||
|
||||
No Yes N/A Off Vulnerable
|
||||
|
||||
No Yes N/A Full Mitigated
|
||||
============ ===== ============= ============ =================
|
||||
|
||||
This only covers the host to guest transition, i.e. prevents leakage from
|
||||
host to guest, but does not protect the guest internally. Guests need to
|
||||
have their own protections.
|
||||
|
||||
.. _xeon_phi:
|
||||
|
||||
XEON PHI specific considerations
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The XEON PHI processor family is affected by MSBDS which can be exploited
|
||||
cross Hyper-Threads when entering idle states. Some XEON PHI variants allow
|
||||
to use MWAIT in user space (Ring 3) which opens an potential attack vector
|
||||
for malicious user space. The exposure can be disabled on the kernel
|
||||
command line with the 'ring3mwait=disable' command line option.
|
||||
|
||||
XEON PHI is not affected by the other MDS variants and MSBDS is mitigated
|
||||
before the CPU enters a idle state. As XEON PHI is not affected by L1TF
|
||||
either disabling SMT is not required for full protection.
|
||||
|
||||
.. _mds_smt_control:
|
||||
|
||||
SMT control
|
||||
^^^^^^^^^^^
|
||||
|
||||
All MDS variants except MSBDS can be attacked cross Hyper-Threads. That
|
||||
means on CPUs which are affected by MFBDS or MLPDS it is necessary to
|
||||
disable SMT for full protection. These are most of the affected CPUs; the
|
||||
exception is XEON PHI, see :ref:`xeon_phi`.
|
||||
|
||||
Disabling SMT can have a significant performance impact, but the impact
|
||||
depends on the type of workloads.
|
||||
|
||||
See the relevant chapter in the L1TF mitigation documentation for details:
|
||||
:ref:`Documentation/admin-guide/hw-vuln/l1tf.rst <smt_control>`.
|
||||
|
||||
|
||||
.. _mds_mitigation_control_command_line:
|
||||
|
||||
Mitigation control on the kernel command line
|
||||
---------------------------------------------
|
||||
|
||||
The kernel command line allows to control the MDS mitigations at boot
|
||||
time with the option "mds=". The valid arguments for this option are:
|
||||
|
||||
============ =============================================================
|
||||
full If the CPU is vulnerable, enable all available mitigations
|
||||
for the MDS vulnerability, CPU buffer clearing on exit to
|
||||
userspace and when entering a VM. Idle transitions are
|
||||
protected as well if SMT is enabled.
|
||||
|
||||
It does not automatically disable SMT.
|
||||
|
||||
full,nosmt The same as mds=full, with SMT disabled on vulnerable
|
||||
CPUs. This is the complete mitigation.
|
||||
|
||||
off Disables MDS mitigations completely.
|
||||
|
||||
============ =============================================================
|
||||
|
||||
Not specifying this option is equivalent to "mds=full".
|
||||
|
||||
|
||||
Mitigation selection guide
|
||||
--------------------------
|
||||
|
||||
1. Trusted userspace
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
If all userspace applications are from a trusted source and do not
|
||||
execute untrusted code which is supplied externally, then the mitigation
|
||||
can be disabled.
|
||||
|
||||
|
||||
2. Virtualization with trusted guests
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The same considerations as above versus trusted user space apply.
|
||||
|
||||
3. Virtualization with untrusted guests
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The protection depends on the state of the L1TF mitigations.
|
||||
See :ref:`virt_mechanism`.
|
||||
|
||||
If the MDS mitigation is enabled and SMT is disabled, guest to host and
|
||||
guest to guest attacks are prevented.
|
||||
|
||||
.. _mds_default_mitigations:
|
||||
|
||||
Default mitigations
|
||||
-------------------
|
||||
|
||||
The kernel default mitigations for vulnerable processors are:
|
||||
|
||||
- Enable CPU buffer clearing
|
||||
|
||||
The kernel does not by default enforce the disabling of SMT, which leaves
|
||||
SMT systems vulnerable when running untrusted code. The same rationale as
|
||||
for L1TF applies.
|
||||
See :ref:`Documentation/admin-guide/hw-vuln//l1tf.rst <default_mitigations>`.
|
@ -17,14 +17,12 @@ etc.
|
||||
kernel-parameters
|
||||
devices
|
||||
|
||||
This section describes CPU vulnerabilities and provides an overview of the
|
||||
possible mitigations along with guidance for selecting mitigations if they
|
||||
are configurable at compile, boot or run time.
|
||||
This section describes CPU vulnerabilities and their mitigations.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
l1tf
|
||||
hw-vuln/index
|
||||
|
||||
Here is a set of documents aimed at users who are trying to track down
|
||||
problems and bugs in particular.
|
||||
|
@ -1588,7 +1588,7 @@
|
||||
Format: { "off" | "enforce" | "fix" | "log" }
|
||||
default: "enforce"
|
||||
|
||||
ima_appraise_tcb [IMA]
|
||||
ima_appraise_tcb [IMA] Deprecated. Use ima_policy= instead.
|
||||
The builtin appraise policy appraises all files
|
||||
owned by uid=0.
|
||||
|
||||
@ -1615,8 +1615,7 @@
|
||||
uid=0.
|
||||
|
||||
The "appraise_tcb" policy appraises the integrity of
|
||||
all files owned by root. (This is the equivalent
|
||||
of ima_appraise_tcb.)
|
||||
all files owned by root.
|
||||
|
||||
The "secure_boot" policy appraises the integrity
|
||||
of files (eg. kexec kernel image, kernel modules,
|
||||
@ -1831,6 +1830,9 @@
|
||||
ip= [IP_PNP]
|
||||
See Documentation/filesystems/nfs/nfsroot.txt.
|
||||
|
||||
ipcmni_extend [KNL] Extend the maximum number of unique System V
|
||||
IPC identifiers from 32,768 to 16,777,216.
|
||||
|
||||
irqaffinity= [SMP] Set the default irq affinity mask
|
||||
The argument is a cpu list, as described above.
|
||||
|
||||
@ -2144,7 +2146,7 @@
|
||||
|
||||
Default is 'flush'.
|
||||
|
||||
For details see: Documentation/admin-guide/l1tf.rst
|
||||
For details see: Documentation/admin-guide/hw-vuln/l1tf.rst
|
||||
|
||||
l2cr= [PPC]
|
||||
|
||||
@ -2390,6 +2392,32 @@
|
||||
Format: <first>,<last>
|
||||
Specifies range of consoles to be captured by the MDA.
|
||||
|
||||
mds= [X86,INTEL]
|
||||
Control mitigation for the Micro-architectural Data
|
||||
Sampling (MDS) vulnerability.
|
||||
|
||||
Certain CPUs are vulnerable to an exploit against CPU
|
||||
internal buffers which can forward information to a
|
||||
disclosure gadget under certain conditions.
|
||||
|
||||
In vulnerable processors, the speculatively
|
||||
forwarded data can be used in a cache side channel
|
||||
attack, to access data to which the attacker does
|
||||
not have direct access.
|
||||
|
||||
This parameter controls the MDS mitigation. The
|
||||
options are:
|
||||
|
||||
full - Enable MDS mitigation on vulnerable CPUs
|
||||
full,nosmt - Enable MDS mitigation and disable
|
||||
SMT on vulnerable CPUs
|
||||
off - Unconditionally disable MDS mitigation
|
||||
|
||||
Not specifying this option is equivalent to
|
||||
mds=full.
|
||||
|
||||
For details see: Documentation/admin-guide/hw-vuln/mds.rst
|
||||
|
||||
mem=nn[KMG] [KNL,BOOT] Force usage of a specific amount of memory
|
||||
Amount of memory to be used when the kernel is not able
|
||||
to see the whole system memory or for test.
|
||||
@ -2566,6 +2594,7 @@
|
||||
spec_store_bypass_disable=off [X86,PPC]
|
||||
ssbd=force-off [ARM64]
|
||||
l1tf=off [X86]
|
||||
mds=off [X86]
|
||||
|
||||
auto (default)
|
||||
Mitigate all CPU vulnerabilities, but leave SMT
|
||||
@ -2580,6 +2609,7 @@
|
||||
if needed. This is for users who always want to
|
||||
be fully mitigated, even if it means losing SMT.
|
||||
Equivalent to: l1tf=flush,nosmt [X86]
|
||||
mds=full,nosmt [X86]
|
||||
|
||||
mminit_loglevel=
|
||||
[KNL] When CONFIG_DEBUG_MEMORY_INIT is set, this
|
||||
@ -2876,11 +2906,11 @@
|
||||
noexec=on: enable non-executable mappings (default)
|
||||
noexec=off: disable non-executable mappings
|
||||
|
||||
nosmap [X86]
|
||||
nosmap [X86,PPC]
|
||||
Disable SMAP (Supervisor Mode Access Prevention)
|
||||
even if it is supported by processor.
|
||||
|
||||
nosmep [X86]
|
||||
nosmep [X86,PPC]
|
||||
Disable SMEP (Supervisor Mode Execution Prevention)
|
||||
even if it is supported by processor.
|
||||
|
||||
@ -3147,6 +3177,16 @@
|
||||
This will also cause panics on machine check exceptions.
|
||||
Useful together with panic=30 to trigger a reboot.
|
||||
|
||||
page_alloc.shuffle=
|
||||
[KNL] Boolean flag to control whether the page allocator
|
||||
should randomize its free lists. The randomization may
|
||||
be automatically enabled if the kernel detects it is
|
||||
running on a platform with a direct-mapped memory-side
|
||||
cache, and this parameter can be used to
|
||||
override/disable that behavior. The state of the flag
|
||||
can be read from sysfs at:
|
||||
/sys/module/page_alloc/parameters/shuffle.
|
||||
|
||||
page_owner= [KNL] Boot-time page_owner enabling option.
|
||||
Storage of the information about who allocated
|
||||
each page is disabled in default. With this switch,
|
||||
@ -4027,7 +4067,9 @@
|
||||
[[,]s[mp]#### \
|
||||
[[,]b[ios] | a[cpi] | k[bd] | t[riple] | e[fi] | p[ci]] \
|
||||
[[,]f[orce]
|
||||
Where reboot_mode is one of warm (soft) or cold (hard) or gpio,
|
||||
Where reboot_mode is one of warm (soft) or cold (hard) or gpio
|
||||
(prefix with 'panic_' to set mode for panic
|
||||
reboot only),
|
||||
reboot_type is one of bios, acpi, kbd, triple, efi, or pci,
|
||||
reboot_force is either force or not specified,
|
||||
reboot_cpu is s[mp]#### with #### being the processor
|
||||
|
169
Documentation/admin-guide/mm/numaperf.rst
Normal file
169
Documentation/admin-guide/mm/numaperf.rst
Normal file
@ -0,0 +1,169 @@
|
||||
.. _numaperf:
|
||||
|
||||
=============
|
||||
NUMA Locality
|
||||
=============
|
||||
|
||||
Some platforms may have multiple types of memory attached to a compute
|
||||
node. These disparate memory ranges may share some characteristics, such
|
||||
as CPU cache coherence, but may have different performance. For example,
|
||||
different media types and buses affect bandwidth and latency.
|
||||
|
||||
A system supports such heterogeneous memory by grouping each memory type
|
||||
under different domains, or "nodes", based on locality and performance
|
||||
characteristics. Some memory may share the same node as a CPU, and others
|
||||
are provided as memory only nodes. While memory only nodes do not provide
|
||||
CPUs, they may still be local to one or more compute nodes relative to
|
||||
other nodes. The following diagram shows one such example of two compute
|
||||
nodes with local memory and a memory only node for each of compute node:
|
||||
|
||||
+------------------+ +------------------+
|
||||
| Compute Node 0 +-----+ Compute Node 1 |
|
||||
| Local Node0 Mem | | Local Node1 Mem |
|
||||
+--------+---------+ +--------+---------+
|
||||
| |
|
||||
+--------+---------+ +--------+---------+
|
||||
| Slower Node2 Mem | | Slower Node3 Mem |
|
||||
+------------------+ +--------+---------+
|
||||
|
||||
A "memory initiator" is a node containing one or more devices such as
|
||||
CPUs or separate memory I/O devices that can initiate memory requests.
|
||||
A "memory target" is a node containing one or more physical address
|
||||
ranges accessible from one or more memory initiators.
|
||||
|
||||
When multiple memory initiators exist, they may not all have the same
|
||||
performance when accessing a given memory target. Each initiator-target
|
||||
pair may be organized into different ranked access classes to represent
|
||||
this relationship. The highest performing initiator to a given target
|
||||
is considered to be one of that target's local initiators, and given
|
||||
the highest access class, 0. Any given target may have one or more
|
||||
local initiators, and any given initiator may have multiple local
|
||||
memory targets.
|
||||
|
||||
To aid applications matching memory targets with their initiators, the
|
||||
kernel provides symlinks to each other. The following example lists the
|
||||
relationship for the access class "0" memory initiators and targets::
|
||||
|
||||
# symlinks -v /sys/devices/system/node/nodeX/access0/targets/
|
||||
relative: /sys/devices/system/node/nodeX/access0/targets/nodeY -> ../../nodeY
|
||||
|
||||
# symlinks -v /sys/devices/system/node/nodeY/access0/initiators/
|
||||
relative: /sys/devices/system/node/nodeY/access0/initiators/nodeX -> ../../nodeX
|
||||
|
||||
A memory initiator may have multiple memory targets in the same access
|
||||
class. The target memory's initiators in a given class indicate the
|
||||
nodes' access characteristics share the same performance relative to other
|
||||
linked initiator nodes. Each target within an initiator's access class,
|
||||
though, do not necessarily perform the same as each other.
|
||||
|
||||
================
|
||||
NUMA Performance
|
||||
================
|
||||
|
||||
Applications may wish to consider which node they want their memory to
|
||||
be allocated from based on the node's performance characteristics. If
|
||||
the system provides these attributes, the kernel exports them under the
|
||||
node sysfs hierarchy by appending the attributes directory under the
|
||||
memory node's access class 0 initiators as follows::
|
||||
|
||||
/sys/devices/system/node/nodeY/access0/initiators/
|
||||
|
||||
These attributes apply only when accessed from nodes that have the
|
||||
are linked under the this access's inititiators.
|
||||
|
||||
The performance characteristics the kernel provides for the local initiators
|
||||
are exported are as follows::
|
||||
|
||||
# tree -P "read*|write*" /sys/devices/system/node/nodeY/access0/initiators/
|
||||
/sys/devices/system/node/nodeY/access0/initiators/
|
||||
|-- read_bandwidth
|
||||
|-- read_latency
|
||||
|-- write_bandwidth
|
||||
`-- write_latency
|
||||
|
||||
The bandwidth attributes are provided in MiB/second.
|
||||
|
||||
The latency attributes are provided in nanoseconds.
|
||||
|
||||
The values reported here correspond to the rated latency and bandwidth
|
||||
for the platform.
|
||||
|
||||
==========
|
||||
NUMA Cache
|
||||
==========
|
||||
|
||||
System memory may be constructed in a hierarchy of elements with various
|
||||
performance characteristics in order to provide large address space of
|
||||
slower performing memory cached by a smaller higher performing memory. The
|
||||
system physical addresses memory initiators are aware of are provided
|
||||
by the last memory level in the hierarchy. The system meanwhile uses
|
||||
higher performing memory to transparently cache access to progressively
|
||||
slower levels.
|
||||
|
||||
The term "far memory" is used to denote the last level memory in the
|
||||
hierarchy. Each increasing cache level provides higher performing
|
||||
initiator access, and the term "near memory" represents the fastest
|
||||
cache provided by the system.
|
||||
|
||||
This numbering is different than CPU caches where the cache level (ex:
|
||||
L1, L2, L3) uses the CPU-side view where each increased level is lower
|
||||
performing. In contrast, the memory cache level is centric to the last
|
||||
level memory, so the higher numbered cache level corresponds to memory
|
||||
nearer to the CPU, and further from far memory.
|
||||
|
||||
The memory-side caches are not directly addressable by software. When
|
||||
software accesses a system address, the system will return it from the
|
||||
near memory cache if it is present. If it is not present, the system
|
||||
accesses the next level of memory until there is either a hit in that
|
||||
cache level, or it reaches far memory.
|
||||
|
||||
An application does not need to know about caching attributes in order
|
||||
to use the system. Software may optionally query the memory cache
|
||||
attributes in order to maximize the performance out of such a setup.
|
||||
If the system provides a way for the kernel to discover this information,
|
||||
for example with ACPI HMAT (Heterogeneous Memory Attribute Table),
|
||||
the kernel will append these attributes to the NUMA node memory target.
|
||||
|
||||
When the kernel first registers a memory cache with a node, the kernel
|
||||
will create the following directory::
|
||||
|
||||
/sys/devices/system/node/nodeX/memory_side_cache/
|
||||
|
||||
If that directory is not present, the system either does not not provide
|
||||
a memory-side cache, or that information is not accessible to the kernel.
|
||||
|
||||
The attributes for each level of cache is provided under its cache
|
||||
level index::
|
||||
|
||||
/sys/devices/system/node/nodeX/memory_side_cache/indexA/
|
||||
/sys/devices/system/node/nodeX/memory_side_cache/indexB/
|
||||
/sys/devices/system/node/nodeX/memory_side_cache/indexC/
|
||||
|
||||
Each cache level's directory provides its attributes. For example, the
|
||||
following shows a single cache level and the attributes available for
|
||||
software to query::
|
||||
|
||||
# tree sys/devices/system/node/node0/memory_side_cache/
|
||||
/sys/devices/system/node/node0/memory_side_cache/
|
||||
|-- index1
|
||||
| |-- indexing
|
||||
| |-- line_size
|
||||
| |-- size
|
||||
| `-- write_policy
|
||||
|
||||
The "indexing" will be 0 if it is a direct-mapped cache, and non-zero
|
||||
for any other indexed based, multi-way associativity.
|
||||
|
||||
The "line_size" is the number of bytes accessed from the next cache
|
||||
level on a miss.
|
||||
|
||||
The "size" is the number of bytes provided by this cache level.
|
||||
|
||||
The "write_policy" will be 0 for write-back, and non-zero for
|
||||
write-through caching.
|
||||
|
||||
========
|
||||
See Also
|
||||
========
|
||||
.. [1] https://www.uefi.org/sites/default/files/resources/ACPI_6_2.pdf
|
||||
Section 5.2.27
|
@ -1,6 +1,6 @@
|
||||
|
||||
On atomic bitops.
|
||||
|
||||
=============
|
||||
Atomic bitops
|
||||
=============
|
||||
|
||||
While our bitmap_{}() functions are non-atomic, we have a number of operations
|
||||
operating on single bits in a bitmap that are atomic.
|
||||
|
@ -20,13 +20,26 @@ for that device, by setting low_latency to 0. See Section 3 for
|
||||
details on how to configure BFQ for the desired tradeoff between
|
||||
latency and throughput, or on how to maximize throughput.
|
||||
|
||||
BFQ has a non-null overhead, which limits the maximum IOPS that a CPU
|
||||
can process for a device scheduled with BFQ. To give an idea of the
|
||||
limits on slow or average CPUs, here are, first, the limits of BFQ for
|
||||
three different CPUs, on, respectively, an average laptop, an old
|
||||
desktop, and a cheap embedded system, in case full hierarchical
|
||||
support is enabled (i.e., CONFIG_BFQ_GROUP_IOSCHED is set), but
|
||||
CONFIG_DEBUG_BLK_CGROUP is not set (Section 4-2):
|
||||
As every I/O scheduler, BFQ adds some overhead to per-I/O-request
|
||||
processing. To give an idea of this overhead, the total,
|
||||
single-lock-protected, per-request processing time of BFQ---i.e., the
|
||||
sum of the execution times of the request insertion, dispatch and
|
||||
completion hooks---is, e.g., 1.9 us on an Intel Core i7-2760QM@2.40GHz
|
||||
(dated CPU for notebooks; time measured with simple code
|
||||
instrumentation, and using the throughput-sync.sh script of the S
|
||||
suite [1], in performance-profiling mode). To put this result into
|
||||
context, the total, single-lock-protected, per-request execution time
|
||||
of the lightest I/O scheduler available in blk-mq, mq-deadline, is 0.7
|
||||
us (mq-deadline is ~800 LOC, against ~10500 LOC for BFQ).
|
||||
|
||||
Scheduling overhead further limits the maximum IOPS that a CPU can
|
||||
process (already limited by the execution of the rest of the I/O
|
||||
stack). To give an idea of the limits with BFQ, on slow or average
|
||||
CPUs, here are, first, the limits of BFQ for three different CPUs, on,
|
||||
respectively, an average laptop, an old desktop, and a cheap embedded
|
||||
system, in case full hierarchical support is enabled (i.e.,
|
||||
CONFIG_BFQ_GROUP_IOSCHED is set), but CONFIG_DEBUG_BLK_CGROUP is not
|
||||
set (Section 4-2):
|
||||
- Intel i7-4850HQ: 400 KIOPS
|
||||
- AMD A8-3850: 250 KIOPS
|
||||
- ARM CortexTM-A53 Octa-core: 80 KIOPS
|
||||
@ -566,3 +579,5 @@ applications. Unset this tunable if you need/want to control weights.
|
||||
Slightly extended version:
|
||||
http://algogroup.unimore.it/people/paolo/disk_sched/bfq-v1-suite-
|
||||
results.pdf
|
||||
|
||||
[3] https://github.com/Algodev-github/S
|
||||
|
@ -93,3 +93,7 @@ zoned=[0/1]: Default: 0
|
||||
|
||||
zone_size=[MB]: Default: 256
|
||||
Per zone size when exposed as a zoned block device. Must be a power of two.
|
||||
|
||||
zone_nr_conv=[nr_conv]: Default: 0
|
||||
The number of conventional zones to create when block device is zoned. If
|
||||
zone_nr_conv >= nr_zones, it will be reduced to nr_zones - 1.
|
||||
|
@ -85,8 +85,33 @@ Q: Can loops be supported in a safe way?
|
||||
A: It's not clear yet.
|
||||
|
||||
BPF developers are trying to find a way to
|
||||
support bounded loops where the verifier can guarantee that
|
||||
the program terminates in less than 4096 instructions.
|
||||
support bounded loops.
|
||||
|
||||
Q: What are the verifier limits?
|
||||
--------------------------------
|
||||
A: The only limit known to the user space is BPF_MAXINSNS (4096).
|
||||
It's the maximum number of instructions that the unprivileged bpf
|
||||
program can have. The verifier has various internal limits.
|
||||
Like the maximum number of instructions that can be explored during
|
||||
program analysis. Currently, that limit is set to 1 million.
|
||||
Which essentially means that the largest program can consist
|
||||
of 1 million NOP instructions. There is a limit to the maximum number
|
||||
of subsequent branches, a limit to the number of nested bpf-to-bpf
|
||||
calls, a limit to the number of the verifier states per instruction,
|
||||
a limit to the number of maps used by the program.
|
||||
All these limits can be hit with a sufficiently complex program.
|
||||
There are also non-numerical limits that can cause the program
|
||||
to be rejected. The verifier used to recognize only pointer + constant
|
||||
expressions. Now it can recognize pointer + bounded_register.
|
||||
bpf_lookup_map_elem(key) had a requirement that 'key' must be
|
||||
a pointer to the stack. Now, 'key' can be a pointer to map value.
|
||||
The verifier is steadily getting 'smarter'. The limits are
|
||||
being removed. The only way to know that the program is going to
|
||||
be accepted by the verifier is to try to load it.
|
||||
The bpf development process guarantees that the future kernel
|
||||
versions will accept all bpf programs that were accepted by
|
||||
the earlier versions.
|
||||
|
||||
|
||||
Instruction level questions
|
||||
---------------------------
|
||||
|
@ -82,6 +82,8 @@ sequentially and type id is assigned to each recognized type starting from id
|
||||
#define BTF_KIND_RESTRICT 11 /* Restrict */
|
||||
#define BTF_KIND_FUNC 12 /* Function */
|
||||
#define BTF_KIND_FUNC_PROTO 13 /* Function Proto */
|
||||
#define BTF_KIND_VAR 14 /* Variable */
|
||||
#define BTF_KIND_DATASEC 15 /* Section */
|
||||
|
||||
Note that the type section encodes debug info, not just pure types.
|
||||
``BTF_KIND_FUNC`` is not a type, and it represents a defined subprogram.
|
||||
@ -393,6 +395,61 @@ refers to parameter type.
|
||||
If the function has variable arguments, the last parameter is encoded with
|
||||
``name_off = 0`` and ``type = 0``.
|
||||
|
||||
2.2.14 BTF_KIND_VAR
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
``struct btf_type`` encoding requirement:
|
||||
* ``name_off``: offset to a valid C identifier
|
||||
* ``info.kind_flag``: 0
|
||||
* ``info.kind``: BTF_KIND_VAR
|
||||
* ``info.vlen``: 0
|
||||
* ``type``: the type of the variable
|
||||
|
||||
``btf_type`` is followed by a single ``struct btf_variable`` with the
|
||||
following data::
|
||||
|
||||
struct btf_var {
|
||||
__u32 linkage;
|
||||
};
|
||||
|
||||
``struct btf_var`` encoding:
|
||||
* ``linkage``: currently only static variable 0, or globally allocated
|
||||
variable in ELF sections 1
|
||||
|
||||
Not all type of global variables are supported by LLVM at this point.
|
||||
The following is currently available:
|
||||
|
||||
* static variables with or without section attributes
|
||||
* global variables with section attributes
|
||||
|
||||
The latter is for future extraction of map key/value type id's from a
|
||||
map definition.
|
||||
|
||||
2.2.15 BTF_KIND_DATASEC
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
``struct btf_type`` encoding requirement:
|
||||
* ``name_off``: offset to a valid name associated with a variable or
|
||||
one of .data/.bss/.rodata
|
||||
* ``info.kind_flag``: 0
|
||||
* ``info.kind``: BTF_KIND_DATASEC
|
||||
* ``info.vlen``: # of variables
|
||||
* ``size``: total section size in bytes (0 at compilation time, patched
|
||||
to actual size by BPF loaders such as libbpf)
|
||||
|
||||
``btf_type`` is followed by ``info.vlen`` number of ``struct btf_var_secinfo``.::
|
||||
|
||||
struct btf_var_secinfo {
|
||||
__u32 type;
|
||||
__u32 offset;
|
||||
__u32 size;
|
||||
};
|
||||
|
||||
``struct btf_var_secinfo`` encoding:
|
||||
* ``type``: the type of the BTF_KIND_VAR variable
|
||||
* ``offset``: the in-section offset of the variable
|
||||
* ``size``: the size of the variable in bytes
|
||||
|
||||
3. BTF Kernel API
|
||||
*****************
|
||||
|
||||
@ -521,6 +578,7 @@ For line_info, the line number and column number are defined as below:
|
||||
#define BPF_LINE_INFO_LINE_COL(line_col) ((line_col) & 0x3ff)
|
||||
|
||||
3.4 BPF_{PROG,MAP}_GET_NEXT_ID
|
||||
==============================
|
||||
|
||||
In kernel, every loaded program, map or btf has a unique id. The id won't
|
||||
change during the lifetime of a program, map, or btf.
|
||||
@ -530,6 +588,7 @@ each command, to user space, for bpf program or maps, respectively, so an
|
||||
inspection tool can inspect all programs and maps.
|
||||
|
||||
3.5 BPF_{PROG,MAP}_GET_FD_BY_ID
|
||||
===============================
|
||||
|
||||
An introspection tool cannot use id to get details about program or maps.
|
||||
A file descriptor needs to be obtained first for reference-counting purpose.
|
||||
|
@ -36,6 +36,16 @@ Two sets of Questions and Answers (Q&A) are maintained.
|
||||
bpf_devel_QA
|
||||
|
||||
|
||||
Program types
|
||||
=============
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
prog_cgroup_sysctl
|
||||
prog_flow_dissector
|
||||
|
||||
|
||||
.. Links:
|
||||
.. _Documentation/networking/filter.txt: ../networking/filter.txt
|
||||
.. _man-pages: https://www.kernel.org/doc/man-pages/
|
||||
|
125
Documentation/bpf/prog_cgroup_sysctl.rst
Normal file
125
Documentation/bpf/prog_cgroup_sysctl.rst
Normal file
@ -0,0 +1,125 @@
|
||||
.. SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
|
||||
|
||||
===========================
|
||||
BPF_PROG_TYPE_CGROUP_SYSCTL
|
||||
===========================
|
||||
|
||||
This document describes ``BPF_PROG_TYPE_CGROUP_SYSCTL`` program type that
|
||||
provides cgroup-bpf hook for sysctl.
|
||||
|
||||
The hook has to be attached to a cgroup and will be called every time a
|
||||
process inside that cgroup tries to read from or write to sysctl knob in proc.
|
||||
|
||||
1. Attach type
|
||||
**************
|
||||
|
||||
``BPF_CGROUP_SYSCTL`` attach type has to be used to attach
|
||||
``BPF_PROG_TYPE_CGROUP_SYSCTL`` program to a cgroup.
|
||||
|
||||
2. Context
|
||||
**********
|
||||
|
||||
``BPF_PROG_TYPE_CGROUP_SYSCTL`` provides access to the following context from
|
||||
BPF program::
|
||||
|
||||
struct bpf_sysctl {
|
||||
__u32 write;
|
||||
__u32 file_pos;
|
||||
};
|
||||
|
||||
* ``write`` indicates whether sysctl value is being read (``0``) or written
|
||||
(``1``). This field is read-only.
|
||||
|
||||
* ``file_pos`` indicates file position sysctl is being accessed at, read
|
||||
or written. This field is read-write. Writing to the field sets the starting
|
||||
position in sysctl proc file ``read(2)`` will be reading from or ``write(2)``
|
||||
will be writing to. Writing zero to the field can be used e.g. to override
|
||||
whole sysctl value by ``bpf_sysctl_set_new_value()`` on ``write(2)`` even
|
||||
when it's called by user space on ``file_pos > 0``. Writing non-zero
|
||||
value to the field can be used to access part of sysctl value starting from
|
||||
specified ``file_pos``. Not all sysctl support access with ``file_pos !=
|
||||
0``, e.g. writes to numeric sysctl entries must always be at file position
|
||||
``0``. See also ``kernel.sysctl_writes_strict`` sysctl.
|
||||
|
||||
See `linux/bpf.h`_ for more details on how context field can be accessed.
|
||||
|
||||
3. Return code
|
||||
**************
|
||||
|
||||
``BPF_PROG_TYPE_CGROUP_SYSCTL`` program must return one of the following
|
||||
return codes:
|
||||
|
||||
* ``0`` means "reject access to sysctl";
|
||||
* ``1`` means "proceed with access".
|
||||
|
||||
If program returns ``0`` user space will get ``-1`` from ``read(2)`` or
|
||||
``write(2)`` and ``errno`` will be set to ``EPERM``.
|
||||
|
||||
4. Helpers
|
||||
**********
|
||||
|
||||
Since sysctl knob is represented by a name and a value, sysctl specific BPF
|
||||
helpers focus on providing access to these properties:
|
||||
|
||||
* ``bpf_sysctl_get_name()`` to get sysctl name as it is visible in
|
||||
``/proc/sys`` into provided by BPF program buffer;
|
||||
|
||||
* ``bpf_sysctl_get_current_value()`` to get string value currently held by
|
||||
sysctl into provided by BPF program buffer. This helper is available on both
|
||||
``read(2)`` from and ``write(2)`` to sysctl;
|
||||
|
||||
* ``bpf_sysctl_get_new_value()`` to get new string value currently being
|
||||
written to sysctl before actual write happens. This helper can be used only
|
||||
on ``ctx->write == 1``;
|
||||
|
||||
* ``bpf_sysctl_set_new_value()`` to override new string value currently being
|
||||
written to sysctl before actual write happens. Sysctl value will be
|
||||
overridden starting from the current ``ctx->file_pos``. If the whole value
|
||||
has to be overridden BPF program can set ``file_pos`` to zero before calling
|
||||
to the helper. This helper can be used only on ``ctx->write == 1``. New
|
||||
string value set by the helper is treated and verified by kernel same way as
|
||||
an equivalent string passed by user space.
|
||||
|
||||
BPF program sees sysctl value same way as user space does in proc filesystem,
|
||||
i.e. as a string. Since many sysctl values represent an integer or a vector
|
||||
of integers, the following helpers can be used to get numeric value from the
|
||||
string:
|
||||
|
||||
* ``bpf_strtol()`` to convert initial part of the string to long integer
|
||||
similar to user space `strtol(3)`_;
|
||||
* ``bpf_strtoul()`` to convert initial part of the string to unsigned long
|
||||
integer similar to user space `strtoul(3)`_;
|
||||
|
||||
See `linux/bpf.h`_ for more details on helpers described here.
|
||||
|
||||
5. Examples
|
||||
***********
|
||||
|
||||
See `test_sysctl_prog.c`_ for an example of BPF program in C that access
|
||||
sysctl name and value, parses string value to get vector of integers and uses
|
||||
the result to make decision whether to allow or deny access to sysctl.
|
||||
|
||||
6. Notes
|
||||
********
|
||||
|
||||
``BPF_PROG_TYPE_CGROUP_SYSCTL`` is intended to be used in **trusted** root
|
||||
environment, for example to monitor sysctl usage or catch unreasonable values
|
||||
an application, running as root in a separate cgroup, is trying to set.
|
||||
|
||||
Since `task_dfl_cgroup(current)` is called at `sys_read` / `sys_write` time it
|
||||
may return results different from that at `sys_open` time, i.e. process that
|
||||
opened sysctl file in proc filesystem may differ from process that is trying
|
||||
to read from / write to it and two such processes may run in different
|
||||
cgroups, what means ``BPF_PROG_TYPE_CGROUP_SYSCTL`` should not be used as a
|
||||
security mechanism to limit sysctl usage.
|
||||
|
||||
As with any cgroup-bpf program additional care should be taken if an
|
||||
application running as root in a cgroup should not be allowed to
|
||||
detach/replace BPF program attached by administrator.
|
||||
|
||||
.. Links
|
||||
.. _linux/bpf.h: ../../include/uapi/linux/bpf.h
|
||||
.. _strtol(3): http://man7.org/linux/man-pages/man3/strtol.3p.html
|
||||
.. _strtoul(3): http://man7.org/linux/man-pages/man3/strtoul.3p.html
|
||||
.. _test_sysctl_prog.c:
|
||||
../../tools/testing/selftests/bpf/progs/test_sysctl_prog.c
|
@ -1,8 +1,8 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
==================
|
||||
BPF Flow Dissector
|
||||
==================
|
||||
============================
|
||||
BPF_PROG_TYPE_FLOW_DISSECTOR
|
||||
============================
|
||||
|
||||
Overview
|
||||
========
|
@ -1,5 +1,7 @@
|
||||
Clearing WARN_ONCE
|
||||
------------------
|
||||
|
||||
WARN_ONCE / WARN_ON_ONCE only print a warning once.
|
||||
WARN_ONCE / WARN_ON_ONCE / printk_once only emit a message once.
|
||||
|
||||
echo 1 > /sys/kernel/debug/clear_warn_once
|
||||
|
||||
|
@ -22,7 +22,6 @@ Core utilities
|
||||
workqueue
|
||||
genericirq
|
||||
xarray
|
||||
flexible-arrays
|
||||
librs
|
||||
genalloc
|
||||
errseq
|
||||
|
@ -147,10 +147,10 @@ Division Functions
|
||||
.. kernel-doc:: include/linux/math64.h
|
||||
:internal:
|
||||
|
||||
.. kernel-doc:: lib/div64.c
|
||||
.. kernel-doc:: lib/math/div64.c
|
||||
:functions: div_s64_rem div64_u64_rem div64_u64 div64_s64
|
||||
|
||||
.. kernel-doc:: lib/gcd.c
|
||||
.. kernel-doc:: lib/math/gcd.c
|
||||
:export:
|
||||
|
||||
UUID/GUID
|
||||
|
@ -58,6 +58,14 @@ A raw pointer value may be printed with %p which will hash the address
|
||||
before printing. The kernel also supports extended specifiers for printing
|
||||
pointers of different types.
|
||||
|
||||
Some of the extended specifiers print the data on the given address instead
|
||||
of printing the address itself. In this case, the following error messages
|
||||
might be printed instead of the unreachable information::
|
||||
|
||||
(null) data on plain NULL address
|
||||
(efault) data on invalid address
|
||||
(einval) invalid data on a valid address
|
||||
|
||||
Plain Pointers
|
||||
--------------
|
||||
|
||||
|
@ -133,7 +133,6 @@ Code Example For Use of Operational State Memory With SHASH
|
||||
if (!sdesc)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
sdesc->shash.tfm = alg;
|
||||
sdesc->shash.flags = 0x0;
|
||||
return sdesc;
|
||||
}
|
||||
|
||||
|
@ -34,10 +34,6 @@ Configure the kernel with::
|
||||
CONFIG_DEBUG_FS=y
|
||||
CONFIG_GCOV_KERNEL=y
|
||||
|
||||
select the gcc's gcov format, default is autodetect based on gcc version::
|
||||
|
||||
CONFIG_GCOV_FORMAT_AUTODETECT=y
|
||||
|
||||
and to get coverage data for the entire kernel::
|
||||
|
||||
CONFIG_GCOV_PROFILE_ALL=y
|
||||
@ -169,6 +165,20 @@ b) gcov is run on the BUILD machine
|
||||
[user@build] gcov -o /tmp/coverage/tmp/out/init main.c
|
||||
|
||||
|
||||
Note on compilers
|
||||
-----------------
|
||||
|
||||
GCC and LLVM gcov tools are not necessarily compatible. Use gcov_ to work with
|
||||
GCC-generated .gcno and .gcda files, and use llvm-cov_ for Clang.
|
||||
|
||||
.. _gcov: http://gcc.gnu.org/onlinedocs/gcc/Gcov.html
|
||||
.. _llvm-cov: https://llvm.org/docs/CommandGuide/llvm-cov.html
|
||||
|
||||
Build differences between GCC and Clang gcov are handled by Kconfig. It
|
||||
automatically selects the appropriate gcov format depending on the detected
|
||||
toolchain.
|
||||
|
||||
|
||||
Troubleshooting
|
||||
---------------
|
||||
|
||||
|
@ -7,6 +7,11 @@ directory. These are intended to be small tests to exercise individual code
|
||||
paths in the kernel. Tests are intended to be run after building, installing
|
||||
and booting a kernel.
|
||||
|
||||
You can find additional information on Kselftest framework, how to
|
||||
write new tests using the framework on Kselftest wiki:
|
||||
|
||||
https://kselftest.wiki.kernel.org/
|
||||
|
||||
On some systems, hot-plug tests could hang forever waiting for cpu and
|
||||
memory to be ready to be offlined. A special hot-plug target is created
|
||||
to run the full range of hot-plug tests. In default mode, hot-plug tests run
|
||||
@ -14,6 +19,10 @@ in safe mode with a limited scope. In limited mode, cpu-hotplug test is
|
||||
run on a single cpu as opposed to all hotplug capable cpus, and memory
|
||||
hotplug test is run on 2% of hotplug capable memory instead of 10%.
|
||||
|
||||
kselftest runs as a userspace process. Tests that can be written/run in
|
||||
userspace may wish to use the `Test Harness`_. Tests that need to be
|
||||
run in kernel space may wish to use a `Test Module`_.
|
||||
|
||||
Running the selftests (hotplug tests are run in limited mode)
|
||||
=============================================================
|
||||
|
||||
@ -31,17 +40,32 @@ To build and run the tests with a single command, use::
|
||||
|
||||
Note that some tests will require root privileges.
|
||||
|
||||
Build and run from user specific object directory (make O=dir)::
|
||||
Kselftest supports saving output files in a separate directory and then
|
||||
running tests. To locate output files in a separate directory two syntaxes
|
||||
are supported. In both cases the working directory must be the root of the
|
||||
kernel src. This is applicable to "Running a subset of selftests" section
|
||||
below.
|
||||
|
||||
To build, save output files in a separate directory with O= ::
|
||||
|
||||
$ make O=/tmp/kselftest kselftest
|
||||
|
||||
Build and run KBUILD_OUTPUT directory (make KBUILD_OUTPUT=)::
|
||||
To build, save output files in a separate directory with KBUILD_OUTPUT ::
|
||||
|
||||
$ make KBUILD_OUTPUT=/tmp/kselftest kselftest
|
||||
$ export KBUILD_OUTPUT=/tmp/kselftest; make kselftest
|
||||
|
||||
The above commands run the tests and print pass/fail summary to make it
|
||||
easier to understand the test results. Please find the detailed individual
|
||||
test results for each test in /tmp/testname file(s).
|
||||
The O= assignment takes precedence over the KBUILD_OUTPUT environment
|
||||
variable.
|
||||
|
||||
The above commands by default run the tests and print full pass/fail report.
|
||||
Kselftest supports "summary" option to make it easier to understand the test
|
||||
results. Please find the detailed individual test results for each test in
|
||||
/tmp/testname file(s) when summary option is specified. This is applicable
|
||||
to "Running a subset of selftests" section below.
|
||||
|
||||
To run kselftest with summary option enabled ::
|
||||
|
||||
$ make summary=1 kselftest
|
||||
|
||||
Running a subset of selftests
|
||||
=============================
|
||||
@ -57,17 +81,13 @@ You can specify multiple tests to build and run::
|
||||
|
||||
$ make TARGETS="size timers" kselftest
|
||||
|
||||
Build and run from user specific object directory (make O=dir)::
|
||||
To build, save output files in a separate directory with O= ::
|
||||
|
||||
$ make O=/tmp/kselftest TARGETS="size timers" kselftest
|
||||
|
||||
Build and run KBUILD_OUTPUT directory (make KBUILD_OUTPUT=)::
|
||||
To build, save output files in a separate directory with KBUILD_OUTPUT ::
|
||||
|
||||
$ make KBUILD_OUTPUT=/tmp/kselftest TARGETS="size timers" kselftest
|
||||
|
||||
The above commands run the tests and print pass/fail summary to make it
|
||||
easier to understand the test results. Please find the detailed individual
|
||||
test results for each test in /tmp/testname file(s).
|
||||
$ export KBUILD_OUTPUT=/tmp/kselftest; make TARGETS="size timers" kselftest
|
||||
|
||||
See the top-level tools/testing/selftests/Makefile for the list of all
|
||||
possible targets.
|
||||
@ -161,11 +181,97 @@ Contributing new tests (details)
|
||||
|
||||
e.g: tools/testing/selftests/android/config
|
||||
|
||||
Test Module
|
||||
===========
|
||||
|
||||
Kselftest tests the kernel from userspace. Sometimes things need
|
||||
testing from within the kernel, one method of doing this is to create a
|
||||
test module. We can tie the module into the kselftest framework by
|
||||
using a shell script test runner. ``kselftest_module.sh`` is designed
|
||||
to facilitate this process. There is also a header file provided to
|
||||
assist writing kernel modules that are for use with kselftest:
|
||||
|
||||
- ``tools/testing/kselftest/kselftest_module.h``
|
||||
- ``tools/testing/kselftest/kselftest_module.sh``
|
||||
|
||||
How to use
|
||||
----------
|
||||
|
||||
Here we show the typical steps to create a test module and tie it into
|
||||
kselftest. We use kselftests for lib/ as an example.
|
||||
|
||||
1. Create the test module
|
||||
|
||||
2. Create the test script that will run (load/unload) the module
|
||||
e.g. ``tools/testing/selftests/lib/printf.sh``
|
||||
|
||||
3. Add line to config file e.g. ``tools/testing/selftests/lib/config``
|
||||
|
||||
4. Add test script to makefile e.g. ``tools/testing/selftests/lib/Makefile``
|
||||
|
||||
5. Verify it works:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
# Assumes you have booted a fresh build of this kernel tree
|
||||
cd /path/to/linux/tree
|
||||
make kselftest-merge
|
||||
make modules
|
||||
sudo make modules_install
|
||||
make TARGETS=lib kselftest
|
||||
|
||||
Example Module
|
||||
--------------
|
||||
|
||||
A bare bones test module might look like this:
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include "../tools/testing/selftests/kselftest_module.h"
|
||||
|
||||
KSTM_MODULE_GLOBALS();
|
||||
|
||||
/*
|
||||
* Kernel module for testing the foobinator
|
||||
*/
|
||||
|
||||
static int __init test_function()
|
||||
{
|
||||
...
|
||||
}
|
||||
|
||||
static void __init selftest(void)
|
||||
{
|
||||
KSTM_CHECK_ZERO(do_test_case("", 0));
|
||||
}
|
||||
|
||||
KSTM_MODULE_LOADERS(test_foo);
|
||||
MODULE_AUTHOR("John Developer <jd@fooman.org>");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
Example test script
|
||||
-------------------
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
#!/bin/bash
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
$(dirname $0)/../kselftest_module.sh "foo" test_foo
|
||||
|
||||
|
||||
Test Harness
|
||||
============
|
||||
|
||||
The kselftest_harness.h file contains useful helpers to build tests. The tests
|
||||
from tools/testing/selftests/seccomp/seccomp_bpf.c can be used as example.
|
||||
The kselftest_harness.h file contains useful helpers to build tests. The
|
||||
test harness is for userspace testing, for kernel space testing see `Test
|
||||
Module`_ above.
|
||||
|
||||
The tests from tools/testing/selftests/seccomp/seccomp_bpf.c can be used as
|
||||
example.
|
||||
|
||||
Example
|
||||
-------
|
||||
|
@ -11,3 +11,15 @@ Example:
|
||||
reg = <0xffd08000 0x1000>;
|
||||
cpu1-start-addr = <0xffd080c4>;
|
||||
};
|
||||
|
||||
ARM64 - Stratix10
|
||||
Required properties:
|
||||
- compatible : "altr,sys-mgr-s10"
|
||||
- reg : Should contain 1 register range(address and length)
|
||||
for system manager register.
|
||||
|
||||
Example:
|
||||
sysmgr@ffd12000 {
|
||||
compatible = "altr,sys-mgr-s10";
|
||||
reg = <0xffd12000 0x228>;
|
||||
};
|
||||
|
@ -8,7 +8,8 @@ through the intermediate links connecting the source to the currently selected
|
||||
sink. Each CoreSight component device should use these properties to describe
|
||||
its hardware characteristcs.
|
||||
|
||||
* Required properties for all components *except* non-configurable replicators:
|
||||
* Required properties for all components *except* non-configurable replicators
|
||||
and non-configurable funnels:
|
||||
|
||||
* compatible: These have to be supplemented with "arm,primecell" as
|
||||
drivers are using the AMBA bus interface. Possible values include:
|
||||
@ -24,8 +25,10 @@ its hardware characteristcs.
|
||||
discovered at boot time when the device is probed.
|
||||
"arm,coresight-tmc", "arm,primecell";
|
||||
|
||||
- Trace Funnel:
|
||||
"arm,coresight-funnel", "arm,primecell";
|
||||
- Trace Programmable Funnel:
|
||||
"arm,coresight-dynamic-funnel", "arm,primecell";
|
||||
"arm,coresight-funnel", "arm,primecell"; (OBSOLETE. For
|
||||
backward compatibility and will be removed)
|
||||
|
||||
- Embedded Trace Macrocell (version 3.x) and
|
||||
Program Flow Trace Macrocell:
|
||||
@ -65,11 +68,17 @@ its hardware characteristcs.
|
||||
"stm-stimulus-base", each corresponding to the areas defined in "reg".
|
||||
|
||||
* Required properties for devices that don't show up on the AMBA bus, such as
|
||||
non-configurable replicators:
|
||||
non-configurable replicators and non-configurable funnels:
|
||||
|
||||
* compatible: Currently supported value is (note the absence of the
|
||||
AMBA markee):
|
||||
- "arm,coresight-replicator"
|
||||
- Coresight Non-configurable Replicator:
|
||||
"arm,coresight-static-replicator";
|
||||
"arm,coresight-replicator"; (OBSOLETE. For backward
|
||||
compatibility and will be removed)
|
||||
|
||||
- Coresight Non-configurable Funnel:
|
||||
"arm,coresight-static-funnel";
|
||||
|
||||
* port or ports: see "Graph bindings for Coresight" below.
|
||||
|
||||
@ -169,7 +178,7 @@ Example:
|
||||
/* non-configurable replicators don't show up on the
|
||||
* AMBA bus. As such no need to add "arm,primecell".
|
||||
*/
|
||||
compatible = "arm,coresight-replicator";
|
||||
compatible = "arm,coresight-static-replicator";
|
||||
|
||||
out-ports {
|
||||
#address-cells = <1>;
|
||||
@ -200,8 +209,45 @@ Example:
|
||||
};
|
||||
};
|
||||
|
||||
funnel {
|
||||
/*
|
||||
* non-configurable funnel don't show up on the AMBA
|
||||
* bus. As such no need to add "arm,primecell".
|
||||
*/
|
||||
compatible = "arm,coresight-static-funnel";
|
||||
clocks = <&crg_ctrl HI3660_PCLK>;
|
||||
clock-names = "apb_pclk";
|
||||
|
||||
out-ports {
|
||||
port {
|
||||
combo_funnel_out: endpoint {
|
||||
remote-endpoint = <&top_funnel_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
in-ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
combo_funnel_in0: endpoint {
|
||||
remote-endpoint = <&cluster0_etf_out>;
|
||||
};
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
combo_funnel_in1: endpoint {
|
||||
remote-endpoint = <&cluster1_etf_out>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
funnel@20040000 {
|
||||
compatible = "arm,coresight-funnel", "arm,primecell";
|
||||
compatible = "arm,coresight-dynamic-funnel", "arm,primecell";
|
||||
reg = <0 0x20040000 0 0x1000>;
|
||||
|
||||
clocks = <&oscclk6a>;
|
||||
|
@ -67,6 +67,7 @@ properties:
|
||||
|
||||
patternProperties:
|
||||
'^cpu@[0-9a-f]+$':
|
||||
type: object
|
||||
properties:
|
||||
device_type:
|
||||
const: cpu
|
||||
|
@ -14,6 +14,8 @@ Required Properties:
|
||||
- "mediatek,mt7629-apmixedsys"
|
||||
- "mediatek,mt8135-apmixedsys"
|
||||
- "mediatek,mt8173-apmixedsys"
|
||||
- "mediatek,mt8183-apmixedsys", "syscon"
|
||||
- "mediatek,mt8516-apmixedsys"
|
||||
- #clock-cells: Must be 1
|
||||
|
||||
The apmixedsys controller uses the common clk binding from
|
||||
|
@ -9,6 +9,7 @@ Required Properties:
|
||||
- "mediatek,mt2701-audsys", "syscon"
|
||||
- "mediatek,mt7622-audsys", "syscon"
|
||||
- "mediatek,mt7623-audsys", "mediatek,mt2701-audsys", "syscon"
|
||||
- "mediatek,mt8183-audiosys", "syscon"
|
||||
- #clock-cells: Must be 1
|
||||
|
||||
The AUDSYS controller uses the common clk binding from
|
||||
|
@ -0,0 +1,22 @@
|
||||
MediaTek CAMSYS controller
|
||||
============================
|
||||
|
||||
The MediaTek camsys controller provides various clocks to the system.
|
||||
|
||||
Required Properties:
|
||||
|
||||
- compatible: Should be one of:
|
||||
- "mediatek,mt8183-camsys", "syscon"
|
||||
- #clock-cells: Must be 1
|
||||
|
||||
The camsys controller uses the common clk binding from
|
||||
Documentation/devicetree/bindings/clock/clock-bindings.txt
|
||||
The available clocks are defined in dt-bindings/clock/mt*-clk.h.
|
||||
|
||||
Example:
|
||||
|
||||
camsys: camsys@1a000000 {
|
||||
compatible = "mediatek,mt8183-camsys", "syscon";
|
||||
reg = <0 0x1a000000 0 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
@ -11,6 +11,7 @@ Required Properties:
|
||||
- "mediatek,mt6797-imgsys", "syscon"
|
||||
- "mediatek,mt7623-imgsys", "mediatek,mt2701-imgsys", "syscon"
|
||||
- "mediatek,mt8173-imgsys", "syscon"
|
||||
- "mediatek,mt8183-imgsys", "syscon"
|
||||
- #clock-cells: Must be 1
|
||||
|
||||
The imgsys controller uses the common clk binding from
|
||||
|
@ -15,6 +15,8 @@ Required Properties:
|
||||
- "mediatek,mt7629-infracfg", "syscon"
|
||||
- "mediatek,mt8135-infracfg", "syscon"
|
||||
- "mediatek,mt8173-infracfg", "syscon"
|
||||
- "mediatek,mt8183-infracfg", "syscon"
|
||||
- "mediatek,mt8516-infracfg", "syscon"
|
||||
- #clock-cells: Must be 1
|
||||
- #reset-cells: Must be 1
|
||||
|
||||
|
@ -0,0 +1,43 @@
|
||||
Mediatek IPU controller
|
||||
============================
|
||||
|
||||
The Mediatek ipu controller provides various clocks to the system.
|
||||
|
||||
Required Properties:
|
||||
|
||||
- compatible: Should be one of:
|
||||
- "mediatek,mt8183-ipu_conn", "syscon"
|
||||
- "mediatek,mt8183-ipu_adl", "syscon"
|
||||
- "mediatek,mt8183-ipu_core0", "syscon"
|
||||
- "mediatek,mt8183-ipu_core1", "syscon"
|
||||
- #clock-cells: Must be 1
|
||||
|
||||
The ipu controller uses the common clk binding from
|
||||
Documentation/devicetree/bindings/clock/clock-bindings.txt
|
||||
The available clocks are defined in dt-bindings/clock/mt*-clk.h.
|
||||
|
||||
Example:
|
||||
|
||||
ipu_conn: syscon@19000000 {
|
||||
compatible = "mediatek,mt8183-ipu_conn", "syscon";
|
||||
reg = <0 0x19000000 0 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
ipu_adl: syscon@19010000 {
|
||||
compatible = "mediatek,mt8183-ipu_adl", "syscon";
|
||||
reg = <0 0x19010000 0 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
ipu_core0: syscon@19180000 {
|
||||
compatible = "mediatek,mt8183-ipu_core0", "syscon";
|
||||
reg = <0 0x19180000 0 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
ipu_core1: syscon@19280000 {
|
||||
compatible = "mediatek,mt8183-ipu_core1", "syscon";
|
||||
reg = <0 0x19280000 0 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
@ -7,6 +7,7 @@ Required Properties:
|
||||
|
||||
- compatible: Should be one of:
|
||||
- "mediatek,mt2712-mcucfg", "syscon"
|
||||
- "mediatek,mt8183-mcucfg", "syscon"
|
||||
- #clock-cells: Must be 1
|
||||
|
||||
The mcucfg controller uses the common clk binding from
|
||||
|
@ -7,6 +7,7 @@ Required Properties:
|
||||
|
||||
- compatible: Should be one of:
|
||||
- "mediatek,mt2712-mfgcfg", "syscon"
|
||||
- "mediatek,mt8183-mfgcfg", "syscon"
|
||||
- #clock-cells: Must be 1
|
||||
|
||||
The mfgcfg controller uses the common clk binding from
|
||||
|
@ -11,6 +11,7 @@ Required Properties:
|
||||
- "mediatek,mt6797-mmsys", "syscon"
|
||||
- "mediatek,mt7623-mmsys", "mediatek,mt2701-mmsys", "syscon"
|
||||
- "mediatek,mt8173-mmsys", "syscon"
|
||||
- "mediatek,mt8183-mmsys", "syscon"
|
||||
- #clock-cells: Must be 1
|
||||
|
||||
The mmsys controller uses the common clk binding from
|
||||
|
@ -14,6 +14,8 @@ Required Properties:
|
||||
- "mediatek,mt7629-topckgen"
|
||||
- "mediatek,mt8135-topckgen"
|
||||
- "mediatek,mt8173-topckgen"
|
||||
- "mediatek,mt8183-topckgen", "syscon"
|
||||
- "mediatek,mt8516-topckgen"
|
||||
- #clock-cells: Must be 1
|
||||
|
||||
The topckgen controller uses the common clk binding from
|
||||
|
@ -11,6 +11,7 @@ Required Properties:
|
||||
- "mediatek,mt6797-vdecsys", "syscon"
|
||||
- "mediatek,mt7623-vdecsys", "mediatek,mt2701-vdecsys", "syscon"
|
||||
- "mediatek,mt8173-vdecsys", "syscon"
|
||||
- "mediatek,mt8183-vdecsys", "syscon"
|
||||
- #clock-cells: Must be 1
|
||||
|
||||
The vdecsys controller uses the common clk binding from
|
||||
|
@ -9,6 +9,7 @@ Required Properties:
|
||||
- "mediatek,mt2712-vencsys", "syscon"
|
||||
- "mediatek,mt6797-vencsys", "syscon"
|
||||
- "mediatek,mt8173-vencsys", "syscon"
|
||||
- "mediatek,mt8183-vencsys", "syscon"
|
||||
- #clock-cells: Must be 1
|
||||
|
||||
The vencsys controller uses the common clk binding from
|
||||
|
@ -5,10 +5,12 @@ Properties:
|
||||
- " st,stm32mp157-syscfg " - for stm32mp157 based SoCs,
|
||||
second value must be always "syscon".
|
||||
- reg : offset and length of the register set.
|
||||
- clocks: phandle to the syscfg clock
|
||||
|
||||
Example:
|
||||
syscfg: syscon@50020000 {
|
||||
compatible = "st,stm32mp157-syscfg", "syscon";
|
||||
reg = <0x50020000 0x400>;
|
||||
clocks = <&rcc SYSCFG>;
|
||||
};
|
||||
|
||||
|
36
Documentation/devicetree/bindings/arm/sunxi/sunxi-mbus.txt
Normal file
36
Documentation/devicetree/bindings/arm/sunxi/sunxi-mbus.txt
Normal file
@ -0,0 +1,36 @@
|
||||
Allwinner Memory Bus (MBUS) controller
|
||||
|
||||
The MBUS controller drives the MBUS that other devices in the SoC will
|
||||
use to perform DMA. It also has a register interface that allows to
|
||||
monitor and control the bandwidth and priorities for masters on that
|
||||
bus.
|
||||
|
||||
Required properties:
|
||||
- compatible: Must be one of:
|
||||
- allwinner,sun5i-a13-mbus
|
||||
- reg: Offset and length of the register set for the controller
|
||||
- clocks: phandle to the clock driving the controller
|
||||
- dma-ranges: See section 2.3.9 of the DeviceTree Specification
|
||||
- #interconnect-cells: Must be one, with the argument being the MBUS
|
||||
port ID
|
||||
|
||||
Each device having to perform their DMA through the MBUS must have the
|
||||
interconnects and interconnect-names properties set to the MBUS
|
||||
controller and with "dma-mem" as the interconnect name.
|
||||
|
||||
Example:
|
||||
|
||||
mbus: dram-controller@1c01000 {
|
||||
compatible = "allwinner,sun5i-a13-mbus";
|
||||
reg = <0x01c01000 0x1000>;
|
||||
clocks = <&ccu CLK_MBUS>;
|
||||
dma-ranges = <0x00000000 0x40000000 0x20000000>;
|
||||
#interconnect-cells = <1>;
|
||||
};
|
||||
|
||||
fe0: display-frontend@1e00000 {
|
||||
compatible = "allwinner,sun5i-a13-display-frontend";
|
||||
...
|
||||
interconnects = <&mbus 19>;
|
||||
interconnect-names = "dma-mem";
|
||||
};
|
@ -6,7 +6,8 @@ devices.
|
||||
|
||||
Required Properties:
|
||||
|
||||
- compatible : should be "amlogic,axg-audio-clkc" for the A113X and A113D
|
||||
- compatible : should be "amlogic,axg-audio-clkc" for the A113X and A113D,
|
||||
"amlogic,g12a-audio-clkc" for G12A.
|
||||
- reg : physical base address of the clock controller and length of
|
||||
memory mapped region.
|
||||
- clocks : a list of phandle + clock-specifier pairs for the clocks listed
|
||||
|
@ -8,35 +8,30 @@ Slow Clock controller:
|
||||
|
||||
Required properties:
|
||||
- compatible : shall be one of the following:
|
||||
"atmel,at91sam9x5-sckc" or
|
||||
"atmel,at91sam9x5-sckc",
|
||||
"atmel,sama5d3-sckc" or
|
||||
"atmel,sama5d4-sckc":
|
||||
at91 SCKC (Slow Clock Controller)
|
||||
This node contains the slow clock definitions.
|
||||
|
||||
"atmel,at91sam9x5-clk-slow-osc":
|
||||
at91 slow oscillator
|
||||
|
||||
"atmel,at91sam9x5-clk-slow-rc-osc":
|
||||
at91 internal slow RC oscillator
|
||||
- reg : defines the IO memory reserved for the SCKC.
|
||||
- #size-cells : shall be 0 (reg is used to encode clk id).
|
||||
- #address-cells : shall be 1 (reg is used to encode clk id).
|
||||
- #clock-cells : shall be 0.
|
||||
- clocks : shall be the input parent clock phandle for the clock.
|
||||
|
||||
Optional properties:
|
||||
- atmel,osc-bypass : boolean property. Set this when a clock signal is directly
|
||||
provided on XIN.
|
||||
|
||||
For example:
|
||||
sckc: sckc@fffffe50 {
|
||||
compatible = "atmel,sama5d3-pmc";
|
||||
reg = <0xfffffe50 0x4>
|
||||
#size-cells = <0>;
|
||||
#address-cells = <1>;
|
||||
|
||||
/* put at91 slow clocks here */
|
||||
sckc@fffffe50 {
|
||||
compatible = "atmel,at91sam9x5-sckc";
|
||||
reg = <0xfffffe50 0x4>;
|
||||
clocks = <&slow_xtal>;
|
||||
#clock-cells = <0>;
|
||||
};
|
||||
|
||||
Power Management Controller (PMC):
|
||||
|
||||
Required properties:
|
||||
- compatible : shall be "atmel,<chip>-pmc", "syscon":
|
||||
- compatible : shall be "atmel,<chip>-pmc", "syscon" or
|
||||
"microchip,sam9x60-pmc"
|
||||
<chip> can be: at91rm9200, at91sam9260, at91sam9261,
|
||||
at91sam9263, at91sam9g45, at91sam9n12, at91sam9rl, at91sam9g15,
|
||||
at91sam9g25, at91sam9g35, at91sam9x25, at91sam9x35, at91sam9x5,
|
||||
|
93
Documentation/devicetree/bindings/clock/cirrus,lochnagar.txt
Normal file
93
Documentation/devicetree/bindings/clock/cirrus,lochnagar.txt
Normal file
@ -0,0 +1,93 @@
|
||||
Cirrus Logic Lochnagar Audio Development Board
|
||||
|
||||
Lochnagar is an evaluation and development board for Cirrus Logic
|
||||
Smart CODEC and Amp devices. It allows the connection of most Cirrus
|
||||
Logic devices on mini-cards, as well as allowing connection of
|
||||
various application processor systems to provide a full evaluation
|
||||
platform. Audio system topology, clocking and power can all be
|
||||
controlled through the Lochnagar, allowing the device under test
|
||||
to be used in a variety of possible use cases.
|
||||
|
||||
This binding document describes the binding for the clock portion of
|
||||
the driver.
|
||||
|
||||
Also see these documents for generic binding information:
|
||||
[1] Clock : ../clock/clock-bindings.txt
|
||||
|
||||
And these for relevant defines:
|
||||
[2] include/dt-bindings/clock/lochnagar.h
|
||||
|
||||
This binding must be part of the Lochnagar MFD binding:
|
||||
[3] ../mfd/cirrus,lochnagar.txt
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible : One of the following strings:
|
||||
"cirrus,lochnagar1-clk"
|
||||
"cirrus,lochnagar2-clk"
|
||||
|
||||
- #clock-cells : Must be 1. The first cell indicates the clock
|
||||
number, see [2] for available clocks and [1].
|
||||
|
||||
Optional properties:
|
||||
|
||||
- clocks : Must contain an entry for each clock in clock-names.
|
||||
- clock-names : May contain entries for each of the following
|
||||
clocks:
|
||||
- ln-cdc-clkout : Output clock from CODEC card.
|
||||
- ln-dsp-clkout : Output clock from DSP card.
|
||||
- ln-gf-mclk1,ln-gf-mclk2,ln-gf-mclk3,ln-gf-mclk4 : Optional
|
||||
input audio clocks from host system.
|
||||
- ln-psia1-mclk, ln-psia2-mclk : Optional input audio clocks from
|
||||
external connector.
|
||||
- ln-spdif-clkout : Optional input audio clock from SPDIF.
|
||||
- ln-adat-mclk : Optional input audio clock from ADAT.
|
||||
- ln-pmic-32k : On board fixed clock.
|
||||
- ln-clk-12m : On board fixed clock.
|
||||
- ln-clk-11m : On board fixed clock.
|
||||
- ln-clk-24m : On board fixed clock.
|
||||
- ln-clk-22m : On board fixed clock.
|
||||
- ln-clk-8m : On board fixed clock.
|
||||
- ln-usb-clk-24m : On board fixed clock.
|
||||
- ln-usb-clk-12m : On board fixed clock.
|
||||
|
||||
- assigned-clocks : A list of Lochnagar clocks to be reparented, see
|
||||
[2] for available clocks.
|
||||
- assigned-clock-parents : Parents to be assigned to the clocks
|
||||
listed in "assigned-clocks".
|
||||
|
||||
Optional nodes:
|
||||
|
||||
- fixed-clock nodes may be registered for the following on board clocks:
|
||||
- ln-pmic-32k : 32768 Hz
|
||||
- ln-clk-12m : 12288000 Hz
|
||||
- ln-clk-11m : 11298600 Hz
|
||||
- ln-clk-24m : 24576000 Hz
|
||||
- ln-clk-22m : 22579200 Hz
|
||||
- ln-clk-8m : 8192000 Hz
|
||||
- ln-usb-clk-24m : 24576000 Hz
|
||||
- ln-usb-clk-12m : 12288000 Hz
|
||||
|
||||
Example:
|
||||
|
||||
lochnagar {
|
||||
lochnagar-clk {
|
||||
compatible = "cirrus,lochnagar2-clk";
|
||||
|
||||
#clock-cells = <1>;
|
||||
|
||||
clocks = <&clk-audio>, <&clk_pmic>;
|
||||
clock-names = "ln-gf-mclk2", "ln-pmic-32k";
|
||||
|
||||
assigned-clocks = <&lochnagar-clk LOCHNAGAR_CDC_MCLK1>,
|
||||
<&lochnagar-clk LOCHNAGAR_CDC_MCLK2>;
|
||||
assigned-clock-parents = <&clk-audio>,
|
||||
<&clk-pmic>;
|
||||
};
|
||||
|
||||
clk-pmic: clk-pmic {
|
||||
compatible = "fixed-clock";
|
||||
clock-cells = <0>;
|
||||
clock-frequency = <32768>;
|
||||
};
|
||||
};
|
73
Documentation/devicetree/bindings/clock/milbeaut-clock.yaml
Normal file
73
Documentation/devicetree/bindings/clock/milbeaut-clock.yaml
Normal file
@ -0,0 +1,73 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/bindings/clock/milbeaut-clock.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Milbeaut SoCs Clock Controller Binding
|
||||
|
||||
maintainers:
|
||||
- Taichi Sugaya <sugaya.taichi@socionext.com>
|
||||
|
||||
description: |
|
||||
Milbeaut SoCs Clock controller is an integrated clock controller, which
|
||||
generates and supplies to all modules.
|
||||
|
||||
This binding uses common clock bindings
|
||||
[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
oneOf:
|
||||
- items:
|
||||
- enum:
|
||||
- socionext,milbeaut-m10v-ccu
|
||||
clocks:
|
||||
maxItems: 1
|
||||
description: external clock
|
||||
|
||||
'#clock-cells':
|
||||
const: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- clocks
|
||||
- '#clock-cells'
|
||||
|
||||
examples:
|
||||
# Clock controller node:
|
||||
- |
|
||||
m10v-clk-ctrl@1d021000 {
|
||||
compatible = "socionext,milbeaut-m10v-clk-ccu";
|
||||
reg = <0x1d021000 0x4000>;
|
||||
#clock-cells = <1>;
|
||||
clocks = <&clki40mhz>;
|
||||
};
|
||||
|
||||
# Required an external clock for Clock controller node:
|
||||
- |
|
||||
clocks {
|
||||
clki40mhz: clki40mhz {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <40000000>;
|
||||
};
|
||||
/* other clocks */
|
||||
};
|
||||
|
||||
# The clock consumer shall specify the desired clock-output of the clock
|
||||
# controller as below by specifying output-id in its "clk" phandle cell.
|
||||
# 2: uart
|
||||
# 4: 32-bit timer
|
||||
# 7: UHS-I/II
|
||||
- |
|
||||
serial@1e700010 {
|
||||
compatible = "socionext,milbeaut-usio-uart";
|
||||
reg = <0x1e700010 0x10>;
|
||||
interrupts = <0 141 0x4>, <0 149 0x4>;
|
||||
interrupt-names = "rx", "tx";
|
||||
clocks = <&clk 2>;
|
||||
};
|
||||
|
||||
...
|
19
Documentation/devicetree/bindings/clock/qcom,turingcc.txt
Normal file
19
Documentation/devicetree/bindings/clock/qcom,turingcc.txt
Normal file
@ -0,0 +1,19 @@
|
||||
Qualcomm Turing Clock & Reset Controller Binding
|
||||
------------------------------------------------
|
||||
|
||||
Required properties :
|
||||
- compatible: shall contain "qcom,qcs404-turingcc".
|
||||
- reg: shall contain base register location and length.
|
||||
- clocks: ahb clock for the TuringCC
|
||||
- #clock-cells: from common clock binding, shall contain 1.
|
||||
- #reset-cells: from common reset binding, shall contain 1.
|
||||
|
||||
Example:
|
||||
turingcc: clock-controller@800000 {
|
||||
compatible = "qcom,qcs404-turingcc";
|
||||
reg = <0x00800000 0x30000>;
|
||||
clocks = <&gcc GCC_CDSP_CFG_AHB_CLK>;
|
||||
|
||||
#clock-cells = <1>;
|
||||
#reset-cells = <1>;
|
||||
};
|
@ -39,6 +39,7 @@ Required properties:
|
||||
* "fsl,b4860-clockgen"
|
||||
* "fsl,ls1012a-clockgen"
|
||||
* "fsl,ls1021a-clockgen"
|
||||
* "fsl,ls1028a-clockgen"
|
||||
* "fsl,ls1043a-clockgen"
|
||||
* "fsl,ls1046a-clockgen"
|
||||
* "fsl,ls1088a-clockgen"
|
||||
@ -83,8 +84,8 @@ second cell is the clock index for the specified type.
|
||||
1 cmux index (n in CLKCnCSR)
|
||||
2 hwaccel index (n in CLKCGnHWACSR)
|
||||
3 fman 0 for fm1, 1 for fm2
|
||||
4 platform pll 0=pll, 1=pll/2, 2=pll/3, 3=pll/4
|
||||
4=pll/5, 5=pll/6, 6=pll/7, 7=pll/8
|
||||
4 platform pll n=pll/(n+1). For example, when n=1,
|
||||
that means output_freq=PLL_freq/2.
|
||||
5 coreclk must be 0
|
||||
|
||||
3. Example
|
||||
|
@ -0,0 +1,46 @@
|
||||
SiFive FU540 PRCI bindings
|
||||
|
||||
On the FU540 family of SoCs, most system-wide clock and reset integration
|
||||
is via the PRCI IP block.
|
||||
|
||||
Required properties:
|
||||
- compatible: Should be "sifive,<chip>-prci". Only one value is
|
||||
supported: "sifive,fu540-c000-prci"
|
||||
- reg: Should describe the PRCI's register target physical address region
|
||||
- clocks: Should point to the hfclk device tree node and the rtcclk
|
||||
device tree node. The RTC clock here is not a time-of-day clock,
|
||||
but is instead a high-stability clock source for system timers
|
||||
and cycle counters.
|
||||
- #clock-cells: Should be <1>
|
||||
|
||||
The clock consumer should specify the desired clock via the clock ID
|
||||
macros defined in include/dt-bindings/clock/sifive-fu540-prci.h.
|
||||
These macros begin with PRCI_CLK_.
|
||||
|
||||
The hfclk and rtcclk nodes are required, and represent physical
|
||||
crystals or resonators located on the PCB. These nodes should be present
|
||||
underneath /, rather than /soc.
|
||||
|
||||
Examples:
|
||||
|
||||
/* under /, in PCB-specific DT data */
|
||||
hfclk: hfclk {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <33333333>;
|
||||
clock-output-names = "hfclk";
|
||||
};
|
||||
rtcclk: rtcclk {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <1000000>;
|
||||
clock-output-names = "rtcclk";
|
||||
};
|
||||
|
||||
/* under /soc, in SoC-specific DT data */
|
||||
prci: clock-controller@10000000 {
|
||||
compatible = "sifive,fu540-c000-prci";
|
||||
reg = <0x0 0x10000000 0x0 0x1000>;
|
||||
clocks = <&hfclk>, <&rtcclk>;
|
||||
#clock-cells = <1>;
|
||||
};
|
@ -11,6 +11,8 @@ Required properties:
|
||||
"st,stm32f42xx-rcc"
|
||||
"st,stm32f469-rcc"
|
||||
"st,stm32f746-rcc"
|
||||
"st,stm32f769-rcc"
|
||||
|
||||
- reg: should be register base and length as documented in the
|
||||
datasheet
|
||||
- #reset-cells: 1, see below
|
||||
@ -102,6 +104,10 @@ The secondary index is bound with the following magic numbers:
|
||||
28 CLK_I2C3
|
||||
29 CLK_I2C4
|
||||
30 CLK_LPTIMER (LPTimer1 clock)
|
||||
31 CLK_PLL_SRC
|
||||
32 CLK_DFSDM1
|
||||
33 CLK_ADFSDM1
|
||||
34 CLK_F769_DSI
|
||||
)
|
||||
|
||||
Example:
|
||||
|
@ -47,7 +47,7 @@ Required properties for usb-c-connector with power delivery support:
|
||||
Required nodes:
|
||||
- any data bus to the connector should be modeled using the OF graph bindings
|
||||
specified in bindings/graph.txt, unless the bus is between parent node and
|
||||
the connector. Since single connector can have multpile data buses every bus
|
||||
the connector. Since single connector can have multiple data buses every bus
|
||||
has assigned OF graph port number as follows:
|
||||
0: High Speed (HS), present in all connectors,
|
||||
1: Super Speed (SS), present in SS capable connectors,
|
||||
|
18
Documentation/devicetree/bindings/counter/ftm-quaddec.txt
Normal file
18
Documentation/devicetree/bindings/counter/ftm-quaddec.txt
Normal file
@ -0,0 +1,18 @@
|
||||
FlexTimer Quadrature decoder counter
|
||||
|
||||
This driver exposes a simple counter for the quadrature decoder mode.
|
||||
|
||||
Required properties:
|
||||
- compatible: Must be "fsl,ftm-quaddec".
|
||||
- reg: Must be set to the memory region of the flextimer.
|
||||
|
||||
Optional property:
|
||||
- big-endian: Access the device registers in big-endian mode.
|
||||
|
||||
Example:
|
||||
counter0: counter@29d0000 {
|
||||
compatible = "fsl,ftm-quaddec";
|
||||
reg = <0x0 0x29d0000 0x0 0x10000>;
|
||||
big-endian;
|
||||
status = "disabled";
|
||||
};
|
@ -10,8 +10,9 @@ See ../mfd/stm32-lptimer.txt for details about the parent node.
|
||||
|
||||
Required properties:
|
||||
- compatible: Must be "st,stm32-lptimer-counter".
|
||||
- pinctrl-names: Set to "default".
|
||||
- pinctrl-0: List of phandles pointing to pin configuration nodes,
|
||||
- pinctrl-names: Set to "default". An additional "sleep" state can be
|
||||
defined to set pins in sleep state.
|
||||
- pinctrl-n: List of phandles pointing to pin configuration nodes,
|
||||
to set IN1/IN2 pins in mode of operation for Low-Power
|
||||
Timer input on external pin.
|
||||
|
||||
@ -21,7 +22,8 @@ Example:
|
||||
...
|
||||
counter {
|
||||
compatible = "st,stm32-lptimer-counter";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&lptim1_in_pins>;
|
||||
pinctrl-1 = <&lptim1_sleep_in_pins>;
|
||||
};
|
||||
};
|
@ -0,0 +1,31 @@
|
||||
STMicroelectronics STM32 Timer quadrature encoder
|
||||
|
||||
STM32 Timer provides quadrature encoder to detect
|
||||
angular position and direction of rotary elements,
|
||||
from IN1 and IN2 input signals.
|
||||
|
||||
Must be a sub-node of an STM32 Timer device tree node.
|
||||
See ../mfd/stm32-timers.txt for details about the parent node.
|
||||
|
||||
Required properties:
|
||||
- compatible: Must be "st,stm32-timer-counter".
|
||||
- pinctrl-names: Set to "default".
|
||||
- pinctrl-0: List of phandles pointing to pin configuration nodes,
|
||||
to set CH1/CH2 pins in mode of operation for STM32
|
||||
Timer input on external pin.
|
||||
|
||||
Example:
|
||||
timers@40010000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "st,stm32-timers";
|
||||
reg = <0x40010000 0x400>;
|
||||
clocks = <&rcc 0 160>;
|
||||
clock-names = "int";
|
||||
|
||||
counter {
|
||||
compatible = "st,stm32-timer-counter";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&tim1_in_pins>;
|
||||
};
|
||||
};
|
@ -37,6 +37,7 @@ Required properties:
|
||||
- GXL (S905X, S905D) : "amlogic,meson-gxl-dw-hdmi"
|
||||
- GXM (S912) : "amlogic,meson-gxm-dw-hdmi"
|
||||
followed by the common "amlogic,meson-gx-dw-hdmi"
|
||||
- G12A (S905X2, S905Y2, S905D2) : "amlogic,meson-g12a-dw-hdmi"
|
||||
- reg: Physical base address and length of the controller's registers.
|
||||
- interrupts: The HDMI interrupt number
|
||||
- clocks, clock-names : must have the phandles to the HDMI iahb and isfr clocks,
|
||||
@ -66,6 +67,9 @@ corresponding to each HDMI output and input.
|
||||
S905X (GXL) VENC Input TMDS Output
|
||||
S905D (GXL) VENC Input TMDS Output
|
||||
S912 (GXM) VENC Input TMDS Output
|
||||
S905X2 (G12A) VENC Input TMDS Output
|
||||
S905Y2 (G12A) VENC Input TMDS Output
|
||||
S905D2 (G12A) VENC Input TMDS Output
|
||||
|
||||
Example:
|
||||
|
||||
|
@ -57,18 +57,18 @@ Required properties:
|
||||
- GXL (S905X, S905D) : "amlogic,meson-gxl-vpu"
|
||||
- GXM (S912) : "amlogic,meson-gxm-vpu"
|
||||
followed by the common "amlogic,meson-gx-vpu"
|
||||
- G12A (S905X2, S905Y2, S905D2) : "amlogic,meson-g12a-vpu"
|
||||
- reg: base address and size of he following memory-mapped regions :
|
||||
- vpu
|
||||
- hhi
|
||||
- dmc
|
||||
- reg-names: should contain the names of the previous memory regions
|
||||
- interrupts: should contain the VENC Vsync interrupt number
|
||||
- amlogic,canvas: phandle to canvas provider node as described in the file
|
||||
../soc/amlogic/amlogic,canvas.txt
|
||||
|
||||
Optional properties:
|
||||
- power-domains: Optional phandle to associated power domain as described in
|
||||
the file ../power/power_domain.txt
|
||||
- amlogic,canvas: phandle to canvas provider node as described in the file
|
||||
../soc/amlogic/amlogic,canvas.txt
|
||||
|
||||
Required nodes:
|
||||
|
||||
@ -84,6 +84,9 @@ corresponding to each VPU output.
|
||||
S905X (GXL) CVBS VDAC HDMI-TX
|
||||
S905D (GXL) CVBS VDAC HDMI-TX
|
||||
S912 (GXM) CVBS VDAC HDMI-TX
|
||||
S905X2 (G12A) CVBS VDAC HDMI-TX
|
||||
S905Y2 (G12A) CVBS VDAC HDMI-TX
|
||||
S905D2 (G12A) CVBS VDAC HDMI-TX
|
||||
|
||||
Example:
|
||||
|
||||
|
@ -1,33 +0,0 @@
|
||||
Meson specific Simple Framebuffer bindings
|
||||
|
||||
This binding documents meson specific extensions to the simple-framebuffer
|
||||
bindings. The meson simplefb u-boot code relies on the devicetree containing
|
||||
pre-populated simplefb nodes.
|
||||
|
||||
These extensions are intended so that u-boot can select the right node based
|
||||
on which pipeline is being used. As such they are solely intended for
|
||||
firmware / bootloader use, and the OS should ignore them.
|
||||
|
||||
Required properties:
|
||||
- compatible: "amlogic,simple-framebuffer", "simple-framebuffer"
|
||||
- amlogic,pipeline, one of:
|
||||
"vpu-cvbs"
|
||||
"vpu-hdmi"
|
||||
|
||||
Example:
|
||||
|
||||
chosen {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
simplefb_hdmi: framebuffer-hdmi {
|
||||
compatible = "amlogic,simple-framebuffer",
|
||||
"simple-framebuffer";
|
||||
amlogic,pipeline = "vpu-hdmi";
|
||||
clocks = <&clkc CLKID_HDMI_PCLK>,
|
||||
<&clkc CLKID_CLK81>,
|
||||
<&clkc CLKID_GCLK_VENCI_INT0>;
|
||||
power-domains = <&pwrc_vpu>;
|
||||
};
|
||||
};
|
@ -6,15 +6,32 @@ Required properties:
|
||||
|
||||
Optional properties:
|
||||
- powerdown-gpios: power-down gpio
|
||||
- reg: I2C address. If and only if present the device node
|
||||
should be placed into the i2c controller node where the
|
||||
tfp410 i2c is connected to.
|
||||
- reg: I2C address. If and only if present the device node should be placed
|
||||
into the I2C controller node where the TFP410 I2C is connected to.
|
||||
- ti,deskew: data de-skew in 350ps increments, from -4 to +3, as configured
|
||||
through th DK[3:1] pins. This property shall be present only if the TFP410
|
||||
is not connected through I2C.
|
||||
|
||||
Required nodes:
|
||||
- Video port 0 for DPI input [1].
|
||||
- Video port 1 for DVI output [1].
|
||||
|
||||
[1]: Documentation/devicetree/bindings/media/video-interfaces.txt
|
||||
This device has two video ports. Their connections are modeled using the OF
|
||||
graph bindings specified in [1]. Each port node shall have a single endpoint.
|
||||
|
||||
- Port 0 is the DPI input port. Its endpoint subnode shall contain a
|
||||
pclk-sample and bus-width property and a remote-endpoint property as specified
|
||||
in [1].
|
||||
- If pclk-sample is not defined, pclk-sample = 0 should be assumed for
|
||||
backward compatibility.
|
||||
- If bus-width is not defined then bus-width = 24 should be assumed for
|
||||
backward compatibility.
|
||||
bus-width = 24: 24 data lines are connected and single-edge mode
|
||||
bus-width = 12: 12 data lines are connected and dual-edge mode
|
||||
|
||||
- Port 1 is the DVI output port. Its endpoint subnode shall contain a
|
||||
remote-endpoint property is specified in [1].
|
||||
|
||||
[1] Documentation/devicetree/bindings/media/video-interfaces.txt
|
||||
|
||||
|
||||
Example
|
||||
-------
|
||||
@ -22,6 +39,7 @@ Example
|
||||
tfp410: encoder@0 {
|
||||
compatible = "ti,tfp410";
|
||||
powerdown-gpios = <&twl_gpio 2 GPIO_ACTIVE_LOW>;
|
||||
ti,deskew = <4>;
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
@ -31,6 +49,8 @@ tfp410: encoder@0 {
|
||||
reg = <0>;
|
||||
|
||||
tfp410_in: endpoint@0 {
|
||||
pclk-sample = <1>;
|
||||
bus-width = <24>;
|
||||
remote-endpoint = <&dpi_out>;
|
||||
};
|
||||
};
|
||||
|
@ -24,7 +24,10 @@ Required properties:
|
||||
* "cxo"
|
||||
* "axi"
|
||||
* "mnoc"
|
||||
- power-domains: should be <&clock_gpucc GPU_CX_GDSC>
|
||||
- power-domains: should be:
|
||||
<&clock_gpucc GPU_CX_GDSC>
|
||||
<&clock_gpucc GPU_GX_GDSC>
|
||||
- power-domain-names: Matching names for the power domains
|
||||
- iommus: phandle to the adreno iommu
|
||||
- operating-points-v2: phandle to the OPP operating points
|
||||
|
||||
@ -51,7 +54,10 @@ Example:
|
||||
<&gcc GCC_GPU_MEMNOC_GFX_CLK>;
|
||||
clock-names = "gmu", "cxo", "axi", "memnoc";
|
||||
|
||||
power-domains = <&gpucc GPU_CX_GDSC>;
|
||||
power-domains = <&gpucc GPU_CX_GDSC>,
|
||||
<&gpucc GPU_GX_GDSC>;
|
||||
power-domain-names = "cx", "gx";
|
||||
|
||||
iommus = <&adreno_smmu 5>;
|
||||
|
||||
operating-points-v2 = <&gmu_opp_table>;
|
||||
|
@ -22,9 +22,14 @@ Required properties:
|
||||
- qcom,adreno-630.2
|
||||
- iommus: optional phandle to an adreno iommu instance
|
||||
- operating-points-v2: optional phandle to the OPP operating points
|
||||
- interconnects: optional phandle to an interconnect provider. See
|
||||
../interconnect/interconnect.txt for details.
|
||||
- qcom,gmu: For GMU attached devices a phandle to the GMU device that will
|
||||
control the power for the GPU. Applicable targets:
|
||||
- qcom,adreno-630.2
|
||||
- zap-shader: For a5xx and a6xx devices this node contains a memory-region that
|
||||
points to reserved memory to store the zap shader that can be used to help
|
||||
bring the GPU out of secure mode.
|
||||
|
||||
Example 3xx/4xx/a5xx:
|
||||
|
||||
@ -70,6 +75,12 @@ Example a6xx (with GMU):
|
||||
|
||||
operating-points-v2 = <&gpu_opp_table>;
|
||||
|
||||
interconnects = <&rsc_hlos MASTER_GFX3D &rsc_hlos SLAVE_EBI1>;
|
||||
|
||||
qcom,gmu = <&gmu>;
|
||||
|
||||
zap-shader {
|
||||
memory-region = <&zap_shader_region>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -0,0 +1,20 @@
|
||||
Feiyang FY07024DI26A30-D 7" MIPI-DSI LCD Panel
|
||||
|
||||
Required properties:
|
||||
- compatible: must be "feiyang,fy07024di26a30d"
|
||||
- reg: DSI virtual channel used by that screen
|
||||
- avdd-supply: analog regulator dc1 switch
|
||||
- dvdd-supply: 3v3 digital regulator
|
||||
- reset-gpios: a GPIO phandle for the reset pin
|
||||
|
||||
Optional properties:
|
||||
- backlight: phandle for the backlight control.
|
||||
|
||||
panel@0 {
|
||||
compatible = "feiyang,fy07024di26a30d";
|
||||
reg = <0>;
|
||||
avdd-supply = <®_dc1sw>;
|
||||
dvdd-supply = <®_dldo2>;
|
||||
reset-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* LCD-RST: PD24 */
|
||||
backlight = <&backlight>;
|
||||
};
|
@ -12,7 +12,7 @@ Optional properties:
|
||||
Example:
|
||||
|
||||
&mipi_dsi {
|
||||
panel {
|
||||
panel@0 {
|
||||
compatible = "innolux,p079zca";
|
||||
reg = <0>;
|
||||
power-supply = <...>;
|
||||
|
@ -13,7 +13,7 @@ Optional properties:
|
||||
Example:
|
||||
|
||||
&mipi_dsi {
|
||||
panel {
|
||||
panel@0 {
|
||||
compatible = "innolux,p079zca";
|
||||
reg = <0>;
|
||||
avdd-supply = <...>;
|
||||
|
@ -12,7 +12,7 @@ Optional properties:
|
||||
Example:
|
||||
|
||||
&mipi_dsi {
|
||||
panel {
|
||||
panel@0 {
|
||||
compatible = "kingdisplay,kd097d04";
|
||||
reg = <0>;
|
||||
power-supply = <...>;
|
||||
|
@ -0,0 +1,7 @@
|
||||
LG ACX467AKM-7 4.95" 1080×1920 LCD Panel
|
||||
|
||||
Required properties:
|
||||
- compatible: must be "lg,acx467akm-7"
|
||||
|
||||
This binding is compatible with the simple-panel binding, which is specified
|
||||
in simple-panel.txt in this directory.
|
@ -0,0 +1,12 @@
|
||||
OSD Displays OSD070T1718-19TS 7" WVGA TFT LCD panel
|
||||
|
||||
Required properties:
|
||||
- compatible: shall be "osddisplays,osd070t1718-19ts"
|
||||
- power-supply: see simple-panel.txt
|
||||
|
||||
Optional properties:
|
||||
- backlight: see simple-panel.txt
|
||||
|
||||
This binding is compatible with the simple-panel binding, which is specified
|
||||
in simple-panel.txt in this directory. No other simple-panel properties than
|
||||
the ones specified herein are valid.
|
@ -0,0 +1,18 @@
|
||||
Rocktech jh057n00900 5.5" 720x1440 TFT LCD panel
|
||||
|
||||
Required properties:
|
||||
- compatible: should be "rocktech,jh057n00900"
|
||||
- reg: DSI virtual channel of the peripheral
|
||||
- reset-gpios: panel reset gpio
|
||||
- backlight: phandle of the backlight device attached to the panel
|
||||
|
||||
Example:
|
||||
|
||||
&mipi_dsi {
|
||||
panel@0 {
|
||||
compatible = "rocktech,jh057n00900";
|
||||
reg = <0>;
|
||||
backlight = <&backlight>;
|
||||
reset-gpios = <&gpio3 13 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
@ -0,0 +1,51 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0+ OR X11)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/display/panel/ronbo,rb070d30.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Ronbo RB070D30 DSI Display Panel
|
||||
|
||||
maintainers:
|
||||
- Maxime Ripard <maxime.ripard@bootlin.com>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: ronbo,rb070d30
|
||||
|
||||
reg:
|
||||
description: MIPI-DSI virtual channel
|
||||
|
||||
power-gpios:
|
||||
description: GPIO used for the power pin
|
||||
maxItems: 1
|
||||
|
||||
reset-gpios:
|
||||
description: GPIO used for the reset pin
|
||||
maxItems: 1
|
||||
|
||||
shlr-gpios:
|
||||
description: GPIO used for the shlr pin (horizontal flip)
|
||||
maxItems: 1
|
||||
|
||||
updn-gpios:
|
||||
description: GPIO used for the updn pin (vertical flip)
|
||||
maxItems: 1
|
||||
|
||||
vcc-lcd-supply:
|
||||
description: Power regulator
|
||||
|
||||
backlight:
|
||||
description: Backlight used by the panel
|
||||
$ref: "/schemas/types.yaml#/definitions/phandle"
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- power-gpios
|
||||
- reg
|
||||
- reset-gpios
|
||||
- shlr-gpios
|
||||
- updn-gpios
|
||||
- vcc-lcd-supply
|
||||
|
||||
additionalProperties: false
|
@ -6,6 +6,7 @@ Required properties:
|
||||
|
||||
Optional properties:
|
||||
- label: a symbolic name for the panel
|
||||
- backlight: phandle of the backlight device
|
||||
|
||||
Required nodes:
|
||||
- Video port for DPI input
|
||||
@ -21,6 +22,7 @@ lcd-panel: td028ttec1@0 {
|
||||
spi-cpha;
|
||||
|
||||
label = "lcd";
|
||||
backlight = <&backlight>;
|
||||
port {
|
||||
lcd_in: endpoint {
|
||||
remote-endpoint = <&dpi_out>;
|
||||
|
@ -0,0 +1,72 @@
|
||||
Rockchip specific extensions for rk3066 HDMI
|
||||
============================================
|
||||
|
||||
Required properties:
|
||||
- compatible:
|
||||
"rockchip,rk3066-hdmi";
|
||||
- reg:
|
||||
Physical base address and length of the controller's registers.
|
||||
- clocks, clock-names:
|
||||
Phandle to HDMI controller clock, name should be "hclk".
|
||||
- interrupts:
|
||||
HDMI interrupt number.
|
||||
- power-domains:
|
||||
Phandle to the RK3066_PD_VIO power domain.
|
||||
- rockchip,grf:
|
||||
This soc uses GRF regs to switch the HDMI TX input between vop0 and vop1.
|
||||
- ports:
|
||||
Contains one port node with two endpoints, numbered 0 and 1,
|
||||
connected respectively to vop0 and vop1.
|
||||
Contains one port node with one endpoint
|
||||
connected to a hdmi-connector node.
|
||||
- pinctrl-0, pinctrl-name:
|
||||
Switch the iomux for the HPD/I2C pins to HDMI function.
|
||||
|
||||
Example:
|
||||
hdmi: hdmi@10116000 {
|
||||
compatible = "rockchip,rk3066-hdmi";
|
||||
reg = <0x10116000 0x2000>;
|
||||
interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cru HCLK_HDMI>;
|
||||
clock-names = "hclk";
|
||||
power-domains = <&power RK3066_PD_VIO>;
|
||||
rockchip,grf = <&grf>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hdmii2c_xfer>, <&hdmi_hpd>;
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
hdmi_in: port@0 {
|
||||
reg = <0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
hdmi_in_vop0: endpoint@0 {
|
||||
reg = <0>;
|
||||
remote-endpoint = <&vop0_out_hdmi>;
|
||||
};
|
||||
hdmi_in_vop1: endpoint@1 {
|
||||
reg = <1>;
|
||||
remote-endpoint = <&vop1_out_hdmi>;
|
||||
};
|
||||
};
|
||||
hdmi_out: port@1 {
|
||||
reg = <1>;
|
||||
hdmi_out_con: endpoint {
|
||||
remote-endpoint = <&hdmi_con_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
hdmi {
|
||||
hdmi_hpd: hdmi-hpd {
|
||||
rockchip,pins = <0 RK_PA0 1 &pcfg_pull_default>;
|
||||
};
|
||||
hdmii2c_xfer: hdmii2c-xfer {
|
||||
rockchip,pins = <0 RK_PA1 1 &pcfg_pull_none>,
|
||||
<0 RK_PA2 1 &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
};
|
@ -1,36 +0,0 @@
|
||||
Sunxi specific Simple Framebuffer bindings
|
||||
|
||||
This binding documents sunxi specific extensions to the simple-framebuffer
|
||||
bindings. The sunxi simplefb u-boot code relies on the devicetree containing
|
||||
pre-populated simplefb nodes.
|
||||
|
||||
These extensions are intended so that u-boot can select the right node based
|
||||
on which pipeline is being used. As such they are solely intended for
|
||||
firmware / bootloader use, and the OS should ignore them.
|
||||
|
||||
Required properties:
|
||||
- compatible: "allwinner,simple-framebuffer"
|
||||
- allwinner,pipeline, one of:
|
||||
"de_be0-lcd0"
|
||||
"de_be1-lcd1"
|
||||
"de_be0-lcd0-hdmi"
|
||||
"de_be1-lcd1-hdmi"
|
||||
"mixer0-lcd0"
|
||||
"mixer0-lcd0-hdmi"
|
||||
"mixer1-lcd1-hdmi"
|
||||
"mixer1-lcd1-tve"
|
||||
|
||||
Example:
|
||||
|
||||
chosen {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
|
||||
framebuffer@0 {
|
||||
compatible = "allwinner,simple-framebuffer", "simple-framebuffer";
|
||||
allwinner,pipeline = "de_be0-lcd0-hdmi";
|
||||
clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>,
|
||||
<&ahb_gates 44>;
|
||||
};
|
||||
};
|
@ -1,91 +0,0 @@
|
||||
Simple Framebuffer
|
||||
|
||||
A simple frame-buffer describes a frame-buffer setup by firmware or
|
||||
the bootloader, with the assumption that the display hardware has already
|
||||
been set up to scan out from the memory pointed to by the reg property.
|
||||
|
||||
Since simplefb nodes represent runtime information they must be sub-nodes of
|
||||
the chosen node (*). Simplefb nodes must be named "framebuffer@<address>".
|
||||
|
||||
If the devicetree contains nodes for the display hardware used by a simplefb,
|
||||
then the simplefb node must contain a property called "display", which
|
||||
contains a phandle pointing to the primary display hw node, so that the OS
|
||||
knows which simplefb to disable when handing over control to a driver for the
|
||||
real hardware. The bindings for the hw nodes must specify which node is
|
||||
considered the primary node.
|
||||
|
||||
It is advised to add display# aliases to help the OS determine how to number
|
||||
things. If display# aliases are used, then if the simplefb node contains a
|
||||
"display" property then the /aliases/display# path must point to the display
|
||||
hw node the "display" property points to, otherwise it must point directly
|
||||
to the simplefb node.
|
||||
|
||||
If a simplefb node represents the preferred console for user interaction,
|
||||
then the chosen node's stdout-path property should point to it, or to the
|
||||
primary display hw node, as with display# aliases. If display aliases are
|
||||
used then it should be set to the alias instead.
|
||||
|
||||
It is advised that devicetree files contain pre-filled, disabled framebuffer
|
||||
nodes, so that the firmware only needs to update the mode information and
|
||||
enable them. This way if e.g. later on support for more display clocks get
|
||||
added, the simplefb nodes will already contain this info and the firmware
|
||||
does not need to be updated.
|
||||
|
||||
If pre-filled framebuffer nodes are used, the firmware may need extra
|
||||
information to find the right node. In that case an extra platform specific
|
||||
compatible and platform specific properties should be used and documented,
|
||||
see e.g. simple-framebuffer-sunxi.txt .
|
||||
|
||||
Required properties:
|
||||
- compatible: "simple-framebuffer"
|
||||
- reg: Should contain the location and size of the framebuffer memory.
|
||||
- width: The width of the framebuffer in pixels.
|
||||
- height: The height of the framebuffer in pixels.
|
||||
- stride: The number of bytes in each line of the framebuffer.
|
||||
- format: The format of the framebuffer surface. Valid values are:
|
||||
- r5g6b5 (16-bit pixels, d[15:11]=r, d[10:5]=g, d[4:0]=b).
|
||||
- a8b8g8r8 (32-bit pixels, d[31:24]=a, d[23:16]=b, d[15:8]=g, d[7:0]=r).
|
||||
|
||||
Optional properties:
|
||||
- clocks : List of clocks used by the framebuffer.
|
||||
- *-supply : Any number of regulators used by the framebuffer. These should
|
||||
be named according to the names in the device's design.
|
||||
|
||||
The above resources are expected to already be configured correctly.
|
||||
The OS must ensure they are not modified or disabled while the simple
|
||||
framebuffer remains active.
|
||||
|
||||
- display : phandle pointing to the primary display hardware node
|
||||
|
||||
Example:
|
||||
|
||||
aliases {
|
||||
display0 = &lcdc0;
|
||||
}
|
||||
|
||||
chosen {
|
||||
framebuffer0: framebuffer@1d385000 {
|
||||
compatible = "simple-framebuffer";
|
||||
reg = <0x1d385000 (1600 * 1200 * 2)>;
|
||||
width = <1600>;
|
||||
height = <1200>;
|
||||
stride = <(1600 * 2)>;
|
||||
format = "r5g6b5";
|
||||
clocks = <&ahb_gates 36>, <&ahb_gates 43>, <&ahb_gates 44>;
|
||||
lcd-supply = <®_dc1sw>;
|
||||
display = <&lcdc0>;
|
||||
};
|
||||
stdout-path = "display0";
|
||||
};
|
||||
|
||||
soc@1c00000 {
|
||||
lcdc0: lcdc@1c0c000 {
|
||||
compatible = "allwinner,sun4i-a10-lcdc";
|
||||
...
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
*) Older devicetree files may have a compatible = "simple-framebuffer" node
|
||||
in a different place, operating systems must first enumerate any compatible
|
||||
nodes found under chosen and then check for other compatible nodes.
|
@ -0,0 +1,160 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/display/simple-framebuffer.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Simple Framebuffer Device Tree Bindings
|
||||
|
||||
maintainers:
|
||||
- Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
|
||||
- Hans de Goede <hdegoede@redhat.com>
|
||||
|
||||
description: |+
|
||||
A simple frame-buffer describes a frame-buffer setup by firmware or
|
||||
the bootloader, with the assumption that the display hardware has
|
||||
already been set up to scan out from the memory pointed to by the
|
||||
reg property.
|
||||
|
||||
Since simplefb nodes represent runtime information they must be
|
||||
sub-nodes of the chosen node (*). Simplefb nodes must be named
|
||||
framebuffer@<address>.
|
||||
|
||||
If the devicetree contains nodes for the display hardware used by a
|
||||
simplefb, then the simplefb node must contain a property called
|
||||
display, which contains a phandle pointing to the primary display
|
||||
hw node, so that the OS knows which simplefb to disable when handing
|
||||
over control to a driver for the real hardware. The bindings for the
|
||||
hw nodes must specify which node is considered the primary node.
|
||||
|
||||
It is advised to add display# aliases to help the OS determine how
|
||||
to number things. If display# aliases are used, then if the simplefb
|
||||
node contains a display property then the /aliases/display# path
|
||||
must point to the display hw node the display property points to,
|
||||
otherwise it must point directly to the simplefb node.
|
||||
|
||||
If a simplefb node represents the preferred console for user
|
||||
interaction, then the chosen node stdout-path property should point
|
||||
to it, or to the primary display hw node, as with display#
|
||||
aliases. If display aliases are used then it should be set to the
|
||||
alias instead.
|
||||
|
||||
It is advised that devicetree files contain pre-filled, disabled
|
||||
framebuffer nodes, so that the firmware only needs to update the
|
||||
mode information and enable them. This way if e.g. later on support
|
||||
for more display clocks get added, the simplefb nodes will already
|
||||
contain this info and the firmware does not need to be updated.
|
||||
|
||||
If pre-filled framebuffer nodes are used, the firmware may need
|
||||
extra information to find the right node. In that case an extra
|
||||
platform specific compatible and platform specific properties should
|
||||
be used and documented.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
items:
|
||||
- enum:
|
||||
- allwinner,simple-framebuffer
|
||||
- amlogic,simple-framebuffer
|
||||
- const: simple-framebuffer
|
||||
|
||||
reg:
|
||||
description: Location and size of the framebuffer memory
|
||||
|
||||
clocks:
|
||||
description: List of clocks used by the framebuffer.
|
||||
|
||||
power-domains:
|
||||
description: List of power domains used by the framebuffer.
|
||||
|
||||
width:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description: Width of the framebuffer in pixels
|
||||
|
||||
height:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description: Height of the framebuffer in pixels
|
||||
|
||||
stride:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description: Number of bytes of a line in the framebuffer
|
||||
|
||||
format:
|
||||
description: >
|
||||
Format of the framebuffer:
|
||||
* `a8b8g8r8` - 32-bit pixels, d[31:24]=a, d[23:16]=b, d[15:8]=g, d[7:0]=r
|
||||
* `r5g6b5` - 16-bit pixels, d[15:11]=r, d[10:5]=g, d[4:0]=b
|
||||
enum:
|
||||
- a8b8g8r8
|
||||
- r5g6b5
|
||||
|
||||
display:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
description: Primary display hardware node
|
||||
|
||||
allwinner,pipeline:
|
||||
description: Pipeline used by the framebuffer on Allwinner SoCs
|
||||
enum:
|
||||
- de_be0-lcd0
|
||||
- de_be0-lcd0-hdmi
|
||||
- de_be0-lcd0-tve0
|
||||
- de_be1-lcd0
|
||||
- de_be1-lcd1-hdmi
|
||||
- de_fe0-de_be0-lcd0
|
||||
- de_fe0-de_be0-lcd0-hdmi
|
||||
- de_fe0-de_be0-lcd0-tve0
|
||||
- mixer0-lcd0
|
||||
- mixer0-lcd0-hdmi
|
||||
- mixer1-lcd1-hdmi
|
||||
- mixer1-lcd1-tve
|
||||
|
||||
amlogic,pipeline:
|
||||
description: Pipeline used by the framebuffer on Amlogic SoCs
|
||||
enum:
|
||||
- vpu-cvbs
|
||||
- vpu-hdmi
|
||||
|
||||
patternProperties:
|
||||
"^[a-zA-Z0-9-]+-supply$":
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
description:
|
||||
Regulators used by the framebuffer. These should be named
|
||||
according to the names in the device design.
|
||||
|
||||
required:
|
||||
# The binding requires also reg, width, height, stride and format,
|
||||
# but usually they will be filled by the bootloader.
|
||||
- compatible
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
aliases {
|
||||
display0 = &lcdc0;
|
||||
};
|
||||
|
||||
chosen {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
stdout-path = "display0";
|
||||
framebuffer0: framebuffer@1d385000 {
|
||||
compatible = "simple-framebuffer";
|
||||
reg = <0x1d385000 3840000>;
|
||||
width = <1600>;
|
||||
height = <1200>;
|
||||
stride = <3200>;
|
||||
format = "r5g6b5";
|
||||
clocks = <&ahb_gates 36>, <&ahb_gates 43>, <&ahb_gates 44>;
|
||||
lcd-supply = <®_dc1sw>;
|
||||
display = <&lcdc0>;
|
||||
};
|
||||
};
|
||||
|
||||
soc@1c00000 {
|
||||
lcdc0: lcdc@1c0c000 {
|
||||
compatible = "allwinner,sun4i-a10-lcdc";
|
||||
};
|
||||
};
|
||||
|
||||
...
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user