[ALPS05077885] [Do NOT Sync]Merge branch android-4.14 into alps-trunk-r0.basic
[Detail] Parent:234de92896Merge 4.14.150 into android-4.14 Start:7d642373dbANDROID: refactor build.config files to remove duplication Target:32bc956bc2Merge 4.14.174 into android-4.14 MTK-Commit-Id: 73aee9b6172d4865b3b10bd396f7cfa40e7207b1 Feature: Others Change-Id: Id09b858cd9f7f12db63cdb0bea42254d233a9fbd CR-Id: ALPS05077885 Signed-off-by: Breeze.Li <breeze.li@mediatek.com>
This commit is contained in:
@@ -83,3 +83,11 @@ KernelVersion: 4.7
|
|||||||
Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
|
Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
|
||||||
Description: (R) Indicates the capabilities of the Coresight TMC.
|
Description: (R) Indicates the capabilities of the Coresight TMC.
|
||||||
The value is read directly from the DEVID register, 0xFC8,
|
The value is read directly from the DEVID register, 0xFC8,
|
||||||
|
|
||||||
|
What: /sys/bus/coresight/devices/<memory_map>.tmc/buffer_size
|
||||||
|
Date: December 2018
|
||||||
|
KernelVersion: 4.19
|
||||||
|
Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
|
||||||
|
Description: (RW) Size of the trace buffer for TMC-ETR when used in SYSFS
|
||||||
|
mode. Writable only for TMC-ETR configurations. The value
|
||||||
|
should be aligned to the kernel pagesize.
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ KernelVersion: 3.10
|
|||||||
Contact: Samuel Ortiz <sameo@linux.intel.com>
|
Contact: Samuel Ortiz <sameo@linux.intel.com>
|
||||||
linux-mei@linux.intel.com
|
linux-mei@linux.intel.com
|
||||||
Description: Stores the same MODALIAS value emitted by uevent
|
Description: Stores the same MODALIAS value emitted by uevent
|
||||||
Format: mei:<mei device name>:<device uuid>:
|
Format: mei:<mei device name>:<device uuid>:<protocol version>
|
||||||
|
|
||||||
What: /sys/bus/mei/devices/.../name
|
What: /sys/bus/mei/devices/.../name
|
||||||
Date: May 2015
|
Date: May 2015
|
||||||
|
|||||||
@@ -7,6 +7,13 @@ Description:
|
|||||||
The name of devfreq object denoted as ... is same as the
|
The name of devfreq object denoted as ... is same as the
|
||||||
name of device using devfreq.
|
name of device using devfreq.
|
||||||
|
|
||||||
|
What: /sys/class/devfreq/.../name
|
||||||
|
Date: November 2019
|
||||||
|
Contact: Chanwoo Choi <cw00.choi@samsung.com>
|
||||||
|
Description:
|
||||||
|
The /sys/class/devfreq/.../name shows the name of device
|
||||||
|
of the corresponding devfreq object.
|
||||||
|
|
||||||
What: /sys/class/devfreq/.../governor
|
What: /sys/class/devfreq/.../governor
|
||||||
Date: September 2011
|
Date: September 2011
|
||||||
Contact: MyungJoo Ham <myungjoo.ham@samsung.com>
|
Contact: MyungJoo Ham <myungjoo.ham@samsung.com>
|
||||||
|
|||||||
15
Documentation/ABI/testing/sysfs-class-gnss
Normal file
15
Documentation/ABI/testing/sysfs-class-gnss
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
What: /sys/class/gnss/gnssN/type
|
||||||
|
Date: May 2018
|
||||||
|
KernelVersion: 4.18
|
||||||
|
Contact: Johan Hovold <johan@kernel.org>
|
||||||
|
Description:
|
||||||
|
The GNSS receiver type. The currently identified types reflect
|
||||||
|
the protocol(s) supported by the receiver:
|
||||||
|
|
||||||
|
"NMEA" NMEA 0183
|
||||||
|
"SiRF" SiRF Binary
|
||||||
|
"UBX" UBX
|
||||||
|
|
||||||
|
Note that also non-"NMEA" type receivers typically support a
|
||||||
|
subset of NMEA 0183 with vendor extensions (e.g. to allow
|
||||||
|
switching to a vendor protocol).
|
||||||
@@ -381,6 +381,8 @@ What: /sys/devices/system/cpu/vulnerabilities
|
|||||||
/sys/devices/system/cpu/vulnerabilities/spec_store_bypass
|
/sys/devices/system/cpu/vulnerabilities/spec_store_bypass
|
||||||
/sys/devices/system/cpu/vulnerabilities/l1tf
|
/sys/devices/system/cpu/vulnerabilities/l1tf
|
||||||
/sys/devices/system/cpu/vulnerabilities/mds
|
/sys/devices/system/cpu/vulnerabilities/mds
|
||||||
|
/sys/devices/system/cpu/vulnerabilities/tsx_async_abort
|
||||||
|
/sys/devices/system/cpu/vulnerabilities/itlb_multihit
|
||||||
Date: January 2018
|
Date: January 2018
|
||||||
Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
|
Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
|
||||||
Description: Information about CPU vulnerabilities
|
Description: Information about CPU vulnerabilities
|
||||||
|
|||||||
@@ -1,260 +1,320 @@
|
|||||||
What: /sys/fs/f2fs/<disk>/gc_max_sleep_time
|
What: /sys/fs/f2fs/<disk>/gc_max_sleep_time
|
||||||
Date: July 2013
|
Date: July 2013
|
||||||
Contact: "Namjae Jeon" <namjae.jeon@samsung.com>
|
Contact: "Namjae Jeon" <namjae.jeon@samsung.com>
|
||||||
Description:
|
Description: Controls the maximum sleep time for gc_thread. Time
|
||||||
Controls the maximun sleep time for gc_thread. Time
|
is in milliseconds.
|
||||||
is in milliseconds.
|
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/gc_min_sleep_time
|
What: /sys/fs/f2fs/<disk>/gc_min_sleep_time
|
||||||
Date: July 2013
|
Date: July 2013
|
||||||
Contact: "Namjae Jeon" <namjae.jeon@samsung.com>
|
Contact: "Namjae Jeon" <namjae.jeon@samsung.com>
|
||||||
Description:
|
Description: Controls the minimum sleep time for gc_thread. Time
|
||||||
Controls the minimum sleep time for gc_thread. Time
|
is in milliseconds.
|
||||||
is in milliseconds.
|
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/gc_no_gc_sleep_time
|
What: /sys/fs/f2fs/<disk>/gc_no_gc_sleep_time
|
||||||
Date: July 2013
|
Date: July 2013
|
||||||
Contact: "Namjae Jeon" <namjae.jeon@samsung.com>
|
Contact: "Namjae Jeon" <namjae.jeon@samsung.com>
|
||||||
Description:
|
Description: Controls the default sleep time for gc_thread. Time
|
||||||
Controls the default sleep time for gc_thread. Time
|
is in milliseconds.
|
||||||
is in milliseconds.
|
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/gc_idle
|
What: /sys/fs/f2fs/<disk>/gc_idle
|
||||||
Date: July 2013
|
Date: July 2013
|
||||||
Contact: "Namjae Jeon" <namjae.jeon@samsung.com>
|
Contact: "Namjae Jeon" <namjae.jeon@samsung.com>
|
||||||
Description:
|
Description: Controls the victim selection policy for garbage collection.
|
||||||
Controls the victim selection policy for garbage collection.
|
Setting gc_idle = 0(default) will disable this option. Setting
|
||||||
|
gc_idle = 1 will select the Cost Benefit approach & setting
|
||||||
|
gc_idle = 2 will select the greedy approach.
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/reclaim_segments
|
What: /sys/fs/f2fs/<disk>/reclaim_segments
|
||||||
Date: October 2013
|
Date: October 2013
|
||||||
Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
|
Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
|
||||||
|
Description: This parameter controls the number of prefree segments to be
|
||||||
|
reclaimed. If the number of prefree segments is larger than
|
||||||
|
the number of segments in the proportion to the percentage
|
||||||
|
over total volume size, f2fs tries to conduct checkpoint to
|
||||||
|
reclaim the prefree segments to free segments.
|
||||||
|
By default, 5% over total # of segments.
|
||||||
|
|
||||||
|
What: /sys/fs/f2fs/<disk>/main_blkaddr
|
||||||
|
Date: November 2019
|
||||||
|
Contact: "Ramon Pantin" <pantin@google.com>
|
||||||
Description:
|
Description:
|
||||||
Controls the issue rate of segment discard commands.
|
Shows first block address of MAIN area.
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/ipu_policy
|
What: /sys/fs/f2fs/<disk>/ipu_policy
|
||||||
Date: November 2013
|
Date: November 2013
|
||||||
Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
|
Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
|
||||||
Description:
|
Description: Controls the in-place-update policy.
|
||||||
Controls the in-place-update policy.
|
updates in f2fs. User can set:
|
||||||
|
0x01: F2FS_IPU_FORCE, 0x02: F2FS_IPU_SSR,
|
||||||
|
0x04: F2FS_IPU_UTIL, 0x08: F2FS_IPU_SSR_UTIL,
|
||||||
|
0x10: F2FS_IPU_FSYNC, 0x20: F2FS_IPU_ASYNC,
|
||||||
|
0x40: F2FS_IPU_NOCACHE.
|
||||||
|
Refer segment.h for details.
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/min_ipu_util
|
What: /sys/fs/f2fs/<disk>/min_ipu_util
|
||||||
Date: November 2013
|
Date: November 2013
|
||||||
Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
|
Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
|
||||||
Description:
|
Description: Controls the FS utilization condition for the in-place-update
|
||||||
Controls the FS utilization condition for the in-place-update
|
policies. It is used by F2FS_IPU_UTIL and F2FS_IPU_SSR_UTIL policies.
|
||||||
policies.
|
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/min_fsync_blocks
|
What: /sys/fs/f2fs/<disk>/min_fsync_blocks
|
||||||
Date: September 2014
|
Date: September 2014
|
||||||
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
||||||
Description:
|
Description: Controls the dirty page count condition for the in-place-update
|
||||||
Controls the dirty page count condition for the in-place-update
|
policies.
|
||||||
policies.
|
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/min_seq_blocks
|
What: /sys/fs/f2fs/<disk>/min_seq_blocks
|
||||||
Date: August 2018
|
Date: August 2018
|
||||||
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
||||||
Description:
|
Description: Controls the dirty page count condition for batched sequential
|
||||||
Controls the dirty page count condition for batched sequential
|
writes in writepages.
|
||||||
writes in ->writepages.
|
|
||||||
|
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/min_hot_blocks
|
What: /sys/fs/f2fs/<disk>/min_hot_blocks
|
||||||
Date: March 2017
|
Date: March 2017
|
||||||
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
||||||
Description:
|
Description: Controls the dirty page count condition for redefining hot data.
|
||||||
Controls the dirty page count condition for redefining hot data.
|
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/min_ssr_sections
|
What: /sys/fs/f2fs/<disk>/min_ssr_sections
|
||||||
Date: October 2017
|
Date: October 2017
|
||||||
Contact: "Chao Yu" <yuchao0@huawei.com>
|
Contact: "Chao Yu" <yuchao0@huawei.com>
|
||||||
Description:
|
Description: Controls the free section threshold to trigger SSR allocation.
|
||||||
Controls the fee section threshold to trigger SSR allocation.
|
If this is large, SSR mode will be enabled early.
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/max_small_discards
|
What: /sys/fs/f2fs/<disk>/max_small_discards
|
||||||
Date: November 2013
|
Date: November 2013
|
||||||
Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
|
Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
|
||||||
Description:
|
Description: Controls the issue rate of discard commands that consist of small
|
||||||
Controls the issue rate of small discard commands.
|
blocks less than 2MB. The candidates to be discarded are cached until
|
||||||
|
checkpoint is triggered, and issued during the checkpoint.
|
||||||
|
By default, it is disabled with 0.
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/discard_granularity
|
What: /sys/fs/f2fs/<disk>/discard_granularity
|
||||||
Date: July 2017
|
Date: July 2017
|
||||||
Contact: "Chao Yu" <yuchao0@huawei.com>
|
Contact: "Chao Yu" <yuchao0@huawei.com>
|
||||||
Description:
|
Description: Controls discard granularity of inner discard thread. Inner thread
|
||||||
Controls discard granularity of inner discard thread, inner thread
|
|
||||||
will not issue discards with size that is smaller than granularity.
|
will not issue discards with size that is smaller than granularity.
|
||||||
The unit size is one block, now only support configuring in range
|
The unit size is one block(4KB), now only support configuring
|
||||||
of [1, 512].
|
in range of [1, 512]. Default value is 4(=16KB).
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/umount_discard_timeout
|
What: /sys/fs/f2fs/<disk>/umount_discard_timeout
|
||||||
Date: January 2019
|
Date: January 2019
|
||||||
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
||||||
Description:
|
Description: Set timeout to issue discard commands during umount.
|
||||||
Set timeout to issue discard commands during umount.
|
Default: 5 secs
|
||||||
Default: 5 secs
|
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/max_victim_search
|
What: /sys/fs/f2fs/<disk>/max_victim_search
|
||||||
Date: January 2014
|
Date: January 2014
|
||||||
Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
|
Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
|
||||||
Description:
|
Description: Controls the number of trials to find a victim segment
|
||||||
Controls the number of trials to find a victim segment.
|
when conducting SSR and cleaning operations. The default value
|
||||||
|
is 4096 which covers 8GB block address range.
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/migration_granularity
|
What: /sys/fs/f2fs/<disk>/migration_granularity
|
||||||
Date: October 2018
|
Date: October 2018
|
||||||
Contact: "Chao Yu" <yuchao0@huawei.com>
|
Contact: "Chao Yu" <yuchao0@huawei.com>
|
||||||
Description:
|
Description: Controls migration granularity of garbage collection on large
|
||||||
Controls migration granularity of garbage collection on large
|
section, it can let GC move partial segment{s} of one section
|
||||||
section, it can let GC move partial segment{s} of one section
|
in one GC cycle, so that dispersing heavy overhead GC to
|
||||||
in one GC cycle, so that dispersing heavy overhead GC to
|
multiple lightweight one.
|
||||||
multiple lightweight one.
|
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/dir_level
|
What: /sys/fs/f2fs/<disk>/dir_level
|
||||||
Date: March 2014
|
Date: March 2014
|
||||||
Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
|
Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
|
||||||
Description:
|
Description: Controls the directory level for large directory. If a
|
||||||
Controls the directory level for large directory.
|
directory has a number of files, it can reduce the file lookup
|
||||||
|
latency by increasing this dir_level value. Otherwise, it
|
||||||
|
needs to decrease this value to reduce the space overhead.
|
||||||
|
The default value is 0.
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/ram_thresh
|
What: /sys/fs/f2fs/<disk>/ram_thresh
|
||||||
Date: March 2014
|
Date: March 2014
|
||||||
Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
|
Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
|
||||||
Description:
|
Description: Controls the memory footprint used by free nids and cached
|
||||||
Controls the memory footprint used by f2fs.
|
nat entries. By default, 1 is set, which indicates
|
||||||
|
10 MB / 1 GB RAM.
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/batched_trim_sections
|
What: /sys/fs/f2fs/<disk>/batched_trim_sections
|
||||||
Date: February 2015
|
Date: February 2015
|
||||||
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
||||||
Description:
|
Description: Controls the trimming rate in batch mode.
|
||||||
Controls the trimming rate in batch mode.
|
<deprecated>
|
||||||
<deprecated>
|
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/cp_interval
|
What: /sys/fs/f2fs/<disk>/cp_interval
|
||||||
Date: October 2015
|
Date: October 2015
|
||||||
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
||||||
Description:
|
Description: Controls the checkpoint timing, set to 60 seconds by default.
|
||||||
Controls the checkpoint timing.
|
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/idle_interval
|
What: /sys/fs/f2fs/<disk>/idle_interval
|
||||||
Date: January 2016
|
Date: January 2016
|
||||||
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
||||||
Description:
|
Description: Controls the idle timing of system, if there is no FS operation
|
||||||
Controls the idle timing for all paths other than
|
during given interval.
|
||||||
discard and gc path.
|
Set to 5 seconds by default.
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/discard_idle_interval
|
What: /sys/fs/f2fs/<disk>/discard_idle_interval
|
||||||
Date: September 2018
|
Date: September 2018
|
||||||
Contact: "Chao Yu" <yuchao0@huawei.com>
|
Contact: "Chao Yu" <yuchao0@huawei.com>
|
||||||
Contact: "Sahitya Tummala" <stummala@codeaurora.org>
|
Contact: "Sahitya Tummala" <stummala@codeaurora.org>
|
||||||
Description:
|
Description: Controls the idle timing of discard thread given
|
||||||
Controls the idle timing for discard path.
|
this time interval.
|
||||||
|
Default is 5 secs.
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/gc_idle_interval
|
What: /sys/fs/f2fs/<disk>/gc_idle_interval
|
||||||
Date: September 2018
|
Date: September 2018
|
||||||
Contact: "Chao Yu" <yuchao0@huawei.com>
|
Contact: "Chao Yu" <yuchao0@huawei.com>
|
||||||
Contact: "Sahitya Tummala" <stummala@codeaurora.org>
|
Contact: "Sahitya Tummala" <stummala@codeaurora.org>
|
||||||
Description:
|
Description: Controls the idle timing for gc path. Set to 5 seconds by default.
|
||||||
Controls the idle timing for gc path.
|
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/iostat_enable
|
What: /sys/fs/f2fs/<disk>/iostat_enable
|
||||||
Date: August 2017
|
Date: August 2017
|
||||||
Contact: "Chao Yu" <yuchao0@huawei.com>
|
Contact: "Chao Yu" <yuchao0@huawei.com>
|
||||||
Description:
|
Description: Controls to enable/disable IO stat.
|
||||||
Controls to enable/disable IO stat.
|
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/ra_nid_pages
|
What: /sys/fs/f2fs/<disk>/ra_nid_pages
|
||||||
Date: October 2015
|
Date: October 2015
|
||||||
Contact: "Chao Yu" <chao2.yu@samsung.com>
|
Contact: "Chao Yu" <chao2.yu@samsung.com>
|
||||||
Description:
|
Description: Controls the count of nid pages to be readaheaded.
|
||||||
Controls the count of nid pages to be readaheaded.
|
When building free nids, F2FS reads NAT blocks ahead for
|
||||||
|
speed up. Default is 0.
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/dirty_nats_ratio
|
What: /sys/fs/f2fs/<disk>/dirty_nats_ratio
|
||||||
Date: January 2016
|
Date: January 2016
|
||||||
Contact: "Chao Yu" <chao2.yu@samsung.com>
|
Contact: "Chao Yu" <chao2.yu@samsung.com>
|
||||||
Description:
|
Description: Controls dirty nat entries ratio threshold, if current
|
||||||
Controls dirty nat entries ratio threshold, if current
|
ratio exceeds configured threshold, checkpoint will
|
||||||
ratio exceeds configured threshold, checkpoint will
|
be triggered for flushing dirty nat entries.
|
||||||
be triggered for flushing dirty nat entries.
|
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/lifetime_write_kbytes
|
What: /sys/fs/f2fs/<disk>/lifetime_write_kbytes
|
||||||
Date: January 2016
|
Date: January 2016
|
||||||
Contact: "Shuoran Liu" <liushuoran@huawei.com>
|
Contact: "Shuoran Liu" <liushuoran@huawei.com>
|
||||||
Description:
|
Description: Shows total written kbytes issued to disk.
|
||||||
Shows total written kbytes issued to disk.
|
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/feature
|
What: /sys/fs/f2fs/<disk>/feature
|
||||||
Date: July 2017
|
Date: July 2017
|
||||||
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
||||||
Description:
|
Description: Shows all enabled features in current device.
|
||||||
Shows all enabled features in current device.
|
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/inject_rate
|
What: /sys/fs/f2fs/<disk>/inject_rate
|
||||||
Date: May 2016
|
Date: May 2016
|
||||||
Contact: "Sheng Yong" <shengyong1@huawei.com>
|
Contact: "Sheng Yong" <shengyong1@huawei.com>
|
||||||
Description:
|
Description: Controls the injection rate of arbitrary faults.
|
||||||
Controls the injection rate.
|
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/inject_type
|
What: /sys/fs/f2fs/<disk>/inject_type
|
||||||
Date: May 2016
|
Date: May 2016
|
||||||
Contact: "Sheng Yong" <shengyong1@huawei.com>
|
Contact: "Sheng Yong" <shengyong1@huawei.com>
|
||||||
Description:
|
Description: Controls the injection type of arbitrary faults.
|
||||||
Controls the injection type.
|
|
||||||
|
What: /sys/fs/f2fs/<disk>/dirty_segments
|
||||||
|
Date: October 2017
|
||||||
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
||||||
|
Description: Shows the number of dirty segments.
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/reserved_blocks
|
What: /sys/fs/f2fs/<disk>/reserved_blocks
|
||||||
Date: June 2017
|
Date: June 2017
|
||||||
Contact: "Chao Yu" <yuchao0@huawei.com>
|
Contact: "Chao Yu" <yuchao0@huawei.com>
|
||||||
Description:
|
Description: Controls target reserved blocks in system, the threshold
|
||||||
Controls target reserved blocks in system, the threshold
|
is soft, it could exceed current available user space.
|
||||||
is soft, it could exceed current available user space.
|
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/current_reserved_blocks
|
What: /sys/fs/f2fs/<disk>/current_reserved_blocks
|
||||||
Date: October 2017
|
Date: October 2017
|
||||||
Contact: "Yunlong Song" <yunlong.song@huawei.com>
|
Contact: "Yunlong Song" <yunlong.song@huawei.com>
|
||||||
Contact: "Chao Yu" <yuchao0@huawei.com>
|
Contact: "Chao Yu" <yuchao0@huawei.com>
|
||||||
Description:
|
Description: Shows current reserved blocks in system, it may be temporarily
|
||||||
Shows current reserved blocks in system, it may be temporarily
|
smaller than target_reserved_blocks, but will gradually
|
||||||
smaller than target_reserved_blocks, but will gradually
|
increase to target_reserved_blocks when more free blocks are
|
||||||
increase to target_reserved_blocks when more free blocks are
|
freed by user later.
|
||||||
freed by user later.
|
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/gc_urgent
|
What: /sys/fs/f2fs/<disk>/gc_urgent
|
||||||
Date: August 2017
|
Date: August 2017
|
||||||
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
||||||
Description:
|
Description: Do background GC agressively when set. When gc_urgent = 1,
|
||||||
Do background GC agressively
|
background thread starts to do GC by given gc_urgent_sleep_time
|
||||||
|
interval. It is set to 0 by default.
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/gc_urgent_sleep_time
|
What: /sys/fs/f2fs/<disk>/gc_urgent_sleep_time
|
||||||
Date: August 2017
|
Date: August 2017
|
||||||
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
||||||
Description:
|
Description: Controls sleep time of GC urgent mode. Set to 500ms by default.
|
||||||
Controls sleep time of GC urgent mode
|
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/readdir_ra
|
What: /sys/fs/f2fs/<disk>/readdir_ra
|
||||||
Date: November 2017
|
Date: November 2017
|
||||||
Contact: "Sheng Yong" <shengyong1@huawei.com>
|
Contact: "Sheng Yong" <shengyong1@huawei.com>
|
||||||
Description:
|
Description: Controls readahead inode block in readdir. Enabled by default.
|
||||||
Controls readahead inode block in readdir.
|
|
||||||
|
What: /sys/fs/f2fs/<disk>/gc_pin_file_thresh
|
||||||
|
Date: January 2018
|
||||||
|
Contact: Jaegeuk Kim <jaegeuk@kernel.org>
|
||||||
|
Description: This indicates how many GC can be failed for the pinned
|
||||||
|
file. If it exceeds this, F2FS doesn't guarantee its pinning
|
||||||
|
state. 2048 trials is set by default.
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/extension_list
|
What: /sys/fs/f2fs/<disk>/extension_list
|
||||||
Date: Feburary 2018
|
Date: Feburary 2018
|
||||||
Contact: "Chao Yu" <yuchao0@huawei.com>
|
Contact: "Chao Yu" <yuchao0@huawei.com>
|
||||||
Description:
|
Description: Used to control configure extension list:
|
||||||
Used to control configure extension list:
|
- Query: cat /sys/fs/f2fs/<disk>/extension_list
|
||||||
- Query: cat /sys/fs/f2fs/<disk>/extension_list
|
- Add: echo '[h/c]extension' > /sys/fs/f2fs/<disk>/extension_list
|
||||||
- Add: echo '[h/c]extension' > /sys/fs/f2fs/<disk>/extension_list
|
- Del: echo '[h/c]!extension' > /sys/fs/f2fs/<disk>/extension_list
|
||||||
- Del: echo '[h/c]!extension' > /sys/fs/f2fs/<disk>/extension_list
|
- [h] means add/del hot file extension
|
||||||
- [h] means add/del hot file extension
|
- [c] means add/del cold file extension
|
||||||
- [c] means add/del cold file extension
|
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/unusable
|
What: /sys/fs/f2fs/<disk>/unusable
|
||||||
Date April 2019
|
Date April 2019
|
||||||
Contact: "Daniel Rosenberg" <drosen@google.com>
|
Contact: "Daniel Rosenberg" <drosen@google.com>
|
||||||
Description:
|
Description: If checkpoint=disable, it displays the number of blocks that
|
||||||
If checkpoint=disable, it displays the number of blocks that are unusable.
|
are unusable.
|
||||||
If checkpoint=enable it displays the enumber of blocks that would be unusable
|
If checkpoint=enable it displays the enumber of blocks that
|
||||||
if checkpoint=disable were to be set.
|
would be unusable if checkpoint=disable were to be set.
|
||||||
|
|
||||||
What: /sys/fs/f2fs/<disk>/encoding
|
What: /sys/fs/f2fs/<disk>/encoding
|
||||||
Date July 2019
|
Date July 2019
|
||||||
Contact: "Daniel Rosenberg" <drosen@google.com>
|
Contact: "Daniel Rosenberg" <drosen@google.com>
|
||||||
Description:
|
Description: Displays name and version of the encoding set for the filesystem.
|
||||||
Displays name and version of the encoding set for the filesystem.
|
If no encoding is set, displays (none)
|
||||||
If no encoding is set, displays (none)
|
|
||||||
|
What: /sys/fs/f2fs/<disk>/free_segments
|
||||||
|
Date: September 2019
|
||||||
|
Contact: "Hridya Valsaraju" <hridya@google.com>
|
||||||
|
Description: Number of free segments in disk.
|
||||||
|
|
||||||
|
What: /sys/fs/f2fs/<disk>/cp_foreground_calls
|
||||||
|
Date: September 2019
|
||||||
|
Contact: "Hridya Valsaraju" <hridya@google.com>
|
||||||
|
Description: Number of checkpoint operations performed on demand. Available when
|
||||||
|
CONFIG_F2FS_STAT_FS=y.
|
||||||
|
|
||||||
|
What: /sys/fs/f2fs/<disk>/cp_background_calls
|
||||||
|
Date: September 2019
|
||||||
|
Contact: "Hridya Valsaraju" <hridya@google.com>
|
||||||
|
Description: Number of checkpoint operations performed in the background to
|
||||||
|
free segments. Available when CONFIG_F2FS_STAT_FS=y.
|
||||||
|
|
||||||
|
What: /sys/fs/f2fs/<disk>/gc_foreground_calls
|
||||||
|
Date: September 2019
|
||||||
|
Contact: "Hridya Valsaraju" <hridya@google.com>
|
||||||
|
Description: Number of garbage collection operations performed on demand.
|
||||||
|
Available when CONFIG_F2FS_STAT_FS=y.
|
||||||
|
|
||||||
|
What: /sys/fs/f2fs/<disk>/gc_background_calls
|
||||||
|
Date: September 2019
|
||||||
|
Contact: "Hridya Valsaraju" <hridya@google.com>
|
||||||
|
Description: Number of garbage collection operations triggered in background.
|
||||||
|
Available when CONFIG_F2FS_STAT_FS=y.
|
||||||
|
|
||||||
|
What: /sys/fs/f2fs/<disk>/moved_blocks_foreground
|
||||||
|
Date: September 2019
|
||||||
|
Contact: "Hridya Valsaraju" <hridya@google.com>
|
||||||
|
Description: Number of blocks moved by garbage collection in foreground.
|
||||||
|
Available when CONFIG_F2FS_STAT_FS=y.
|
||||||
|
|
||||||
|
What: /sys/fs/f2fs/<disk>/moved_blocks_background
|
||||||
|
Date: September 2019
|
||||||
|
Contact: "Hridya Valsaraju" <hridya@google.com>
|
||||||
|
Description: Number of blocks moved by garbage collection in background.
|
||||||
|
Available when CONFIG_F2FS_STAT_FS=y.
|
||||||
|
|
||||||
|
What: /sys/fs/f2fs/<disk>/avg_vblocks
|
||||||
|
Date: September 2019
|
||||||
|
Contact: "Hridya Valsaraju" <hridya@google.com>
|
||||||
|
Description: Average number of valid blocks.
|
||||||
|
Available when CONFIG_F2FS_STAT_FS=y.
|
||||||
|
|||||||
27
Documentation/ABI/testing/sysfs-kernel-ion
Normal file
27
Documentation/ABI/testing/sysfs-kernel-ion
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
What: /sys/kernel/ion
|
||||||
|
Date: Dec 2019
|
||||||
|
KernelVersion: 4.14.158
|
||||||
|
Contact: Suren Baghdasaryan <surenb@google.com>,
|
||||||
|
Sandeep Patil <sspatil@google.com>
|
||||||
|
Description:
|
||||||
|
The /sys/kernel/ion directory contains a snapshot of the
|
||||||
|
internal state of ION memory heaps and pools.
|
||||||
|
Users: kernel memory tuning tools
|
||||||
|
|
||||||
|
What: /sys/kernel/ion/total_heaps_kb
|
||||||
|
Date: Dec 2019
|
||||||
|
KernelVersion: 4.14.158
|
||||||
|
Contact: Suren Baghdasaryan <surenb@google.com>,
|
||||||
|
Sandeep Patil <sspatil@google.com>
|
||||||
|
Description:
|
||||||
|
The total_heaps_kb file is read-only and specifies how much
|
||||||
|
memory in Kb is allocated to ION heaps.
|
||||||
|
|
||||||
|
What: /sys/kernel/ion/total_pools_kb
|
||||||
|
Date: Dec 2019
|
||||||
|
KernelVersion: 4.14.158
|
||||||
|
Contact: Suren Baghdasaryan <surenb@google.com>,
|
||||||
|
Sandeep Patil <sspatil@google.com>
|
||||||
|
Description:
|
||||||
|
The total_pools_kb file is read-only and specifies how much
|
||||||
|
memory in Kb is allocated to ION pools.
|
||||||
@@ -54,6 +54,9 @@ If you make a mistake with the syntax, the write will fail thus::
|
|||||||
<debugfs>/dynamic_debug/control
|
<debugfs>/dynamic_debug/control
|
||||||
-bash: echo: write error: Invalid argument
|
-bash: echo: write error: Invalid argument
|
||||||
|
|
||||||
|
Note, for systems without 'debugfs' enabled, the control file can be
|
||||||
|
found in ``/proc/dynamic_debug/control``.
|
||||||
|
|
||||||
Viewing Dynamic Debug Behaviour
|
Viewing Dynamic Debug Behaviour
|
||||||
===============================
|
===============================
|
||||||
|
|
||||||
|
|||||||
@@ -12,3 +12,5 @@ are configurable at compile, boot or run time.
|
|||||||
spectre
|
spectre
|
||||||
l1tf
|
l1tf
|
||||||
mds
|
mds
|
||||||
|
tsx_async_abort
|
||||||
|
multihit.rst
|
||||||
|
|||||||
@@ -265,8 +265,11 @@ time with the option "mds=". The valid arguments for this option are:
|
|||||||
|
|
||||||
============ =============================================================
|
============ =============================================================
|
||||||
|
|
||||||
Not specifying this option is equivalent to "mds=full".
|
Not specifying this option is equivalent to "mds=full". For processors
|
||||||
|
that are affected by both TAA (TSX Asynchronous Abort) and MDS,
|
||||||
|
specifying just "mds=off" without an accompanying "tsx_async_abort=off"
|
||||||
|
will have no effect as the same mitigation is used for both
|
||||||
|
vulnerabilities.
|
||||||
|
|
||||||
Mitigation selection guide
|
Mitigation selection guide
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|||||||
163
Documentation/admin-guide/hw-vuln/multihit.rst
Normal file
163
Documentation/admin-guide/hw-vuln/multihit.rst
Normal file
@@ -0,0 +1,163 @@
|
|||||||
|
iTLB multihit
|
||||||
|
=============
|
||||||
|
|
||||||
|
iTLB multihit is an erratum where some processors may incur a machine check
|
||||||
|
error, possibly resulting in an unrecoverable CPU lockup, when an
|
||||||
|
instruction fetch hits multiple entries in the instruction TLB. This can
|
||||||
|
occur when the page size is changed along with either the physical address
|
||||||
|
or cache type. A malicious guest running on a virtualized system can
|
||||||
|
exploit this erratum to perform a denial of service attack.
|
||||||
|
|
||||||
|
|
||||||
|
Affected processors
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
Variations of this erratum are present on most Intel Core and Xeon processor
|
||||||
|
models. The erratum is not present on:
|
||||||
|
|
||||||
|
- non-Intel processors
|
||||||
|
|
||||||
|
- Some Atoms (Airmont, Bonnell, Goldmont, GoldmontPlus, Saltwell, Silvermont)
|
||||||
|
|
||||||
|
- Intel processors that have the PSCHANGE_MC_NO bit set in the
|
||||||
|
IA32_ARCH_CAPABILITIES MSR.
|
||||||
|
|
||||||
|
|
||||||
|
Related CVEs
|
||||||
|
------------
|
||||||
|
|
||||||
|
The following CVE entry is related to this issue:
|
||||||
|
|
||||||
|
============== =================================================
|
||||||
|
CVE-2018-12207 Machine Check Error Avoidance on Page Size Change
|
||||||
|
============== =================================================
|
||||||
|
|
||||||
|
|
||||||
|
Problem
|
||||||
|
-------
|
||||||
|
|
||||||
|
Privileged software, including OS and virtual machine managers (VMM), are in
|
||||||
|
charge of memory management. A key component in memory management is the control
|
||||||
|
of the page tables. Modern processors use virtual memory, a technique that creates
|
||||||
|
the illusion of a very large memory for processors. This virtual space is split
|
||||||
|
into pages of a given size. Page tables translate virtual addresses to physical
|
||||||
|
addresses.
|
||||||
|
|
||||||
|
To reduce latency when performing a virtual to physical address translation,
|
||||||
|
processors include a structure, called TLB, that caches recent translations.
|
||||||
|
There are separate TLBs for instruction (iTLB) and data (dTLB).
|
||||||
|
|
||||||
|
Under this errata, instructions are fetched from a linear address translated
|
||||||
|
using a 4 KB translation cached in the iTLB. Privileged software modifies the
|
||||||
|
paging structure so that the same linear address using large page size (2 MB, 4
|
||||||
|
MB, 1 GB) with a different physical address or memory type. After the page
|
||||||
|
structure modification but before the software invalidates any iTLB entries for
|
||||||
|
the linear address, a code fetch that happens on the same linear address may
|
||||||
|
cause a machine-check error which can result in a system hang or shutdown.
|
||||||
|
|
||||||
|
|
||||||
|
Attack scenarios
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Attacks against the iTLB multihit erratum can be mounted from malicious
|
||||||
|
guests in a virtualized system.
|
||||||
|
|
||||||
|
|
||||||
|
iTLB multihit system information
|
||||||
|
--------------------------------
|
||||||
|
|
||||||
|
The Linux kernel provides a sysfs interface to enumerate the current iTLB
|
||||||
|
multihit status of the system:whether the system is vulnerable and which
|
||||||
|
mitigations are active. The relevant sysfs file is:
|
||||||
|
|
||||||
|
/sys/devices/system/cpu/vulnerabilities/itlb_multihit
|
||||||
|
|
||||||
|
The possible values in this file are:
|
||||||
|
|
||||||
|
.. list-table::
|
||||||
|
|
||||||
|
* - Not affected
|
||||||
|
- The processor is not vulnerable.
|
||||||
|
* - KVM: Mitigation: Split huge pages
|
||||||
|
- Software changes mitigate this issue.
|
||||||
|
* - KVM: Vulnerable
|
||||||
|
- The processor is vulnerable, but no mitigation enabled
|
||||||
|
|
||||||
|
|
||||||
|
Enumeration of the erratum
|
||||||
|
--------------------------------
|
||||||
|
|
||||||
|
A new bit has been allocated in the IA32_ARCH_CAPABILITIES (PSCHANGE_MC_NO) msr
|
||||||
|
and will be set on CPU's which are mitigated against this issue.
|
||||||
|
|
||||||
|
======================================= =========== ===============================
|
||||||
|
IA32_ARCH_CAPABILITIES MSR Not present Possibly vulnerable,check model
|
||||||
|
IA32_ARCH_CAPABILITIES[PSCHANGE_MC_NO] '0' Likely vulnerable,check model
|
||||||
|
IA32_ARCH_CAPABILITIES[PSCHANGE_MC_NO] '1' Not vulnerable
|
||||||
|
======================================= =========== ===============================
|
||||||
|
|
||||||
|
|
||||||
|
Mitigation mechanism
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
This erratum can be mitigated by restricting the use of large page sizes to
|
||||||
|
non-executable pages. This forces all iTLB entries to be 4K, and removes
|
||||||
|
the possibility of multiple hits.
|
||||||
|
|
||||||
|
In order to mitigate the vulnerability, KVM initially marks all huge pages
|
||||||
|
as non-executable. If the guest attempts to execute in one of those pages,
|
||||||
|
the page is broken down into 4K pages, which are then marked executable.
|
||||||
|
|
||||||
|
If EPT is disabled or not available on the host, KVM is in control of TLB
|
||||||
|
flushes and the problematic situation cannot happen. However, the shadow
|
||||||
|
EPT paging mechanism used by nested virtualization is vulnerable, because
|
||||||
|
the nested guest can trigger multiple iTLB hits by modifying its own
|
||||||
|
(non-nested) page tables. For simplicity, KVM will make large pages
|
||||||
|
non-executable in all shadow paging modes.
|
||||||
|
|
||||||
|
Mitigation control on the kernel command line and KVM - module parameter
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
The KVM hypervisor mitigation mechanism for marking huge pages as
|
||||||
|
non-executable can be controlled with a module parameter "nx_huge_pages=".
|
||||||
|
The kernel command line allows to control the iTLB multihit mitigations at
|
||||||
|
boot time with the option "kvm.nx_huge_pages=".
|
||||||
|
|
||||||
|
The valid arguments for these options are:
|
||||||
|
|
||||||
|
========== ================================================================
|
||||||
|
force Mitigation is enabled. In this case, the mitigation implements
|
||||||
|
non-executable huge pages in Linux kernel KVM module. All huge
|
||||||
|
pages in the EPT are marked as non-executable.
|
||||||
|
If a guest attempts to execute in one of those pages, the page is
|
||||||
|
broken down into 4K pages, which are then marked executable.
|
||||||
|
|
||||||
|
off Mitigation is disabled.
|
||||||
|
|
||||||
|
auto Enable mitigation only if the platform is affected and the kernel
|
||||||
|
was not booted with the "mitigations=off" command line parameter.
|
||||||
|
This is the default option.
|
||||||
|
========== ================================================================
|
||||||
|
|
||||||
|
|
||||||
|
Mitigation selection guide
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
1. No virtualization in use
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The system is protected by the kernel unconditionally and no further
|
||||||
|
action is required.
|
||||||
|
|
||||||
|
2. Virtualization with trusted guests
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
If the guest comes from a trusted source, you may assume that the guest will
|
||||||
|
not attempt to maliciously exploit these errata and no further action is
|
||||||
|
required.
|
||||||
|
|
||||||
|
3. Virtualization with untrusted guests
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
If the guest comes from an untrusted source, the guest host kernel will need
|
||||||
|
to apply iTLB multihit mitigation via the kernel command line or kvm
|
||||||
|
module parameter.
|
||||||
279
Documentation/admin-guide/hw-vuln/tsx_async_abort.rst
Normal file
279
Documentation/admin-guide/hw-vuln/tsx_async_abort.rst
Normal file
@@ -0,0 +1,279 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
TAA - TSX Asynchronous Abort
|
||||||
|
======================================
|
||||||
|
|
||||||
|
TAA is a hardware vulnerability that allows unprivileged speculative access to
|
||||||
|
data which is available in various CPU internal buffers by using asynchronous
|
||||||
|
aborts within an Intel TSX transactional region.
|
||||||
|
|
||||||
|
Affected processors
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
This vulnerability only affects Intel processors that support Intel
|
||||||
|
Transactional Synchronization Extensions (TSX) when the TAA_NO bit (bit 8)
|
||||||
|
is 0 in the IA32_ARCH_CAPABILITIES MSR. On processors where the MDS_NO bit
|
||||||
|
(bit 5) is 0 in the IA32_ARCH_CAPABILITIES MSR, the existing MDS mitigations
|
||||||
|
also mitigate against TAA.
|
||||||
|
|
||||||
|
Whether a processor is affected or not can be read out from the TAA
|
||||||
|
vulnerability file in sysfs. See :ref:`tsx_async_abort_sys_info`.
|
||||||
|
|
||||||
|
Related CVEs
|
||||||
|
------------
|
||||||
|
|
||||||
|
The following CVE entry is related to this TAA issue:
|
||||||
|
|
||||||
|
============== ===== ===================================================
|
||||||
|
CVE-2019-11135 TAA TSX Asynchronous Abort (TAA) condition on some
|
||||||
|
microprocessors utilizing speculative execution may
|
||||||
|
allow an authenticated user to potentially enable
|
||||||
|
information disclosure via a side channel with
|
||||||
|
local access.
|
||||||
|
============== ===== ===================================================
|
||||||
|
|
||||||
|
Problem
|
||||||
|
-------
|
||||||
|
|
||||||
|
When performing store, load or L1 refill operations, processors write
|
||||||
|
data into temporary microarchitectural structures (buffers). The data in
|
||||||
|
those buffers can be forwarded to load operations as an optimization.
|
||||||
|
|
||||||
|
Intel TSX is an extension to the x86 instruction set architecture that adds
|
||||||
|
hardware transactional memory support to improve performance of multi-threaded
|
||||||
|
software. TSX lets the processor expose and exploit concurrency hidden in an
|
||||||
|
application due to dynamically avoiding unnecessary synchronization.
|
||||||
|
|
||||||
|
TSX supports atomic memory transactions that are either committed (success) or
|
||||||
|
aborted. During an abort, operations that happened within the transactional region
|
||||||
|
are rolled back. An asynchronous abort takes place, among other options, when a
|
||||||
|
different thread accesses a cache line that is also used within the transactional
|
||||||
|
region when that access might lead to a data race.
|
||||||
|
|
||||||
|
Immediately after an uncompleted asynchronous abort, certain speculatively
|
||||||
|
executed loads may read data from those internal buffers and pass it to dependent
|
||||||
|
operations. This can be then used 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.
|
||||||
|
|
||||||
|
The victim of a malicious actor does not need to make use of TSX. Only the
|
||||||
|
attacker needs to begin a TSX transaction and raise an asynchronous abort
|
||||||
|
which in turn potenitally leaks data stored in the buffers.
|
||||||
|
|
||||||
|
More detailed technical information is available in the TAA specific x86
|
||||||
|
architecture section: :ref:`Documentation/x86/tsx_async_abort.rst <tsx_async_abort>`.
|
||||||
|
|
||||||
|
|
||||||
|
Attack scenarios
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Attacks against the TAA vulnerability can be implemented from unprivileged
|
||||||
|
applications running on hosts or guests.
|
||||||
|
|
||||||
|
As for MDS, the attacker has no control over the memory addresses that can
|
||||||
|
be leaked. Only the victim is responsible for bringing data to the CPU. As
|
||||||
|
a result, the malicious actor has to sample as much data as possible and
|
||||||
|
then postprocess it to try to infer any useful information from it.
|
||||||
|
|
||||||
|
A potential attacker only has read access to the data. Also, there is no direct
|
||||||
|
privilege escalation by using this technique.
|
||||||
|
|
||||||
|
|
||||||
|
.. _tsx_async_abort_sys_info:
|
||||||
|
|
||||||
|
TAA system information
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
The Linux kernel provides a sysfs interface to enumerate the current TAA status
|
||||||
|
of mitigated systems. The relevant sysfs file is:
|
||||||
|
|
||||||
|
/sys/devices/system/cpu/vulnerabilities/tsx_async_abort
|
||||||
|
|
||||||
|
The possible values in this file are:
|
||||||
|
|
||||||
|
.. list-table::
|
||||||
|
|
||||||
|
* - 'Vulnerable'
|
||||||
|
- The CPU is affected by this vulnerability and the microcode and kernel mitigation are not applied.
|
||||||
|
* - 'Vulnerable: Clear CPU buffers attempted, no microcode'
|
||||||
|
- The system tries to clear the buffers but the microcode might not support the operation.
|
||||||
|
* - 'Mitigation: Clear CPU buffers'
|
||||||
|
- The microcode has been updated to clear the buffers. TSX is still enabled.
|
||||||
|
* - 'Mitigation: TSX disabled'
|
||||||
|
- TSX is disabled.
|
||||||
|
* - 'Not affected'
|
||||||
|
- The CPU is not affected by this issue.
|
||||||
|
|
||||||
|
.. _ucode_needed:
|
||||||
|
|
||||||
|
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 tsx_async_abort 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:`taa_mitigation_control_command_line`.
|
||||||
|
|
||||||
|
.. _virt_mechanism:
|
||||||
|
|
||||||
|
Virtualization mitigation
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Affected systems where the host has TAA microcode and TAA is mitigated by
|
||||||
|
having disabled TSX previously, are not vulnerable regardless of the status
|
||||||
|
of the VMs.
|
||||||
|
|
||||||
|
In all other cases, if the host either does not have the TAA microcode or
|
||||||
|
the kernel is not mitigated, the system might be vulnerable.
|
||||||
|
|
||||||
|
|
||||||
|
.. _taa_mitigation_control_command_line:
|
||||||
|
|
||||||
|
Mitigation control on the kernel command line
|
||||||
|
---------------------------------------------
|
||||||
|
|
||||||
|
The kernel command line allows to control the TAA mitigations at boot time with
|
||||||
|
the option "tsx_async_abort=". The valid arguments for this option are:
|
||||||
|
|
||||||
|
============ =============================================================
|
||||||
|
off This option disables the TAA mitigation on affected platforms.
|
||||||
|
If the system has TSX enabled (see next parameter) and the CPU
|
||||||
|
is affected, the system is vulnerable.
|
||||||
|
|
||||||
|
full TAA mitigation is enabled. If TSX is enabled, on an affected
|
||||||
|
system it will clear CPU buffers on ring transitions. On
|
||||||
|
systems which are MDS-affected and deploy MDS mitigation,
|
||||||
|
TAA is also mitigated. Specifying this option on those
|
||||||
|
systems will have no effect.
|
||||||
|
|
||||||
|
full,nosmt The same as tsx_async_abort=full, with SMT disabled on
|
||||||
|
vulnerable CPUs that have TSX enabled. This is the complete
|
||||||
|
mitigation. When TSX is disabled, SMT is not disabled because
|
||||||
|
CPU is not vulnerable to cross-thread TAA attacks.
|
||||||
|
============ =============================================================
|
||||||
|
|
||||||
|
Not specifying this option is equivalent to "tsx_async_abort=full". For
|
||||||
|
processors that are affected by both TAA and MDS, specifying just
|
||||||
|
"tsx_async_abort=off" without an accompanying "mds=off" will have no
|
||||||
|
effect as the same mitigation is used for both vulnerabilities.
|
||||||
|
|
||||||
|
The kernel command line also allows to control the TSX feature using the
|
||||||
|
parameter "tsx=" on CPUs which support TSX control. MSR_IA32_TSX_CTRL is used
|
||||||
|
to control the TSX feature and the enumeration of the TSX feature bits (RTM
|
||||||
|
and HLE) in CPUID.
|
||||||
|
|
||||||
|
The valid options are:
|
||||||
|
|
||||||
|
============ =============================================================
|
||||||
|
off Disables TSX on the system.
|
||||||
|
|
||||||
|
Note that this option takes effect only on newer CPUs which are
|
||||||
|
not vulnerable to MDS, i.e., have MSR_IA32_ARCH_CAPABILITIES.MDS_NO=1
|
||||||
|
and which get the new IA32_TSX_CTRL MSR through a microcode
|
||||||
|
update. This new MSR allows for the reliable deactivation of
|
||||||
|
the TSX functionality.
|
||||||
|
|
||||||
|
on Enables TSX.
|
||||||
|
|
||||||
|
Although there are mitigations for all known security
|
||||||
|
vulnerabilities, TSX has been known to be an accelerator for
|
||||||
|
several previous speculation-related CVEs, and so there may be
|
||||||
|
unknown security risks associated with leaving it enabled.
|
||||||
|
|
||||||
|
auto Disables TSX if X86_BUG_TAA is present, otherwise enables TSX
|
||||||
|
on the system.
|
||||||
|
============ =============================================================
|
||||||
|
|
||||||
|
Not specifying this option is equivalent to "tsx=off".
|
||||||
|
|
||||||
|
The following combinations of the "tsx_async_abort" and "tsx" are possible. For
|
||||||
|
affected platforms tsx=auto is equivalent to tsx=off and the result will be:
|
||||||
|
|
||||||
|
========= ========================== =========================================
|
||||||
|
tsx=on tsx_async_abort=full The system will use VERW to clear CPU
|
||||||
|
buffers. Cross-thread attacks are still
|
||||||
|
possible on SMT machines.
|
||||||
|
tsx=on tsx_async_abort=full,nosmt As above, cross-thread attacks on SMT
|
||||||
|
mitigated.
|
||||||
|
tsx=on tsx_async_abort=off The system is vulnerable.
|
||||||
|
tsx=off tsx_async_abort=full TSX might be disabled if microcode
|
||||||
|
provides a TSX control MSR. If so,
|
||||||
|
system is not vulnerable.
|
||||||
|
tsx=off tsx_async_abort=full,nosmt Ditto
|
||||||
|
tsx=off tsx_async_abort=off ditto
|
||||||
|
========= ========================== =========================================
|
||||||
|
|
||||||
|
|
||||||
|
For unaffected platforms "tsx=on" and "tsx_async_abort=full" does not clear CPU
|
||||||
|
buffers. For platforms without TSX control (MSR_IA32_ARCH_CAPABILITIES.MDS_NO=0)
|
||||||
|
"tsx" command line argument has no effect.
|
||||||
|
|
||||||
|
For the affected platforms below table indicates the mitigation status for the
|
||||||
|
combinations of CPUID bit MD_CLEAR and IA32_ARCH_CAPABILITIES MSR bits MDS_NO
|
||||||
|
and TSX_CTRL_MSR.
|
||||||
|
|
||||||
|
======= ========= ============= ========================================
|
||||||
|
MDS_NO MD_CLEAR TSX_CTRL_MSR Status
|
||||||
|
======= ========= ============= ========================================
|
||||||
|
0 0 0 Vulnerable (needs microcode)
|
||||||
|
0 1 0 MDS and TAA mitigated via VERW
|
||||||
|
1 1 0 MDS fixed, TAA vulnerable if TSX enabled
|
||||||
|
because MD_CLEAR has no meaning and
|
||||||
|
VERW is not guaranteed to clear buffers
|
||||||
|
1 X 1 MDS fixed, TAA can be mitigated by
|
||||||
|
VERW or TSX_CTRL_MSR
|
||||||
|
======= ========= ============= ========================================
|
||||||
|
|
||||||
|
Mitigation selection guide
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
1. Trusted userspace and guests
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
If all user space applications are from a trusted source and do not execute
|
||||||
|
untrusted code which is supplied externally, then the mitigation can be
|
||||||
|
disabled. The same applies to virtualized environments with trusted guests.
|
||||||
|
|
||||||
|
|
||||||
|
2. Untrusted userspace and guests
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
If there are untrusted applications or guests on the system, enabling TSX
|
||||||
|
might allow a malicious actor to leak data from the host or from other
|
||||||
|
processes running on the same physical core.
|
||||||
|
|
||||||
|
If the microcode is available and the TSX is disabled on the host, attacks
|
||||||
|
are prevented in a virtualized environment as well, even if the VMs do not
|
||||||
|
explicitly enable the mitigation.
|
||||||
|
|
||||||
|
|
||||||
|
.. _taa_default_mitigations:
|
||||||
|
|
||||||
|
Default mitigations
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
The kernel's default action for vulnerable processors is:
|
||||||
|
|
||||||
|
- Deploy TSX disable mitigation (tsx_async_abort=full tsx=off).
|
||||||
@@ -137,6 +137,10 @@
|
|||||||
dynamic table installation which will install SSDT
|
dynamic table installation which will install SSDT
|
||||||
tables to /sys/firmware/acpi/tables/dynamic.
|
tables to /sys/firmware/acpi/tables/dynamic.
|
||||||
|
|
||||||
|
acpi_no_watchdog [HW,ACPI,WDT]
|
||||||
|
Ignore the ACPI-based watchdog interface (WDAT) and let
|
||||||
|
a native driver control the watchdog device instead.
|
||||||
|
|
||||||
acpi_rsdp= [ACPI,EFI,KEXEC]
|
acpi_rsdp= [ACPI,EFI,KEXEC]
|
||||||
Pass the RSDP address to the kernel, mostly used
|
Pass the RSDP address to the kernel, mostly used
|
||||||
on machines running EFI runtime service to boot the
|
on machines running EFI runtime service to boot the
|
||||||
@@ -1854,6 +1858,12 @@
|
|||||||
Built with CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y,
|
Built with CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y,
|
||||||
the default is off.
|
the default is off.
|
||||||
|
|
||||||
|
kpti= [ARM64] Control page table isolation of user
|
||||||
|
and kernel address spaces.
|
||||||
|
Default: enabled on cores which need mitigation.
|
||||||
|
0: force disabled
|
||||||
|
1: force enabled
|
||||||
|
|
||||||
kvm.ignore_msrs=[KVM] Ignore guest accesses to unhandled MSRs.
|
kvm.ignore_msrs=[KVM] Ignore guest accesses to unhandled MSRs.
|
||||||
Default is 0 (don't ignore, but inject #GP)
|
Default is 0 (don't ignore, but inject #GP)
|
||||||
|
|
||||||
@@ -1861,6 +1871,25 @@
|
|||||||
KVM MMU at runtime.
|
KVM MMU at runtime.
|
||||||
Default is 0 (off)
|
Default is 0 (off)
|
||||||
|
|
||||||
|
kvm.nx_huge_pages=
|
||||||
|
[KVM] Controls the software workaround for the
|
||||||
|
X86_BUG_ITLB_MULTIHIT bug.
|
||||||
|
force : Always deploy workaround.
|
||||||
|
off : Never deploy workaround.
|
||||||
|
auto : Deploy workaround based on the presence of
|
||||||
|
X86_BUG_ITLB_MULTIHIT.
|
||||||
|
|
||||||
|
Default is 'auto'.
|
||||||
|
|
||||||
|
If the software workaround is enabled for the host,
|
||||||
|
guests do need not to enable it for nested guests.
|
||||||
|
|
||||||
|
kvm.nx_huge_pages_recovery_ratio=
|
||||||
|
[KVM] Controls how many 4KiB pages are periodically zapped
|
||||||
|
back to huge pages. 0 disables the recovery, otherwise if
|
||||||
|
the value is N KVM will zap 1/Nth of the 4KiB pages every
|
||||||
|
minute. The default is 60.
|
||||||
|
|
||||||
kvm-amd.nested= [KVM,AMD] Allow nested virtualization in KVM/SVM.
|
kvm-amd.nested= [KVM,AMD] Allow nested virtualization in KVM/SVM.
|
||||||
Default is 1 (enabled)
|
Default is 1 (enabled)
|
||||||
|
|
||||||
@@ -2223,6 +2252,38 @@
|
|||||||
Format: <first>,<last>
|
Format: <first>,<last>
|
||||||
Specifies range of consoles to be captured by the MDA.
|
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
|
||||||
|
|
||||||
|
On TAA-affected machines, mds=off can be prevented by
|
||||||
|
an active TAA mitigation as both vulnerabilities are
|
||||||
|
mitigated with the same mechanism so in order to disable
|
||||||
|
this mitigation, you need to specify tsx_async_abort=off
|
||||||
|
too.
|
||||||
|
|
||||||
|
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
|
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
|
Amount of memory to be used when the kernel is not able
|
||||||
to see the whole system memory or for test.
|
to see the whole system memory or for test.
|
||||||
@@ -2372,8 +2433,8 @@
|
|||||||
http://repo.or.cz/w/linux-2.6/mini2440.git
|
http://repo.or.cz/w/linux-2.6/mini2440.git
|
||||||
|
|
||||||
mitigations=
|
mitigations=
|
||||||
[X86,PPC,S390] Control optional mitigations for CPU
|
[X86,PPC,S390,ARM64] Control optional mitigations for
|
||||||
vulnerabilities. This is a set of curated,
|
CPU vulnerabilities. This is a set of curated,
|
||||||
arch-independent options, each of which is an
|
arch-independent options, each of which is an
|
||||||
aggregation of existing arch-specific options.
|
aggregation of existing arch-specific options.
|
||||||
|
|
||||||
@@ -2382,14 +2443,23 @@
|
|||||||
improves system performance, but it may also
|
improves system performance, but it may also
|
||||||
expose users to several CPU vulnerabilities.
|
expose users to several CPU vulnerabilities.
|
||||||
Equivalent to: nopti [X86,PPC]
|
Equivalent to: nopti [X86,PPC]
|
||||||
|
kpti=0 [ARM64]
|
||||||
nospectre_v1 [PPC]
|
nospectre_v1 [PPC]
|
||||||
nobp=0 [S390]
|
nobp=0 [S390]
|
||||||
nospectre_v1 [X86]
|
nospectre_v1 [X86]
|
||||||
nospectre_v2 [X86,PPC,S390]
|
nospectre_v2 [X86,PPC,S390,ARM64]
|
||||||
spectre_v2_user=off [X86]
|
spectre_v2_user=off [X86]
|
||||||
spec_store_bypass_disable=off [X86,PPC]
|
spec_store_bypass_disable=off [X86,PPC]
|
||||||
|
ssbd=force-off [ARM64]
|
||||||
l1tf=off [X86]
|
l1tf=off [X86]
|
||||||
mds=off [X86]
|
mds=off [X86]
|
||||||
|
tsx_async_abort=off [X86]
|
||||||
|
kvm.nx_huge_pages=off [X86]
|
||||||
|
|
||||||
|
Exceptions:
|
||||||
|
This does not have any effect on
|
||||||
|
kvm.nx_huge_pages when
|
||||||
|
kvm.nx_huge_pages=force.
|
||||||
|
|
||||||
auto (default)
|
auto (default)
|
||||||
Mitigate all CPU vulnerabilities, but leave SMT
|
Mitigate all CPU vulnerabilities, but leave SMT
|
||||||
@@ -2405,6 +2475,7 @@
|
|||||||
be fully mitigated, even if it means losing SMT.
|
be fully mitigated, even if it means losing SMT.
|
||||||
Equivalent to: l1tf=flush,nosmt [X86]
|
Equivalent to: l1tf=flush,nosmt [X86]
|
||||||
mds=full,nosmt [X86]
|
mds=full,nosmt [X86]
|
||||||
|
tsx_async_abort=full,nosmt [X86]
|
||||||
|
|
||||||
mminit_loglevel=
|
mminit_loglevel=
|
||||||
[KNL] When CONFIG_DEBUG_MEMORY_INIT is set, this
|
[KNL] When CONFIG_DEBUG_MEMORY_INIT is set, this
|
||||||
@@ -2728,10 +2799,10 @@
|
|||||||
(bounds check bypass). With this option data leaks
|
(bounds check bypass). With this option data leaks
|
||||||
are possible in the system.
|
are possible in the system.
|
||||||
|
|
||||||
nospectre_v2 [X86,PPC_FSL_BOOK3E] Disable all mitigations for the Spectre variant 2
|
nospectre_v2 [X86,PPC_FSL_BOOK3E,ARM64] Disable all mitigations for
|
||||||
(indirect branch prediction) vulnerability. System may
|
the Spectre variant 2 (indirect branch prediction)
|
||||||
allow data leaks with this option, which is equivalent
|
vulnerability. System may allow data leaks with this
|
||||||
to spectre_v2=off.
|
option.
|
||||||
|
|
||||||
nospec_store_bypass_disable
|
nospec_store_bypass_disable
|
||||||
[HW] Disable all mitigations for the Speculative Store Bypass vulnerability
|
[HW] Disable all mitigations for the Speculative Store Bypass vulnerability
|
||||||
@@ -4490,6 +4561,76 @@
|
|||||||
platforms where RDTSC is slow and this accounting
|
platforms where RDTSC is slow and this accounting
|
||||||
can add overhead.
|
can add overhead.
|
||||||
|
|
||||||
|
tsx= [X86] Control Transactional Synchronization
|
||||||
|
Extensions (TSX) feature in Intel processors that
|
||||||
|
support TSX control.
|
||||||
|
|
||||||
|
This parameter controls the TSX feature. The options are:
|
||||||
|
|
||||||
|
on - Enable TSX on the system. Although there are
|
||||||
|
mitigations for all known security vulnerabilities,
|
||||||
|
TSX has been known to be an accelerator for
|
||||||
|
several previous speculation-related CVEs, and
|
||||||
|
so there may be unknown security risks associated
|
||||||
|
with leaving it enabled.
|
||||||
|
|
||||||
|
off - Disable TSX on the system. (Note that this
|
||||||
|
option takes effect only on newer CPUs which are
|
||||||
|
not vulnerable to MDS, i.e., have
|
||||||
|
MSR_IA32_ARCH_CAPABILITIES.MDS_NO=1 and which get
|
||||||
|
the new IA32_TSX_CTRL MSR through a microcode
|
||||||
|
update. This new MSR allows for the reliable
|
||||||
|
deactivation of the TSX functionality.)
|
||||||
|
|
||||||
|
auto - Disable TSX if X86_BUG_TAA is present,
|
||||||
|
otherwise enable TSX on the system.
|
||||||
|
|
||||||
|
Not specifying this option is equivalent to tsx=off.
|
||||||
|
|
||||||
|
See Documentation/admin-guide/hw-vuln/tsx_async_abort.rst
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
tsx_async_abort= [X86,INTEL] Control mitigation for the TSX Async
|
||||||
|
Abort (TAA) vulnerability.
|
||||||
|
|
||||||
|
Similar to Micro-architectural Data Sampling (MDS)
|
||||||
|
certain CPUs that support Transactional
|
||||||
|
Synchronization Extensions (TSX) 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 TAA mitigation. The
|
||||||
|
options are:
|
||||||
|
|
||||||
|
full - Enable TAA mitigation on vulnerable CPUs
|
||||||
|
if TSX is enabled.
|
||||||
|
|
||||||
|
full,nosmt - Enable TAA mitigation and disable SMT on
|
||||||
|
vulnerable CPUs. If TSX is disabled, SMT
|
||||||
|
is not disabled because CPU is not
|
||||||
|
vulnerable to cross-thread TAA attacks.
|
||||||
|
off - Unconditionally disable TAA mitigation
|
||||||
|
|
||||||
|
On MDS-affected machines, tsx_async_abort=off can be
|
||||||
|
prevented by an active MDS mitigation as both vulnerabilities
|
||||||
|
are mitigated with the same mechanism so in order to disable
|
||||||
|
this mitigation, you need to specify mds=off too.
|
||||||
|
|
||||||
|
Not specifying this option is equivalent to
|
||||||
|
tsx_async_abort=full. On CPUs which are MDS affected
|
||||||
|
and deploy MDS mitigation, TAA mitigation is not
|
||||||
|
required and doesn't provide any additional
|
||||||
|
mitigation.
|
||||||
|
|
||||||
|
For details see:
|
||||||
|
Documentation/admin-guide/hw-vuln/tsx_async_abort.rst
|
||||||
|
|
||||||
turbografx.map[2|3]= [HW,JOY]
|
turbografx.map[2|3]= [HW,JOY]
|
||||||
TurboGraFX parallel port interface
|
TurboGraFX parallel port interface
|
||||||
Format:
|
Format:
|
||||||
@@ -4575,13 +4716,13 @@
|
|||||||
Flags is a set of characters, each corresponding
|
Flags is a set of characters, each corresponding
|
||||||
to a common usb-storage quirk flag as follows:
|
to a common usb-storage quirk flag as follows:
|
||||||
a = SANE_SENSE (collect more than 18 bytes
|
a = SANE_SENSE (collect more than 18 bytes
|
||||||
of sense data);
|
of sense data, not on uas);
|
||||||
b = BAD_SENSE (don't collect more than 18
|
b = BAD_SENSE (don't collect more than 18
|
||||||
bytes of sense data);
|
bytes of sense data, not on uas);
|
||||||
c = FIX_CAPACITY (decrease the reported
|
c = FIX_CAPACITY (decrease the reported
|
||||||
device capacity by one sector);
|
device capacity by one sector);
|
||||||
d = NO_READ_DISC_INFO (don't use
|
d = NO_READ_DISC_INFO (don't use
|
||||||
READ_DISC_INFO command);
|
READ_DISC_INFO command, not on uas);
|
||||||
e = NO_READ_CAPACITY_16 (don't use
|
e = NO_READ_CAPACITY_16 (don't use
|
||||||
READ_CAPACITY_16 command);
|
READ_CAPACITY_16 command);
|
||||||
f = NO_REPORT_OPCODES (don't use report opcodes
|
f = NO_REPORT_OPCODES (don't use report opcodes
|
||||||
@@ -4596,17 +4737,18 @@
|
|||||||
j = NO_REPORT_LUNS (don't use report luns
|
j = NO_REPORT_LUNS (don't use report luns
|
||||||
command, uas only);
|
command, uas only);
|
||||||
l = NOT_LOCKABLE (don't try to lock and
|
l = NOT_LOCKABLE (don't try to lock and
|
||||||
unlock ejectable media);
|
unlock ejectable media, not on uas);
|
||||||
m = MAX_SECTORS_64 (don't transfer more
|
m = MAX_SECTORS_64 (don't transfer more
|
||||||
than 64 sectors = 32 KB at a time);
|
than 64 sectors = 32 KB at a time,
|
||||||
|
not on uas);
|
||||||
n = INITIAL_READ10 (force a retry of the
|
n = INITIAL_READ10 (force a retry of the
|
||||||
initial READ(10) command);
|
initial READ(10) command, not on uas);
|
||||||
o = CAPACITY_OK (accept the capacity
|
o = CAPACITY_OK (accept the capacity
|
||||||
reported by the device);
|
reported by the device, not on uas);
|
||||||
p = WRITE_CACHE (the device cache is ON
|
p = WRITE_CACHE (the device cache is ON
|
||||||
by default);
|
by default, not on uas);
|
||||||
r = IGNORE_RESIDUE (the device reports
|
r = IGNORE_RESIDUE (the device reports
|
||||||
bogus residue values);
|
bogus residue values, not on uas);
|
||||||
s = SINGLE_LUN (the device has only one
|
s = SINGLE_LUN (the device has only one
|
||||||
Logical Unit);
|
Logical Unit);
|
||||||
t = NO_ATA_1X (don't allow ATA(12) and ATA(16)
|
t = NO_ATA_1X (don't allow ATA(12) and ATA(16)
|
||||||
@@ -4615,7 +4757,8 @@
|
|||||||
w = NO_WP_DETECT (don't test whether the
|
w = NO_WP_DETECT (don't test whether the
|
||||||
medium is write-protected).
|
medium is write-protected).
|
||||||
y = ALWAYS_SYNC (issue a SYNCHRONIZE_CACHE
|
y = ALWAYS_SYNC (issue a SYNCHRONIZE_CACHE
|
||||||
even if the device claims no cache)
|
even if the device claims no cache,
|
||||||
|
not on uas)
|
||||||
Example: quirks=0419:aaf5:rl,0421:0433:rc
|
Example: quirks=0419:aaf5:rl,0421:0433:rc
|
||||||
|
|
||||||
user_debug= [KNL,ARM]
|
user_debug= [KNL,ARM]
|
||||||
@@ -4860,6 +5003,10 @@
|
|||||||
the unplug protocol
|
the unplug protocol
|
||||||
never -- do not unplug even if version check succeeds
|
never -- do not unplug even if version check succeeds
|
||||||
|
|
||||||
|
xen_legacy_crash [X86,XEN]
|
||||||
|
Crash from Xen panic notifier, without executing late
|
||||||
|
panic() code such as dumping handler.
|
||||||
|
|
||||||
xen_nopvspin [X86,XEN]
|
xen_nopvspin [X86,XEN]
|
||||||
Disables the ticketlock slowpath using Xen PV
|
Disables the ticketlock slowpath using Xen PV
|
||||||
optimizations.
|
optimizations.
|
||||||
|
|||||||
@@ -111,6 +111,9 @@ infrastructure:
|
|||||||
| Name | bits | visible |
|
| Name | bits | visible |
|
||||||
|--------------------------------------------------|
|
|--------------------------------------------------|
|
||||||
| RES0 | [63-48] | n |
|
| RES0 | [63-48] | n |
|
||||||
|
| TS | [55-52] | y |
|
||||||
|
|--------------------------------------------------|
|
||||||
|
| FHM | [51-48] | y |
|
||||||
|--------------------------------------------------|
|
|--------------------------------------------------|
|
||||||
| DP | [47-44] | y |
|
| DP | [47-44] | y |
|
||||||
|--------------------------------------------------|
|
|--------------------------------------------------|
|
||||||
@@ -133,8 +136,6 @@ infrastructure:
|
|||||||
| SHA1 | [11-8] | y |
|
| SHA1 | [11-8] | y |
|
||||||
|--------------------------------------------------|
|
|--------------------------------------------------|
|
||||||
| AES | [7-4] | y |
|
| AES | [7-4] | y |
|
||||||
|--------------------------------------------------|
|
|
||||||
| RES0 | [3-0] | n |
|
|
||||||
x--------------------------------------------------x
|
x--------------------------------------------------x
|
||||||
|
|
||||||
|
|
||||||
@@ -142,7 +143,9 @@ infrastructure:
|
|||||||
x--------------------------------------------------x
|
x--------------------------------------------------x
|
||||||
| Name | bits | visible |
|
| Name | bits | visible |
|
||||||
|--------------------------------------------------|
|
|--------------------------------------------------|
|
||||||
| RES0 | [63-28] | n |
|
| DIT | [51-48] | y |
|
||||||
|
|--------------------------------------------------|
|
||||||
|
| SVE | [35-32] | y |
|
||||||
|--------------------------------------------------|
|
|--------------------------------------------------|
|
||||||
| GIC | [27-24] | n |
|
| GIC | [27-24] | n |
|
||||||
|--------------------------------------------------|
|
|--------------------------------------------------|
|
||||||
@@ -193,6 +196,14 @@ infrastructure:
|
|||||||
| DPB | [3-0] | y |
|
| DPB | [3-0] | y |
|
||||||
x--------------------------------------------------x
|
x--------------------------------------------------x
|
||||||
|
|
||||||
|
5) ID_AA64MMFR2_EL1 - Memory model feature register 2
|
||||||
|
|
||||||
|
x--------------------------------------------------x
|
||||||
|
| Name | bits | visible |
|
||||||
|
|--------------------------------------------------|
|
||||||
|
| AT | [35-32] | y |
|
||||||
|
x--------------------------------------------------x
|
||||||
|
|
||||||
Appendix I: Example
|
Appendix I: Example
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
|
|||||||
@@ -44,8 +44,15 @@ The AArch64 Tagged Address ABI has two stages of relaxation depending
|
|||||||
how the user addresses are used by the kernel:
|
how the user addresses are used by the kernel:
|
||||||
|
|
||||||
1. User addresses not accessed by the kernel but used for address space
|
1. User addresses not accessed by the kernel but used for address space
|
||||||
management (e.g. ``mmap()``, ``mprotect()``, ``madvise()``). The use
|
management (e.g. ``mprotect()``, ``madvise()``). The use of valid
|
||||||
of valid tagged pointers in this context is always allowed.
|
tagged pointers in this context is allowed with the exception of
|
||||||
|
``brk()``, ``mmap()`` and the ``new_address`` argument to
|
||||||
|
``mremap()`` as these have the potential to alias with existing
|
||||||
|
user addresses.
|
||||||
|
|
||||||
|
NOTE: This behaviour changed in v5.6 and so some earlier kernels may
|
||||||
|
incorrectly accept valid tagged pointers for the ``brk()``,
|
||||||
|
``mmap()`` and ``mremap()`` system calls.
|
||||||
|
|
||||||
2. User addresses accessed by the kernel (e.g. ``write()``). This ABI
|
2. User addresses accessed by the kernel (e.g. ``write()``). This ABI
|
||||||
relaxation is disabled by default and the application thread needs to
|
relaxation is disabled by default and the application thread needs to
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ data-integrity.txt
|
|||||||
- Block data integrity
|
- Block data integrity
|
||||||
deadline-iosched.txt
|
deadline-iosched.txt
|
||||||
- Deadline IO scheduler tunables
|
- Deadline IO scheduler tunables
|
||||||
|
inline-encryption.rst
|
||||||
|
- Blk-crypto internals and inline encryption
|
||||||
ioprio.txt
|
ioprio.txt
|
||||||
- Block io priorities (in CFQ scheduler)
|
- Block io priorities (in CFQ scheduler)
|
||||||
pr.txt
|
pr.txt
|
||||||
|
|||||||
26
Documentation/block/index.rst
Normal file
26
Documentation/block/index.rst
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
=====
|
||||||
|
Block
|
||||||
|
=====
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
|
||||||
|
bfq-iosched
|
||||||
|
biodoc
|
||||||
|
biovecs
|
||||||
|
capability
|
||||||
|
cmdline-partition
|
||||||
|
data-integrity
|
||||||
|
deadline-iosched
|
||||||
|
inline-encryption
|
||||||
|
ioprio
|
||||||
|
kyber-iosched
|
||||||
|
null_blk
|
||||||
|
pr
|
||||||
|
queue-sysfs
|
||||||
|
request
|
||||||
|
stat
|
||||||
|
switching-sched
|
||||||
|
writeback_cache_control
|
||||||
183
Documentation/block/inline-encryption.rst
Normal file
183
Documentation/block/inline-encryption.rst
Normal file
@@ -0,0 +1,183 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
=================
|
||||||
|
Inline Encryption
|
||||||
|
=================
|
||||||
|
|
||||||
|
Objective
|
||||||
|
=========
|
||||||
|
|
||||||
|
We want to support inline encryption (IE) in the kernel.
|
||||||
|
To allow for testing, we also want a crypto API fallback when actual
|
||||||
|
IE hardware is absent. We also want IE to work with layered devices
|
||||||
|
like dm and loopback (i.e. we want to be able to use the IE hardware
|
||||||
|
of the underlying devices if present, or else fall back to crypto API
|
||||||
|
en/decryption).
|
||||||
|
|
||||||
|
|
||||||
|
Constraints and notes
|
||||||
|
=====================
|
||||||
|
|
||||||
|
- IE hardware have a limited number of "keyslots" that can be programmed
|
||||||
|
with an encryption context (key, algorithm, data unit size, etc.) at any time.
|
||||||
|
One can specify a keyslot in a data request made to the device, and the
|
||||||
|
device will en/decrypt the data using the encryption context programmed into
|
||||||
|
that specified keyslot. When possible, we want to make multiple requests with
|
||||||
|
the same encryption context share the same keyslot.
|
||||||
|
|
||||||
|
- We need a way for filesystems to specify an encryption context to use for
|
||||||
|
en/decrypting a struct bio, and a device driver (like UFS) needs to be able
|
||||||
|
to use that encryption context when it processes the bio.
|
||||||
|
|
||||||
|
- We need a way for device drivers to expose their capabilities in a unified
|
||||||
|
way to the upper layers.
|
||||||
|
|
||||||
|
|
||||||
|
Design
|
||||||
|
======
|
||||||
|
|
||||||
|
We add a struct bio_crypt_ctx to struct bio that can represent an
|
||||||
|
encryption context, because we need to be able to pass this encryption
|
||||||
|
context from the FS layer to the device driver to act upon.
|
||||||
|
|
||||||
|
While IE hardware works on the notion of keyslots, the FS layer has no
|
||||||
|
knowledge of keyslots - it simply wants to specify an encryption context to
|
||||||
|
use while en/decrypting a bio.
|
||||||
|
|
||||||
|
We introduce a keyslot manager (KSM) that handles the translation from
|
||||||
|
encryption contexts specified by the FS to keyslots on the IE hardware.
|
||||||
|
This KSM also serves as the way IE hardware can expose their capabilities to
|
||||||
|
upper layers. The generic mode of operation is: each device driver that wants
|
||||||
|
to support IE will construct a KSM and set it up in its struct request_queue.
|
||||||
|
Upper layers that want to use IE on this device can then use this KSM in
|
||||||
|
the device's struct request_queue to translate an encryption context into
|
||||||
|
a keyslot. The presence of the KSM in the request queue shall be used to mean
|
||||||
|
that the device supports IE.
|
||||||
|
|
||||||
|
On the device driver end of the interface, the device driver needs to tell the
|
||||||
|
KSM how to actually manipulate the IE hardware in the device to do things like
|
||||||
|
programming the crypto key into the IE hardware into a particular keyslot. All
|
||||||
|
this is achieved through the :c:type:`struct keyslot_mgmt_ll_ops` that the
|
||||||
|
device driver passes to the KSM when creating it.
|
||||||
|
|
||||||
|
It uses refcounts to track which keyslots are idle (either they have no
|
||||||
|
encryption context programmed, or there are no in-flight struct bios
|
||||||
|
referencing that keyslot). When a new encryption context needs a keyslot, it
|
||||||
|
tries to find a keyslot that has already been programmed with the same
|
||||||
|
encryption context, and if there is no such keyslot, it evicts the least
|
||||||
|
recently used idle keyslot and programs the new encryption context into that
|
||||||
|
one. If no idle keyslots are available, then the caller will sleep until there
|
||||||
|
is at least one.
|
||||||
|
|
||||||
|
|
||||||
|
Blk-crypto
|
||||||
|
==========
|
||||||
|
|
||||||
|
The above is sufficient for simple cases, but does not work if there is a
|
||||||
|
need for a crypto API fallback, or if we are want to use IE with layered
|
||||||
|
devices. To these ends, we introduce blk-crypto. Blk-crypto allows us to
|
||||||
|
present a unified view of encryption to the FS (so FS only needs to specify
|
||||||
|
an encryption context and not worry about keyslots at all), and blk-crypto
|
||||||
|
can decide whether to delegate the en/decryption to IE hardware or to the
|
||||||
|
crypto API. Blk-crypto maintains an internal KSM that serves as the crypto
|
||||||
|
API fallback.
|
||||||
|
|
||||||
|
Blk-crypto needs to ensure that the encryption context is programmed into the
|
||||||
|
"correct" keyslot manager for IE. If a bio is submitted to a layered device
|
||||||
|
that eventually passes the bio down to a device that really does support IE, we
|
||||||
|
want the encryption context to be programmed into a keyslot for the KSM of the
|
||||||
|
device with IE support. However, blk-crypto does not know a priori whether a
|
||||||
|
particular device is the final device in the layering structure for a bio or
|
||||||
|
not. So in the case that a particular device does not support IE, since it is
|
||||||
|
possibly the final destination device for the bio, if the bio requires
|
||||||
|
encryption (i.e. the bio is doing a write operation), blk-crypto must fallback
|
||||||
|
to the crypto API *before* sending the bio to the device.
|
||||||
|
|
||||||
|
Blk-crypto ensures that:
|
||||||
|
|
||||||
|
- The bio's encryption context is programmed into a keyslot in the KSM of the
|
||||||
|
request queue that the bio is being submitted to (or the crypto API fallback
|
||||||
|
KSM if the request queue doesn't have a KSM), and that the ``bc_ksm``
|
||||||
|
in the ``bi_crypt_context`` is set to this KSM
|
||||||
|
|
||||||
|
- That the bio has its own individual reference to the keyslot in this KSM.
|
||||||
|
Once the bio passes through blk-crypto, its encryption context is programmed
|
||||||
|
in some KSM. The "its own individual reference to the keyslot" ensures that
|
||||||
|
keyslots can be released by each bio independently of other bios while
|
||||||
|
ensuring that the bio has a valid reference to the keyslot when, for e.g., the
|
||||||
|
crypto API fallback KSM in blk-crypto performs crypto on the device's behalf.
|
||||||
|
The individual references are ensured by increasing the refcount for the
|
||||||
|
keyslot in the ``bc_ksm`` when a bio with a programmed encryption
|
||||||
|
context is cloned.
|
||||||
|
|
||||||
|
|
||||||
|
What blk-crypto does on bio submission
|
||||||
|
--------------------------------------
|
||||||
|
|
||||||
|
**Case 1:** blk-crypto is given a bio with only an encryption context that hasn't
|
||||||
|
been programmed into any keyslot in any KSM (for e.g. a bio from the FS).
|
||||||
|
In this case, blk-crypto will program the encryption context into the KSM of the
|
||||||
|
request queue the bio is being submitted to (and if this KSM does not exist,
|
||||||
|
then it will program it into blk-crypto's internal KSM for crypto API
|
||||||
|
fallback). The KSM that this encryption context was programmed into is stored
|
||||||
|
as the ``bc_ksm`` in the bio's ``bi_crypt_context``.
|
||||||
|
|
||||||
|
**Case 2:** blk-crypto is given a bio whose encryption context has already been
|
||||||
|
programmed into a keyslot in the *crypto API fallback* KSM.
|
||||||
|
In this case, blk-crypto does nothing; it treats the bio as not having
|
||||||
|
specified an encryption context. Note that we cannot do here what we will do
|
||||||
|
in Case 3 because we would have already encrypted the bio via the crypto API
|
||||||
|
by this point.
|
||||||
|
|
||||||
|
**Case 3:** blk-crypto is given a bio whose encryption context has already been
|
||||||
|
programmed into a keyslot in some KSM (that is *not* the crypto API fallback
|
||||||
|
KSM).
|
||||||
|
In this case, blk-crypto first releases that keyslot from that KSM and then
|
||||||
|
treats the bio as in Case 1.
|
||||||
|
|
||||||
|
This way, when a device driver is processing a bio, it can be sure that
|
||||||
|
the bio's encryption context has been programmed into some KSM (either the
|
||||||
|
device driver's request queue's KSM, or blk-crypto's crypto API fallback KSM).
|
||||||
|
It then simply needs to check if the bio's ``bc_ksm`` is the device's
|
||||||
|
request queue's KSM. If so, then it should proceed with IE. If not, it should
|
||||||
|
simply do nothing with respect to crypto, because some other KSM (perhaps the
|
||||||
|
blk-crypto crypto API fallback KSM) is handling the en/decryption.
|
||||||
|
|
||||||
|
Blk-crypto will release the keyslot that is being held by the bio (and also
|
||||||
|
decrypt it if the bio is using the crypto API fallback KSM) once
|
||||||
|
``bio_remaining_done`` returns true for the bio.
|
||||||
|
|
||||||
|
|
||||||
|
Layered Devices
|
||||||
|
===============
|
||||||
|
|
||||||
|
Layered devices that wish to support IE need to create their own keyslot
|
||||||
|
manager for their request queue, and expose whatever functionality they choose.
|
||||||
|
When a layered device wants to pass a bio to another layer (either by
|
||||||
|
resubmitting the same bio, or by submitting a clone), it doesn't need to do
|
||||||
|
anything special because the bio (or the clone) will once again pass through
|
||||||
|
blk-crypto, which will work as described in Case 3. If a layered device wants
|
||||||
|
for some reason to do the IO by itself instead of passing it on to a child
|
||||||
|
device, but it also chose to expose IE capabilities by setting up a KSM in its
|
||||||
|
request queue, it is then responsible for en/decrypting the data itself. In
|
||||||
|
such cases, the device can choose to call the blk-crypto function
|
||||||
|
``blk_crypto_fallback_to_kernel_crypto_api`` (TODO: Not yet implemented), which will
|
||||||
|
cause the en/decryption to be done via the crypto API fallback.
|
||||||
|
|
||||||
|
|
||||||
|
Future Optimizations for layered devices
|
||||||
|
========================================
|
||||||
|
|
||||||
|
Creating a keyslot manager for the layered device uses up memory for each
|
||||||
|
keyslot, and in general, a layered device (like dm-linear) merely passes the
|
||||||
|
request on to a "child" device, so the keyslots in the layered device itself
|
||||||
|
might be completely unused. We can instead define a new type of KSM; the
|
||||||
|
"passthrough KSM", that layered devices can use to let blk-crypto know that
|
||||||
|
this layered device *will* pass the bio to some child device (and hence
|
||||||
|
through blk-crypto again, at which point blk-crypto can program the encryption
|
||||||
|
context, instead of programming it into the layered device's KSM). Again, if
|
||||||
|
the device "lies" and decides to do the IO itself instead of passing it on to
|
||||||
|
a child device, it is responsible for doing the en/decryption (and can choose
|
||||||
|
to call ``blk_crypto_fallback_to_kernel_crypto_api``). Another use case for the
|
||||||
|
"passthrough KSM" is for IE devices that want to manage their own keyslots/do
|
||||||
|
not have a limited number of keyslots.
|
||||||
@@ -12,19 +12,31 @@ To achieve this goal it does not collect coverage in soft/hard interrupts
|
|||||||
and instrumentation of some inherently non-deterministic parts of kernel is
|
and instrumentation of some inherently non-deterministic parts of kernel is
|
||||||
disabled (e.g. scheduler, locking).
|
disabled (e.g. scheduler, locking).
|
||||||
|
|
||||||
Usage
|
kcov is also able to collect comparison operands from the instrumented code
|
||||||
-----
|
(this feature currently requires that the kernel is compiled with clang).
|
||||||
|
|
||||||
|
Prerequisites
|
||||||
|
-------------
|
||||||
|
|
||||||
Configure the kernel with::
|
Configure the kernel with::
|
||||||
|
|
||||||
CONFIG_KCOV=y
|
CONFIG_KCOV=y
|
||||||
|
|
||||||
CONFIG_KCOV requires gcc built on revision 231296 or later.
|
CONFIG_KCOV requires gcc built on revision 231296 or later.
|
||||||
|
|
||||||
|
If the comparison operands need to be collected, set::
|
||||||
|
|
||||||
|
CONFIG_KCOV_ENABLE_COMPARISONS=y
|
||||||
|
|
||||||
Profiling data will only become accessible once debugfs has been mounted::
|
Profiling data will only become accessible once debugfs has been mounted::
|
||||||
|
|
||||||
mount -t debugfs none /sys/kernel/debug
|
mount -t debugfs none /sys/kernel/debug
|
||||||
|
|
||||||
The following program demonstrates kcov usage from within a test program:
|
Coverage collection
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
The following program demonstrates coverage collection from within a test
|
||||||
|
program using kcov:
|
||||||
|
|
||||||
.. code-block:: c
|
.. code-block:: c
|
||||||
|
|
||||||
@@ -44,6 +56,9 @@ The following program demonstrates kcov usage from within a test program:
|
|||||||
#define KCOV_DISABLE _IO('c', 101)
|
#define KCOV_DISABLE _IO('c', 101)
|
||||||
#define COVER_SIZE (64<<10)
|
#define COVER_SIZE (64<<10)
|
||||||
|
|
||||||
|
#define KCOV_TRACE_PC 0
|
||||||
|
#define KCOV_TRACE_CMP 1
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
@@ -64,7 +79,7 @@ The following program demonstrates kcov usage from within a test program:
|
|||||||
if ((void*)cover == MAP_FAILED)
|
if ((void*)cover == MAP_FAILED)
|
||||||
perror("mmap"), exit(1);
|
perror("mmap"), exit(1);
|
||||||
/* Enable coverage collection on the current thread. */
|
/* Enable coverage collection on the current thread. */
|
||||||
if (ioctl(fd, KCOV_ENABLE, 0))
|
if (ioctl(fd, KCOV_ENABLE, KCOV_TRACE_PC))
|
||||||
perror("ioctl"), exit(1);
|
perror("ioctl"), exit(1);
|
||||||
/* Reset coverage from the tail of the ioctl() call. */
|
/* Reset coverage from the tail of the ioctl() call. */
|
||||||
__atomic_store_n(&cover[0], 0, __ATOMIC_RELAXED);
|
__atomic_store_n(&cover[0], 0, __ATOMIC_RELAXED);
|
||||||
@@ -111,3 +126,208 @@ The interface is fine-grained to allow efficient forking of test processes.
|
|||||||
That is, a parent process opens /sys/kernel/debug/kcov, enables trace mode,
|
That is, a parent process opens /sys/kernel/debug/kcov, enables trace mode,
|
||||||
mmaps coverage buffer and then forks child processes in a loop. Child processes
|
mmaps coverage buffer and then forks child processes in a loop. Child processes
|
||||||
only need to enable coverage (disable happens automatically on thread end).
|
only need to enable coverage (disable happens automatically on thread end).
|
||||||
|
|
||||||
|
Comparison operands collection
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
Comparison operands collection is similar to coverage collection:
|
||||||
|
|
||||||
|
.. code-block:: c
|
||||||
|
|
||||||
|
/* Same includes and defines as above. */
|
||||||
|
|
||||||
|
/* Number of 64-bit words per record. */
|
||||||
|
#define KCOV_WORDS_PER_CMP 4
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The format for the types of collected comparisons.
|
||||||
|
*
|
||||||
|
* Bit 0 shows whether one of the arguments is a compile-time constant.
|
||||||
|
* Bits 1 & 2 contain log2 of the argument size, up to 8 bytes.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define KCOV_CMP_CONST (1 << 0)
|
||||||
|
#define KCOV_CMP_SIZE(n) ((n) << 1)
|
||||||
|
#define KCOV_CMP_MASK KCOV_CMP_SIZE(3)
|
||||||
|
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
int fd;
|
||||||
|
uint64_t *cover, type, arg1, arg2, is_const, size;
|
||||||
|
unsigned long n, i;
|
||||||
|
|
||||||
|
fd = open("/sys/kernel/debug/kcov", O_RDWR);
|
||||||
|
if (fd == -1)
|
||||||
|
perror("open"), exit(1);
|
||||||
|
if (ioctl(fd, KCOV_INIT_TRACE, COVER_SIZE))
|
||||||
|
perror("ioctl"), exit(1);
|
||||||
|
/*
|
||||||
|
* Note that the buffer pointer is of type uint64_t*, because all
|
||||||
|
* the comparison operands are promoted to uint64_t.
|
||||||
|
*/
|
||||||
|
cover = (uint64_t *)mmap(NULL, COVER_SIZE * sizeof(unsigned long),
|
||||||
|
PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
|
||||||
|
if ((void*)cover == MAP_FAILED)
|
||||||
|
perror("mmap"), exit(1);
|
||||||
|
/* Note KCOV_TRACE_CMP instead of KCOV_TRACE_PC. */
|
||||||
|
if (ioctl(fd, KCOV_ENABLE, KCOV_TRACE_CMP))
|
||||||
|
perror("ioctl"), exit(1);
|
||||||
|
__atomic_store_n(&cover[0], 0, __ATOMIC_RELAXED);
|
||||||
|
read(-1, NULL, 0);
|
||||||
|
/* Read number of comparisons collected. */
|
||||||
|
n = __atomic_load_n(&cover[0], __ATOMIC_RELAXED);
|
||||||
|
for (i = 0; i < n; i++) {
|
||||||
|
type = cover[i * KCOV_WORDS_PER_CMP + 1];
|
||||||
|
/* arg1 and arg2 - operands of the comparison. */
|
||||||
|
arg1 = cover[i * KCOV_WORDS_PER_CMP + 2];
|
||||||
|
arg2 = cover[i * KCOV_WORDS_PER_CMP + 3];
|
||||||
|
/* ip - caller address. */
|
||||||
|
ip = cover[i * KCOV_WORDS_PER_CMP + 4];
|
||||||
|
/* size of the operands. */
|
||||||
|
size = 1 << ((type & KCOV_CMP_MASK) >> 1);
|
||||||
|
/* is_const - true if either operand is a compile-time constant.*/
|
||||||
|
is_const = type & KCOV_CMP_CONST;
|
||||||
|
printf("ip: 0x%lx type: 0x%lx, arg1: 0x%lx, arg2: 0x%lx, "
|
||||||
|
"size: %lu, %s\n",
|
||||||
|
ip, type, arg1, arg2, size,
|
||||||
|
is_const ? "const" : "non-const");
|
||||||
|
}
|
||||||
|
if (ioctl(fd, KCOV_DISABLE, 0))
|
||||||
|
perror("ioctl"), exit(1);
|
||||||
|
/* Free resources. */
|
||||||
|
if (munmap(cover, COVER_SIZE * sizeof(unsigned long)))
|
||||||
|
perror("munmap"), exit(1);
|
||||||
|
if (close(fd))
|
||||||
|
perror("close"), exit(1);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
Note that the kcov modes (coverage collection or comparison operands) are
|
||||||
|
mutually exclusive.
|
||||||
|
|
||||||
|
Remote coverage collection
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
With KCOV_ENABLE coverage is collected only for syscalls that are issued
|
||||||
|
from the current process. With KCOV_REMOTE_ENABLE it's possible to collect
|
||||||
|
coverage for arbitrary parts of the kernel code, provided that those parts
|
||||||
|
are annotated with kcov_remote_start()/kcov_remote_stop().
|
||||||
|
|
||||||
|
This allows to collect coverage from two types of kernel background
|
||||||
|
threads: the global ones, that are spawned during kernel boot in a limited
|
||||||
|
number of instances (e.g. one USB hub_event() worker thread is spawned per
|
||||||
|
USB HCD); and the local ones, that are spawned when a user interacts with
|
||||||
|
some kernel interface (e.g. vhost workers).
|
||||||
|
|
||||||
|
To enable collecting coverage from a global background thread, a unique
|
||||||
|
global handle must be assigned and passed to the corresponding
|
||||||
|
kcov_remote_start() call. Then a userspace process can pass a list of such
|
||||||
|
handles to the KCOV_REMOTE_ENABLE ioctl in the handles array field of the
|
||||||
|
kcov_remote_arg struct. This will attach the used kcov device to the code
|
||||||
|
sections, that are referenced by those handles.
|
||||||
|
|
||||||
|
Since there might be many local background threads spawned from different
|
||||||
|
userspace processes, we can't use a single global handle per annotation.
|
||||||
|
Instead, the userspace process passes a non-zero handle through the
|
||||||
|
common_handle field of the kcov_remote_arg struct. This common handle gets
|
||||||
|
saved to the kcov_handle field in the current task_struct and needs to be
|
||||||
|
passed to the newly spawned threads via custom annotations. Those threads
|
||||||
|
should in turn be annotated with kcov_remote_start()/kcov_remote_stop().
|
||||||
|
|
||||||
|
Internally kcov stores handles as u64 integers. The top byte of a handle
|
||||||
|
is used to denote the id of a subsystem that this handle belongs to, and
|
||||||
|
the lower 4 bytes are used to denote the id of a thread instance within
|
||||||
|
that subsystem. A reserved value 0 is used as a subsystem id for common
|
||||||
|
handles as they don't belong to a particular subsystem. The bytes 4-7 are
|
||||||
|
currently reserved and must be zero. In the future the number of bytes
|
||||||
|
used for the subsystem or handle ids might be increased.
|
||||||
|
|
||||||
|
When a particular userspace proccess collects coverage by via a common
|
||||||
|
handle, kcov will collect coverage for each code section that is annotated
|
||||||
|
to use the common handle obtained as kcov_handle from the current
|
||||||
|
task_struct. However non common handles allow to collect coverage
|
||||||
|
selectively from different subsystems.
|
||||||
|
|
||||||
|
.. code-block:: c
|
||||||
|
|
||||||
|
struct kcov_remote_arg {
|
||||||
|
__u32 trace_mode;
|
||||||
|
__u32 area_size;
|
||||||
|
__u32 num_handles;
|
||||||
|
__aligned_u64 common_handle;
|
||||||
|
__aligned_u64 handles[0];
|
||||||
|
};
|
||||||
|
|
||||||
|
#define KCOV_INIT_TRACE _IOR('c', 1, unsigned long)
|
||||||
|
#define KCOV_DISABLE _IO('c', 101)
|
||||||
|
#define KCOV_REMOTE_ENABLE _IOW('c', 102, struct kcov_remote_arg)
|
||||||
|
|
||||||
|
#define COVER_SIZE (64 << 10)
|
||||||
|
|
||||||
|
#define KCOV_TRACE_PC 0
|
||||||
|
|
||||||
|
#define KCOV_SUBSYSTEM_COMMON (0x00ull << 56)
|
||||||
|
#define KCOV_SUBSYSTEM_USB (0x01ull << 56)
|
||||||
|
|
||||||
|
#define KCOV_SUBSYSTEM_MASK (0xffull << 56)
|
||||||
|
#define KCOV_INSTANCE_MASK (0xffffffffull)
|
||||||
|
|
||||||
|
static inline __u64 kcov_remote_handle(__u64 subsys, __u64 inst)
|
||||||
|
{
|
||||||
|
if (subsys & ~KCOV_SUBSYSTEM_MASK || inst & ~KCOV_INSTANCE_MASK)
|
||||||
|
return 0;
|
||||||
|
return subsys | inst;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define KCOV_COMMON_ID 0x42
|
||||||
|
#define KCOV_USB_BUS_NUM 1
|
||||||
|
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
int fd;
|
||||||
|
unsigned long *cover, n, i;
|
||||||
|
struct kcov_remote_arg *arg;
|
||||||
|
|
||||||
|
fd = open("/sys/kernel/debug/kcov", O_RDWR);
|
||||||
|
if (fd == -1)
|
||||||
|
perror("open"), exit(1);
|
||||||
|
if (ioctl(fd, KCOV_INIT_TRACE, COVER_SIZE))
|
||||||
|
perror("ioctl"), exit(1);
|
||||||
|
cover = (unsigned long*)mmap(NULL, COVER_SIZE * sizeof(unsigned long),
|
||||||
|
PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
|
||||||
|
if ((void*)cover == MAP_FAILED)
|
||||||
|
perror("mmap"), exit(1);
|
||||||
|
|
||||||
|
/* Enable coverage collection via common handle and from USB bus #1. */
|
||||||
|
arg = calloc(1, sizeof(*arg) + sizeof(uint64_t));
|
||||||
|
if (!arg)
|
||||||
|
perror("calloc"), exit(1);
|
||||||
|
arg->trace_mode = KCOV_TRACE_PC;
|
||||||
|
arg->area_size = COVER_SIZE;
|
||||||
|
arg->num_handles = 1;
|
||||||
|
arg->common_handle = kcov_remote_handle(KCOV_SUBSYSTEM_COMMON,
|
||||||
|
KCOV_COMMON_ID);
|
||||||
|
arg->handles[0] = kcov_remote_handle(KCOV_SUBSYSTEM_USB,
|
||||||
|
KCOV_USB_BUS_NUM);
|
||||||
|
if (ioctl(fd, KCOV_REMOTE_ENABLE, arg))
|
||||||
|
perror("ioctl"), free(arg), exit(1);
|
||||||
|
free(arg);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Here the user needs to trigger execution of a kernel code section
|
||||||
|
* that is either annotated with the common handle, or to trigger some
|
||||||
|
* activity on USB bus #1.
|
||||||
|
*/
|
||||||
|
sleep(2);
|
||||||
|
|
||||||
|
n = __atomic_load_n(&cover[0], __ATOMIC_RELAXED);
|
||||||
|
for (i = 0; i < n; i++)
|
||||||
|
printf("0x%lx\n", cover[i + 1]);
|
||||||
|
if (ioctl(fd, KCOV_DISABLE, 0))
|
||||||
|
perror("ioctl"), exit(1);
|
||||||
|
if (munmap(cover, COVER_SIZE * sizeof(unsigned long)))
|
||||||
|
perror("munmap"), exit(1);
|
||||||
|
if (close(fd))
|
||||||
|
perror("close"), exit(1);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|||||||
@@ -73,6 +73,15 @@ its hardware characteristcs.
|
|||||||
|
|
||||||
* port or ports: same as above.
|
* port or ports: same as above.
|
||||||
|
|
||||||
|
* Optional properties for all components:
|
||||||
|
|
||||||
|
* arm,coresight-loses-context-with-cpu : boolean. Indicates that the
|
||||||
|
hardware will lose register context on CPU power down (e.g. CPUIdle).
|
||||||
|
An example of where this may be needed are systems which contain a
|
||||||
|
coresight component and CPU in the same power domain. When the CPU
|
||||||
|
powers down the coresight component also powers down and loses its
|
||||||
|
context. This property is currently only used for the ETM 4.x driver.
|
||||||
|
|
||||||
* Optional properties for ETM/PTMs:
|
* Optional properties for ETM/PTMs:
|
||||||
|
|
||||||
* arm,cp14: must be present if the system accesses ETM/PTM management
|
* arm,cp14: must be present if the system accesses ETM/PTM management
|
||||||
@@ -84,8 +93,11 @@ its hardware characteristcs.
|
|||||||
* Optional property for TMC:
|
* Optional property for TMC:
|
||||||
|
|
||||||
* arm,buffer-size: size of contiguous buffer space for TMC ETR
|
* arm,buffer-size: size of contiguous buffer space for TMC ETR
|
||||||
(embedded trace router)
|
(embedded trace router). This property is obsolete. The buffer size
|
||||||
|
can be configured dynamically via buffer_size property in sysfs.
|
||||||
|
|
||||||
|
* arm,scatter-gather: boolean. Indicates that the TMC-ETR can safely
|
||||||
|
use the SG mode on this system.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ Required properties:
|
|||||||
Example (R-Car H3):
|
Example (R-Car H3):
|
||||||
|
|
||||||
usb2_clksel: clock-controller@e6590630 {
|
usb2_clksel: clock-controller@e6590630 {
|
||||||
compatible = "renesas,r8a77950-rcar-usb2-clock-sel",
|
compatible = "renesas,r8a7795-rcar-usb2-clock-sel",
|
||||||
"renesas,rcar-gen3-usb2-clock-sel";
|
"renesas,rcar-gen3-usb2-clock-sel";
|
||||||
reg = <0 0xe6590630 0 0x02>;
|
reg = <0 0xe6590630 0 0x02>;
|
||||||
clocks = <&cpg CPG_MOD 703>, <&usb_extal>, <&usb_xtal>;
|
clocks = <&cpg CPG_MOD 703>, <&usb_extal>, <&usb_xtal>;
|
||||||
|
|||||||
36
Documentation/devicetree/bindings/gnss/gnss.txt
Normal file
36
Documentation/devicetree/bindings/gnss/gnss.txt
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
GNSS Receiver DT binding
|
||||||
|
|
||||||
|
This documents the binding structure and common properties for GNSS receiver
|
||||||
|
devices.
|
||||||
|
|
||||||
|
A GNSS receiver node is a node named "gnss" and typically resides on a serial
|
||||||
|
bus (e.g. UART, I2C or SPI).
|
||||||
|
|
||||||
|
Please refer to the following documents for generic properties:
|
||||||
|
|
||||||
|
Documentation/devicetree/bindings/serial/slave-device.txt
|
||||||
|
Documentation/devicetree/bindings/spi/spi-bus.txt
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
|
||||||
|
- compatible : A string reflecting the vendor and specific device the node
|
||||||
|
represents
|
||||||
|
|
||||||
|
Optional properties:
|
||||||
|
- enable-gpios : GPIO used to enable the device
|
||||||
|
- timepulse-gpios : Time pulse GPIO
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
serial@1234 {
|
||||||
|
compatible = "ns16550a";
|
||||||
|
|
||||||
|
gnss {
|
||||||
|
compatible = "u-blox,neo-8";
|
||||||
|
|
||||||
|
vcc-supply = <&gnss_reg>;
|
||||||
|
timepulse-gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
|
||||||
|
|
||||||
|
current-speed = <4800>;
|
||||||
|
};
|
||||||
|
};
|
||||||
@@ -73,7 +73,7 @@ Example:
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
port@10 {
|
port@a {
|
||||||
reg = <10>;
|
reg = <10>;
|
||||||
|
|
||||||
adv7482_txa: endpoint {
|
adv7482_txa: endpoint {
|
||||||
@@ -83,7 +83,7 @@ Example:
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
port@11 {
|
port@b {
|
||||||
reg = <11>;
|
reg = <11>;
|
||||||
|
|
||||||
adv7482_txb: endpoint {
|
adv7482_txb: endpoint {
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ Optional properties:
|
|||||||
- interrupt-names: must be "mdio_done_error" when there is a share interrupt fed
|
- interrupt-names: must be "mdio_done_error" when there is a share interrupt fed
|
||||||
to this hardware block, or must be "mdio_done" for the first interrupt and
|
to this hardware block, or must be "mdio_done" for the first interrupt and
|
||||||
"mdio_error" for the second when there are separate interrupts
|
"mdio_error" for the second when there are separate interrupts
|
||||||
|
- clocks: A reference to the clock supplying the MDIO bus controller
|
||||||
|
- clock-frequency: the MDIO bus clock that must be output by the MDIO bus
|
||||||
|
hardware, if absent, the default hardware values are used
|
||||||
|
|
||||||
Child nodes of this MDIO bus controller node are standard Ethernet PHY device
|
Child nodes of this MDIO bus controller node are standard Ethernet PHY device
|
||||||
nodes as described in Documentation/devicetree/bindings/net/phy.txt
|
nodes as described in Documentation/devicetree/bindings/net/phy.txt
|
||||||
|
|||||||
@@ -27,4 +27,4 @@ and valid to enable charging:
|
|||||||
|
|
||||||
- "abracon,tc-diode": should be "standard" (0.6V) or "schottky" (0.3V)
|
- "abracon,tc-diode": should be "standard" (0.6V) or "schottky" (0.3V)
|
||||||
- "abracon,tc-resistor": should be <0>, <3>, <6> or <11>. 0 disables the output
|
- "abracon,tc-resistor": should be <0>, <3>, <6> or <11>. 0 disables the output
|
||||||
resistor, the other values are in ohm.
|
resistor, the other values are in kOhm.
|
||||||
|
|||||||
@@ -47,6 +47,8 @@ Optional properties:
|
|||||||
from P0 to P1/P2/P3 without delay.
|
from P0 to P1/P2/P3 without delay.
|
||||||
- snps,dis-tx-ipgap-linecheck-quirk: when set, disable u2mac linestate check
|
- snps,dis-tx-ipgap-linecheck-quirk: when set, disable u2mac linestate check
|
||||||
during HS transmit.
|
during HS transmit.
|
||||||
|
- snps,dis_metastability_quirk: when set, disable metastability workaround.
|
||||||
|
CAUTION: use only if you are absolutely sure of it.
|
||||||
- snps,is-utmi-l1-suspend: true when DWC3 asserts output signal
|
- snps,is-utmi-l1-suspend: true when DWC3 asserts output signal
|
||||||
utmi_l1_suspend_n, false when asserts utmi_sleep_n
|
utmi_l1_suspend_n, false when asserts utmi_sleep_n
|
||||||
- snps,hird-threshold: HIRD threshold
|
- snps,hird-threshold: HIRD threshold
|
||||||
|
|||||||
@@ -235,6 +235,17 @@ checkpoint=%s[:%u[%]] Set to "disable" to turn off checkpointing. Set to "en
|
|||||||
hide up to all remaining free space. The actual space that
|
hide up to all remaining free space. The actual space that
|
||||||
would be unusable can be viewed at /sys/fs/f2fs/<disk>/unusable
|
would be unusable can be viewed at /sys/fs/f2fs/<disk>/unusable
|
||||||
This space is reclaimed once checkpoint=enable.
|
This space is reclaimed once checkpoint=enable.
|
||||||
|
compress_algorithm=%s Control compress algorithm, currently f2fs supports "lzo"
|
||||||
|
and "lz4" algorithm.
|
||||||
|
compress_log_size=%u Support configuring compress cluster size, the size will
|
||||||
|
be 4KB * (1 << %u), 16KB is minimum size, also it's
|
||||||
|
default size.
|
||||||
|
compress_extension=%s Support adding specified extension, so that f2fs can enable
|
||||||
|
compression on those corresponding files, e.g. if all files
|
||||||
|
with '.ext' has high compression rate, we can set the '.ext'
|
||||||
|
on compression extension list and enable compression on
|
||||||
|
these file by default rather than to enable it via ioctl.
|
||||||
|
For other files, we can still enable compression via ioctl.
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
DEBUGFS ENTRIES
|
DEBUGFS ENTRIES
|
||||||
@@ -259,167 +270,6 @@ The files in each per-device directory are shown in table below.
|
|||||||
|
|
||||||
Files in /sys/fs/f2fs/<devname>
|
Files in /sys/fs/f2fs/<devname>
|
||||||
(see also Documentation/ABI/testing/sysfs-fs-f2fs)
|
(see also Documentation/ABI/testing/sysfs-fs-f2fs)
|
||||||
..............................................................................
|
|
||||||
File Content
|
|
||||||
|
|
||||||
gc_urgent_sleep_time This parameter controls sleep time for gc_urgent.
|
|
||||||
500 ms is set by default. See above gc_urgent.
|
|
||||||
|
|
||||||
gc_min_sleep_time This tuning parameter controls the minimum sleep
|
|
||||||
time for the garbage collection thread. Time is
|
|
||||||
in milliseconds.
|
|
||||||
|
|
||||||
gc_max_sleep_time This tuning parameter controls the maximum sleep
|
|
||||||
time for the garbage collection thread. Time is
|
|
||||||
in milliseconds.
|
|
||||||
|
|
||||||
gc_no_gc_sleep_time This tuning parameter controls the default sleep
|
|
||||||
time for the garbage collection thread. Time is
|
|
||||||
in milliseconds.
|
|
||||||
|
|
||||||
gc_idle This parameter controls the selection of victim
|
|
||||||
policy for garbage collection. Setting gc_idle = 0
|
|
||||||
(default) will disable this option. Setting
|
|
||||||
gc_idle = 1 will select the Cost Benefit approach
|
|
||||||
& setting gc_idle = 2 will select the greedy approach.
|
|
||||||
|
|
||||||
gc_urgent This parameter controls triggering background GCs
|
|
||||||
urgently or not. Setting gc_urgent = 0 [default]
|
|
||||||
makes back to default behavior, while if it is set
|
|
||||||
to 1, background thread starts to do GC by given
|
|
||||||
gc_urgent_sleep_time interval.
|
|
||||||
|
|
||||||
reclaim_segments This parameter controls the number of prefree
|
|
||||||
segments to be reclaimed. If the number of prefree
|
|
||||||
segments is larger than the number of segments
|
|
||||||
in the proportion to the percentage over total
|
|
||||||
volume size, f2fs tries to conduct checkpoint to
|
|
||||||
reclaim the prefree segments to free segments.
|
|
||||||
By default, 5% over total # of segments.
|
|
||||||
|
|
||||||
max_small_discards This parameter controls the number of discard
|
|
||||||
commands that consist small blocks less than 2MB.
|
|
||||||
The candidates to be discarded are cached until
|
|
||||||
checkpoint is triggered, and issued during the
|
|
||||||
checkpoint. By default, it is disabled with 0.
|
|
||||||
|
|
||||||
discard_granularity This parameter controls the granularity of discard
|
|
||||||
command size. It will issue discard commands iif
|
|
||||||
the size is larger than given granularity. Its
|
|
||||||
unit size is 4KB, and 4 (=16KB) is set by default.
|
|
||||||
The maximum value is 128 (=512KB).
|
|
||||||
|
|
||||||
reserved_blocks This parameter indicates the number of blocks that
|
|
||||||
f2fs reserves internally for root.
|
|
||||||
|
|
||||||
batched_trim_sections This parameter controls the number of sections
|
|
||||||
to be trimmed out in batch mode when FITRIM
|
|
||||||
conducts. 32 sections is set by default.
|
|
||||||
|
|
||||||
ipu_policy This parameter controls the policy of in-place
|
|
||||||
updates in f2fs. There are five policies:
|
|
||||||
0x01: F2FS_IPU_FORCE, 0x02: F2FS_IPU_SSR,
|
|
||||||
0x04: F2FS_IPU_UTIL, 0x08: F2FS_IPU_SSR_UTIL,
|
|
||||||
0x10: F2FS_IPU_FSYNC.
|
|
||||||
|
|
||||||
min_ipu_util This parameter controls the threshold to trigger
|
|
||||||
in-place-updates. The number indicates percentage
|
|
||||||
of the filesystem utilization, and used by
|
|
||||||
F2FS_IPU_UTIL and F2FS_IPU_SSR_UTIL policies.
|
|
||||||
|
|
||||||
min_fsync_blocks This parameter controls the threshold to trigger
|
|
||||||
in-place-updates when F2FS_IPU_FSYNC mode is set.
|
|
||||||
The number indicates the number of dirty pages
|
|
||||||
when fsync needs to flush on its call path. If
|
|
||||||
the number is less than this value, it triggers
|
|
||||||
in-place-updates.
|
|
||||||
|
|
||||||
min_seq_blocks This parameter controls the threshold to serialize
|
|
||||||
write IOs issued by multiple threads in parallel.
|
|
||||||
|
|
||||||
min_hot_blocks This parameter controls the threshold to allocate
|
|
||||||
a hot data log for pending data blocks to write.
|
|
||||||
|
|
||||||
min_ssr_sections This parameter adds the threshold when deciding
|
|
||||||
SSR block allocation. If this is large, SSR mode
|
|
||||||
will be enabled early.
|
|
||||||
|
|
||||||
ram_thresh This parameter controls the memory footprint used
|
|
||||||
by free nids and cached nat entries. By default,
|
|
||||||
10 is set, which indicates 10 MB / 1 GB RAM.
|
|
||||||
|
|
||||||
ra_nid_pages When building free nids, F2FS reads NAT blocks
|
|
||||||
ahead for speed up. Default is 0.
|
|
||||||
|
|
||||||
dirty_nats_ratio Given dirty ratio of cached nat entries, F2FS
|
|
||||||
determines flushing them in background.
|
|
||||||
|
|
||||||
max_victim_search This parameter controls the number of trials to
|
|
||||||
find a victim segment when conducting SSR and
|
|
||||||
cleaning operations. The default value is 4096
|
|
||||||
which covers 8GB block address range.
|
|
||||||
|
|
||||||
migration_granularity For large-sized sections, F2FS can stop GC given
|
|
||||||
this granularity instead of reclaiming entire
|
|
||||||
section.
|
|
||||||
|
|
||||||
dir_level This parameter controls the directory level to
|
|
||||||
support large directory. If a directory has a
|
|
||||||
number of files, it can reduce the file lookup
|
|
||||||
latency by increasing this dir_level value.
|
|
||||||
Otherwise, it needs to decrease this value to
|
|
||||||
reduce the space overhead. The default value is 0.
|
|
||||||
|
|
||||||
cp_interval F2FS tries to do checkpoint periodically, 60 secs
|
|
||||||
by default.
|
|
||||||
|
|
||||||
idle_interval F2FS detects system is idle, if there's no F2FS
|
|
||||||
operations during given interval, 5 secs by
|
|
||||||
default.
|
|
||||||
|
|
||||||
discard_idle_interval F2FS detects the discard thread is idle, given
|
|
||||||
time interval. Default is 5 secs.
|
|
||||||
|
|
||||||
gc_idle_interval F2FS detects the GC thread is idle, given time
|
|
||||||
interval. Default is 5 secs.
|
|
||||||
|
|
||||||
umount_discard_timeout When unmounting the disk, F2FS waits for finishing
|
|
||||||
queued discard commands which can take huge time.
|
|
||||||
This gives time out for it, 5 secs by default.
|
|
||||||
|
|
||||||
iostat_enable This controls to enable/disable iostat in F2FS.
|
|
||||||
|
|
||||||
readdir_ra This enables/disabled readahead of inode blocks
|
|
||||||
in readdir, and default is enabled.
|
|
||||||
|
|
||||||
gc_pin_file_thresh This indicates how many GC can be failed for the
|
|
||||||
pinned file. If it exceeds this, F2FS doesn't
|
|
||||||
guarantee its pinning state. 2048 trials is set
|
|
||||||
by default.
|
|
||||||
|
|
||||||
extension_list This enables to change extension_list for hot/cold
|
|
||||||
files in runtime.
|
|
||||||
|
|
||||||
inject_rate This controls injection rate of arbitrary faults.
|
|
||||||
|
|
||||||
inject_type This controls injection type of arbitrary faults.
|
|
||||||
|
|
||||||
dirty_segments This shows # of dirty segments.
|
|
||||||
|
|
||||||
lifetime_write_kbytes This shows # of data written to the disk.
|
|
||||||
|
|
||||||
features This shows current features enabled on F2FS.
|
|
||||||
|
|
||||||
current_reserved_blocks This shows # of blocks currently reserved.
|
|
||||||
|
|
||||||
unusable If checkpoint=disable, this shows the number of
|
|
||||||
blocks that are unusable.
|
|
||||||
If checkpoint=enable it shows the number of blocks
|
|
||||||
that would be unusable if checkpoint=disable were
|
|
||||||
to be set.
|
|
||||||
|
|
||||||
encoding This shows the encoding used for casefolding.
|
|
||||||
If casefolding is not enabled, returns (none)
|
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
USAGE
|
USAGE
|
||||||
@@ -777,3 +627,44 @@ zero or random data, which is useful to the below scenario where:
|
|||||||
4. address = fibmap(fd, offset)
|
4. address = fibmap(fd, offset)
|
||||||
5. open(blkdev)
|
5. open(blkdev)
|
||||||
6. write(blkdev, address)
|
6. write(blkdev, address)
|
||||||
|
|
||||||
|
Compression implementation
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
- New term named cluster is defined as basic unit of compression, file can
|
||||||
|
be divided into multiple clusters logically. One cluster includes 4 << n
|
||||||
|
(n >= 0) logical pages, compression size is also cluster size, each of
|
||||||
|
cluster can be compressed or not.
|
||||||
|
|
||||||
|
- In cluster metadata layout, one special block address is used to indicate
|
||||||
|
cluster is compressed one or normal one, for compressed cluster, following
|
||||||
|
metadata maps cluster to [1, 4 << n - 1] physical blocks, in where f2fs
|
||||||
|
stores data including compress header and compressed data.
|
||||||
|
|
||||||
|
- In order to eliminate write amplification during overwrite, F2FS only
|
||||||
|
support compression on write-once file, data can be compressed only when
|
||||||
|
all logical blocks in file are valid and cluster compress ratio is lower
|
||||||
|
than specified threshold.
|
||||||
|
|
||||||
|
- To enable compression on regular inode, there are three ways:
|
||||||
|
* chattr +c file
|
||||||
|
* chattr +c dir; touch dir/file
|
||||||
|
* mount w/ -o compress_extension=ext; touch file.ext
|
||||||
|
|
||||||
|
Compress metadata layout:
|
||||||
|
[Dnode Structure]
|
||||||
|
+-----------------------------------------------+
|
||||||
|
| cluster 1 | cluster 2 | ......... | cluster N |
|
||||||
|
+-----------------------------------------------+
|
||||||
|
. . . .
|
||||||
|
. . . .
|
||||||
|
. Compressed Cluster . . Normal Cluster .
|
||||||
|
+----------+---------+---------+---------+ +---------+---------+---------+---------+
|
||||||
|
|compr flag| block 1 | block 2 | block 3 | | block 1 | block 2 | block 3 | block 4 |
|
||||||
|
+----------+---------+---------+---------+ +---------+---------+---------+---------+
|
||||||
|
. .
|
||||||
|
. .
|
||||||
|
. .
|
||||||
|
+-------------+-------------+----------+----------------------------+
|
||||||
|
| data length | data chksum | reserved | compressed data |
|
||||||
|
+-------------+-------------+----------+----------------------------+
|
||||||
|
|||||||
@@ -234,8 +234,8 @@ HKDF is more flexible, is nonreversible, and evenly distributes
|
|||||||
entropy from the master key. HKDF is also standardized and widely
|
entropy from the master key. HKDF is also standardized and widely
|
||||||
used by other software, whereas the AES-128-ECB based KDF is ad-hoc.
|
used by other software, whereas the AES-128-ECB based KDF is ad-hoc.
|
||||||
|
|
||||||
Per-file keys
|
Per-file encryption keys
|
||||||
-------------
|
------------------------
|
||||||
|
|
||||||
Since each master key can protect many files, it is necessary to
|
Since each master key can protect many files, it is necessary to
|
||||||
"tweak" the encryption of each file so that the same plaintext in two
|
"tweak" the encryption of each file so that the same plaintext in two
|
||||||
@@ -256,13 +256,8 @@ alternative master keys or to support rotating master keys. Instead,
|
|||||||
the master keys may be wrapped in userspace, e.g. as is done by the
|
the master keys may be wrapped in userspace, e.g. as is done by the
|
||||||
`fscrypt <https://github.com/google/fscrypt>`_ tool.
|
`fscrypt <https://github.com/google/fscrypt>`_ tool.
|
||||||
|
|
||||||
Including the inode number in the IVs was considered. However, it was
|
DIRECT_KEY policies
|
||||||
rejected as it would have prevented ext4 filesystems from being
|
-------------------
|
||||||
resized, and by itself still wouldn't have been sufficient to prevent
|
|
||||||
the same key from being directly reused for both XTS and CTS-CBC.
|
|
||||||
|
|
||||||
DIRECT_KEY and per-mode keys
|
|
||||||
----------------------------
|
|
||||||
|
|
||||||
The Adiantum encryption mode (see `Encryption modes and usage`_) is
|
The Adiantum encryption mode (see `Encryption modes and usage`_) is
|
||||||
suitable for both contents and filenames encryption, and it accepts
|
suitable for both contents and filenames encryption, and it accepts
|
||||||
@@ -273,9 +268,9 @@ is greater than that of an AES-256-XTS key.
|
|||||||
Therefore, to improve performance and save memory, for Adiantum a
|
Therefore, to improve performance and save memory, for Adiantum a
|
||||||
"direct key" configuration is supported. When the user has enabled
|
"direct key" configuration is supported. When the user has enabled
|
||||||
this by setting FSCRYPT_POLICY_FLAG_DIRECT_KEY in the fscrypt policy,
|
this by setting FSCRYPT_POLICY_FLAG_DIRECT_KEY in the fscrypt policy,
|
||||||
per-file keys are not used. Instead, whenever any data (contents or
|
per-file encryption keys are not used. Instead, whenever any data
|
||||||
filenames) is encrypted, the file's 16-byte nonce is included in the
|
(contents or filenames) is encrypted, the file's 16-byte nonce is
|
||||||
IV. Moreover:
|
included in the IV. Moreover:
|
||||||
|
|
||||||
- For v1 encryption policies, the encryption is done directly with the
|
- For v1 encryption policies, the encryption is done directly with the
|
||||||
master key. Because of this, users **must not** use the same master
|
master key. Because of this, users **must not** use the same master
|
||||||
@@ -285,6 +280,21 @@ IV. Moreover:
|
|||||||
key derived using the KDF. Users may use the same master key for
|
key derived using the KDF. Users may use the same master key for
|
||||||
other v2 encryption policies.
|
other v2 encryption policies.
|
||||||
|
|
||||||
|
IV_INO_LBLK_64 policies
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
When FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 is set in the fscrypt policy,
|
||||||
|
the encryption keys are derived from the master key, encryption mode
|
||||||
|
number, and filesystem UUID. This normally results in all files
|
||||||
|
protected by the same master key sharing a single contents encryption
|
||||||
|
key and a single filenames encryption key. To still encrypt different
|
||||||
|
files' data differently, inode numbers are included in the IVs.
|
||||||
|
Consequently, shrinking the filesystem may not be allowed.
|
||||||
|
|
||||||
|
This format is optimized for use with inline encryption hardware
|
||||||
|
compliant with the UFS or eMMC standards, which support only 64 IV
|
||||||
|
bits per I/O request and may have only a small number of keyslots.
|
||||||
|
|
||||||
Key identifiers
|
Key identifiers
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
@@ -292,6 +302,16 @@ For master keys used for v2 encryption policies, a unique 16-byte "key
|
|||||||
identifier" is also derived using the KDF. This value is stored in
|
identifier" is also derived using the KDF. This value is stored in
|
||||||
the clear, since it is needed to reliably identify the key itself.
|
the clear, since it is needed to reliably identify the key itself.
|
||||||
|
|
||||||
|
Dirhash keys
|
||||||
|
------------
|
||||||
|
|
||||||
|
For directories that are indexed using a secret-keyed dirhash over the
|
||||||
|
plaintext filenames, the KDF is also used to derive a 128-bit
|
||||||
|
SipHash-2-4 key per directory in order to hash filenames. This works
|
||||||
|
just like deriving a per-file encryption key, except that a different
|
||||||
|
KDF context is used. Currently, only casefolded ("case-insensitive")
|
||||||
|
encrypted directories use this style of hashing.
|
||||||
|
|
||||||
Encryption modes and usage
|
Encryption modes and usage
|
||||||
==========================
|
==========================
|
||||||
|
|
||||||
@@ -308,17 +328,18 @@ If unsure, you should use the (AES-256-XTS, AES-256-CTS-CBC) pair.
|
|||||||
|
|
||||||
AES-128-CBC was added only for low-powered embedded devices with
|
AES-128-CBC was added only for low-powered embedded devices with
|
||||||
crypto accelerators such as CAAM or CESA that do not support XTS. To
|
crypto accelerators such as CAAM or CESA that do not support XTS. To
|
||||||
use AES-128-CBC, CONFIG_CRYPTO_SHA256 (or another SHA-256
|
use AES-128-CBC, CONFIG_CRYPTO_ESSIV and CONFIG_CRYPTO_SHA256 (or
|
||||||
implementation) must be enabled so that ESSIV can be used.
|
another SHA-256 implementation) must be enabled so that ESSIV can be
|
||||||
|
used.
|
||||||
|
|
||||||
Adiantum is a (primarily) stream cipher-based mode that is fast even
|
Adiantum is a (primarily) stream cipher-based mode that is fast even
|
||||||
on CPUs without dedicated crypto instructions. It's also a true
|
on CPUs without dedicated crypto instructions. It's also a true
|
||||||
wide-block mode, unlike XTS. It can also eliminate the need to derive
|
wide-block mode, unlike XTS. It can also eliminate the need to derive
|
||||||
per-file keys. However, it depends on the security of two primitives,
|
per-file encryption keys. However, it depends on the security of two
|
||||||
XChaCha12 and AES-256, rather than just one. See the paper
|
primitives, XChaCha12 and AES-256, rather than just one. See the
|
||||||
"Adiantum: length-preserving encryption for entry-level processors"
|
paper "Adiantum: length-preserving encryption for entry-level
|
||||||
(https://eprint.iacr.org/2018/720.pdf) for more details. To use
|
processors" (https://eprint.iacr.org/2018/720.pdf) for more details.
|
||||||
Adiantum, CONFIG_CRYPTO_ADIANTUM must be enabled. Also, fast
|
To use Adiantum, CONFIG_CRYPTO_ADIANTUM must be enabled. Also, fast
|
||||||
implementations of ChaCha and NHPoly1305 should be enabled, e.g.
|
implementations of ChaCha and NHPoly1305 should be enabled, e.g.
|
||||||
CONFIG_CRYPTO_CHACHA20_NEON and CONFIG_CRYPTO_NHPOLY1305_NEON for ARM.
|
CONFIG_CRYPTO_CHACHA20_NEON and CONFIG_CRYPTO_NHPOLY1305_NEON for ARM.
|
||||||
|
|
||||||
@@ -341,10 +362,16 @@ a little endian number, except that:
|
|||||||
is encrypted with AES-256 where the AES-256 key is the SHA-256 hash
|
is encrypted with AES-256 where the AES-256 key is the SHA-256 hash
|
||||||
of the file's data encryption key.
|
of the file's data encryption key.
|
||||||
|
|
||||||
- In the "direct key" configuration (FSCRYPT_POLICY_FLAG_DIRECT_KEY
|
- With `DIRECT_KEY policies`_, the file's nonce is appended to the IV.
|
||||||
set in the fscrypt_policy), the file's nonce is also appended to the
|
Currently this is only allowed with the Adiantum encryption mode.
|
||||||
IV. Currently this is only allowed with the Adiantum encryption
|
|
||||||
mode.
|
- With `IV_INO_LBLK_64 policies`_, the logical block number is limited
|
||||||
|
to 32 bits and is placed in bits 0-31 of the IV. The inode number
|
||||||
|
(which is also limited to 32 bits) is placed in bits 32-63.
|
||||||
|
|
||||||
|
Note that because file logical block numbers are included in the IVs,
|
||||||
|
filesystems must enforce that blocks are never shifted around within
|
||||||
|
encrypted files, e.g. via "collapse range" or "insert range".
|
||||||
|
|
||||||
Filenames encryption
|
Filenames encryption
|
||||||
--------------------
|
--------------------
|
||||||
@@ -354,10 +381,10 @@ the requirements to retain support for efficient directory lookups and
|
|||||||
filenames of up to 255 bytes, the same IV is used for every filename
|
filenames of up to 255 bytes, the same IV is used for every filename
|
||||||
in a directory.
|
in a directory.
|
||||||
|
|
||||||
However, each encrypted directory still uses a unique key; or
|
However, each encrypted directory still uses a unique key, or
|
||||||
alternatively (for the "direct key" configuration) has the file's
|
alternatively has the file's nonce (for `DIRECT_KEY policies`_) or
|
||||||
nonce included in the IVs. Thus, IV reuse is limited to within a
|
inode number (for `IV_INO_LBLK_64 policies`_) included in the IVs.
|
||||||
single directory.
|
Thus, IV reuse is limited to within a single directory.
|
||||||
|
|
||||||
With CTS-CBC, the IV reuse means that when the plaintext filenames
|
With CTS-CBC, the IV reuse means that when the plaintext filenames
|
||||||
share a common prefix at least as long as the cipher block size (16
|
share a common prefix at least as long as the cipher block size (16
|
||||||
@@ -431,12 +458,15 @@ This structure must be initialized as follows:
|
|||||||
(1) for ``contents_encryption_mode`` and FSCRYPT_MODE_AES_256_CTS
|
(1) for ``contents_encryption_mode`` and FSCRYPT_MODE_AES_256_CTS
|
||||||
(4) for ``filenames_encryption_mode``.
|
(4) for ``filenames_encryption_mode``.
|
||||||
|
|
||||||
- ``flags`` must contain a value from ``<linux/fscrypt.h>`` which
|
- ``flags`` contains optional flags from ``<linux/fscrypt.h>``:
|
||||||
identifies the amount of NUL-padding to use when encrypting
|
|
||||||
filenames. If unsure, use FSCRYPT_POLICY_FLAGS_PAD_32 (0x3).
|
- FSCRYPT_POLICY_FLAGS_PAD_*: The amount of NUL padding to use when
|
||||||
Additionally, if the encryption modes are both
|
encrypting filenames. If unsure, use FSCRYPT_POLICY_FLAGS_PAD_32
|
||||||
FSCRYPT_MODE_ADIANTUM, this can contain
|
(0x3).
|
||||||
FSCRYPT_POLICY_FLAG_DIRECT_KEY; see `DIRECT_KEY and per-mode keys`_.
|
- FSCRYPT_POLICY_FLAG_DIRECT_KEY: See `DIRECT_KEY policies`_.
|
||||||
|
- FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64: See `IV_INO_LBLK_64
|
||||||
|
policies`_. This is mutually exclusive with DIRECT_KEY and is not
|
||||||
|
supported on v1 policies.
|
||||||
|
|
||||||
- For v2 encryption policies, ``__reserved`` must be zeroed.
|
- For v2 encryption policies, ``__reserved`` must be zeroed.
|
||||||
|
|
||||||
@@ -493,7 +523,9 @@ FS_IOC_SET_ENCRYPTION_POLICY can fail with the following errors:
|
|||||||
- ``EEXIST``: the file is already encrypted with an encryption policy
|
- ``EEXIST``: the file is already encrypted with an encryption policy
|
||||||
different from the one specified
|
different from the one specified
|
||||||
- ``EINVAL``: an invalid encryption policy was specified (invalid
|
- ``EINVAL``: an invalid encryption policy was specified (invalid
|
||||||
version, mode(s), or flags; or reserved bits were set)
|
version, mode(s), or flags; or reserved bits were set); or a v1
|
||||||
|
encryption policy was specified but the directory has the casefold
|
||||||
|
flag enabled (casefolding is incompatible with v1 policies).
|
||||||
- ``ENOKEY``: a v2 encryption policy was specified, but the key with
|
- ``ENOKEY``: a v2 encryption policy was specified, but the key with
|
||||||
the specified ``master_key_identifier`` has not been added, nor does
|
the specified ``master_key_identifier`` has not been added, nor does
|
||||||
the process have the CAP_FOWNER capability in the initial user
|
the process have the CAP_FOWNER capability in the initial user
|
||||||
@@ -618,7 +650,8 @@ follows::
|
|||||||
struct fscrypt_add_key_arg {
|
struct fscrypt_add_key_arg {
|
||||||
struct fscrypt_key_specifier key_spec;
|
struct fscrypt_key_specifier key_spec;
|
||||||
__u32 raw_size;
|
__u32 raw_size;
|
||||||
__u32 __reserved[9];
|
__u32 key_id;
|
||||||
|
__u32 __reserved[8];
|
||||||
__u8 raw[];
|
__u8 raw[];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -635,6 +668,12 @@ follows::
|
|||||||
} u;
|
} u;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct fscrypt_provisioning_key_payload {
|
||||||
|
__u32 type;
|
||||||
|
__u32 __reserved;
|
||||||
|
__u8 raw[];
|
||||||
|
};
|
||||||
|
|
||||||
:c:type:`struct fscrypt_add_key_arg` must be zeroed, then initialized
|
:c:type:`struct fscrypt_add_key_arg` must be zeroed, then initialized
|
||||||
as follows:
|
as follows:
|
||||||
|
|
||||||
@@ -657,9 +696,26 @@ as follows:
|
|||||||
``Documentation/security/keys/core.rst``).
|
``Documentation/security/keys/core.rst``).
|
||||||
|
|
||||||
- ``raw_size`` must be the size of the ``raw`` key provided, in bytes.
|
- ``raw_size`` must be the size of the ``raw`` key provided, in bytes.
|
||||||
|
Alternatively, if ``key_id`` is nonzero, this field must be 0, since
|
||||||
|
in that case the size is implied by the specified Linux keyring key.
|
||||||
|
|
||||||
|
- ``key_id`` is 0 if the raw key is given directly in the ``raw``
|
||||||
|
field. Otherwise ``key_id`` is the ID of a Linux keyring key of
|
||||||
|
type "fscrypt-provisioning" whose payload is a :c:type:`struct
|
||||||
|
fscrypt_provisioning_key_payload` whose ``raw`` field contains the
|
||||||
|
raw key and whose ``type`` field matches ``key_spec.type``. Since
|
||||||
|
``raw`` is variable-length, the total size of this key's payload
|
||||||
|
must be ``sizeof(struct fscrypt_provisioning_key_payload)`` plus the
|
||||||
|
raw key size. The process must have Search permission on this key.
|
||||||
|
|
||||||
|
Most users should leave this 0 and specify the raw key directly.
|
||||||
|
The support for specifying a Linux keyring key is intended mainly to
|
||||||
|
allow re-adding keys after a filesystem is unmounted and re-mounted,
|
||||||
|
without having to store the raw keys in userspace memory.
|
||||||
|
|
||||||
- ``raw`` is a variable-length field which must contain the actual
|
- ``raw`` is a variable-length field which must contain the actual
|
||||||
key, ``raw_size`` bytes long.
|
key, ``raw_size`` bytes long. Alternatively, if ``key_id`` is
|
||||||
|
nonzero, then this field is unused.
|
||||||
|
|
||||||
For v2 policy keys, the kernel keeps track of which user (identified
|
For v2 policy keys, the kernel keeps track of which user (identified
|
||||||
by effective user ID) added the key, and only allows the key to be
|
by effective user ID) added the key, and only allows the key to be
|
||||||
@@ -681,11 +737,16 @@ FS_IOC_ADD_ENCRYPTION_KEY can fail with the following errors:
|
|||||||
|
|
||||||
- ``EACCES``: FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR was specified, but the
|
- ``EACCES``: FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR was specified, but the
|
||||||
caller does not have the CAP_SYS_ADMIN capability in the initial
|
caller does not have the CAP_SYS_ADMIN capability in the initial
|
||||||
user namespace
|
user namespace; or the raw key was specified by Linux key ID but the
|
||||||
|
process lacks Search permission on the key.
|
||||||
- ``EDQUOT``: the key quota for this user would be exceeded by adding
|
- ``EDQUOT``: the key quota for this user would be exceeded by adding
|
||||||
the key
|
the key
|
||||||
- ``EINVAL``: invalid key size or key specifier type, or reserved bits
|
- ``EINVAL``: invalid key size or key specifier type, or reserved bits
|
||||||
were set
|
were set
|
||||||
|
- ``EKEYREJECTED``: the raw key was specified by Linux key ID, but the
|
||||||
|
key has the wrong type
|
||||||
|
- ``ENOKEY``: the raw key was specified by Linux key ID, but no key
|
||||||
|
exists with that ID
|
||||||
- ``ENOTTY``: this type of filesystem does not implement encryption
|
- ``ENOTTY``: this type of filesystem does not implement encryption
|
||||||
- ``EOPNOTSUPP``: the kernel was not configured with encryption
|
- ``EOPNOTSUPP``: the kernel was not configured with encryption
|
||||||
support for this filesystem, or the filesystem superblock has not
|
support for this filesystem, or the filesystem superblock has not
|
||||||
@@ -1088,8 +1149,8 @@ The context structs contain the same information as the corresponding
|
|||||||
policy structs (see `Setting an encryption policy`_), except that the
|
policy structs (see `Setting an encryption policy`_), except that the
|
||||||
context structs also contain a nonce. The nonce is randomly generated
|
context structs also contain a nonce. The nonce is randomly generated
|
||||||
by the kernel and is used as KDF input or as a tweak to cause
|
by the kernel and is used as KDF input or as a tweak to cause
|
||||||
different files to be encrypted differently; see `Per-file keys`_ and
|
different files to be encrypted differently; see `Per-file encryption
|
||||||
`DIRECT_KEY and per-mode keys`_.
|
keys`_ and `DIRECT_KEY policies`_.
|
||||||
|
|
||||||
Data path changes
|
Data path changes
|
||||||
-----------------
|
-----------------
|
||||||
@@ -1141,7 +1202,7 @@ filesystem-specific hash(es) needed for directory lookups. This
|
|||||||
allows the filesystem to still, with a high degree of confidence, map
|
allows the filesystem to still, with a high degree of confidence, map
|
||||||
the filename given in ->lookup() back to a particular directory entry
|
the filename given in ->lookup() back to a particular directory entry
|
||||||
that was previously listed by readdir(). See :c:type:`struct
|
that was previously listed by readdir(). See :c:type:`struct
|
||||||
fscrypt_digested_name` in the source for more details.
|
fscrypt_nokey_name` in the source for more details.
|
||||||
|
|
||||||
Note that the precise way that filenames are presented to userspace
|
Note that the precise way that filenames are presented to userspace
|
||||||
without the key is subject to change in the future. It is only meant
|
without the key is subject to change in the future. It is only meant
|
||||||
|
|||||||
@@ -226,6 +226,14 @@ To do so, check for FS_VERITY_FL (0x00100000) in the returned flags.
|
|||||||
The verity flag is not settable via FS_IOC_SETFLAGS. You must use
|
The verity flag is not settable via FS_IOC_SETFLAGS. You must use
|
||||||
FS_IOC_ENABLE_VERITY instead, since parameters must be provided.
|
FS_IOC_ENABLE_VERITY instead, since parameters must be provided.
|
||||||
|
|
||||||
|
statx
|
||||||
|
-----
|
||||||
|
|
||||||
|
Since Linux v5.5, the statx() system call sets STATX_ATTR_VERITY if
|
||||||
|
the file has fs-verity enabled. This can perform better than
|
||||||
|
FS_IOC_GETFLAGS and FS_IOC_MEASURE_VERITY because it doesn't require
|
||||||
|
opening the file, and opening verity files can be expensive.
|
||||||
|
|
||||||
Accessing verity files
|
Accessing verity files
|
||||||
======================
|
======================
|
||||||
|
|
||||||
@@ -398,7 +406,7 @@ pages have been read into the pagecache. (See `Verifying data`_.)
|
|||||||
ext4
|
ext4
|
||||||
----
|
----
|
||||||
|
|
||||||
ext4 supports fs-verity since Linux TODO and e2fsprogs v1.45.2.
|
ext4 supports fs-verity since Linux v5.4 and e2fsprogs v1.45.2.
|
||||||
|
|
||||||
To create verity files on an ext4 filesystem, the filesystem must have
|
To create verity files on an ext4 filesystem, the filesystem must have
|
||||||
been formatted with ``-O verity`` or had ``tune2fs -O verity`` run on
|
been formatted with ``-O verity`` or had ``tune2fs -O verity`` run on
|
||||||
@@ -434,7 +442,7 @@ also only supports extent-based files.
|
|||||||
f2fs
|
f2fs
|
||||||
----
|
----
|
||||||
|
|
||||||
f2fs supports fs-verity since Linux TODO and f2fs-tools v1.11.0.
|
f2fs supports fs-verity since Linux v5.4 and f2fs-tools v1.11.0.
|
||||||
|
|
||||||
To create verity files on an f2fs filesystem, the filesystem must have
|
To create verity files on an f2fs filesystem, the filesystem must have
|
||||||
been formatted with ``-O verity``.
|
been formatted with ``-O verity``.
|
||||||
|
|||||||
@@ -606,3 +606,10 @@ in your dentry operations instead.
|
|||||||
dentry separately, and it now has request_mask and query_flags arguments
|
dentry separately, and it now has request_mask and query_flags arguments
|
||||||
to specify the fields and sync type requested by statx. Filesystems not
|
to specify the fields and sync type requested by statx. Filesystems not
|
||||||
supporting any statx-specific features may ignore the new arguments.
|
supporting any statx-specific features may ignore the new arguments.
|
||||||
|
--
|
||||||
|
[mandatory]
|
||||||
|
|
||||||
|
[should've been added in 2016] stale comment in finish_open()
|
||||||
|
nonwithstanding, failure exits in ->atomic_open() instances should
|
||||||
|
*NOT* fput() the file, no matter what. Everything is handled by the
|
||||||
|
caller.
|
||||||
|
|||||||
@@ -862,6 +862,7 @@ Writeback: 0 kB
|
|||||||
AnonPages: 861800 kB
|
AnonPages: 861800 kB
|
||||||
Mapped: 280372 kB
|
Mapped: 280372 kB
|
||||||
Shmem: 644 kB
|
Shmem: 644 kB
|
||||||
|
KReclaimable: 168048 kB
|
||||||
Slab: 284364 kB
|
Slab: 284364 kB
|
||||||
SReclaimable: 159856 kB
|
SReclaimable: 159856 kB
|
||||||
SUnreclaim: 124508 kB
|
SUnreclaim: 124508 kB
|
||||||
@@ -925,6 +926,9 @@ AnonHugePages: Non-file backed huge pages mapped into userspace page tables
|
|||||||
ShmemHugePages: Memory used by shared memory (shmem) and tmpfs allocated
|
ShmemHugePages: Memory used by shared memory (shmem) and tmpfs allocated
|
||||||
with huge pages
|
with huge pages
|
||||||
ShmemPmdMapped: Shared memory mapped into userspace with huge pages
|
ShmemPmdMapped: Shared memory mapped into userspace with huge pages
|
||||||
|
KReclaimable: Kernel allocations that the kernel will attempt to reclaim
|
||||||
|
under memory pressure. Includes SReclaimable (below), and other
|
||||||
|
direct allocations with a shrinker.
|
||||||
Slab: in-kernel data structures cache
|
Slab: in-kernel data structures cache
|
||||||
SReclaimable: Part of Slab, that might be reclaimed, such as caches
|
SReclaimable: Part of Slab, that might be reclaimed, such as caches
|
||||||
SUnreclaim: Part of Slab, that cannot be reclaimed on memory pressure
|
SUnreclaim: Part of Slab, that cannot be reclaimed on memory pressure
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ them but you should handle them according to your needs.
|
|||||||
UHID_OUTPUT:
|
UHID_OUTPUT:
|
||||||
This is sent if the HID device driver wants to send raw data to the I/O
|
This is sent if the HID device driver wants to send raw data to the I/O
|
||||||
device on the interrupt channel. You should read the payload and forward it to
|
device on the interrupt channel. You should read the payload and forward it to
|
||||||
the device. The payload is of type "struct uhid_data_req".
|
the device. The payload is of type "struct uhid_output_req".
|
||||||
This may be received even though you haven't received UHID_OPEN, yet.
|
This may be received even though you haven't received UHID_OPEN, yet.
|
||||||
|
|
||||||
UHID_GET_REPORT:
|
UHID_GET_REPORT:
|
||||||
|
|||||||
@@ -90,6 +90,51 @@ There are two ways in which a group may become throttled:
|
|||||||
In case b) above, even though the child may have runtime remaining it will not
|
In case b) above, even though the child may have runtime remaining it will not
|
||||||
be allowed to until the parent's runtime is refreshed.
|
be allowed to until the parent's runtime is refreshed.
|
||||||
|
|
||||||
|
CFS Bandwidth Quota Caveats
|
||||||
|
---------------------------
|
||||||
|
Once a slice is assigned to a cpu it does not expire. However all but 1ms of
|
||||||
|
the slice may be returned to the global pool if all threads on that cpu become
|
||||||
|
unrunnable. This is configured at compile time by the min_cfs_rq_runtime
|
||||||
|
variable. This is a performance tweak that helps prevent added contention on
|
||||||
|
the global lock.
|
||||||
|
|
||||||
|
The fact that cpu-local slices do not expire results in some interesting corner
|
||||||
|
cases that should be understood.
|
||||||
|
|
||||||
|
For cgroup cpu constrained applications that are cpu limited this is a
|
||||||
|
relatively moot point because they will naturally consume the entirety of their
|
||||||
|
quota as well as the entirety of each cpu-local slice in each period. As a
|
||||||
|
result it is expected that nr_periods roughly equal nr_throttled, and that
|
||||||
|
cpuacct.usage will increase roughly equal to cfs_quota_us in each period.
|
||||||
|
|
||||||
|
For highly-threaded, non-cpu bound applications this non-expiration nuance
|
||||||
|
allows applications to briefly burst past their quota limits by the amount of
|
||||||
|
unused slice on each cpu that the task group is running on (typically at most
|
||||||
|
1ms per cpu or as defined by min_cfs_rq_runtime). This slight burst only
|
||||||
|
applies if quota had been assigned to a cpu and then not fully used or returned
|
||||||
|
in previous periods. This burst amount will not be transferred between cores.
|
||||||
|
As a result, this mechanism still strictly limits the task group to quota
|
||||||
|
average usage, albeit over a longer time window than a single period. This
|
||||||
|
also limits the burst ability to no more than 1ms per cpu. This provides
|
||||||
|
better more predictable user experience for highly threaded applications with
|
||||||
|
small quota limits on high core count machines. It also eliminates the
|
||||||
|
propensity to throttle these applications while simultanously using less than
|
||||||
|
quota amounts of cpu. Another way to say this, is that by allowing the unused
|
||||||
|
portion of a slice to remain valid across periods we have decreased the
|
||||||
|
possibility of wastefully expiring quota on cpu-local silos that don't need a
|
||||||
|
full slice's amount of cpu time.
|
||||||
|
|
||||||
|
The interaction between cpu-bound and non-cpu-bound-interactive applications
|
||||||
|
should also be considered, especially when single core usage hits 100%. If you
|
||||||
|
gave each of these applications half of a cpu-core and they both got scheduled
|
||||||
|
on the same CPU it is theoretically possible that the non-cpu bound application
|
||||||
|
will use up to 1ms additional quota in some periods, thereby preventing the
|
||||||
|
cpu-bound application from fully using its quota by that same amount. In these
|
||||||
|
instances it will be up to the CFS algorithm (see sched-design-CFS.rst) to
|
||||||
|
decide which application is chosen to run, as they will both be runnable and
|
||||||
|
have remaining quota. This runtime discrepancy will be made up in the following
|
||||||
|
periods when the interactive application idles.
|
||||||
|
|
||||||
Examples
|
Examples
|
||||||
--------
|
--------
|
||||||
1. Limit a group to 1 CPU worth of runtime.
|
1. Limit a group to 1 CPU worth of runtime.
|
||||||
|
|||||||
@@ -653,8 +653,7 @@ allowed to execute.
|
|||||||
perf_event_paranoid:
|
perf_event_paranoid:
|
||||||
|
|
||||||
Controls use of the performance events system by unprivileged
|
Controls use of the performance events system by unprivileged
|
||||||
users (without CAP_SYS_ADMIN). The default value is 3 if
|
users (without CAP_SYS_ADMIN). The default value is 2.
|
||||||
CONFIG_SECURITY_PERF_EVENTS_RESTRICT is set, or 2 otherwise.
|
|
||||||
|
|
||||||
-1: Allow use of (almost) all events by all users
|
-1: Allow use of (almost) all events by all users
|
||||||
Ignore mlock limit after perf_event_mlock_kb without CAP_IPC_LOCK
|
Ignore mlock limit after perf_event_mlock_kb without CAP_IPC_LOCK
|
||||||
@@ -662,7 +661,6 @@ CONFIG_SECURITY_PERF_EVENTS_RESTRICT is set, or 2 otherwise.
|
|||||||
Disallow raw tracepoint access by users without CAP_SYS_ADMIN
|
Disallow raw tracepoint access by users without CAP_SYS_ADMIN
|
||||||
>=1: Disallow CPU event access by users without CAP_SYS_ADMIN
|
>=1: Disallow CPU event access by users without CAP_SYS_ADMIN
|
||||||
>=2: Disallow kernel profiling by users without CAP_SYS_ADMIN
|
>=2: Disallow kernel profiling by users without CAP_SYS_ADMIN
|
||||||
>=3: Disallow all event access by users without CAP_SYS_ADMIN
|
|
||||||
|
|
||||||
==============================================================
|
==============================================================
|
||||||
|
|
||||||
|
|||||||
@@ -15,8 +15,6 @@ The acquisition orders for mutexes are as follows:
|
|||||||
|
|
||||||
On x86, vcpu->mutex is taken outside kvm->arch.hyperv.hv_lock.
|
On x86, vcpu->mutex is taken outside kvm->arch.hyperv.hv_lock.
|
||||||
|
|
||||||
For spinlocks, kvm_lock is taken outside kvm->mmu_lock.
|
|
||||||
|
|
||||||
Everything else is a leaf: no other lock is taken inside the critical
|
Everything else is a leaf: no other lock is taken inside the critical
|
||||||
sections.
|
sections.
|
||||||
|
|
||||||
@@ -169,7 +167,7 @@ which time it will be set using the Dirty tracking mechanism described above.
|
|||||||
------------
|
------------
|
||||||
|
|
||||||
Name: kvm_lock
|
Name: kvm_lock
|
||||||
Type: spinlock_t
|
Type: mutex
|
||||||
Arch: any
|
Arch: any
|
||||||
Protects: - vm_list
|
Protects: - vm_list
|
||||||
|
|
||||||
|
|||||||
@@ -6,3 +6,4 @@ x86 architecture specifics
|
|||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
||||||
mds
|
mds
|
||||||
|
tsx_async_abort
|
||||||
|
|||||||
117
Documentation/x86/tsx_async_abort.rst
Normal file
117
Documentation/x86/tsx_async_abort.rst
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
TSX Async Abort (TAA) mitigation
|
||||||
|
================================
|
||||||
|
|
||||||
|
.. _tsx_async_abort:
|
||||||
|
|
||||||
|
Overview
|
||||||
|
--------
|
||||||
|
|
||||||
|
TSX Async Abort (TAA) is a side channel attack on internal buffers in some
|
||||||
|
Intel processors similar to Microachitectural Data Sampling (MDS). In this
|
||||||
|
case certain loads may speculatively pass invalid data to dependent operations
|
||||||
|
when an asynchronous abort condition is pending in a Transactional
|
||||||
|
Synchronization Extensions (TSX) transaction. This includes loads with no
|
||||||
|
fault or assist condition. Such loads may speculatively expose stale data from
|
||||||
|
the same uarch data structures as in MDS, with same scope of exposure i.e.
|
||||||
|
same-thread and cross-thread. This issue affects all current processors that
|
||||||
|
support TSX.
|
||||||
|
|
||||||
|
Mitigation strategy
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
a) TSX disable - one of the mitigations is to disable TSX. A new MSR
|
||||||
|
IA32_TSX_CTRL will be available in future and current processors after
|
||||||
|
microcode update which can be used to disable TSX. In addition, it
|
||||||
|
controls the enumeration of the TSX feature bits (RTM and HLE) in CPUID.
|
||||||
|
|
||||||
|
b) Clear CPU buffers - similar to MDS, clearing the CPU buffers mitigates this
|
||||||
|
vulnerability. More details on this approach can be found in
|
||||||
|
:ref:`Documentation/admin-guide/hw-vuln/mds.rst <mds>`.
|
||||||
|
|
||||||
|
Kernel internal mitigation modes
|
||||||
|
--------------------------------
|
||||||
|
|
||||||
|
============= ============================================================
|
||||||
|
off Mitigation is disabled. Either the CPU is not affected or
|
||||||
|
tsx_async_abort=off is supplied on the kernel command line.
|
||||||
|
|
||||||
|
tsx disabled Mitigation is enabled. TSX feature is disabled by default at
|
||||||
|
bootup on processors that support TSX control.
|
||||||
|
|
||||||
|
verw Mitigation is enabled. CPU is affected and MD_CLEAR is
|
||||||
|
advertised in CPUID.
|
||||||
|
|
||||||
|
ucode needed Mitigation is enabled. CPU is affected and MD_CLEAR is not
|
||||||
|
advertised in CPUID. That is mainly for virtualization
|
||||||
|
scenarios where the host has the updated microcode but the
|
||||||
|
hypervisor does not expose MD_CLEAR in CPUID. It's a best
|
||||||
|
effort approach without guarantee.
|
||||||
|
============= ============================================================
|
||||||
|
|
||||||
|
If the CPU is affected and the "tsx_async_abort" kernel command line parameter is
|
||||||
|
not provided then the kernel selects an appropriate mitigation depending on the
|
||||||
|
status of RTM and MD_CLEAR CPUID bits.
|
||||||
|
|
||||||
|
Below tables indicate the impact of tsx=on|off|auto cmdline options on state of
|
||||||
|
TAA mitigation, VERW behavior and TSX feature for various combinations of
|
||||||
|
MSR_IA32_ARCH_CAPABILITIES bits.
|
||||||
|
|
||||||
|
1. "tsx=off"
|
||||||
|
|
||||||
|
========= ========= ============ ============ ============== =================== ======================
|
||||||
|
MSR_IA32_ARCH_CAPABILITIES bits Result with cmdline tsx=off
|
||||||
|
---------------------------------- -------------------------------------------------------------------------
|
||||||
|
TAA_NO MDS_NO TSX_CTRL_MSR TSX state VERW can clear TAA mitigation TAA mitigation
|
||||||
|
after bootup CPU buffers tsx_async_abort=off tsx_async_abort=full
|
||||||
|
========= ========= ============ ============ ============== =================== ======================
|
||||||
|
0 0 0 HW default Yes Same as MDS Same as MDS
|
||||||
|
0 0 1 Invalid case Invalid case Invalid case Invalid case
|
||||||
|
0 1 0 HW default No Need ucode update Need ucode update
|
||||||
|
0 1 1 Disabled Yes TSX disabled TSX disabled
|
||||||
|
1 X 1 Disabled X None needed None needed
|
||||||
|
========= ========= ============ ============ ============== =================== ======================
|
||||||
|
|
||||||
|
2. "tsx=on"
|
||||||
|
|
||||||
|
========= ========= ============ ============ ============== =================== ======================
|
||||||
|
MSR_IA32_ARCH_CAPABILITIES bits Result with cmdline tsx=on
|
||||||
|
---------------------------------- -------------------------------------------------------------------------
|
||||||
|
TAA_NO MDS_NO TSX_CTRL_MSR TSX state VERW can clear TAA mitigation TAA mitigation
|
||||||
|
after bootup CPU buffers tsx_async_abort=off tsx_async_abort=full
|
||||||
|
========= ========= ============ ============ ============== =================== ======================
|
||||||
|
0 0 0 HW default Yes Same as MDS Same as MDS
|
||||||
|
0 0 1 Invalid case Invalid case Invalid case Invalid case
|
||||||
|
0 1 0 HW default No Need ucode update Need ucode update
|
||||||
|
0 1 1 Enabled Yes None Same as MDS
|
||||||
|
1 X 1 Enabled X None needed None needed
|
||||||
|
========= ========= ============ ============ ============== =================== ======================
|
||||||
|
|
||||||
|
3. "tsx=auto"
|
||||||
|
|
||||||
|
========= ========= ============ ============ ============== =================== ======================
|
||||||
|
MSR_IA32_ARCH_CAPABILITIES bits Result with cmdline tsx=auto
|
||||||
|
---------------------------------- -------------------------------------------------------------------------
|
||||||
|
TAA_NO MDS_NO TSX_CTRL_MSR TSX state VERW can clear TAA mitigation TAA mitigation
|
||||||
|
after bootup CPU buffers tsx_async_abort=off tsx_async_abort=full
|
||||||
|
========= ========= ============ ============ ============== =================== ======================
|
||||||
|
0 0 0 HW default Yes Same as MDS Same as MDS
|
||||||
|
0 0 1 Invalid case Invalid case Invalid case Invalid case
|
||||||
|
0 1 0 HW default No Need ucode update Need ucode update
|
||||||
|
0 1 1 Disabled Yes TSX disabled TSX disabled
|
||||||
|
1 X 1 Enabled X None needed None needed
|
||||||
|
========= ========= ============ ============ ============== =================== ======================
|
||||||
|
|
||||||
|
In the tables, TSX_CTRL_MSR is a new bit in MSR_IA32_ARCH_CAPABILITIES that
|
||||||
|
indicates whether MSR_IA32_TSX_CTRL is supported.
|
||||||
|
|
||||||
|
There are two control bits in IA32_TSX_CTRL MSR:
|
||||||
|
|
||||||
|
Bit 0: When set it disables the Restricted Transactional Memory (RTM)
|
||||||
|
sub-feature of TSX (will force all transactions to abort on the
|
||||||
|
XBEGIN instruction).
|
||||||
|
|
||||||
|
Bit 1: When set it disables the enumeration of the RTM and HLE feature
|
||||||
|
(i.e. it will make CPUID(EAX=7).EBX{bit4} and
|
||||||
|
CPUID(EAX=7).EBX{bit11} read as 0).
|
||||||
23
MAINTAINERS
23
MAINTAINERS
@@ -5847,6 +5847,14 @@ F: Documentation/isdn/README.gigaset
|
|||||||
F: drivers/isdn/gigaset/
|
F: drivers/isdn/gigaset/
|
||||||
F: include/uapi/linux/gigaset_dev.h
|
F: include/uapi/linux/gigaset_dev.h
|
||||||
|
|
||||||
|
GNSS SUBSYSTEM
|
||||||
|
M: Johan Hovold <johan@kernel.org>
|
||||||
|
S: Maintained
|
||||||
|
F: Documentation/ABI/testing/sysfs-class-gnss
|
||||||
|
F: Documentation/devicetree/bindings/gnss/
|
||||||
|
F: drivers/gnss/
|
||||||
|
F: include/linux/gnss.h
|
||||||
|
|
||||||
GO7007 MPEG CODEC
|
GO7007 MPEG CODEC
|
||||||
M: Hans Verkuil <hans.verkuil@cisco.com>
|
M: Hans Verkuil <hans.verkuil@cisco.com>
|
||||||
L: linux-media@vger.kernel.org
|
L: linux-media@vger.kernel.org
|
||||||
@@ -6891,7 +6899,7 @@ M: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
|
|||||||
M: Rodrigo Vivi <rodrigo.vivi@intel.com>
|
M: Rodrigo Vivi <rodrigo.vivi@intel.com>
|
||||||
L: intel-gfx@lists.freedesktop.org
|
L: intel-gfx@lists.freedesktop.org
|
||||||
W: https://01.org/linuxgraphics/
|
W: https://01.org/linuxgraphics/
|
||||||
B: https://01.org/linuxgraphics/documentation/how-report-bugs
|
B: https://gitlab.freedesktop.org/drm/intel/-/wikis/How-to-file-i915-bugs
|
||||||
C: irc://chat.freenode.net/intel-gfx
|
C: irc://chat.freenode.net/intel-gfx
|
||||||
Q: http://patchwork.freedesktop.org/project/intel-gfx/
|
Q: http://patchwork.freedesktop.org/project/intel-gfx/
|
||||||
T: git git://anongit.freedesktop.org/drm-intel
|
T: git git://anongit.freedesktop.org/drm-intel
|
||||||
@@ -7878,6 +7886,13 @@ Q: https://patchwork.kernel.org/project/linux-nvdimm/list/
|
|||||||
S: Supported
|
S: Supported
|
||||||
F: drivers/nvdimm/pmem*
|
F: drivers/nvdimm/pmem*
|
||||||
|
|
||||||
|
LIBNVDIMM: DEVICETREE BINDINGS
|
||||||
|
M: Oliver O'Halloran <oohall@gmail.com>
|
||||||
|
L: linux-nvdimm@lists.01.org
|
||||||
|
Q: https://patchwork.kernel.org/project/linux-nvdimm/list/
|
||||||
|
S: Supported
|
||||||
|
F: drivers/nvdimm/of_pmem.c
|
||||||
|
|
||||||
LIBNVDIMM: NON-VOLATILE MEMORY DEVICE SUBSYSTEM
|
LIBNVDIMM: NON-VOLATILE MEMORY DEVICE SUBSYSTEM
|
||||||
M: Dan Williams <dan.j.williams@intel.com>
|
M: Dan Williams <dan.j.williams@intel.com>
|
||||||
L: linux-nvdimm@lists.01.org
|
L: linux-nvdimm@lists.01.org
|
||||||
@@ -9576,6 +9591,12 @@ S: Maintained
|
|||||||
F: Documentation/scsi/NinjaSCSI.txt
|
F: Documentation/scsi/NinjaSCSI.txt
|
||||||
F: drivers/scsi/nsp32*
|
F: drivers/scsi/nsp32*
|
||||||
|
|
||||||
|
NINTENDO HID DRIVER
|
||||||
|
M: Daniel J. Ogorchock <djogorchock@gmail.com>
|
||||||
|
L: linux-input@vger.kernel.org
|
||||||
|
S: Maintained
|
||||||
|
F: drivers/hid/hid-nintendo*
|
||||||
|
|
||||||
NIOS2 ARCHITECTURE
|
NIOS2 ARCHITECTURE
|
||||||
M: Ley Foon Tan <lftan@altera.com>
|
M: Ley Foon Tan <lftan@altera.com>
|
||||||
L: nios2-dev@lists.rocketboards.org (moderated for non-subscribers)
|
L: nios2-dev@lists.rocketboards.org (moderated for non-subscribers)
|
||||||
|
|||||||
89
Makefile
89
Makefile
@@ -1,7 +1,7 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
VERSION = 4
|
VERSION = 4
|
||||||
PATCHLEVEL = 14
|
PATCHLEVEL = 14
|
||||||
SUBLEVEL = 150
|
SUBLEVEL = 174
|
||||||
EXTRAVERSION =
|
EXTRAVERSION =
|
||||||
NAME = Petit Gorille
|
NAME = Petit Gorille
|
||||||
|
|
||||||
@@ -499,6 +499,10 @@ CLANG_FLAGS += -Werror=unknown-warning-option
|
|||||||
KBUILD_CFLAGS += $(CLANG_FLAGS)
|
KBUILD_CFLAGS += $(CLANG_FLAGS)
|
||||||
KBUILD_AFLAGS += $(CLANG_FLAGS)
|
KBUILD_AFLAGS += $(CLANG_FLAGS)
|
||||||
export CLANG_FLAGS
|
export CLANG_FLAGS
|
||||||
|
ifeq ($(ld-name),lld)
|
||||||
|
KBUILD_CFLAGS += -fuse-ld=lld
|
||||||
|
endif
|
||||||
|
KBUILD_CPPFLAGS += -Qunused-arguments
|
||||||
endif
|
endif
|
||||||
|
|
||||||
RETPOLINE_CFLAGS_GCC := -mindirect-branch=thunk-extern -mindirect-branch-register
|
RETPOLINE_CFLAGS_GCC := -mindirect-branch=thunk-extern -mindirect-branch-register
|
||||||
@@ -593,6 +597,8 @@ ifeq ($(dot-config),1)
|
|||||||
-include include/config/auto.conf
|
-include include/config/auto.conf
|
||||||
|
|
||||||
ifeq ($(KBUILD_EXTMOD),)
|
ifeq ($(KBUILD_EXTMOD),)
|
||||||
|
include/config/auto.conf.cmd: check-clang-specific-options
|
||||||
|
|
||||||
# Read in dependencies to all Kconfig* files, make sure to run
|
# Read in dependencies to all Kconfig* files, make sure to run
|
||||||
# oldconfig if changes are detected.
|
# oldconfig if changes are detected.
|
||||||
-include include/config/auto.conf.cmd
|
-include include/config/auto.conf.cmd
|
||||||
@@ -645,8 +651,7 @@ KBUILD_AFLAGS += $(call cc-option,-fno-PIE)
|
|||||||
CFLAGS_GCOV := -fprofile-arcs -ftest-coverage \
|
CFLAGS_GCOV := -fprofile-arcs -ftest-coverage \
|
||||||
$(call cc-option,-fno-tree-loop-im) \
|
$(call cc-option,-fno-tree-loop-im) \
|
||||||
$(call cc-disable-warning,maybe-uninitialized,)
|
$(call cc-disable-warning,maybe-uninitialized,)
|
||||||
CFLAGS_KCOV := $(call cc-option,-fsanitize-coverage=trace-pc,)
|
export CFLAGS_GCOV
|
||||||
export CFLAGS_GCOV CFLAGS_KCOV
|
|
||||||
|
|
||||||
# Make toolchain changes before including arch/$(SRCARCH)/Makefile to ensure
|
# Make toolchain changes before including arch/$(SRCARCH)/Makefile to ensure
|
||||||
# ar/cc/ld-* macros return correct values.
|
# ar/cc/ld-* macros return correct values.
|
||||||
@@ -660,8 +665,8 @@ endif
|
|||||||
# use llvm-ar for building symbol tables from IR files, and llvm-dis instead
|
# use llvm-ar for building symbol tables from IR files, and llvm-dis instead
|
||||||
# of objdump for processing symbol versions and exports
|
# of objdump for processing symbol versions and exports
|
||||||
LLVM_AR := llvm-ar
|
LLVM_AR := llvm-ar
|
||||||
LLVM_DIS := llvm-dis
|
LLVM_NM := llvm-nm
|
||||||
export LLVM_AR LLVM_DIS
|
export LLVM_AR LLVM_NM
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# The arch Makefile can set ARCH_{CPP,A,C}FLAGS to override the default
|
# The arch Makefile can set ARCH_{CPP,A,C}FLAGS to override the default
|
||||||
@@ -701,6 +706,7 @@ ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC) $(KBUILD_CFLA
|
|||||||
KBUILD_AFLAGS += -DCC_HAVE_ASM_GOTO
|
KBUILD_AFLAGS += -DCC_HAVE_ASM_GOTO
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
include scripts/Makefile.kcov
|
||||||
include scripts/Makefile.gcc-plugins
|
include scripts/Makefile.gcc-plugins
|
||||||
|
|
||||||
ifdef CONFIG_READABLE_ASM
|
ifdef CONFIG_READABLE_ASM
|
||||||
@@ -740,7 +746,6 @@ endif
|
|||||||
KBUILD_CFLAGS += $(stackp-flag)
|
KBUILD_CFLAGS += $(stackp-flag)
|
||||||
|
|
||||||
ifeq ($(cc-name),clang)
|
ifeq ($(cc-name),clang)
|
||||||
KBUILD_CPPFLAGS += $(call cc-option,-Qunused-arguments,)
|
|
||||||
KBUILD_CFLAGS += $(call cc-disable-warning, format-invalid-specifier)
|
KBUILD_CFLAGS += $(call cc-disable-warning, format-invalid-specifier)
|
||||||
KBUILD_CFLAGS += $(call cc-disable-warning, gnu)
|
KBUILD_CFLAGS += $(call cc-disable-warning, gnu)
|
||||||
KBUILD_CFLAGS += $(call cc-disable-warning, duplicate-decl-specifier)
|
KBUILD_CFLAGS += $(call cc-disable-warning, duplicate-decl-specifier)
|
||||||
@@ -758,6 +763,10 @@ else
|
|||||||
KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable)
|
KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(ld-name),lld)
|
||||||
|
LDFLAGS += -O2
|
||||||
|
endif
|
||||||
|
|
||||||
KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable)
|
KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable)
|
||||||
ifdef CONFIG_FRAME_POINTER
|
ifdef CONFIG_FRAME_POINTER
|
||||||
KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
|
KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
|
||||||
@@ -825,10 +834,24 @@ KBUILD_CFLAGS += $(call cc-option,-fdata-sections,)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_LTO_CLANG
|
ifdef CONFIG_LTO_CLANG
|
||||||
lto-clang-flags := -flto -fvisibility=hidden
|
ifdef CONFIG_THINLTO
|
||||||
|
lto-clang-flags := -flto=thin
|
||||||
|
LDFLAGS += --thinlto-cache-dir=.thinlto-cache
|
||||||
|
else
|
||||||
|
lto-clang-flags := -flto
|
||||||
|
endif
|
||||||
|
lto-clang-flags += -fvisibility=default $(call cc-option, -fsplit-lto-unit)
|
||||||
|
|
||||||
|
# Limit inlining across translation units to reduce binary size
|
||||||
|
LD_FLAGS_LTO_CLANG := -mllvm -import-instr-limit=5
|
||||||
|
|
||||||
|
KBUILD_LDFLAGS += $(LD_FLAGS_LTO_CLANG)
|
||||||
|
KBUILD_LDFLAGS_MODULE += $(LD_FLAGS_LTO_CLANG)
|
||||||
|
|
||||||
|
KBUILD_LDS_MODULE += $(srctree)/scripts/module-lto.lds
|
||||||
|
|
||||||
# allow disabling only clang LTO where needed
|
# allow disabling only clang LTO where needed
|
||||||
DISABLE_LTO_CLANG := -fno-lto -fvisibility=default
|
DISABLE_LTO_CLANG := -fno-lto
|
||||||
export DISABLE_LTO_CLANG
|
export DISABLE_LTO_CLANG
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -845,7 +868,7 @@ export LDFINAL_vmlinux LDFLAGS_FINAL_vmlinux
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_CFI_CLANG
|
ifdef CONFIG_CFI_CLANG
|
||||||
cfi-clang-flags += -fsanitize=cfi $(call cc-option, -fsplit-lto-unit)
|
cfi-clang-flags += -fsanitize=cfi -fno-sanitize-cfi-canonical-jump-tables
|
||||||
DISABLE_CFI_CLANG := -fno-sanitize=cfi
|
DISABLE_CFI_CLANG := -fno-sanitize=cfi
|
||||||
ifdef CONFIG_MODULES
|
ifdef CONFIG_MODULES
|
||||||
cfi-clang-flags += -fsanitize-cfi-cross-dso
|
cfi-clang-flags += -fsanitize-cfi-cross-dso
|
||||||
@@ -871,6 +894,12 @@ DISABLE_LTO += $(DISABLE_CFI)
|
|||||||
export DISABLE_CFI
|
export DISABLE_CFI
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifdef CONFIG_SHADOW_CALL_STACK
|
||||||
|
CC_FLAGS_SCS := -fsanitize=shadow-call-stack
|
||||||
|
KBUILD_CFLAGS += $(CC_FLAGS_SCS)
|
||||||
|
export CC_FLAGS_SCS
|
||||||
|
endif
|
||||||
|
|
||||||
# arch Makefile may override CC so keep this after arch Makefile is included
|
# arch Makefile may override CC so keep this after arch Makefile is included
|
||||||
NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
|
NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
|
||||||
CHECKFLAGS += $(NOSTDINC_FLAGS)
|
CHECKFLAGS += $(NOSTDINC_FLAGS)
|
||||||
@@ -917,6 +946,15 @@ KBUILD_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types)
|
|||||||
# Require designated initializers for all marked structures
|
# Require designated initializers for all marked structures
|
||||||
KBUILD_CFLAGS += $(call cc-option,-Werror=designated-init)
|
KBUILD_CFLAGS += $(call cc-option,-Werror=designated-init)
|
||||||
|
|
||||||
|
# change __FILE__ to the relative path from the srctree
|
||||||
|
KBUILD_CFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=)
|
||||||
|
|
||||||
|
# ensure -fcf-protection is disabled when using retpoline as it is
|
||||||
|
# incompatible with -mindirect-branch=thunk-extern
|
||||||
|
ifdef CONFIG_RETPOLINE
|
||||||
|
KBUILD_CFLAGS += $(call cc-option,-fcf-protection=none)
|
||||||
|
endif
|
||||||
|
|
||||||
# use the deterministic mode of AR if available
|
# use the deterministic mode of AR if available
|
||||||
KBUILD_ARFLAGS := $(call ar-option,D)
|
KBUILD_ARFLAGS := $(call ar-option,D)
|
||||||
|
|
||||||
@@ -1043,6 +1081,7 @@ ifdef CONFIG_STACK_VALIDATION
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
PHONY += prepare0
|
||||||
|
|
||||||
ifeq ($(KBUILD_EXTMOD),)
|
ifeq ($(KBUILD_EXTMOD),)
|
||||||
core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/
|
core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/
|
||||||
@@ -1137,8 +1176,7 @@ include/config/kernel.release: include/config/auto.conf FORCE
|
|||||||
# archprepare is used in arch Makefiles and when processed asm symlink,
|
# archprepare is used in arch Makefiles and when processed asm symlink,
|
||||||
# version.h and scripts_basic is processed / created.
|
# version.h and scripts_basic is processed / created.
|
||||||
|
|
||||||
# Listed in dependency order
|
PHONY += prepare archprepare prepare1 prepare2 prepare3
|
||||||
PHONY += prepare archprepare prepare0 prepare1 prepare2 prepare3
|
|
||||||
|
|
||||||
# prepare3 is used to check if we are building in a separate output directory,
|
# prepare3 is used to check if we are building in a separate output directory,
|
||||||
# and if so do:
|
# and if so do:
|
||||||
@@ -1190,6 +1228,22 @@ else
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Disable clang-specific config options when using a different compiler
|
||||||
|
clang-specific-configs := LTO_CLANG CFI_CLANG SHADOW_CALL_STACK INIT_STACK_ALL
|
||||||
|
|
||||||
|
PHONY += check-clang-specific-options
|
||||||
|
check-clang-specific-options: $(KCONFIG_CONFIG) FORCE
|
||||||
|
ifneq ($(cc-name),clang)
|
||||||
|
ifneq ($(findstring y,$(shell $(CONFIG_SHELL) \
|
||||||
|
$(srctree)/scripts/config --file $(KCONFIG_CONFIG) \
|
||||||
|
$(foreach c,$(clang-specific-configs),-s $(c)))),)
|
||||||
|
@echo WARNING: Disabling clang-specific options with $(cc-name) >&2
|
||||||
|
$(Q)$(srctree)/scripts/config --file $(KCONFIG_CONFIG) \
|
||||||
|
$(foreach c,$(clang-specific-configs),-d $(c)) && \
|
||||||
|
$(MAKE) -f $(srctree)/Makefile olddefconfig
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# Check for CONFIG flags that require compiler support. Abort the build
|
# Check for CONFIG flags that require compiler support. Abort the build
|
||||||
# after .config has been processed, but before the kernel build starts.
|
# after .config has been processed, but before the kernel build starts.
|
||||||
#
|
#
|
||||||
@@ -1207,7 +1261,7 @@ ifdef CONFIG_LTO_CLANG
|
|||||||
endif
|
endif
|
||||||
ifneq ($(ld-name),lld)
|
ifneq ($(ld-name),lld)
|
||||||
ifneq ($(call gold-ifversion, -ge, 112000000, y), y)
|
ifneq ($(call gold-ifversion, -ge, 112000000, y), y)
|
||||||
@echo Cannot use CONFIG_LTO_CLANG: requires GNU gold 1.12 or later >&2 && exit 1
|
@echo Cannot use CONFIG_LTO_CLANG: requires GNU gold 1.12 or later >&2 && exit 1
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
@@ -1624,9 +1678,6 @@ else # KBUILD_EXTMOD
|
|||||||
|
|
||||||
# We are always building modules
|
# We are always building modules
|
||||||
KBUILD_MODULES := 1
|
KBUILD_MODULES := 1
|
||||||
PHONY += crmodverdir
|
|
||||||
crmodverdir:
|
|
||||||
$(cmd_crmodverdir)
|
|
||||||
|
|
||||||
PHONY += $(objtree)/Module.symvers
|
PHONY += $(objtree)/Module.symvers
|
||||||
$(objtree)/Module.symvers:
|
$(objtree)/Module.symvers:
|
||||||
@@ -1638,7 +1689,7 @@ $(objtree)/Module.symvers:
|
|||||||
|
|
||||||
module-dirs := $(addprefix _module_,$(KBUILD_EXTMOD))
|
module-dirs := $(addprefix _module_,$(KBUILD_EXTMOD))
|
||||||
PHONY += $(module-dirs) modules
|
PHONY += $(module-dirs) modules
|
||||||
$(module-dirs): crmodverdir $(objtree)/Module.symvers
|
$(module-dirs): prepare $(objtree)/Module.symvers
|
||||||
$(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)
|
$(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)
|
||||||
|
|
||||||
modules: $(module-dirs)
|
modules: $(module-dirs)
|
||||||
@@ -1679,7 +1730,8 @@ help:
|
|||||||
|
|
||||||
# Dummies...
|
# Dummies...
|
||||||
PHONY += prepare scripts
|
PHONY += prepare scripts
|
||||||
prepare: ;
|
prepare:
|
||||||
|
$(cmd_crmodverdir)
|
||||||
scripts: ;
|
scripts: ;
|
||||||
endif # KBUILD_EXTMOD
|
endif # KBUILD_EXTMOD
|
||||||
|
|
||||||
@@ -1805,17 +1857,14 @@ endif
|
|||||||
|
|
||||||
# Modules
|
# Modules
|
||||||
/: prepare scripts FORCE
|
/: prepare scripts FORCE
|
||||||
$(cmd_crmodverdir)
|
|
||||||
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
|
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
|
||||||
$(build)=$(build-dir)
|
$(build)=$(build-dir)
|
||||||
# Make sure the latest headers are built for Documentation
|
# Make sure the latest headers are built for Documentation
|
||||||
Documentation/ samples/: headers_install
|
Documentation/ samples/: headers_install
|
||||||
%/: prepare scripts FORCE
|
%/: prepare scripts FORCE
|
||||||
$(cmd_crmodverdir)
|
|
||||||
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
|
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
|
||||||
$(build)=$(build-dir)
|
$(build)=$(build-dir)
|
||||||
%.ko: prepare scripts FORCE
|
%.ko: prepare scripts FORCE
|
||||||
$(cmd_crmodverdir)
|
|
||||||
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
|
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
|
||||||
$(build)=$(build-dir) $(@:.ko=.o)
|
$(build)=$(build-dir) $(@:.ko=.o)
|
||||||
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
|
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
|
||||||
|
|||||||
58
arch/Kconfig
58
arch/Kconfig
@@ -622,6 +622,18 @@ config ARCH_SUPPORTS_LTO_CLANG
|
|||||||
- compiling inline assembly with clang's integrated assembler,
|
- compiling inline assembly with clang's integrated assembler,
|
||||||
- and linking with either lld or GNU gold w/ LLVMgold.
|
- and linking with either lld or GNU gold w/ LLVMgold.
|
||||||
|
|
||||||
|
config ARCH_SUPPORTS_THINLTO
|
||||||
|
bool
|
||||||
|
help
|
||||||
|
An architecture should select this if it supports clang's ThinLTO.
|
||||||
|
|
||||||
|
config THINLTO
|
||||||
|
bool "Use clang ThinLTO (EXPERIMENTAL)"
|
||||||
|
depends on LTO_CLANG && ARCH_SUPPORTS_THINLTO
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Use ThinLTO to speed up Link Time Optimization.
|
||||||
|
|
||||||
choice
|
choice
|
||||||
prompt "Link-Time Optimization (LTO) (EXPERIMENTAL)"
|
prompt "Link-Time Optimization (LTO) (EXPERIMENTAL)"
|
||||||
default LTO_NONE
|
default LTO_NONE
|
||||||
@@ -680,6 +692,52 @@ config CFI_CLANG_SHADOW
|
|||||||
If you select this option, the kernel builds a fast look-up table of
|
If you select this option, the kernel builds a fast look-up table of
|
||||||
CFI check functions in loaded modules to reduce overhead.
|
CFI check functions in loaded modules to reduce overhead.
|
||||||
|
|
||||||
|
config ARCH_SUPPORTS_SHADOW_CALL_STACK
|
||||||
|
bool
|
||||||
|
help
|
||||||
|
An architecture should select this if it supports Clang's Shadow
|
||||||
|
Call Stack, has asm/scs.h, and implements runtime support for shadow
|
||||||
|
stack switching.
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "Return-oriented programming (ROP) protection"
|
||||||
|
default ROP_PROTECTION_NONE
|
||||||
|
help
|
||||||
|
This option controls kernel protections against return-oriented
|
||||||
|
programming (ROP) attacks, which involve overwriting function return
|
||||||
|
addresses.
|
||||||
|
|
||||||
|
config ROP_PROTECTION_NONE
|
||||||
|
bool "None"
|
||||||
|
|
||||||
|
config SHADOW_CALL_STACK
|
||||||
|
bool "Clang Shadow Call Stack"
|
||||||
|
depends on ARCH_SUPPORTS_SHADOW_CALL_STACK
|
||||||
|
help
|
||||||
|
This option enables Clang's Shadow Call Stack, which uses a
|
||||||
|
shadow stack to protect function return addresses from being
|
||||||
|
overwritten by an attacker. More information can be found from
|
||||||
|
Clang's documentation:
|
||||||
|
|
||||||
|
https://clang.llvm.org/docs/ShadowCallStack.html
|
||||||
|
|
||||||
|
Note that security guarantees in the kernel differ from the ones
|
||||||
|
documented for user space. The kernel must store addresses of shadow
|
||||||
|
stacks used by other tasks and interrupt handlers in memory, which
|
||||||
|
means an attacker capable reading and writing arbitrary memory may
|
||||||
|
be able to locate them and hijack control flow by modifying shadow
|
||||||
|
stacks that are not currently in use.
|
||||||
|
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
config SHADOW_CALL_STACK_VMAP
|
||||||
|
bool "Use virtually mapped shadow call stacks"
|
||||||
|
depends on SHADOW_CALL_STACK
|
||||||
|
help
|
||||||
|
Use virtually mapped shadow call stacks. Selecting this option
|
||||||
|
provides better stack exhaustion protection, but increases per-thread
|
||||||
|
memory consumption as a full page is allocated for each shadow stack.
|
||||||
|
|
||||||
config HAVE_ARCH_WITHIN_STACK_FRAMES
|
config HAVE_ARCH_WITHIN_STACK_FRAMES
|
||||||
bool
|
bool
|
||||||
help
|
help
|
||||||
|
|||||||
@@ -70,6 +70,7 @@
|
|||||||
interrupt-names = "macirq";
|
interrupt-names = "macirq";
|
||||||
phy-mode = "rgmii";
|
phy-mode = "rgmii";
|
||||||
snps,pbl = < 32 >;
|
snps,pbl = < 32 >;
|
||||||
|
snps,multicast-filter-bins = <256>;
|
||||||
clocks = <&apbclk>;
|
clocks = <&apbclk>;
|
||||||
clock-names = "stmmaceth";
|
clock-names = "stmmaceth";
|
||||||
max-speed = <100>;
|
max-speed = <100>;
|
||||||
|
|||||||
@@ -14,6 +14,8 @@
|
|||||||
#ifdef __ASSEMBLY__
|
#ifdef __ASSEMBLY__
|
||||||
|
|
||||||
#define ASM_NL ` /* use '`' to mark new line in macro */
|
#define ASM_NL ` /* use '`' to mark new line in macro */
|
||||||
|
#define __ALIGN .align 4
|
||||||
|
#define __ALIGN_STR __stringify(__ALIGN)
|
||||||
|
|
||||||
/* annotation for data we want in DCCM - if enabled in .config */
|
/* annotation for data we want in DCCM - if enabled in .config */
|
||||||
.macro ARCFP_DATA nm
|
.macro ARCFP_DATA nm
|
||||||
|
|||||||
@@ -488,8 +488,8 @@ static int arc_pmu_device_probe(struct platform_device *pdev)
|
|||||||
/* loop thru all available h/w condition indexes */
|
/* loop thru all available h/w condition indexes */
|
||||||
for (j = 0; j < cc_bcr.c; j++) {
|
for (j = 0; j < cc_bcr.c; j++) {
|
||||||
write_aux_reg(ARC_REG_CC_INDEX, j);
|
write_aux_reg(ARC_REG_CC_INDEX, j);
|
||||||
cc_name.indiv.word0 = read_aux_reg(ARC_REG_CC_NAME0);
|
cc_name.indiv.word0 = le32_to_cpu(read_aux_reg(ARC_REG_CC_NAME0));
|
||||||
cc_name.indiv.word1 = read_aux_reg(ARC_REG_CC_NAME1);
|
cc_name.indiv.word1 = le32_to_cpu(read_aux_reg(ARC_REG_CC_NAME1));
|
||||||
|
|
||||||
/* See if it has been mapped to a perf event_id */
|
/* See if it has been mapped to a perf event_id */
|
||||||
for (i = 0; i < ARRAY_SIZE(arc_pmu_ev_hw_map); i++) {
|
for (i = 0; i < ARRAY_SIZE(arc_pmu_ev_hw_map); i++) {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
menuconfig ARC_PLAT_EZNPS
|
menuconfig ARC_PLAT_EZNPS
|
||||||
bool "\"EZchip\" ARC dev platform"
|
bool "\"EZchip\" ARC dev platform"
|
||||||
select CPU_BIG_ENDIAN
|
select CPU_BIG_ENDIAN
|
||||||
select CLKSRC_NPS
|
select CLKSRC_NPS if !PHYS_ADDR_T_64BIT
|
||||||
select EZNPS_GIC
|
select EZNPS_GIC
|
||||||
select EZCHIP_NPS_MANAGEMENT_ENET if ETHERNET
|
select EZCHIP_NPS_MANAGEMENT_ENET if ETHERNET
|
||||||
help
|
help
|
||||||
|
|||||||
@@ -1535,12 +1535,10 @@ config THUMB2_KERNEL
|
|||||||
bool "Compile the kernel in Thumb-2 mode" if !CPU_THUMBONLY
|
bool "Compile the kernel in Thumb-2 mode" if !CPU_THUMBONLY
|
||||||
depends on (CPU_V7 || CPU_V7M) && !CPU_V6 && !CPU_V6K
|
depends on (CPU_V7 || CPU_V7M) && !CPU_V6 && !CPU_V6K
|
||||||
default y if CPU_THUMBONLY
|
default y if CPU_THUMBONLY
|
||||||
select ARM_ASM_UNIFIED
|
|
||||||
select ARM_UNWIND
|
select ARM_UNWIND
|
||||||
help
|
help
|
||||||
By enabling this option, the kernel will be compiled in
|
By enabling this option, the kernel will be compiled in
|
||||||
Thumb-2 mode. A compiler/assembler that understand the unified
|
Thumb-2 mode.
|
||||||
ARM-Thumb syntax is needed.
|
|
||||||
|
|
||||||
If unsure, say N.
|
If unsure, say N.
|
||||||
|
|
||||||
@@ -1575,9 +1573,6 @@ config THUMB2_AVOID_R_ARM_THM_JUMP11
|
|||||||
|
|
||||||
Unless you are sure your tools don't have this problem, say Y.
|
Unless you are sure your tools don't have this problem, say Y.
|
||||||
|
|
||||||
config ARM_ASM_UNIFIED
|
|
||||||
bool
|
|
||||||
|
|
||||||
config ARM_PATCH_IDIV
|
config ARM_PATCH_IDIV
|
||||||
bool "Runtime patch udiv/sdiv instructions into __aeabi_{u}idiv()"
|
bool "Runtime patch udiv/sdiv instructions into __aeabi_{u}idiv()"
|
||||||
depends on CPU_32v7 && !XIP_KERNEL
|
depends on CPU_32v7 && !XIP_KERNEL
|
||||||
@@ -2052,7 +2047,7 @@ config XIP_PHYS_ADDR
|
|||||||
config KEXEC
|
config KEXEC
|
||||||
bool "Kexec system call (EXPERIMENTAL)"
|
bool "Kexec system call (EXPERIMENTAL)"
|
||||||
depends on (!SMP || PM_SLEEP_SMP)
|
depends on (!SMP || PM_SLEEP_SMP)
|
||||||
depends on !CPU_V7M
|
depends on MMU
|
||||||
select KEXEC_CORE
|
select KEXEC_CORE
|
||||||
help
|
help
|
||||||
kexec is a system call that implements the ability to shutdown your
|
kexec is a system call that implements the ability to shutdown your
|
||||||
|
|||||||
@@ -1023,14 +1023,21 @@ choice
|
|||||||
Say Y here if you want kernel low-level debugging support
|
Say Y here if you want kernel low-level debugging support
|
||||||
on SOCFPGA(Cyclone 5 and Arria 5) based platforms.
|
on SOCFPGA(Cyclone 5 and Arria 5) based platforms.
|
||||||
|
|
||||||
config DEBUG_SOCFPGA_UART1
|
config DEBUG_SOCFPGA_ARRIA10_UART1
|
||||||
depends on ARCH_SOCFPGA
|
depends on ARCH_SOCFPGA
|
||||||
bool "Use SOCFPGA UART1 for low-level debug"
|
bool "Use SOCFPGA Arria10 UART1 for low-level debug"
|
||||||
select DEBUG_UART_8250
|
select DEBUG_UART_8250
|
||||||
help
|
help
|
||||||
Say Y here if you want kernel low-level debugging support
|
Say Y here if you want kernel low-level debugging support
|
||||||
on SOCFPGA(Arria 10) based platforms.
|
on SOCFPGA(Arria 10) based platforms.
|
||||||
|
|
||||||
|
config DEBUG_SOCFPGA_CYCLONE5_UART1
|
||||||
|
depends on ARCH_SOCFPGA
|
||||||
|
bool "Use SOCFPGA Cyclone 5 UART1 for low-level debug"
|
||||||
|
select DEBUG_UART_8250
|
||||||
|
help
|
||||||
|
Say Y here if you want kernel low-level debugging support
|
||||||
|
on SOCFPGA(Cyclone 5 and Arria 5) based platforms.
|
||||||
|
|
||||||
config DEBUG_SUN9I_UART0
|
config DEBUG_SUN9I_UART0
|
||||||
bool "Kernel low-level debugging messages via sun9i UART0"
|
bool "Kernel low-level debugging messages via sun9i UART0"
|
||||||
@@ -1376,21 +1383,21 @@ config DEBUG_OMAP2PLUS_UART
|
|||||||
depends on ARCH_OMAP2PLUS
|
depends on ARCH_OMAP2PLUS
|
||||||
|
|
||||||
config DEBUG_IMX_UART_PORT
|
config DEBUG_IMX_UART_PORT
|
||||||
int "i.MX Debug UART Port Selection" if DEBUG_IMX1_UART || \
|
int "i.MX Debug UART Port Selection"
|
||||||
DEBUG_IMX25_UART || \
|
depends on DEBUG_IMX1_UART || \
|
||||||
DEBUG_IMX21_IMX27_UART || \
|
DEBUG_IMX25_UART || \
|
||||||
DEBUG_IMX31_UART || \
|
DEBUG_IMX21_IMX27_UART || \
|
||||||
DEBUG_IMX35_UART || \
|
DEBUG_IMX31_UART || \
|
||||||
DEBUG_IMX50_UART || \
|
DEBUG_IMX35_UART || \
|
||||||
DEBUG_IMX51_UART || \
|
DEBUG_IMX50_UART || \
|
||||||
DEBUG_IMX53_UART || \
|
DEBUG_IMX51_UART || \
|
||||||
DEBUG_IMX6Q_UART || \
|
DEBUG_IMX53_UART || \
|
||||||
DEBUG_IMX6SL_UART || \
|
DEBUG_IMX6Q_UART || \
|
||||||
DEBUG_IMX6SX_UART || \
|
DEBUG_IMX6SL_UART || \
|
||||||
DEBUG_IMX6UL_UART || \
|
DEBUG_IMX6SX_UART || \
|
||||||
DEBUG_IMX7D_UART
|
DEBUG_IMX6UL_UART || \
|
||||||
|
DEBUG_IMX7D_UART
|
||||||
default 1
|
default 1
|
||||||
depends on ARCH_MXC
|
|
||||||
help
|
help
|
||||||
Choose UART port on which kernel low-level debug messages
|
Choose UART port on which kernel low-level debug messages
|
||||||
should be output.
|
should be output.
|
||||||
@@ -1585,7 +1592,8 @@ config DEBUG_UART_PHYS
|
|||||||
default 0xfe800000 if ARCH_IOP32X
|
default 0xfe800000 if ARCH_IOP32X
|
||||||
default 0xff690000 if DEBUG_RK32_UART2
|
default 0xff690000 if DEBUG_RK32_UART2
|
||||||
default 0xffc02000 if DEBUG_SOCFPGA_UART0
|
default 0xffc02000 if DEBUG_SOCFPGA_UART0
|
||||||
default 0xffc02100 if DEBUG_SOCFPGA_UART1
|
default 0xffc02100 if DEBUG_SOCFPGA_ARRIA10_UART1
|
||||||
|
default 0xffc03000 if DEBUG_SOCFPGA_CYCLONE5_UART1
|
||||||
default 0xffd82340 if ARCH_IOP13XX
|
default 0xffd82340 if ARCH_IOP13XX
|
||||||
default 0xffe40000 if DEBUG_RCAR_GEN1_SCIF0
|
default 0xffe40000 if DEBUG_RCAR_GEN1_SCIF0
|
||||||
default 0xffe42000 if DEBUG_RCAR_GEN1_SCIF2
|
default 0xffe42000 if DEBUG_RCAR_GEN1_SCIF2
|
||||||
@@ -1689,7 +1697,8 @@ config DEBUG_UART_VIRT
|
|||||||
default 0xfeb30c00 if DEBUG_KEYSTONE_UART0
|
default 0xfeb30c00 if DEBUG_KEYSTONE_UART0
|
||||||
default 0xfeb31000 if DEBUG_KEYSTONE_UART1
|
default 0xfeb31000 if DEBUG_KEYSTONE_UART1
|
||||||
default 0xfec02000 if DEBUG_SOCFPGA_UART0
|
default 0xfec02000 if DEBUG_SOCFPGA_UART0
|
||||||
default 0xfec02100 if DEBUG_SOCFPGA_UART1
|
default 0xfec02100 if DEBUG_SOCFPGA_ARRIA10_UART1
|
||||||
|
default 0xfec03000 if DEBUG_SOCFPGA_CYCLONE5_UART1
|
||||||
default 0xfec12000 if (DEBUG_MVEBU_UART0 || DEBUG_MVEBU_UART0_ALTERNATE) && ARCH_MVEBU
|
default 0xfec12000 if (DEBUG_MVEBU_UART0 || DEBUG_MVEBU_UART0_ALTERNATE) && ARCH_MVEBU
|
||||||
default 0xfec12100 if DEBUG_MVEBU_UART1_ALTERNATE
|
default 0xfec12100 if DEBUG_MVEBU_UART1_ALTERNATE
|
||||||
default 0xfec10000 if DEBUG_SIRFATLAS7_UART0
|
default 0xfec10000 if DEBUG_SIRFATLAS7_UART0
|
||||||
@@ -1737,9 +1746,9 @@ config DEBUG_UART_8250_WORD
|
|||||||
depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
|
depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
|
||||||
depends on DEBUG_UART_8250_SHIFT >= 2
|
depends on DEBUG_UART_8250_SHIFT >= 2
|
||||||
default y if DEBUG_PICOXCELL_UART || \
|
default y if DEBUG_PICOXCELL_UART || \
|
||||||
DEBUG_SOCFPGA_UART0 || DEBUG_SOCFPGA_UART1 || \
|
DEBUG_SOCFPGA_UART0 || DEBUG_SOCFPGA_ARRIA10_UART1 || \
|
||||||
DEBUG_KEYSTONE_UART0 || DEBUG_KEYSTONE_UART1 || \
|
DEBUG_SOCFPGA_CYCLONE5_UART1 || DEBUG_KEYSTONE_UART0 || \
|
||||||
DEBUG_ALPINE_UART0 || \
|
DEBUG_KEYSTONE_UART1 || DEBUG_ALPINE_UART0 || \
|
||||||
DEBUG_DAVINCI_DMx_UART0 || DEBUG_DAVINCI_DA8XX_UART1 || \
|
DEBUG_DAVINCI_DMx_UART0 || DEBUG_DAVINCI_DA8XX_UART1 || \
|
||||||
DEBUG_DAVINCI_DA8XX_UART2 || \
|
DEBUG_DAVINCI_DA8XX_UART2 || \
|
||||||
DEBUG_BCM_KONA_UART || DEBUG_RK32_UART2
|
DEBUG_BCM_KONA_UART || DEBUG_RK32_UART2
|
||||||
|
|||||||
@@ -39,7 +39,10 @@ KBUILD_CFLAGS += $(call cc-option,-mno-unaligned-access)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_FRAME_POINTER),y)
|
ifeq ($(CONFIG_FRAME_POINTER),y)
|
||||||
KBUILD_CFLAGS +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog
|
KBUILD_CFLAGS +=-fno-omit-frame-pointer
|
||||||
|
ifeq ($(cc-name),gcc)
|
||||||
|
KBUILD_CFLAGS += -mapcs -mno-sched-prolog
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_CPU_BIG_ENDIAN),y)
|
ifeq ($(CONFIG_CPU_BIG_ENDIAN),y)
|
||||||
@@ -115,9 +118,15 @@ ifeq ($(CONFIG_ARM_UNWIND),y)
|
|||||||
CFLAGS_ABI +=-funwind-tables
|
CFLAGS_ABI +=-funwind-tables
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(cc-name),clang)
|
||||||
|
CFLAGS_ABI += -meabi gnu
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Accept old syntax despite ".syntax unified"
|
||||||
|
AFLAGS_NOWARN :=$(call as-option,-Wa$(comma)-mno-warn-deprecated,-Wa$(comma)-W)
|
||||||
|
|
||||||
ifeq ($(CONFIG_THUMB2_KERNEL),y)
|
ifeq ($(CONFIG_THUMB2_KERNEL),y)
|
||||||
AFLAGS_AUTOIT :=$(call as-option,-Wa$(comma)-mimplicit-it=always,-Wa$(comma)-mauto-it)
|
AFLAGS_AUTOIT :=$(call as-option,-Wa$(comma)-mimplicit-it=always,-Wa$(comma)-mauto-it)
|
||||||
AFLAGS_NOWARN :=$(call as-option,-Wa$(comma)-mno-warn-deprecated,-Wa$(comma)-W)
|
|
||||||
CFLAGS_ISA :=-mthumb $(AFLAGS_AUTOIT) $(AFLAGS_NOWARN)
|
CFLAGS_ISA :=-mthumb $(AFLAGS_AUTOIT) $(AFLAGS_NOWARN)
|
||||||
AFLAGS_ISA :=$(CFLAGS_ISA) -Wa$(comma)-mthumb
|
AFLAGS_ISA :=$(CFLAGS_ISA) -Wa$(comma)-mthumb
|
||||||
# Work around buggy relocation from gas if requested:
|
# Work around buggy relocation from gas if requested:
|
||||||
@@ -125,7 +134,7 @@ ifeq ($(CONFIG_THUMB2_AVOID_R_ARM_THM_JUMP11),y)
|
|||||||
CFLAGS_MODULE +=-fno-optimize-sibling-calls
|
CFLAGS_MODULE +=-fno-optimize-sibling-calls
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
CFLAGS_ISA :=$(call cc-option,-marm,)
|
CFLAGS_ISA :=$(call cc-option,-marm,) $(AFLAGS_NOWARN)
|
||||||
AFLAGS_ISA :=$(CFLAGS_ISA)
|
AFLAGS_ISA :=$(CFLAGS_ISA)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,14 @@
|
|||||||
#ifndef _ARM_LIBFDT_ENV_H
|
#ifndef _ARM_LIBFDT_ENV_H
|
||||||
#define _ARM_LIBFDT_ENV_H
|
#define _ARM_LIBFDT_ENV_H
|
||||||
|
|
||||||
|
#include <linux/limits.h>
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/string.h>
|
#include <linux/string.h>
|
||||||
#include <asm/byteorder.h>
|
#include <asm/byteorder.h>
|
||||||
|
|
||||||
|
#define INT32_MAX S32_MAX
|
||||||
|
#define UINT32_MAX U32_MAX
|
||||||
|
|
||||||
typedef __be16 fdt16_t;
|
typedef __be16 fdt16_t;
|
||||||
typedef __be32 fdt32_t;
|
typedef __be32 fdt32_t;
|
||||||
typedef __be64 fdt64_t;
|
typedef __be64 fdt64_t;
|
||||||
|
|||||||
@@ -131,6 +131,11 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
|
memory@80000000 {
|
||||||
|
device_type = "memory";
|
||||||
|
reg = <0x80000000 0x20000000>; /* 512 MB */
|
||||||
|
};
|
||||||
|
|
||||||
clk_mcasp0_fixed: clk_mcasp0_fixed {
|
clk_mcasp0_fixed: clk_mcasp0_fixed {
|
||||||
#clock-cells = <0>;
|
#clock-cells = <0>;
|
||||||
compatible = "fixed-clock";
|
compatible = "fixed-clock";
|
||||||
|
|||||||
@@ -724,6 +724,7 @@
|
|||||||
pinctrl-0 = <&cpsw_default>;
|
pinctrl-0 = <&cpsw_default>;
|
||||||
pinctrl-1 = <&cpsw_sleep>;
|
pinctrl-1 = <&cpsw_sleep>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
slaves = <1>;
|
||||||
};
|
};
|
||||||
|
|
||||||
&davinci_mdio {
|
&davinci_mdio {
|
||||||
@@ -731,15 +732,14 @@
|
|||||||
pinctrl-0 = <&davinci_mdio_default>;
|
pinctrl-0 = <&davinci_mdio_default>;
|
||||||
pinctrl-1 = <&davinci_mdio_sleep>;
|
pinctrl-1 = <&davinci_mdio_sleep>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
|
ethphy0: ethernet-phy@0 {
|
||||||
|
reg = <0>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&cpsw_emac0 {
|
&cpsw_emac0 {
|
||||||
phy_id = <&davinci_mdio>, <0>;
|
phy-handle = <ðphy0>;
|
||||||
phy-mode = "rgmii-txid";
|
|
||||||
};
|
|
||||||
|
|
||||||
&cpsw_emac1 {
|
|
||||||
phy_id = <&davinci_mdio>, <1>;
|
|
||||||
phy-mode = "rgmii-txid";
|
phy-mode = "rgmii-txid";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1118,6 +1118,8 @@
|
|||||||
ti,hwmods = "dss_dispc";
|
ti,hwmods = "dss_dispc";
|
||||||
clocks = <&disp_clk>;
|
clocks = <&disp_clk>;
|
||||||
clock-names = "fck";
|
clock-names = "fck";
|
||||||
|
|
||||||
|
max-memory-bandwidth = <230000000>;
|
||||||
};
|
};
|
||||||
|
|
||||||
rfbi: rfbi@4832a800 {
|
rfbi: rfbi@4832a800 {
|
||||||
|
|||||||
@@ -83,7 +83,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
lcd0: display {
|
lcd0: display {
|
||||||
compatible = "osddisplays,osd057T0559-34ts", "panel-dpi";
|
compatible = "osddisplays,osd070t1718-19ts", "panel-dpi";
|
||||||
label = "lcd";
|
label = "lcd";
|
||||||
|
|
||||||
panel-timing {
|
panel-timing {
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
lcd0: display {
|
lcd0: display {
|
||||||
compatible = "osddisplays,osd057T0559-34ts", "panel-dpi";
|
compatible = "osddisplays,osd070t1718-19ts", "panel-dpi";
|
||||||
label = "lcd";
|
label = "lcd";
|
||||||
|
|
||||||
panel-timing {
|
panel-timing {
|
||||||
|
|||||||
@@ -93,7 +93,7 @@
|
|||||||
|
|
||||||
&pcie1_rc {
|
&pcie1_rc {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>;
|
gpios = <&gpio5 18 GPIO_ACTIVE_HIGH>;
|
||||||
};
|
};
|
||||||
|
|
||||||
&pcie1_ep {
|
&pcie1_ep {
|
||||||
|
|||||||
@@ -32,6 +32,27 @@
|
|||||||
reg = <0x0 0x80000000 0x0 0x80000000>;
|
reg = <0x0 0x80000000 0x0 0x80000000>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
main_12v0: fixedregulator-main_12v0 {
|
||||||
|
/* main supply */
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "main_12v0";
|
||||||
|
regulator-min-microvolt = <12000000>;
|
||||||
|
regulator-max-microvolt = <12000000>;
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
};
|
||||||
|
|
||||||
|
evm_5v0: fixedregulator-evm_5v0 {
|
||||||
|
/* Output of TPS54531D */
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "evm_5v0";
|
||||||
|
regulator-min-microvolt = <5000000>;
|
||||||
|
regulator-max-microvolt = <5000000>;
|
||||||
|
vin-supply = <&main_12v0>;
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
};
|
||||||
|
|
||||||
vdd_3v3: fixedregulator-vdd_3v3 {
|
vdd_3v3: fixedregulator-vdd_3v3 {
|
||||||
compatible = "regulator-fixed";
|
compatible = "regulator-fixed";
|
||||||
regulator-name = "vdd_3v3";
|
regulator-name = "vdd_3v3";
|
||||||
|
|||||||
@@ -334,7 +334,7 @@
|
|||||||
clock-names = "uartclk", "apb_pclk";
|
clock-names = "uartclk", "apb_pclk";
|
||||||
};
|
};
|
||||||
|
|
||||||
ssp: ssp@1000d000 {
|
ssp: spi@1000d000 {
|
||||||
compatible = "arm,pl022", "arm,primecell";
|
compatible = "arm,pl022", "arm,primecell";
|
||||||
reg = <0x1000d000 0x1000>;
|
reg = <0x1000d000 0x1000>;
|
||||||
clocks = <&sspclk>, <&pclk>;
|
clocks = <&sspclk>, <&pclk>;
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* The voltage to the MMC card is hardwired at 3.3V */
|
/* The voltage to the MMC card is hardwired at 3.3V */
|
||||||
vmmc: fixedregulator@0 {
|
vmmc: regulator-vmmc {
|
||||||
compatible = "regulator-fixed";
|
compatible = "regulator-fixed";
|
||||||
regulator-name = "vmmc";
|
regulator-name = "vmmc";
|
||||||
regulator-min-microvolt = <3300000>;
|
regulator-min-microvolt = <3300000>;
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
regulator-boot-on;
|
regulator-boot-on;
|
||||||
};
|
};
|
||||||
|
|
||||||
veth: fixedregulator@0 {
|
veth: regulator-veth {
|
||||||
compatible = "regulator-fixed";
|
compatible = "regulator-fixed";
|
||||||
regulator-name = "veth";
|
regulator-name = "veth";
|
||||||
regulator-min-microvolt = <3300000>;
|
regulator-min-microvolt = <3300000>;
|
||||||
@@ -343,7 +343,7 @@
|
|||||||
clock-names = "apb_pclk";
|
clock-names = "apb_pclk";
|
||||||
};
|
};
|
||||||
|
|
||||||
pb1176_ssp: ssp@1010b000 {
|
pb1176_ssp: spi@1010b000 {
|
||||||
compatible = "arm,pl022", "arm,primecell";
|
compatible = "arm,pl022", "arm,primecell";
|
||||||
reg = <0x1010b000 0x1000>;
|
reg = <0x1010b000 0x1000>;
|
||||||
interrupt-parent = <&intc_dc1176>;
|
interrupt-parent = <&intc_dc1176>;
|
||||||
|
|||||||
@@ -145,7 +145,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* The voltage to the MMC card is hardwired at 3.3V */
|
/* The voltage to the MMC card is hardwired at 3.3V */
|
||||||
vmmc: fixedregulator@0 {
|
vmmc: regulator-vmmc {
|
||||||
compatible = "regulator-fixed";
|
compatible = "regulator-fixed";
|
||||||
regulator-name = "vmmc";
|
regulator-name = "vmmc";
|
||||||
regulator-min-microvolt = <3300000>;
|
regulator-min-microvolt = <3300000>;
|
||||||
@@ -153,7 +153,7 @@
|
|||||||
regulator-boot-on;
|
regulator-boot-on;
|
||||||
};
|
};
|
||||||
|
|
||||||
veth: fixedregulator@0 {
|
veth: regulator-veth {
|
||||||
compatible = "regulator-fixed";
|
compatible = "regulator-fixed";
|
||||||
regulator-name = "veth";
|
regulator-name = "veth";
|
||||||
regulator-min-microvolt = <3300000>;
|
regulator-min-microvolt = <3300000>;
|
||||||
@@ -480,7 +480,7 @@
|
|||||||
clock-names = "uartclk", "apb_pclk";
|
clock-names = "uartclk", "apb_pclk";
|
||||||
};
|
};
|
||||||
|
|
||||||
ssp@1000d000 {
|
spi@1000d000 {
|
||||||
compatible = "arm,pl022", "arm,primecell";
|
compatible = "arm,pl022", "arm,primecell";
|
||||||
reg = <0x1000d000 0x1000>;
|
reg = <0x1000d000 0x1000>;
|
||||||
interrupt-parent = <&intc_pb11mp>;
|
interrupt-parent = <&intc_pb11mp>;
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* The voltage to the MMC card is hardwired at 3.3V */
|
/* The voltage to the MMC card is hardwired at 3.3V */
|
||||||
vmmc: fixedregulator@0 {
|
vmmc: regulator-vmmc {
|
||||||
compatible = "regulator-fixed";
|
compatible = "regulator-fixed";
|
||||||
regulator-name = "vmmc";
|
regulator-name = "vmmc";
|
||||||
regulator-min-microvolt = <3300000>;
|
regulator-min-microvolt = <3300000>;
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
regulator-boot-on;
|
regulator-boot-on;
|
||||||
};
|
};
|
||||||
|
|
||||||
veth: fixedregulator@0 {
|
veth: regulator-veth {
|
||||||
compatible = "regulator-fixed";
|
compatible = "regulator-fixed";
|
||||||
regulator-name = "veth";
|
regulator-name = "veth";
|
||||||
regulator-min-microvolt = <3300000>;
|
regulator-min-microvolt = <3300000>;
|
||||||
@@ -318,7 +318,7 @@
|
|||||||
clock-names = "uartclk", "apb_pclk";
|
clock-names = "uartclk", "apb_pclk";
|
||||||
};
|
};
|
||||||
|
|
||||||
ssp: ssp@1000d000 {
|
ssp: spi@1000d000 {
|
||||||
compatible = "arm,pl022", "arm,primecell";
|
compatible = "arm,pl022", "arm,primecell";
|
||||||
reg = <0x1000d000 0x1000>;
|
reg = <0x1000d000 0x1000>;
|
||||||
clocks = <&sspclk>, <&pclk>;
|
clocks = <&sspclk>, <&pclk>;
|
||||||
@@ -539,4 +539,3 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -89,7 +89,7 @@
|
|||||||
&clearfog_sdhci_cd_pins>;
|
&clearfog_sdhci_cd_pins>;
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
status = "okay";
|
status = "okay";
|
||||||
vmmc = <®_3p3v>;
|
vmmc-supply = <®_3p3v>;
|
||||||
wp-inverted;
|
wp-inverted;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -240,7 +240,7 @@
|
|||||||
|
|
||||||
rootfs@800000 {
|
rootfs@800000 {
|
||||||
label = "rootfs";
|
label = "rootfs";
|
||||||
reg = <0x800000 0x0f800000>;
|
reg = <0x800000 0x1f800000>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -566,7 +566,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
uart1 {
|
usart1 {
|
||||||
pinctrl_usart1: usart1-0 {
|
pinctrl_usart1: usart1-0 {
|
||||||
atmel,pins =
|
atmel,pins =
|
||||||
<AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PB4 periph A with pullup */
|
<AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PB4 periph A with pullup */
|
||||||
|
|||||||
@@ -88,7 +88,7 @@
|
|||||||
|
|
||||||
rootfs@800000 {
|
rootfs@800000 {
|
||||||
label = "rootfs";
|
label = "rootfs";
|
||||||
reg = <0x800000 0x1f800000>;
|
reg = <0x800000 0x0f800000>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -165,8 +165,8 @@
|
|||||||
mdio: mdio@18002000 {
|
mdio: mdio@18002000 {
|
||||||
compatible = "brcm,iproc-mdio";
|
compatible = "brcm,iproc-mdio";
|
||||||
reg = <0x18002000 0x8>;
|
reg = <0x18002000 0x8>;
|
||||||
#size-cells = <1>;
|
#size-cells = <0>;
|
||||||
#address-cells = <0>;
|
#address-cells = <1>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
|
|
||||||
gphy0: ethernet-phy@0 {
|
gphy0: ethernet-phy@0 {
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
trips {
|
trips {
|
||||||
cpu-crit {
|
cpu-crit {
|
||||||
temperature = <80000>;
|
temperature = <90000>;
|
||||||
hysteresis = <0>;
|
hysteresis = <0>;
|
||||||
type = "critical";
|
type = "critical";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -87,7 +87,7 @@
|
|||||||
status = "okay";
|
status = "okay";
|
||||||
clock-frequency = <100000>;
|
clock-frequency = <100000>;
|
||||||
|
|
||||||
si5351: clock-generator {
|
si5351: clock-generator@60 {
|
||||||
compatible = "silabs,si5351a-msop";
|
compatible = "silabs,si5351a-msop";
|
||||||
reg = <0x60>;
|
reg = <0x60>;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
|
|||||||
@@ -155,7 +155,7 @@
|
|||||||
0xffffe000 MBUS_ID(0x03, 0x01) 0 0x0000800 /* CESA SRAM 2k */
|
0xffffe000 MBUS_ID(0x03, 0x01) 0 0x0000800 /* CESA SRAM 2k */
|
||||||
0xfffff000 MBUS_ID(0x0d, 0x00) 0 0x0000800>; /* PMU SRAM 2k */
|
0xfffff000 MBUS_ID(0x0d, 0x00) 0 0x0000800>; /* PMU SRAM 2k */
|
||||||
|
|
||||||
spi0: spi-ctrl@10600 {
|
spi0: spi@10600 {
|
||||||
compatible = "marvell,orion-spi";
|
compatible = "marvell,orion-spi";
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
@@ -168,7 +168,7 @@
|
|||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
|
||||||
i2c: i2c-ctrl@11000 {
|
i2c: i2c@11000 {
|
||||||
compatible = "marvell,mv64xxx-i2c";
|
compatible = "marvell,mv64xxx-i2c";
|
||||||
reg = <0x11000 0x20>;
|
reg = <0x11000 0x20>;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
@@ -218,7 +218,7 @@
|
|||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
|
||||||
spi1: spi-ctrl@14600 {
|
spi1: spi@14600 {
|
||||||
compatible = "marvell,orion-spi";
|
compatible = "marvell,orion-spi";
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
|
|||||||
@@ -314,6 +314,7 @@
|
|||||||
<0 0 0 2 &pcie1_intc 2>,
|
<0 0 0 2 &pcie1_intc 2>,
|
||||||
<0 0 0 3 &pcie1_intc 3>,
|
<0 0 0 3 &pcie1_intc 3>,
|
||||||
<0 0 0 4 &pcie1_intc 4>;
|
<0 0 0 4 &pcie1_intc 4>;
|
||||||
|
ti,syscon-unaligned-access = <&scm_conf1 0x14 1>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
pcie1_intc: interrupt-controller {
|
pcie1_intc: interrupt-controller {
|
||||||
interrupt-controller;
|
interrupt-controller;
|
||||||
@@ -367,6 +368,7 @@
|
|||||||
<0 0 0 2 &pcie2_intc 2>,
|
<0 0 0 2 &pcie2_intc 2>,
|
||||||
<0 0 0 3 &pcie2_intc 3>,
|
<0 0 0 3 &pcie2_intc 3>,
|
||||||
<0 0 0 4 &pcie2_intc 4>;
|
<0 0 0 4 &pcie2_intc 4>;
|
||||||
|
ti,syscon-unaligned-access = <&scm_conf1 0x14 2>;
|
||||||
pcie2_intc: interrupt-controller {
|
pcie2_intc: interrupt-controller {
|
||||||
interrupt-controller;
|
interrupt-controller;
|
||||||
#address-cells = <0>;
|
#address-cells = <0>;
|
||||||
@@ -1540,6 +1542,7 @@
|
|||||||
dr_mode = "otg";
|
dr_mode = "otg";
|
||||||
snps,dis_u3_susphy_quirk;
|
snps,dis_u3_susphy_quirk;
|
||||||
snps,dis_u2_susphy_quirk;
|
snps,dis_u2_susphy_quirk;
|
||||||
|
snps,dis_metastability_quirk;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -17,3 +17,8 @@
|
|||||||
&crossbar_mpu {
|
&crossbar_mpu {
|
||||||
ti,irqs-skip = <10 67 68 133 139 140>;
|
ti,irqs-skip = <10 67 68 133 139 140>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&mmc3 {
|
||||||
|
/* dra76x is not affected by i887 */
|
||||||
|
max-frequency = <96000000>;
|
||||||
|
};
|
||||||
|
|||||||
@@ -359,7 +359,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
hsotg: hsotg@12480000 {
|
hsotg: hsotg@12480000 {
|
||||||
compatible = "snps,dwc2";
|
compatible = "samsung,s3c6400-hsotg", "snps,dwc2";
|
||||||
reg = <0x12480000 0x20000>;
|
reg = <0x12480000 0x20000>;
|
||||||
interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
clocks = <&cmu CLK_USBOTG>;
|
clocks = <&cmu CLK_USBOTG>;
|
||||||
|
|||||||
@@ -169,6 +169,8 @@
|
|||||||
reg = <0x66>;
|
reg = <0x66>;
|
||||||
interrupt-parent = <&gpx3>;
|
interrupt-parent = <&gpx3>;
|
||||||
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
|
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&s5m8767_irq>;
|
||||||
|
|
||||||
vinb1-supply = <&main_dc_reg>;
|
vinb1-supply = <&main_dc_reg>;
|
||||||
vinb2-supply = <&main_dc_reg>;
|
vinb2-supply = <&main_dc_reg>;
|
||||||
@@ -544,6 +546,13 @@
|
|||||||
cap-sd-highspeed;
|
cap-sd-highspeed;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&pinctrl_0 {
|
||||||
|
s5m8767_irq: s5m8767-irq {
|
||||||
|
samsung,pins = "gpx3-2";
|
||||||
|
samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
&rtc {
|
&rtc {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -23,6 +23,14 @@
|
|||||||
|
|
||||||
samsung,model = "Snow-I2S-MAX98090";
|
samsung,model = "Snow-I2S-MAX98090";
|
||||||
samsung,audio-codec = <&max98090>;
|
samsung,audio-codec = <&max98090>;
|
||||||
|
|
||||||
|
cpu {
|
||||||
|
sound-dai = <&i2s0 0>;
|
||||||
|
};
|
||||||
|
|
||||||
|
codec {
|
||||||
|
sound-dai = <&max98090 0>, <&hdmi>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -34,6 +42,9 @@
|
|||||||
interrupt-parent = <&gpx0>;
|
interrupt-parent = <&gpx0>;
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&max98090_irq>;
|
pinctrl-0 = <&max98090_irq>;
|
||||||
|
clocks = <&pmu_system_controller 0>;
|
||||||
|
clock-names = "mclk";
|
||||||
|
#sound-dai-cells = <1>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -301,6 +301,7 @@
|
|||||||
regulator-name = "vdd_1v35";
|
regulator-name = "vdd_1v35";
|
||||||
regulator-min-microvolt = <1350000>;
|
regulator-min-microvolt = <1350000>;
|
||||||
regulator-max-microvolt = <1350000>;
|
regulator-max-microvolt = <1350000>;
|
||||||
|
regulator-always-on;
|
||||||
regulator-boot-on;
|
regulator-boot-on;
|
||||||
regulator-state-mem {
|
regulator-state-mem {
|
||||||
regulator-on-in-suspend;
|
regulator-on-in-suspend;
|
||||||
@@ -322,6 +323,7 @@
|
|||||||
regulator-name = "vdd_2v";
|
regulator-name = "vdd_2v";
|
||||||
regulator-min-microvolt = <2000000>;
|
regulator-min-microvolt = <2000000>;
|
||||||
regulator-max-microvolt = <2000000>;
|
regulator-max-microvolt = <2000000>;
|
||||||
|
regulator-always-on;
|
||||||
regulator-boot-on;
|
regulator-boot-on;
|
||||||
regulator-state-mem {
|
regulator-state-mem {
|
||||||
regulator-on-in-suspend;
|
regulator-on-in-suspend;
|
||||||
@@ -332,6 +334,7 @@
|
|||||||
regulator-name = "vdd_1v8";
|
regulator-name = "vdd_1v8";
|
||||||
regulator-min-microvolt = <1800000>;
|
regulator-min-microvolt = <1800000>;
|
||||||
regulator-max-microvolt = <1800000>;
|
regulator-max-microvolt = <1800000>;
|
||||||
|
regulator-always-on;
|
||||||
regulator-boot-on;
|
regulator-boot-on;
|
||||||
regulator-state-mem {
|
regulator-state-mem {
|
||||||
regulator-on-in-suspend;
|
regulator-on-in-suspend;
|
||||||
|
|||||||
@@ -301,6 +301,7 @@
|
|||||||
regulator-name = "vdd_1v35";
|
regulator-name = "vdd_1v35";
|
||||||
regulator-min-microvolt = <1350000>;
|
regulator-min-microvolt = <1350000>;
|
||||||
regulator-max-microvolt = <1350000>;
|
regulator-max-microvolt = <1350000>;
|
||||||
|
regulator-always-on;
|
||||||
regulator-boot-on;
|
regulator-boot-on;
|
||||||
regulator-state-mem {
|
regulator-state-mem {
|
||||||
regulator-on-in-suspend;
|
regulator-on-in-suspend;
|
||||||
@@ -322,6 +323,7 @@
|
|||||||
regulator-name = "vdd_2v";
|
regulator-name = "vdd_2v";
|
||||||
regulator-min-microvolt = <2000000>;
|
regulator-min-microvolt = <2000000>;
|
||||||
regulator-max-microvolt = <2000000>;
|
regulator-max-microvolt = <2000000>;
|
||||||
|
regulator-always-on;
|
||||||
regulator-boot-on;
|
regulator-boot-on;
|
||||||
regulator-state-mem {
|
regulator-state-mem {
|
||||||
regulator-on-in-suspend;
|
regulator-on-in-suspend;
|
||||||
@@ -332,6 +334,7 @@
|
|||||||
regulator-name = "vdd_1v8";
|
regulator-name = "vdd_1v8";
|
||||||
regulator-min-microvolt = <1800000>;
|
regulator-min-microvolt = <1800000>;
|
||||||
regulator-max-microvolt = <1800000>;
|
regulator-max-microvolt = <1800000>;
|
||||||
|
regulator-always-on;
|
||||||
regulator-boot-on;
|
regulator-boot-on;
|
||||||
regulator-state-mem {
|
regulator-state-mem {
|
||||||
regulator-on-in-suspend;
|
regulator-on-in-suspend;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
chosen {
|
chosen {
|
||||||
bootargs = "console=ttyS0,115200n8";
|
bootargs = "console=ttyS0,115200n8 root=/dev/mtdblock2 rw rootfstype=squashfs,jffs2 rootwait";
|
||||||
stdout-path = &uart0;
|
stdout-path = &uart0;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -71,37 +71,10 @@
|
|||||||
/* 16MB of flash */
|
/* 16MB of flash */
|
||||||
reg = <0x30000000 0x01000000>;
|
reg = <0x30000000 0x01000000>;
|
||||||
|
|
||||||
partition@0 {
|
partitions {
|
||||||
label = "RedBoot";
|
compatible = "redboot-fis";
|
||||||
reg = <0x00000000 0x00120000>;
|
/* Eraseblock at 0xfe0000 */
|
||||||
read-only;
|
fis-index-block = <0x1fc>;
|
||||||
};
|
|
||||||
partition@120000 {
|
|
||||||
label = "Kernel";
|
|
||||||
reg = <0x00120000 0x00200000>;
|
|
||||||
};
|
|
||||||
partition@320000 {
|
|
||||||
label = "Ramdisk";
|
|
||||||
reg = <0x00320000 0x00600000>;
|
|
||||||
};
|
|
||||||
partition@920000 {
|
|
||||||
label = "Application";
|
|
||||||
reg = <0x00920000 0x00600000>;
|
|
||||||
};
|
|
||||||
partition@f20000 {
|
|
||||||
label = "VCTL";
|
|
||||||
reg = <0x00f20000 0x00020000>;
|
|
||||||
read-only;
|
|
||||||
};
|
|
||||||
partition@f40000 {
|
|
||||||
label = "CurConf";
|
|
||||||
reg = <0x00f40000 0x000a0000>;
|
|
||||||
read-only;
|
|
||||||
};
|
|
||||||
partition@fe0000 {
|
|
||||||
label = "FIS directory";
|
|
||||||
reg = <0x00fe0000 0x00020000>;
|
|
||||||
read-only;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -17,12 +17,8 @@
|
|||||||
|
|
||||||
memory@70000000 {
|
memory@70000000 {
|
||||||
device_type = "memory";
|
device_type = "memory";
|
||||||
reg = <0x70000000 0x20000000>;
|
reg = <0x70000000 0x20000000>,
|
||||||
};
|
<0xb0000000 0x20000000>;
|
||||||
|
|
||||||
memory@b0000000 {
|
|
||||||
device_type = "memory";
|
|
||||||
reg = <0xb0000000 0x20000000>;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
regulators {
|
regulators {
|
||||||
|
|||||||
@@ -587,7 +587,7 @@
|
|||||||
pinctrl-0 = <&pinctrl_usdhc2>;
|
pinctrl-0 = <&pinctrl_usdhc2>;
|
||||||
bus-width = <4>;
|
bus-width = <4>;
|
||||||
cd-gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
|
cd-gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
|
||||||
wp-gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
|
disable-wp;
|
||||||
vmmc-supply = <®_3p3v_sd>;
|
vmmc-supply = <®_3p3v_sd>;
|
||||||
vqmmc-supply = <®_3p3v>;
|
vqmmc-supply = <®_3p3v>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
@@ -598,7 +598,7 @@
|
|||||||
pinctrl-0 = <&pinctrl_usdhc3>;
|
pinctrl-0 = <&pinctrl_usdhc3>;
|
||||||
bus-width = <4>;
|
bus-width = <4>;
|
||||||
cd-gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
|
cd-gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
|
||||||
wp-gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
|
disable-wp;
|
||||||
vmmc-supply = <®_3p3v_sd>;
|
vmmc-supply = <®_3p3v_sd>;
|
||||||
vqmmc-supply = <®_3p3v>;
|
vqmmc-supply = <®_3p3v>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
@@ -1001,7 +1001,6 @@
|
|||||||
MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x17059
|
MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x17059
|
||||||
MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x17059
|
MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x17059
|
||||||
MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x17059
|
MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x17059
|
||||||
MX6QDL_PAD_NANDF_D3__GPIO2_IO03 0x40010040
|
|
||||||
MX6QDL_PAD_NANDF_D2__GPIO2_IO02 0x40010040
|
MX6QDL_PAD_NANDF_D2__GPIO2_IO02 0x40010040
|
||||||
>;
|
>;
|
||||||
};
|
};
|
||||||
@@ -1014,7 +1013,6 @@
|
|||||||
MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059
|
MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059
|
||||||
MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059
|
MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059
|
||||||
MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059
|
MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059
|
||||||
MX6QDL_PAD_NANDF_D1__GPIO2_IO01 0x40010040
|
|
||||||
MX6QDL_PAD_NANDF_D0__GPIO2_IO00 0x40010040
|
MX6QDL_PAD_NANDF_D0__GPIO2_IO00 0x40010040
|
||||||
|
|
||||||
>;
|
>;
|
||||||
|
|||||||
@@ -450,7 +450,7 @@
|
|||||||
compatible = "fsl,imx7d-gpt", "fsl,imx6sx-gpt";
|
compatible = "fsl,imx7d-gpt", "fsl,imx6sx-gpt";
|
||||||
reg = <0x302d0000 0x10000>;
|
reg = <0x302d0000 0x10000>;
|
||||||
interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
clocks = <&clks IMX7D_CLK_DUMMY>,
|
clocks = <&clks IMX7D_GPT1_ROOT_CLK>,
|
||||||
<&clks IMX7D_GPT1_ROOT_CLK>;
|
<&clks IMX7D_GPT1_ROOT_CLK>;
|
||||||
clock-names = "ipg", "per";
|
clock-names = "ipg", "per";
|
||||||
};
|
};
|
||||||
@@ -459,7 +459,7 @@
|
|||||||
compatible = "fsl,imx7d-gpt", "fsl,imx6sx-gpt";
|
compatible = "fsl,imx7d-gpt", "fsl,imx6sx-gpt";
|
||||||
reg = <0x302e0000 0x10000>;
|
reg = <0x302e0000 0x10000>;
|
||||||
interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
clocks = <&clks IMX7D_CLK_DUMMY>,
|
clocks = <&clks IMX7D_GPT2_ROOT_CLK>,
|
||||||
<&clks IMX7D_GPT2_ROOT_CLK>;
|
<&clks IMX7D_GPT2_ROOT_CLK>;
|
||||||
clock-names = "ipg", "per";
|
clock-names = "ipg", "per";
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
@@ -469,7 +469,7 @@
|
|||||||
compatible = "fsl,imx7d-gpt", "fsl,imx6sx-gpt";
|
compatible = "fsl,imx7d-gpt", "fsl,imx6sx-gpt";
|
||||||
reg = <0x302f0000 0x10000>;
|
reg = <0x302f0000 0x10000>;
|
||||||
interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
clocks = <&clks IMX7D_CLK_DUMMY>,
|
clocks = <&clks IMX7D_GPT3_ROOT_CLK>,
|
||||||
<&clks IMX7D_GPT3_ROOT_CLK>;
|
<&clks IMX7D_GPT3_ROOT_CLK>;
|
||||||
clock-names = "ipg", "per";
|
clock-names = "ipg", "per";
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
@@ -479,7 +479,7 @@
|
|||||||
compatible = "fsl,imx7d-gpt", "fsl,imx6sx-gpt";
|
compatible = "fsl,imx7d-gpt", "fsl,imx6sx-gpt";
|
||||||
reg = <0x30300000 0x10000>;
|
reg = <0x30300000 0x10000>;
|
||||||
interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
clocks = <&clks IMX7D_CLK_DUMMY>,
|
clocks = <&clks IMX7D_GPT4_ROOT_CLK>,
|
||||||
<&clks IMX7D_GPT4_ROOT_CLK>;
|
<&clks IMX7D_GPT4_ROOT_CLK>;
|
||||||
clock-names = "ipg", "per";
|
clock-names = "ipg", "per";
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
|
|||||||
@@ -270,3 +270,7 @@
|
|||||||
&twl_gpio {
|
&twl_gpio {
|
||||||
ti,use-leds;
|
ti,use-leds;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&twl_keypad {
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|||||||
@@ -49,8 +49,8 @@
|
|||||||
sd_reg: regulator@2 {
|
sd_reg: regulator@2 {
|
||||||
compatible = "regulator-fixed";
|
compatible = "regulator-fixed";
|
||||||
regulator-name = "sd_reg";
|
regulator-name = "sd_reg";
|
||||||
regulator-min-microvolt = <1800000>;
|
regulator-min-microvolt = <3300000>;
|
||||||
regulator-max-microvolt = <1800000>;
|
regulator-max-microvolt = <3300000>;
|
||||||
gpio = <&gpio 5 5 0>;
|
gpio = <&gpio 5 5 0>;
|
||||||
enable-active-high;
|
enable-active-high;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -139,11 +139,11 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
clcd: clcd@31040000 {
|
clcd: clcd@31040000 {
|
||||||
compatible = "arm,pl110", "arm,primecell";
|
compatible = "arm,pl111", "arm,primecell";
|
||||||
reg = <0x31040000 0x1000>;
|
reg = <0x31040000 0x1000>;
|
||||||
interrupts = <14 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <14 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
clocks = <&clk LPC32XX_CLK_LCD>;
|
clocks = <&clk LPC32XX_CLK_LCD>, <&clk LPC32XX_CLK_LCD>;
|
||||||
clock-names = "apb_pclk";
|
clock-names = "clcdclk", "apb_pclk";
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -179,7 +179,7 @@
|
|||||||
* ssp0 and spi1 are shared pins;
|
* ssp0 and spi1 are shared pins;
|
||||||
* enable one in your board dts, as needed.
|
* enable one in your board dts, as needed.
|
||||||
*/
|
*/
|
||||||
ssp0: ssp@20084000 {
|
ssp0: spi@20084000 {
|
||||||
compatible = "arm,pl022", "arm,primecell";
|
compatible = "arm,pl022", "arm,primecell";
|
||||||
reg = <0x20084000 0x1000>;
|
reg = <0x20084000 0x1000>;
|
||||||
interrupts = <20 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <20 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
@@ -199,7 +199,7 @@
|
|||||||
* ssp1 and spi2 are shared pins;
|
* ssp1 and spi2 are shared pins;
|
||||||
* enable one in your board dts, as needed.
|
* enable one in your board dts, as needed.
|
||||||
*/
|
*/
|
||||||
ssp1: ssp@2008c000 {
|
ssp1: spi@2008c000 {
|
||||||
compatible = "arm,pl022", "arm,primecell";
|
compatible = "arm,pl022", "arm,primecell";
|
||||||
reg = <0x2008c000 0x1000>;
|
reg = <0x2008c000 0x1000>;
|
||||||
interrupts = <21 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <21 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
@@ -462,7 +462,9 @@
|
|||||||
key: key@40050000 {
|
key: key@40050000 {
|
||||||
compatible = "nxp,lpc3220-key";
|
compatible = "nxp,lpc3220-key";
|
||||||
reg = <0x40050000 0x1000>;
|
reg = <0x40050000 0x1000>;
|
||||||
interrupts = <54 IRQ_TYPE_LEVEL_HIGH>;
|
clocks = <&clk LPC32XX_CLK_KEY>;
|
||||||
|
interrupt-parent = <&sic1>;
|
||||||
|
interrupts = <22 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -143,7 +143,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
&enet0 {
|
&enet0 {
|
||||||
tbi-handle = <&tbi1>;
|
tbi-handle = <&tbi0>;
|
||||||
phy-handle = <&sgmii_phy2>;
|
phy-handle = <&sgmii_phy2>;
|
||||||
phy-connection-type = "sgmii";
|
phy-connection-type = "sgmii";
|
||||||
status = "okay";
|
status = "okay";
|
||||||
@@ -222,6 +222,13 @@
|
|||||||
sgmii_phy2: ethernet-phy@2 {
|
sgmii_phy2: ethernet-phy@2 {
|
||||||
reg = <0x2>;
|
reg = <0x2>;
|
||||||
};
|
};
|
||||||
|
tbi0: tbi-phy@1f {
|
||||||
|
reg = <0x1f>;
|
||||||
|
device_type = "tbi-phy";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&mdio1 {
|
||||||
tbi1: tbi-phy@1f {
|
tbi1: tbi-phy@1f {
|
||||||
reg = <0x1f>;
|
reg = <0x1f>;
|
||||||
device_type = "tbi-phy";
|
device_type = "tbi-phy";
|
||||||
|
|||||||
@@ -569,6 +569,15 @@
|
|||||||
reg = <0x0 0x2d24000 0x0 0x4000>;
|
reg = <0x0 0x2d24000 0x0 0x4000>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
mdio1: mdio@2d64000 {
|
||||||
|
compatible = "gianfar";
|
||||||
|
device_type = "mdio";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
reg = <0x0 0x2d64000 0x0 0x4000>,
|
||||||
|
<0x0 0x2d50030 0x0 0x4>;
|
||||||
|
};
|
||||||
|
|
||||||
ptp_clock@2d10e00 {
|
ptp_clock@2d10e00 {
|
||||||
compatible = "fsl,etsec-ptp";
|
compatible = "fsl,etsec-ptp";
|
||||||
reg = <0x0 0x2d10e00 0x0 0xb0>;
|
reg = <0x0 0x2d10e00 0x0 0xb0>;
|
||||||
|
|||||||
@@ -170,7 +170,7 @@
|
|||||||
#clock-cells = <1>;
|
#clock-cells = <1>;
|
||||||
#reset-cells = <1>;
|
#reset-cells = <1>;
|
||||||
compatible = "amlogic,meson8-clkc";
|
compatible = "amlogic,meson8-clkc";
|
||||||
reg = <0x8000 0x4>, <0x4000 0x460>;
|
reg = <0x8000 0x4>, <0x4000 0x400>;
|
||||||
};
|
};
|
||||||
|
|
||||||
pwm_ef: pwm@86c0 {
|
pwm_ef: pwm@86c0 {
|
||||||
|
|||||||
@@ -121,7 +121,7 @@
|
|||||||
#clock-cells = <1>;
|
#clock-cells = <1>;
|
||||||
#reset-cells = <1>;
|
#reset-cells = <1>;
|
||||||
compatible = "amlogic,meson8b-clkc";
|
compatible = "amlogic,meson8b-clkc";
|
||||||
reg = <0x8000 0x4>, <0x4000 0x460>;
|
reg = <0x8000 0x4>, <0x4000 0x400>;
|
||||||
};
|
};
|
||||||
|
|
||||||
reset: reset-controller@4404 {
|
reset: reset-controller@4404 {
|
||||||
|
|||||||
@@ -180,7 +180,7 @@
|
|||||||
clocks = <&soc_clocks MMP2_CLK_GPIO>;
|
clocks = <&soc_clocks MMP2_CLK_GPIO>;
|
||||||
resets = <&soc_clocks MMP2_CLK_GPIO>;
|
resets = <&soc_clocks MMP2_CLK_GPIO>;
|
||||||
interrupt-controller;
|
interrupt-controller;
|
||||||
#interrupt-cells = <1>;
|
#interrupt-cells = <2>;
|
||||||
ranges;
|
ranges;
|
||||||
|
|
||||||
gcb0: gpio@d4019000 {
|
gcb0: gpio@d4019000 {
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
|
|
||||||
aliases {
|
aliases {
|
||||||
display0 = &lcd;
|
display0 = &lcd;
|
||||||
|
display1 = &tv0;
|
||||||
};
|
};
|
||||||
|
|
||||||
gpio-keys {
|
gpio-keys {
|
||||||
@@ -71,7 +72,7 @@
|
|||||||
#sound-dai-cells = <0>;
|
#sound-dai-cells = <0>;
|
||||||
};
|
};
|
||||||
|
|
||||||
spi_lcd {
|
spi_lcd: spi_lcd {
|
||||||
compatible = "spi-gpio";
|
compatible = "spi-gpio";
|
||||||
#address-cells = <0x1>;
|
#address-cells = <0x1>;
|
||||||
#size-cells = <0x0>;
|
#size-cells = <0x0>;
|
||||||
@@ -123,7 +124,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
tv0: connector {
|
tv0: connector {
|
||||||
compatible = "svideo-connector";
|
compatible = "composite-video-connector";
|
||||||
label = "tv";
|
label = "tv";
|
||||||
|
|
||||||
port {
|
port {
|
||||||
@@ -135,7 +136,7 @@
|
|||||||
|
|
||||||
tv_amp: opa362 {
|
tv_amp: opa362 {
|
||||||
compatible = "ti,opa362";
|
compatible = "ti,opa362";
|
||||||
enable-gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
|
enable-gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>; /* GPIO_23 to enable video out amplifier */
|
||||||
|
|
||||||
ports {
|
ports {
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
@@ -274,6 +275,13 @@
|
|||||||
OMAP3_CORE1_IOPAD(0x2134, PIN_INPUT_PULLUP | MUX_MODE4) /* gpio112 */
|
OMAP3_CORE1_IOPAD(0x2134, PIN_INPUT_PULLUP | MUX_MODE4) /* gpio112 */
|
||||||
>;
|
>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
penirq_pins: pinmux_penirq_pins {
|
||||||
|
pinctrl-single,pins = <
|
||||||
|
/* here we could enable to wakeup the cpu from suspend by a pen touch */
|
||||||
|
OMAP3_CORE1_IOPAD(0x2194, PIN_INPUT_PULLUP | MUX_MODE4) /* gpio160 */
|
||||||
|
>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&omap3_pmx_core2 {
|
&omap3_pmx_core2 {
|
||||||
@@ -411,10 +419,19 @@
|
|||||||
tsc2007@48 {
|
tsc2007@48 {
|
||||||
compatible = "ti,tsc2007";
|
compatible = "ti,tsc2007";
|
||||||
reg = <0x48>;
|
reg = <0x48>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&penirq_pins>;
|
||||||
interrupt-parent = <&gpio6>;
|
interrupt-parent = <&gpio6>;
|
||||||
interrupts = <0 IRQ_TYPE_EDGE_FALLING>; /* GPIO_160 */
|
interrupts = <0 IRQ_TYPE_EDGE_FALLING>; /* GPIO_160 */
|
||||||
gpios = <&gpio6 0 GPIO_ACTIVE_LOW>;
|
gpios = <&gpio6 0 GPIO_ACTIVE_LOW>; /* GPIO_160 */
|
||||||
ti,x-plate-ohms = <600>;
|
ti,x-plate-ohms = <600>;
|
||||||
|
touchscreen-size-x = <480>;
|
||||||
|
touchscreen-size-y = <640>;
|
||||||
|
touchscreen-max-pressure = <1000>;
|
||||||
|
touchscreen-fuzz-x = <3>;
|
||||||
|
touchscreen-fuzz-y = <8>;
|
||||||
|
touchscreen-fuzz-pressure = <10>;
|
||||||
|
touchscreen-inverted-y;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RFID EEPROM */
|
/* RFID EEPROM */
|
||||||
@@ -520,6 +537,12 @@
|
|||||||
regulator-max-microvolt = <3150000>;
|
regulator-max-microvolt = <3150000>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Needed to power the DPI pins */
|
||||||
|
|
||||||
|
&vpll2 {
|
||||||
|
regulator-always-on;
|
||||||
|
};
|
||||||
|
|
||||||
&dss {
|
&dss {
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = < &dss_dpi_pins >;
|
pinctrl-0 = < &dss_dpi_pins >;
|
||||||
@@ -540,10 +563,14 @@
|
|||||||
|
|
||||||
vdda-supply = <&vdac>;
|
vdda-supply = <&vdac>;
|
||||||
|
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
port {
|
port {
|
||||||
|
reg = <0>;
|
||||||
venc_out: endpoint {
|
venc_out: endpoint {
|
||||||
remote-endpoint = <&opa_in>;
|
remote-endpoint = <&opa_in>;
|
||||||
ti,channels = <2>;
|
ti,channels = <1>;
|
||||||
ti,invert-polarity;
|
ti,invert-polarity;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -587,22 +614,22 @@
|
|||||||
|
|
||||||
bootloaders@80000 {
|
bootloaders@80000 {
|
||||||
label = "U-Boot";
|
label = "U-Boot";
|
||||||
reg = <0x80000 0x1e0000>;
|
reg = <0x80000 0x1c0000>;
|
||||||
};
|
};
|
||||||
|
|
||||||
bootloaders_env@260000 {
|
bootloaders_env@240000 {
|
||||||
label = "U-Boot Env";
|
label = "U-Boot Env";
|
||||||
reg = <0x260000 0x20000>;
|
reg = <0x240000 0x40000>;
|
||||||
};
|
};
|
||||||
|
|
||||||
kernel@280000 {
|
kernel@280000 {
|
||||||
label = "Kernel";
|
label = "Kernel";
|
||||||
reg = <0x280000 0x400000>;
|
reg = <0x280000 0x600000>;
|
||||||
};
|
};
|
||||||
|
|
||||||
filesystem@680000 {
|
filesystem@880000 {
|
||||||
label = "File System";
|
label = "File System";
|
||||||
reg = <0x680000 0xf980000>;
|
reg = <0x880000 0>; /* 0 = MTDPART_SIZ_FULL */
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -221,6 +221,17 @@
|
|||||||
gpio = <&gpio6 4 GPIO_ACTIVE_HIGH>; /* GPIO_164 */
|
gpio = <&gpio6 4 GPIO_ACTIVE_HIGH>; /* GPIO_164 */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* wl1251 wifi+bt module */
|
||||||
|
wlan_en: fixed-regulator-wg7210_en {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "vwlan";
|
||||||
|
regulator-min-microvolt = <1800000>;
|
||||||
|
regulator-max-microvolt = <1800000>;
|
||||||
|
startup-delay-us = <50000>;
|
||||||
|
enable-active-high;
|
||||||
|
gpio = <&gpio1 23 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
|
||||||
/* wg7210 (wifi+bt module) 32k clock buffer */
|
/* wg7210 (wifi+bt module) 32k clock buffer */
|
||||||
wg7210_32k: fixed-regulator-wg7210_32k {
|
wg7210_32k: fixed-regulator-wg7210_32k {
|
||||||
compatible = "regulator-fixed";
|
compatible = "regulator-fixed";
|
||||||
@@ -514,9 +525,30 @@
|
|||||||
/*wp-gpios = <&gpio4 31 GPIO_ACTIVE_HIGH>;*/ /* GPIO_127 */
|
/*wp-gpios = <&gpio4 31 GPIO_ACTIVE_HIGH>;*/ /* GPIO_127 */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* mmc3 is probed using pdata-quirks to pass wl1251 card data */
|
|
||||||
&mmc3 {
|
&mmc3 {
|
||||||
status = "disabled";
|
vmmc-supply = <&wlan_en>;
|
||||||
|
|
||||||
|
bus-width = <4>;
|
||||||
|
non-removable;
|
||||||
|
ti,non-removable;
|
||||||
|
cap-power-off-card;
|
||||||
|
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&mmc3_pins>;
|
||||||
|
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
wlan: wifi@1 {
|
||||||
|
compatible = "ti,wl1251";
|
||||||
|
|
||||||
|
reg = <1>;
|
||||||
|
|
||||||
|
interrupt-parent = <&gpio1>;
|
||||||
|
interrupts = <21 IRQ_TYPE_LEVEL_HIGH>; /* GPIO_21 */
|
||||||
|
|
||||||
|
ti,wl1251-has-eeprom;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
/* bluetooth*/
|
/* bluetooth*/
|
||||||
|
|||||||
@@ -224,7 +224,7 @@
|
|||||||
pinctrl-0 = <&mmc1_pins>;
|
pinctrl-0 = <&mmc1_pins>;
|
||||||
vmmc-supply = <&vmmc1>;
|
vmmc-supply = <&vmmc1>;
|
||||||
vqmmc-supply = <&vsim>;
|
vqmmc-supply = <&vsim>;
|
||||||
cd-gpios = <&twl_gpio 0 GPIO_ACTIVE_HIGH>;
|
cd-gpios = <&twl_gpio 0 GPIO_ACTIVE_LOW>;
|
||||||
bus-width = <8>;
|
bus-width = <8>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -694,6 +694,11 @@
|
|||||||
vbus-supply = <&smps10_out1_reg>;
|
vbus-supply = <&smps10_out1_reg>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&dwc3 {
|
||||||
|
extcon = <&extcon_usb3>;
|
||||||
|
dr_mode = "otg";
|
||||||
|
};
|
||||||
|
|
||||||
&mcspi1 {
|
&mcspi1 {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -156,7 +156,7 @@
|
|||||||
&i2c {
|
&i2c {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
rtc {
|
rtc@32 {
|
||||||
compatible = "ricoh,rs5c372a";
|
compatible = "ricoh,rs5c372a";
|
||||||
reg = <0x32>;
|
reg = <0x32>;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -80,6 +80,10 @@
|
|||||||
#pwm-cells = <1>;
|
#pwm-cells = <1>;
|
||||||
clocks = <&clks CLK_PWM1>;
|
clocks = <&clks CLK_PWM1>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
rtc@40900000 {
|
||||||
|
clocks = <&clks CLK_OSC32k768>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
timer@40a00000 {
|
timer@40a00000 {
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
clocks = <&clks CLK_NONE>;
|
clocks = <&clks CLK_NONE>;
|
||||||
};
|
};
|
||||||
|
|
||||||
pxa27x_ohci: usb@4c000000 {
|
usb0: usb@4c000000 {
|
||||||
compatible = "marvell,pxa-ohci";
|
compatible = "marvell,pxa-ohci";
|
||||||
reg = <0x4c000000 0x10000>;
|
reg = <0x4c000000 0x10000>;
|
||||||
interrupts = <3>;
|
interrupts = <3>;
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
clocks = <&clks CLK_PWM1>;
|
clocks = <&clks CLK_PWM1>;
|
||||||
};
|
};
|
||||||
|
|
||||||
pwri2c: i2c@40f000180 {
|
pwri2c: i2c@40f00180 {
|
||||||
compatible = "mrvl,pxa-i2c";
|
compatible = "mrvl,pxa-i2c";
|
||||||
reg = <0x40f00180 0x24>;
|
reg = <0x40f00180 0x24>;
|
||||||
interrupts = <6>;
|
interrupts = <6>;
|
||||||
@@ -113,6 +113,10 @@
|
|||||||
|
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
rtc@40900000 {
|
||||||
|
clocks = <&clks CLK_OSC32k768>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
clocks {
|
clocks {
|
||||||
|
|||||||
@@ -117,13 +117,6 @@
|
|||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
|
||||||
usb0: ohci@4c000000 {
|
|
||||||
compatible = "marvell,pxa-ohci";
|
|
||||||
reg = <0x4c000000 0x10000>;
|
|
||||||
interrupts = <3>;
|
|
||||||
status = "disabled";
|
|
||||||
};
|
|
||||||
|
|
||||||
mmc0: mmc@41100000 {
|
mmc0: mmc@41100000 {
|
||||||
compatible = "marvell,pxa-mmc";
|
compatible = "marvell,pxa-mmc";
|
||||||
reg = <0x41100000 0x1000>;
|
reg = <0x41100000 0x1000>;
|
||||||
|
|||||||
@@ -189,7 +189,7 @@
|
|||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
|
||||||
pxa3xx_ohci: usb@4c000000 {
|
usb0: usb@4c000000 {
|
||||||
compatible = "marvell,pxa-ohci";
|
compatible = "marvell,pxa-ohci";
|
||||||
reg = <0x4c000000 0x10000>;
|
reg = <0x4c000000 0x10000>;
|
||||||
interrupts = <3>;
|
interrupts = <3>;
|
||||||
|
|||||||
@@ -234,7 +234,7 @@
|
|||||||
|
|
||||||
saw0: regulator@b089000 {
|
saw0: regulator@b089000 {
|
||||||
compatible = "qcom,saw2";
|
compatible = "qcom,saw2";
|
||||||
reg = <0x02089000 0x1000>, <0x0b009000 0x1000>;
|
reg = <0x0b089000 0x1000>, <0x0b009000 0x1000>;
|
||||||
regulator;
|
regulator;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -67,6 +67,14 @@
|
|||||||
<0xf0000100 0x100>;
|
<0xf0000100 0x100>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
timer@f0000200 {
|
||||||
|
compatible = "arm,cortex-a9-global-timer";
|
||||||
|
reg = <0xf0000200 0x100>;
|
||||||
|
interrupts = <GIC_PPI 11
|
||||||
|
(GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_EDGE_RISING)>;
|
||||||
|
clocks = <&cpg_clocks R8A7779_CLK_ZS>;
|
||||||
|
};
|
||||||
|
|
||||||
timer@f0000600 {
|
timer@f0000600 {
|
||||||
compatible = "arm,cortex-a9-twd-timer";
|
compatible = "arm,cortex-a9-twd-timer";
|
||||||
reg = <0xf0000600 0x20>;
|
reg = <0xf0000600 0x20>;
|
||||||
|
|||||||
@@ -750,7 +750,7 @@
|
|||||||
/* no rts / cts for uart2 */
|
/* no rts / cts for uart2 */
|
||||||
};
|
};
|
||||||
|
|
||||||
spi {
|
spi-pins {
|
||||||
spi_txd:spi-txd {
|
spi_txd:spi-txd {
|
||||||
rockchip,pins = <1 29 RK_FUNC_3 &pcfg_pull_default>;
|
rockchip,pins = <1 29 RK_FUNC_3 &pcfg_pull_default>;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -130,6 +130,8 @@
|
|||||||
regulator-min-microvolt = <3300000>;
|
regulator-min-microvolt = <3300000>;
|
||||||
regulator-max-microvolt = <3300000>;
|
regulator-max-microvolt = <3300000>;
|
||||||
gpio = <&gpio3 RK_PA1 GPIO_ACTIVE_LOW>;
|
gpio = <&gpio3 RK_PA1 GPIO_ACTIVE_LOW>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&sdmmc_pwr>;
|
||||||
startup-delay-us = <100000>;
|
startup-delay-us = <100000>;
|
||||||
vin-supply = <&vcc_io>;
|
vin-supply = <&vcc_io>;
|
||||||
};
|
};
|
||||||
@@ -348,6 +350,12 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
sd0 {
|
||||||
|
sdmmc_pwr: sdmmc-pwr {
|
||||||
|
rockchip,pins = <RK_GPIO3 1 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
usb {
|
usb {
|
||||||
host_vbus_drv: host-vbus-drv {
|
host_vbus_drv: host-vbus-drv {
|
||||||
rockchip,pins = <0 3 RK_FUNC_GPIO &pcfg_pull_none>;
|
rockchip,pins = <0 3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
|
|
||||||
vcc_flash: flash-regulator {
|
vcc_flash: flash-regulator {
|
||||||
compatible = "regulator-fixed";
|
compatible = "regulator-fixed";
|
||||||
regulator-name = "vcc_sys";
|
regulator-name = "vcc_flash";
|
||||||
regulator-min-microvolt = <1800000>;
|
regulator-min-microvolt = <1800000>;
|
||||||
regulator-max-microvolt = <1800000>;
|
regulator-max-microvolt = <1800000>;
|
||||||
startup-delay-us = <150>;
|
startup-delay-us = <150>;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user