mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
Merge remote-tracking branch 'stable/linux-5.10.y' into rpi-5.10.y
This commit is contained in:
@@ -92,7 +92,8 @@ Triggers can be set on more than one psi metric and more than one trigger
|
||||
for the same psi metric can be specified. However for each trigger a separate
|
||||
file descriptor is required to be able to poll it separately from others,
|
||||
therefore for each trigger a separate open() syscall should be made even
|
||||
when opening the same psi interface file.
|
||||
when opening the same psi interface file. Write operations to a file descriptor
|
||||
with an already existing psi trigger will fail with EBUSY.
|
||||
|
||||
Monitors activate only when system enters stall state for the monitored
|
||||
psi metric and deactivates upon exit from the stall state. While system is
|
||||
|
||||
@@ -60,8 +60,8 @@ privileged data touched during the speculative execution.
|
||||
Spectre variant 1 attacks take advantage of speculative execution of
|
||||
conditional branches, while Spectre variant 2 attacks use speculative
|
||||
execution of indirect branches to leak privileged memory.
|
||||
See :ref:`[1] <spec_ref1>` :ref:`[5] <spec_ref5>` :ref:`[7] <spec_ref7>`
|
||||
:ref:`[10] <spec_ref10>` :ref:`[11] <spec_ref11>`.
|
||||
See :ref:`[1] <spec_ref1>` :ref:`[5] <spec_ref5>` :ref:`[6] <spec_ref6>`
|
||||
:ref:`[7] <spec_ref7>` :ref:`[10] <spec_ref10>` :ref:`[11] <spec_ref11>`.
|
||||
|
||||
Spectre variant 1 (Bounds Check Bypass)
|
||||
---------------------------------------
|
||||
@@ -131,6 +131,19 @@ steer its indirect branch speculations to gadget code, and measure the
|
||||
speculative execution's side effects left in level 1 cache to infer the
|
||||
victim's data.
|
||||
|
||||
Yet another variant 2 attack vector is for the attacker to poison the
|
||||
Branch History Buffer (BHB) to speculatively steer an indirect branch
|
||||
to a specific Branch Target Buffer (BTB) entry, even if the entry isn't
|
||||
associated with the source address of the indirect branch. Specifically,
|
||||
the BHB might be shared across privilege levels even in the presence of
|
||||
Enhanced IBRS.
|
||||
|
||||
Currently the only known real-world BHB attack vector is via
|
||||
unprivileged eBPF. Therefore, it's highly recommended to not enable
|
||||
unprivileged eBPF, especially when eIBRS is used (without retpolines).
|
||||
For a full mitigation against BHB attacks, it's recommended to use
|
||||
retpolines (or eIBRS combined with retpolines).
|
||||
|
||||
Attack scenarios
|
||||
----------------
|
||||
|
||||
@@ -364,13 +377,15 @@ The possible values in this file are:
|
||||
|
||||
- Kernel status:
|
||||
|
||||
==================================== =================================
|
||||
======================================== =================================
|
||||
'Not affected' The processor is not vulnerable
|
||||
'Vulnerable' Vulnerable, no mitigation
|
||||
'Mitigation: Full generic retpoline' Software-focused mitigation
|
||||
'Mitigation: Full AMD retpoline' AMD-specific software mitigation
|
||||
'Mitigation: None' Vulnerable, no mitigation
|
||||
'Mitigation: Retpolines' Use Retpoline thunks
|
||||
'Mitigation: LFENCE' Use LFENCE instructions
|
||||
'Mitigation: Enhanced IBRS' Hardware-focused mitigation
|
||||
==================================== =================================
|
||||
'Mitigation: Enhanced IBRS + Retpolines' Hardware-focused + Retpolines
|
||||
'Mitigation: Enhanced IBRS + LFENCE' Hardware-focused + LFENCE
|
||||
======================================== =================================
|
||||
|
||||
- Firmware status: Show if Indirect Branch Restricted Speculation (IBRS) is
|
||||
used to protect against Spectre variant 2 attacks when calling firmware (x86 only).
|
||||
@@ -584,12 +599,13 @@ kernel command line.
|
||||
|
||||
Specific mitigations can also be selected manually:
|
||||
|
||||
retpoline
|
||||
replace indirect branches
|
||||
retpoline,generic
|
||||
google's original retpoline
|
||||
retpoline,amd
|
||||
AMD-specific minimal thunk
|
||||
retpoline auto pick between generic,lfence
|
||||
retpoline,generic Retpolines
|
||||
retpoline,lfence LFENCE; indirect branch
|
||||
retpoline,amd alias for retpoline,lfence
|
||||
eibrs enhanced IBRS
|
||||
eibrs,retpoline enhanced IBRS + Retpolines
|
||||
eibrs,lfence enhanced IBRS + LFENCE
|
||||
|
||||
Not specifying this option is equivalent to
|
||||
spectre_v2=auto.
|
||||
@@ -730,7 +746,7 @@ AMD white papers:
|
||||
|
||||
.. _spec_ref6:
|
||||
|
||||
[6] `Software techniques for managing speculation on AMD processors <https://developer.amd.com/wp-content/resources/90343-B_SoftwareTechniquesforManagingSpeculation_WP_7-18Update_FNL.pdf>`_.
|
||||
[6] `Software techniques for managing speculation on AMD processors <https://developer.amd.com/wp-content/resources/Managing-Speculation-on-AMD-Processors.pdf>`_.
|
||||
|
||||
ARM white papers:
|
||||
|
||||
|
||||
@@ -4957,8 +4957,12 @@
|
||||
Specific mitigations can also be selected manually:
|
||||
|
||||
retpoline - replace indirect branches
|
||||
retpoline,generic - google's original retpoline
|
||||
retpoline,amd - AMD-specific minimal thunk
|
||||
retpoline,generic - Retpolines
|
||||
retpoline,lfence - LFENCE; indirect branch
|
||||
retpoline,amd - alias for retpoline,lfence
|
||||
eibrs - enhanced IBRS
|
||||
eibrs,retpoline - enhanced IBRS + Retpolines
|
||||
eibrs,lfence - enhanced IBRS + LFENCE
|
||||
|
||||
Not specifying this option is equivalent to
|
||||
spectre_v2=auto.
|
||||
|
||||
@@ -787,6 +787,7 @@ bit 1 print system memory info
|
||||
bit 2 print timer info
|
||||
bit 3 print locks info if ``CONFIG_LOCKDEP`` is on
|
||||
bit 4 print ftrace buffer
|
||||
bit 5 print all printk messages in buffer
|
||||
===== ============================================
|
||||
|
||||
So for example to print tasks and memory info on panic, user can::
|
||||
|
||||
@@ -235,7 +235,15 @@ infrastructure:
|
||||
| DPB | [3-0] | y |
|
||||
+------------------------------+---------+---------+
|
||||
|
||||
6) ID_AA64MMFR2_EL1 - Memory model feature register 2
|
||||
6) ID_AA64MMFR0_EL1 - Memory model feature register 0
|
||||
|
||||
+------------------------------+---------+---------+
|
||||
| Name | bits | visible |
|
||||
+------------------------------+---------+---------+
|
||||
| ECV | [63-60] | y |
|
||||
+------------------------------+---------+---------+
|
||||
|
||||
7) ID_AA64MMFR2_EL1 - Memory model feature register 2
|
||||
|
||||
+------------------------------+---------+---------+
|
||||
| Name | bits | visible |
|
||||
@@ -243,7 +251,7 @@ infrastructure:
|
||||
| AT | [35-32] | y |
|
||||
+------------------------------+---------+---------+
|
||||
|
||||
7) ID_AA64ZFR0_EL1 - SVE feature ID register 0
|
||||
8) ID_AA64ZFR0_EL1 - SVE feature ID register 0
|
||||
|
||||
+------------------------------+---------+---------+
|
||||
| Name | bits | visible |
|
||||
@@ -267,6 +275,23 @@ infrastructure:
|
||||
| SVEVer | [3-0] | y |
|
||||
+------------------------------+---------+---------+
|
||||
|
||||
8) ID_AA64MMFR1_EL1 - Memory model feature register 1
|
||||
|
||||
+------------------------------+---------+---------+
|
||||
| Name | bits | visible |
|
||||
+------------------------------+---------+---------+
|
||||
| AFP | [47-44] | y |
|
||||
+------------------------------+---------+---------+
|
||||
|
||||
9) ID_AA64ISAR2_EL1 - Instruction set attribute register 2
|
||||
|
||||
+------------------------------+---------+---------+
|
||||
| Name | bits | visible |
|
||||
+------------------------------+---------+---------+
|
||||
| RPRES | [7-4] | y |
|
||||
+------------------------------+---------+---------+
|
||||
|
||||
|
||||
Appendix I: Example
|
||||
-------------------
|
||||
|
||||
|
||||
@@ -245,6 +245,18 @@ HWCAP2_MTE
|
||||
Functionality implied by ID_AA64PFR1_EL1.MTE == 0b0010, as described
|
||||
by Documentation/arm64/memory-tagging-extension.rst.
|
||||
|
||||
HWCAP2_ECV
|
||||
|
||||
Functionality implied by ID_AA64MMFR0_EL1.ECV == 0b0001.
|
||||
|
||||
HWCAP2_AFP
|
||||
|
||||
Functionality implied by ID_AA64MFR1_EL1.AFP == 0b0001.
|
||||
|
||||
HWCAP2_RPRES
|
||||
|
||||
Functionality implied by ID_AA64ISAR2_EL1.RPRES == 0b0001.
|
||||
|
||||
4. Unused AT_HWCAP bits
|
||||
-----------------------
|
||||
|
||||
|
||||
@@ -130,3 +130,11 @@ accesses to DMA buffers in both privileged "supervisor" and unprivileged
|
||||
subsystem that the buffer is fully accessible at the elevated privilege
|
||||
level (and ideally inaccessible or at least read-only at the
|
||||
lesser-privileged levels).
|
||||
|
||||
DMA_ATTR_OVERWRITE
|
||||
------------------
|
||||
|
||||
This is a hint to the DMA-mapping subsystem that the device is expected to
|
||||
overwrite the entire mapped size, thus the caller does not require any of the
|
||||
previous buffer contents to be preserved. This allows bounce-buffering
|
||||
implementations to optimise DMA_FROM_DEVICE transfers.
|
||||
|
||||
@@ -119,6 +119,9 @@ Boards (incomplete list of examples):
|
||||
- OMAP3 BeagleBoard : Low cost community board
|
||||
compatible = "ti,omap3-beagle", "ti,omap3430", "ti,omap3"
|
||||
|
||||
- OMAP3 BeagleBoard A to B4 : Early BeagleBoard revisions A to B4 with a timer quirk
|
||||
compatible = "ti,omap3-beagle-ab4", "ti,omap3-beagle", "ti,omap3430", "ti,omap3"
|
||||
|
||||
- OMAP3 Tobi with Overo : Commercial expansion board with daughter board
|
||||
compatible = "gumstix,omap3-overo-tobi", "gumstix,omap3-overo", "ti,omap3430", "ti,omap3"
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ patternProperties:
|
||||
properties:
|
||||
reg:
|
||||
description:
|
||||
Contains the native Ready/Busy IDs.
|
||||
Contains the chip-select IDs.
|
||||
|
||||
nand-ecc-mode:
|
||||
description:
|
||||
@@ -174,6 +174,6 @@ examples:
|
||||
nand-ecc-mode = "soft";
|
||||
nand-ecc-algo = "bch";
|
||||
|
||||
/* controller specific properties */
|
||||
/* NAND chip specific properties */
|
||||
};
|
||||
};
|
||||
|
||||
@@ -31,7 +31,7 @@ tcan4x5x: tcan4x5x@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
spi-max-frequency = <10000000>;
|
||||
bosch,mram-cfg = <0x0 0 0 32 0 0 1 1>;
|
||||
bosch,mram-cfg = <0x0 0 0 16 0 0 1 1>;
|
||||
interrupt-parent = <&gpio1>;
|
||||
interrupts = <14 IRQ_TYPE_LEVEL_LOW>;
|
||||
device-state-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
@@ -8,11 +8,13 @@ Required properties:
|
||||
- reg: should contain 2 entries, one for the registers and one for the direct
|
||||
mapping area
|
||||
- reg-names: should contain "regs" and "dirmap"
|
||||
- interrupts: interrupt line connected to the SPI controller
|
||||
- clock-names: should contain "ps_clk", "send_clk" and "send_dly_clk"
|
||||
- clocks: should contain 3 entries for the "ps_clk", "send_clk" and
|
||||
"send_dly_clk" clocks
|
||||
|
||||
Optional properties:
|
||||
- interrupts: interrupt line connected to the SPI controller
|
||||
|
||||
Example:
|
||||
|
||||
spi@43c30000 {
|
||||
|
||||
@@ -273,24 +273,6 @@ Contact: Daniel Vetter, Noralf Tronnes
|
||||
|
||||
Level: Advanced
|
||||
|
||||
Garbage collect fbdev scrolling acceleration
|
||||
--------------------------------------------
|
||||
|
||||
Scroll acceleration is disabled in fbcon by hard-wiring p->scrollmode =
|
||||
SCROLL_REDRAW. There's a ton of code this will allow us to remove:
|
||||
- lots of code in fbcon.c
|
||||
- a bunch of the hooks in fbcon_ops, maybe the remaining hooks could be called
|
||||
directly instead of the function table (with a switch on p->rotate)
|
||||
- fb_copyarea is unused after this, and can be deleted from all drivers
|
||||
|
||||
Note that not all acceleration code can be deleted, since clearing and cursor
|
||||
support is still accelerated, which might be good candidates for further
|
||||
deletion projects.
|
||||
|
||||
Contact: Daniel Vetter
|
||||
|
||||
Level: Intermediate
|
||||
|
||||
idr_init_base()
|
||||
---------------
|
||||
|
||||
|
||||
@@ -168,7 +168,16 @@ Trees
|
||||
- The finalized and tagged releases of all stable kernels can be found
|
||||
in separate branches per version at:
|
||||
|
||||
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
|
||||
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
|
||||
|
||||
- The release candidate of all stable kernel versions can be found at:
|
||||
|
||||
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/
|
||||
|
||||
.. warning::
|
||||
The -stable-rc tree is a snapshot in time of the stable-queue tree and
|
||||
will change frequently, hence will be rebased often. It should only be
|
||||
used for testing purposes (e.g. to be consumed by CI systems).
|
||||
|
||||
|
||||
Review committee
|
||||
|
||||
@@ -261,6 +261,10 @@ alc-sense-combo
|
||||
huawei-mbx-stereo
|
||||
Enable initialization verbs for Huawei MBX stereo speakers;
|
||||
might be risky, try this at your own risk
|
||||
alc298-samsung-headphone
|
||||
Samsung laptops with ALC298
|
||||
alc256-samsung-headphone
|
||||
Samsung laptops with ALC256
|
||||
|
||||
ALC66x/67x/892
|
||||
==============
|
||||
|
||||
@@ -198,6 +198,15 @@ The glob (~) accepts a wild card character (\*,?) and character classes
|
||||
prev_comm ~ "*sh*"
|
||||
prev_comm ~ "ba*sh"
|
||||
|
||||
If the field is a pointer that points into user space (for example
|
||||
"filename" from sys_enter_openat), then you have to append ".ustring" to the
|
||||
field name::
|
||||
|
||||
filename.ustring ~ "password"
|
||||
|
||||
As the kernel will have to know how to retrieve the memory that the pointer
|
||||
is at from user space.
|
||||
|
||||
5.2 Setting filters
|
||||
-------------------
|
||||
|
||||
@@ -230,6 +239,16 @@ Currently the caret ('^') for an error always appears at the beginning of
|
||||
the filter string; the error message should still be useful though
|
||||
even without more accurate position info.
|
||||
|
||||
5.2.1 Filter limitations
|
||||
------------------------
|
||||
|
||||
If a filter is placed on a string pointer ``(char *)`` that does not point
|
||||
to a string on the ring buffer, but instead points to kernel or user space
|
||||
memory, then, for safety reasons, at most 1024 bytes of the content is
|
||||
copied onto a temporary buffer to do the compare. If the copy of the memory
|
||||
faults (the pointer points to memory that should not be accessed), then the
|
||||
string compare will be treated as not matching.
|
||||
|
||||
5.3 Clearing filters
|
||||
--------------------
|
||||
|
||||
|
||||
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 10
|
||||
SUBLEVEL = 95
|
||||
SUBLEVEL = 110
|
||||
EXTRAVERSION =
|
||||
NAME = Dare mighty things
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ SYSCALL_DEFINE0(arc_gettls)
|
||||
return task_thread_info(current)->thr_ptr;
|
||||
}
|
||||
|
||||
SYSCALL_DEFINE3(arc_usr_cmpxchg, int *, uaddr, int, expected, int, new)
|
||||
SYSCALL_DEFINE3(arc_usr_cmpxchg, int __user *, uaddr, int, expected, int, new)
|
||||
{
|
||||
struct pt_regs *regs = current_pt_regs();
|
||||
u32 uval;
|
||||
|
||||
@@ -750,6 +750,7 @@ dtb-$(CONFIG_ARCH_OMAP3) += \
|
||||
logicpd-som-lv-37xx-devkit.dtb \
|
||||
omap3430-sdp.dtb \
|
||||
omap3-beagle.dtb \
|
||||
omap3-beagle-ab4.dtb \
|
||||
omap3-beagle-xm.dtb \
|
||||
omap3-beagle-xm-ab.dtb \
|
||||
omap3-cm-t3517.dtb \
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
};
|
||||
|
||||
pinctrl_fwqspid_default: fwqspid_default {
|
||||
function = "FWQSPID";
|
||||
function = "FWSPID";
|
||||
groups = "FWQSPID";
|
||||
};
|
||||
|
||||
|
||||
@@ -290,6 +290,7 @@
|
||||
|
||||
hvs: hvs@7e400000 {
|
||||
compatible = "brcm,bcm2711-hvs";
|
||||
reg = <0x7e400000 0x8000>;
|
||||
interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
@@ -471,12 +472,26 @@
|
||||
#size-cells = <0>;
|
||||
enable-method = "brcm,bcm2836-smp"; // for ARM 32-bit
|
||||
|
||||
/* Source for d/i-cache-line-size and d/i-cache-sets
|
||||
* https://developer.arm.com/documentation/100095/0003
|
||||
* /Level-1-Memory-System/About-the-L1-memory-system?lang=en
|
||||
* Source for d/i-cache-size
|
||||
* https://www.raspberrypi.com/documentation/computers
|
||||
* /processors.html#bcm2711
|
||||
*/
|
||||
cpu0: cpu@0 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a72";
|
||||
reg = <0>;
|
||||
enable-method = "spin-table";
|
||||
cpu-release-addr = <0x0 0x000000d8>;
|
||||
d-cache-size = <0x8000>;
|
||||
d-cache-line-size = <64>;
|
||||
d-cache-sets = <256>; // 32KiB(size)/64(line-size)=512ways/2-way set
|
||||
i-cache-size = <0xc000>;
|
||||
i-cache-line-size = <64>;
|
||||
i-cache-sets = <256>; // 48KiB(size)/64(line-size)=768ways/3-way set
|
||||
next-level-cache = <&l2>;
|
||||
};
|
||||
|
||||
cpu1: cpu@1 {
|
||||
@@ -485,6 +500,13 @@
|
||||
reg = <1>;
|
||||
enable-method = "spin-table";
|
||||
cpu-release-addr = <0x0 0x000000e0>;
|
||||
d-cache-size = <0x8000>;
|
||||
d-cache-line-size = <64>;
|
||||
d-cache-sets = <256>; // 32KiB(size)/64(line-size)=512ways/2-way set
|
||||
i-cache-size = <0xc000>;
|
||||
i-cache-line-size = <64>;
|
||||
i-cache-sets = <256>; // 48KiB(size)/64(line-size)=768ways/3-way set
|
||||
next-level-cache = <&l2>;
|
||||
};
|
||||
|
||||
cpu2: cpu@2 {
|
||||
@@ -493,6 +515,13 @@
|
||||
reg = <2>;
|
||||
enable-method = "spin-table";
|
||||
cpu-release-addr = <0x0 0x000000e8>;
|
||||
d-cache-size = <0x8000>;
|
||||
d-cache-line-size = <64>;
|
||||
d-cache-sets = <256>; // 32KiB(size)/64(line-size)=512ways/2-way set
|
||||
i-cache-size = <0xc000>;
|
||||
i-cache-line-size = <64>;
|
||||
i-cache-sets = <256>; // 48KiB(size)/64(line-size)=768ways/3-way set
|
||||
next-level-cache = <&l2>;
|
||||
};
|
||||
|
||||
cpu3: cpu@3 {
|
||||
@@ -501,6 +530,28 @@
|
||||
reg = <3>;
|
||||
enable-method = "spin-table";
|
||||
cpu-release-addr = <0x0 0x000000f0>;
|
||||
d-cache-size = <0x8000>;
|
||||
d-cache-line-size = <64>;
|
||||
d-cache-sets = <256>; // 32KiB(size)/64(line-size)=512ways/2-way set
|
||||
i-cache-size = <0xc000>;
|
||||
i-cache-line-size = <64>;
|
||||
i-cache-sets = <256>; // 48KiB(size)/64(line-size)=768ways/3-way set
|
||||
next-level-cache = <&l2>;
|
||||
};
|
||||
|
||||
/* Source for d/i-cache-line-size and d/i-cache-sets
|
||||
* https://developer.arm.com/documentation/100095/0003
|
||||
* /Level-2-Memory-System/About-the-L2-memory-system?lang=en
|
||||
* Source for d/i-cache-size
|
||||
* https://www.raspberrypi.com/documentation/computers
|
||||
* /processors.html#bcm2711
|
||||
*/
|
||||
l2: l2-cache0 {
|
||||
compatible = "cache";
|
||||
cache-size = <0x100000>;
|
||||
cache-line-size = <64>;
|
||||
cache-sets = <1024>; // 1MiB(size)/64(line-size)=16384ways/16-way set
|
||||
cache-level = <2>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -40,12 +40,26 @@
|
||||
#size-cells = <0>;
|
||||
enable-method = "brcm,bcm2836-smp"; // for ARM 32-bit
|
||||
|
||||
/* Source for d/i-cache-line-size and d/i-cache-sets
|
||||
* https://developer.arm.com/documentation/ddi0500/e/level-1-memory-system
|
||||
* /about-the-l1-memory-system?lang=en
|
||||
*
|
||||
* Source for d/i-cache-size
|
||||
* https://magpi.raspberrypi.com/articles/raspberry-pi-3-specs-benchmarks
|
||||
*/
|
||||
cpu0: cpu@0 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a53";
|
||||
reg = <0>;
|
||||
enable-method = "spin-table";
|
||||
cpu-release-addr = <0x0 0x000000d8>;
|
||||
d-cache-size = <0x8000>;
|
||||
d-cache-line-size = <64>;
|
||||
d-cache-sets = <128>; // 32KiB(size)/64(line-size)=512ways/4-way set
|
||||
i-cache-size = <0x8000>;
|
||||
i-cache-line-size = <64>;
|
||||
i-cache-sets = <256>; // 32KiB(size)/64(line-size)=512ways/2-way set
|
||||
next-level-cache = <&l2>;
|
||||
};
|
||||
|
||||
cpu1: cpu@1 {
|
||||
@@ -54,6 +68,13 @@
|
||||
reg = <1>;
|
||||
enable-method = "spin-table";
|
||||
cpu-release-addr = <0x0 0x000000e0>;
|
||||
d-cache-size = <0x8000>;
|
||||
d-cache-line-size = <64>;
|
||||
d-cache-sets = <128>; // 32KiB(size)/64(line-size)=512ways/4-way set
|
||||
i-cache-size = <0x8000>;
|
||||
i-cache-line-size = <64>;
|
||||
i-cache-sets = <256>; // 32KiB(size)/64(line-size)=512ways/2-way set
|
||||
next-level-cache = <&l2>;
|
||||
};
|
||||
|
||||
cpu2: cpu@2 {
|
||||
@@ -62,6 +83,13 @@
|
||||
reg = <2>;
|
||||
enable-method = "spin-table";
|
||||
cpu-release-addr = <0x0 0x000000e8>;
|
||||
d-cache-size = <0x8000>;
|
||||
d-cache-line-size = <64>;
|
||||
d-cache-sets = <128>; // 32KiB(size)/64(line-size)=512ways/4-way set
|
||||
i-cache-size = <0x8000>;
|
||||
i-cache-line-size = <64>;
|
||||
i-cache-sets = <256>; // 32KiB(size)/64(line-size)=512ways/2-way set
|
||||
next-level-cache = <&l2>;
|
||||
};
|
||||
|
||||
cpu3: cpu@3 {
|
||||
@@ -70,6 +98,27 @@
|
||||
reg = <3>;
|
||||
enable-method = "spin-table";
|
||||
cpu-release-addr = <0x0 0x000000f0>;
|
||||
d-cache-size = <0x8000>;
|
||||
d-cache-line-size = <64>;
|
||||
d-cache-sets = <128>; // 32KiB(size)/64(line-size)=512ways/4-way set
|
||||
i-cache-size = <0x8000>;
|
||||
i-cache-line-size = <64>;
|
||||
i-cache-sets = <256>; // 32KiB(size)/64(line-size)=512ways/2-way set
|
||||
next-level-cache = <&l2>;
|
||||
};
|
||||
|
||||
/* Source for cache-line-size + cache-sets
|
||||
* https://developer.arm.com/documentation/ddi0500
|
||||
* /e/level-2-memory-system/about-the-l2-memory-system?lang=en
|
||||
* Source for cache-size
|
||||
* https://datasheets.raspberrypi.com/cm/cm1-and-cm3-datasheet.pdf
|
||||
*/
|
||||
l2: l2-cache0 {
|
||||
compatible = "cache";
|
||||
cache-size = <0x80000>;
|
||||
cache-line-size = <64>;
|
||||
cache-sets = <512>; // 512KiB(size)/64(line-size)=8192ways/16-way set
|
||||
cache-level = <2>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -3448,8 +3448,7 @@
|
||||
ti,timer-pwm;
|
||||
};
|
||||
};
|
||||
|
||||
target-module@2c000 { /* 0x4882c000, ap 17 02.0 */
|
||||
timer15_target: target-module@2c000 { /* 0x4882c000, ap 17 02.0 */
|
||||
compatible = "ti,sysc-omap4-timer", "ti,sysc";
|
||||
reg = <0x2c000 0x4>,
|
||||
<0x2c010 0x4>;
|
||||
@@ -3477,7 +3476,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
target-module@2e000 { /* 0x4882e000, ap 19 14.0 */
|
||||
timer16_target: target-module@2e000 { /* 0x4882e000, ap 19 14.0 */
|
||||
compatible = "ti,sysc-omap4-timer", "ti,sysc";
|
||||
reg = <0x2e000 0x4>,
|
||||
<0x2e010 0x4>;
|
||||
|
||||
@@ -1093,20 +1093,20 @@
|
||||
};
|
||||
|
||||
/* Local timers, see ARM architected timer wrap erratum i940 */
|
||||
&timer3_target {
|
||||
&timer15_target {
|
||||
ti,no-reset-on-init;
|
||||
ti,no-idle;
|
||||
timer@0 {
|
||||
assigned-clocks = <&l4per_clkctrl DRA7_L4PER_TIMER3_CLKCTRL 24>;
|
||||
assigned-clocks = <&l4per3_clkctrl DRA7_L4PER3_TIMER15_CLKCTRL 24>;
|
||||
assigned-clock-parents = <&timer_sys_clk_div>;
|
||||
};
|
||||
};
|
||||
|
||||
&timer4_target {
|
||||
&timer16_target {
|
||||
ti,no-reset-on-init;
|
||||
ti,no-idle;
|
||||
timer@0 {
|
||||
assigned-clocks = <&l4per_clkctrl DRA7_L4PER_TIMER4_CLKCTRL 24>;
|
||||
assigned-clocks = <&l4per3_clkctrl DRA7_L4PER3_TIMER16_CLKCTRL 24>;
|
||||
assigned-clock-parents = <&timer_sys_clk_div>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -260,7 +260,7 @@
|
||||
};
|
||||
|
||||
uart3_data: uart3-data {
|
||||
samsung,pins = "gpa1-4", "gpa1-4";
|
||||
samsung,pins = "gpa1-4", "gpa1-5";
|
||||
samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
|
||||
samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
|
||||
samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
|
||||
|
||||
@@ -118,6 +118,9 @@
|
||||
status = "okay";
|
||||
ddc = <&i2c_2>;
|
||||
hpd-gpios = <&gpx3 7 GPIO_ACTIVE_HIGH>;
|
||||
vdd-supply = <&ldo8_reg>;
|
||||
vdd_osc-supply = <&ldo10_reg>;
|
||||
vdd_pll-supply = <&ldo8_reg>;
|
||||
};
|
||||
|
||||
&i2c_0 {
|
||||
|
||||
@@ -124,6 +124,9 @@
|
||||
hpd-gpios = <&gpx3 7 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hdmi_hpd_irq>;
|
||||
vdd-supply = <&ldo6_reg>;
|
||||
vdd_osc-supply = <&ldo7_reg>;
|
||||
vdd_pll-supply = <&ldo6_reg>;
|
||||
};
|
||||
|
||||
&hsi2c_4 {
|
||||
|
||||
@@ -79,7 +79,6 @@
|
||||
MX23_PAD_LCD_RESET__GPIO_1_18
|
||||
MX23_PAD_PWM3__GPIO_1_29
|
||||
MX23_PAD_PWM4__GPIO_1_30
|
||||
MX23_PAD_SSP1_DETECT__SSP1_DETECT
|
||||
>;
|
||||
fsl,drive-strength = <MXS_DRIVE_4mA>;
|
||||
fsl,voltage = <MXS_VOLTAGE_HIGH>;
|
||||
|
||||
@@ -53,6 +53,31 @@
|
||||
};
|
||||
};
|
||||
|
||||
lvds-decoder {
|
||||
compatible = "ti,ds90cf364a", "lvds-decoder";
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
|
||||
lvds_decoder_in: endpoint {
|
||||
remote-endpoint = <&lvds0_out>;
|
||||
};
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
|
||||
lvds_decoder_out: endpoint {
|
||||
remote-endpoint = <&panel_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
panel {
|
||||
compatible = "edt,etm0700g0dh6";
|
||||
pinctrl-0 = <&pinctrl_display_gpio>;
|
||||
@@ -61,7 +86,7 @@
|
||||
|
||||
port {
|
||||
panel_in: endpoint {
|
||||
remote-endpoint = <&lvds0_out>;
|
||||
remote-endpoint = <&lvds_decoder_out>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -450,7 +475,7 @@
|
||||
reg = <2>;
|
||||
|
||||
lvds0_out: endpoint {
|
||||
remote-endpoint = <&panel_in>;
|
||||
remote-endpoint = <&lvds_decoder_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
* Author: Fabio Estevam <fabio.estevam@freescale.com>
|
||||
*/
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
backlight = &backlight;
|
||||
@@ -226,6 +228,7 @@
|
||||
MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059
|
||||
MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059
|
||||
MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059
|
||||
MX6QDL_PAD_SD3_DAT5__GPIO7_IO00 0x1b0b0
|
||||
>;
|
||||
};
|
||||
|
||||
@@ -304,7 +307,7 @@
|
||||
&usdhc3 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_usdhc3>;
|
||||
non-removable;
|
||||
cd-gpios = <&gpio7 0 GPIO_ACTIVE_LOW>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
dailink_master: simple-audio-card,codec {
|
||||
sound-dai = <&codec>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -293,7 +293,7 @@
|
||||
compatible = "fsl,sgtl5000";
|
||||
#sound-dai-cells = <0>;
|
||||
reg = <0x0a>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_sai1_mclk>;
|
||||
VDDA-supply = <®_module_3v3_avdd>;
|
||||
|
||||
@@ -250,7 +250,7 @@
|
||||
tlv320aic32x4: audio-codec@18 {
|
||||
compatible = "ti,tlv320aic32x4";
|
||||
reg = <0x18>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
|
||||
clock-names = "mclk";
|
||||
ldoin-supply = <®_audio_3v3>;
|
||||
iov-supply = <®_audio_3v3>;
|
||||
|
||||
@@ -288,7 +288,7 @@
|
||||
codec: wm8960@1a {
|
||||
compatible = "wlf,wm8960";
|
||||
reg = <0x1a>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
|
||||
clock-names = "mclk";
|
||||
wlf,shared-lrclk;
|
||||
};
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
dailink_master: simple-audio-card,codec {
|
||||
sound-dai = <&sgtl5000>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -41,7 +41,7 @@
|
||||
#sound-dai-cells = <0>;
|
||||
reg = <0x0a>;
|
||||
compatible = "fsl,sgtl5000";
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
|
||||
VDDA-supply = <®_2p5v>;
|
||||
VDDIO-supply = <®_vref_1v8>;
|
||||
};
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
dailink_master: simple-audio-card,codec {
|
||||
sound-dai = <&sgtl5000>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -41,7 +41,7 @@
|
||||
#sound-dai-cells = <0>;
|
||||
reg = <0x0a>;
|
||||
compatible = "fsl,sgtl5000";
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
|
||||
VDDA-supply = <®_2p5v>;
|
||||
VDDIO-supply = <®_vref_1v8>;
|
||||
};
|
||||
|
||||
@@ -378,14 +378,14 @@
|
||||
codec: wm8960@1a {
|
||||
compatible = "wlf,wm8960";
|
||||
reg = <0x1a>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
|
||||
clock-names = "mclk";
|
||||
wlf,shared-lrclk;
|
||||
wlf,hp-cfg = <2 2 3>;
|
||||
wlf,gpio-cfg = <1 3>;
|
||||
assigned-clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_SRC>,
|
||||
<&clks IMX7D_PLL_AUDIO_POST_DIV>,
|
||||
<&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
|
||||
<&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
|
||||
assigned-clock-parents = <&clks IMX7D_PLL_AUDIO_POST_DIV>;
|
||||
assigned-clock-rates = <0>, <884736000>, <12288000>;
|
||||
};
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
|
||||
dailink_master: simple-audio-card,codec {
|
||||
sound-dai = <&codec>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -232,7 +232,7 @@
|
||||
#sound-dai-cells = <0>;
|
||||
reg = <0x0a>;
|
||||
compatible = "fsl,sgtl5000";
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_sai1_mclk>;
|
||||
VDDA-supply = <&vgen4_reg>;
|
||||
|
||||
@@ -259,7 +259,7 @@
|
||||
interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&pcc2 IMX7ULP_CLK_WDG1>;
|
||||
assigned-clocks = <&pcc2 IMX7ULP_CLK_WDG1>;
|
||||
assigned-clocks-parents = <&scg1 IMX7ULP_CLK_FIRC_BUS_CLK>;
|
||||
assigned-clock-parents = <&scg1 IMX7ULP_CLK_FIRC_BUS_CLK>;
|
||||
timeout-sec = <40>;
|
||||
};
|
||||
|
||||
|
||||
@@ -42,14 +42,14 @@
|
||||
};
|
||||
|
||||
uart_A: serial@84c0 {
|
||||
compatible = "amlogic,meson6-uart", "amlogic,meson-uart";
|
||||
compatible = "amlogic,meson6-uart";
|
||||
reg = <0x84c0 0x18>;
|
||||
interrupts = <GIC_SPI 26 IRQ_TYPE_EDGE_RISING>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart_B: serial@84dc {
|
||||
compatible = "amlogic,meson6-uart", "amlogic,meson-uart";
|
||||
compatible = "amlogic,meson6-uart";
|
||||
reg = <0x84dc 0x18>;
|
||||
interrupts = <GIC_SPI 75 IRQ_TYPE_EDGE_RISING>;
|
||||
status = "disabled";
|
||||
@@ -87,7 +87,7 @@
|
||||
};
|
||||
|
||||
uart_C: serial@8700 {
|
||||
compatible = "amlogic,meson6-uart", "amlogic,meson-uart";
|
||||
compatible = "amlogic,meson6-uart";
|
||||
reg = <0x8700 0x18>;
|
||||
interrupts = <GIC_SPI 93 IRQ_TYPE_EDGE_RISING>;
|
||||
status = "disabled";
|
||||
@@ -203,7 +203,7 @@
|
||||
};
|
||||
|
||||
uart_AO: serial@4c0 {
|
||||
compatible = "amlogic,meson6-uart", "amlogic,meson-ao-uart", "amlogic,meson-uart";
|
||||
compatible = "amlogic,meson6-uart", "amlogic,meson-ao-uart";
|
||||
reg = <0x4c0 0x18>;
|
||||
interrupts = <GIC_SPI 90 IRQ_TYPE_EDGE_RISING>;
|
||||
status = "disabled";
|
||||
|
||||
@@ -598,27 +598,27 @@
|
||||
};
|
||||
|
||||
&uart_AO {
|
||||
compatible = "amlogic,meson8-uart", "amlogic,meson-uart";
|
||||
clocks = <&clkc CLKID_CLK81>, <&xtal>, <&clkc CLKID_CLK81>;
|
||||
clock-names = "baud", "xtal", "pclk";
|
||||
compatible = "amlogic,meson8-uart", "amlogic,meson-ao-uart";
|
||||
clocks = <&xtal>, <&clkc CLKID_CLK81>, <&clkc CLKID_CLK81>;
|
||||
clock-names = "xtal", "pclk", "baud";
|
||||
};
|
||||
|
||||
&uart_A {
|
||||
compatible = "amlogic,meson8-uart", "amlogic,meson-uart";
|
||||
clocks = <&clkc CLKID_CLK81>, <&xtal>, <&clkc CLKID_UART0>;
|
||||
clock-names = "baud", "xtal", "pclk";
|
||||
compatible = "amlogic,meson8-uart";
|
||||
clocks = <&xtal>, <&clkc CLKID_UART0>, <&clkc CLKID_CLK81>;
|
||||
clock-names = "xtal", "pclk", "baud";
|
||||
};
|
||||
|
||||
&uart_B {
|
||||
compatible = "amlogic,meson8-uart", "amlogic,meson-uart";
|
||||
clocks = <&clkc CLKID_CLK81>, <&xtal>, <&clkc CLKID_UART1>;
|
||||
clock-names = "baud", "xtal", "pclk";
|
||||
compatible = "amlogic,meson8-uart";
|
||||
clocks = <&xtal>, <&clkc CLKID_UART0>, <&clkc CLKID_CLK81>;
|
||||
clock-names = "xtal", "pclk", "baud";
|
||||
};
|
||||
|
||||
&uart_C {
|
||||
compatible = "amlogic,meson8-uart", "amlogic,meson-uart";
|
||||
clocks = <&clkc CLKID_CLK81>, <&xtal>, <&clkc CLKID_UART2>;
|
||||
clock-names = "baud", "xtal", "pclk";
|
||||
compatible = "amlogic,meson8-uart";
|
||||
clocks = <&xtal>, <&clkc CLKID_UART0>, <&clkc CLKID_CLK81>;
|
||||
clock-names = "xtal", "pclk", "baud";
|
||||
};
|
||||
|
||||
&usb0 {
|
||||
|
||||
@@ -586,27 +586,27 @@
|
||||
};
|
||||
|
||||
&uart_AO {
|
||||
compatible = "amlogic,meson8b-uart", "amlogic,meson-uart";
|
||||
clocks = <&clkc CLKID_CLK81>, <&xtal>, <&clkc CLKID_CLK81>;
|
||||
clock-names = "baud", "xtal", "pclk";
|
||||
compatible = "amlogic,meson8b-uart", "amlogic,meson-ao-uart";
|
||||
clocks = <&xtal>, <&clkc CLKID_CLK81>, <&clkc CLKID_CLK81>;
|
||||
clock-names = "xtal", "pclk", "baud";
|
||||
};
|
||||
|
||||
&uart_A {
|
||||
compatible = "amlogic,meson8b-uart", "amlogic,meson-uart";
|
||||
clocks = <&clkc CLKID_CLK81>, <&xtal>, <&clkc CLKID_UART0>;
|
||||
clock-names = "baud", "xtal", "pclk";
|
||||
compatible = "amlogic,meson8b-uart";
|
||||
clocks = <&xtal>, <&clkc CLKID_UART0>, <&clkc CLKID_CLK81>;
|
||||
clock-names = "xtal", "pclk", "baud";
|
||||
};
|
||||
|
||||
&uart_B {
|
||||
compatible = "amlogic,meson8b-uart", "amlogic,meson-uart";
|
||||
clocks = <&clkc CLKID_CLK81>, <&xtal>, <&clkc CLKID_UART1>;
|
||||
clock-names = "baud", "xtal", "pclk";
|
||||
compatible = "amlogic,meson8b-uart";
|
||||
clocks = <&xtal>, <&clkc CLKID_UART0>, <&clkc CLKID_CLK81>;
|
||||
clock-names = "xtal", "pclk", "baud";
|
||||
};
|
||||
|
||||
&uart_C {
|
||||
compatible = "amlogic,meson8b-uart", "amlogic,meson-uart";
|
||||
clocks = <&clkc CLKID_CLK81>, <&xtal>, <&clkc CLKID_UART2>;
|
||||
clock-names = "baud", "xtal", "pclk";
|
||||
compatible = "amlogic,meson8b-uart";
|
||||
clocks = <&xtal>, <&clkc CLKID_UART0>, <&clkc CLKID_CLK81>;
|
||||
clock-names = "xtal", "pclk", "baud";
|
||||
};
|
||||
|
||||
&usb0 {
|
||||
|
||||
47
arch/arm/boot/dts/omap3-beagle-ab4.dts
Normal file
47
arch/arm/boot/dts/omap3-beagle-ab4.dts
Normal file
@@ -0,0 +1,47 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/dts-v1/;
|
||||
|
||||
#include "omap3-beagle.dts"
|
||||
|
||||
/ {
|
||||
model = "TI OMAP3 BeagleBoard A to B4";
|
||||
compatible = "ti,omap3-beagle-ab4", "ti,omap3-beagle", "ti,omap3430", "ti,omap3";
|
||||
};
|
||||
|
||||
/*
|
||||
* Workaround for capacitor C70 issue, see "Boards revision A and < B5"
|
||||
* section at https://elinux.org/BeagleBoard_Community
|
||||
*/
|
||||
|
||||
/* Unusable as clocksource because of unreliable oscillator */
|
||||
&counter32k {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
/* Unusable as clockevent because of unreliable oscillator, allow to idle */
|
||||
&timer1_target {
|
||||
/delete-property/ti,no-reset-on-init;
|
||||
/delete-property/ti,no-idle;
|
||||
timer@0 {
|
||||
/delete-property/ti,timer-alwon;
|
||||
};
|
||||
};
|
||||
|
||||
/* Preferred always-on timer for clocksource */
|
||||
&timer12_target {
|
||||
ti,no-reset-on-init;
|
||||
ti,no-idle;
|
||||
timer@0 {
|
||||
/* Always clocked by secure_32k_fck */
|
||||
};
|
||||
};
|
||||
|
||||
/* Preferred timer for clockevent */
|
||||
&timer2_target {
|
||||
ti,no-reset-on-init;
|
||||
ti,no-idle;
|
||||
timer@0 {
|
||||
assigned-clocks = <&gpt2_fck>;
|
||||
assigned-clock-parents = <&sys_ck>;
|
||||
};
|
||||
};
|
||||
@@ -304,39 +304,6 @@
|
||||
phys = <0 &hsusb2_phy>;
|
||||
};
|
||||
|
||||
/* Unusable as clocksource because of unreliable oscillator */
|
||||
&counter32k {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
/* Unusable as clockevent because if unreliable oscillator, allow to idle */
|
||||
&timer1_target {
|
||||
/delete-property/ti,no-reset-on-init;
|
||||
/delete-property/ti,no-idle;
|
||||
timer@0 {
|
||||
/delete-property/ti,timer-alwon;
|
||||
};
|
||||
};
|
||||
|
||||
/* Preferred always-on timer for clocksource */
|
||||
&timer12_target {
|
||||
ti,no-reset-on-init;
|
||||
ti,no-idle;
|
||||
timer@0 {
|
||||
/* Always clocked by secure_32k_fck */
|
||||
};
|
||||
};
|
||||
|
||||
/* Preferred timer for clockevent */
|
||||
&timer2_target {
|
||||
ti,no-reset-on-init;
|
||||
ti,no-idle;
|
||||
timer@0 {
|
||||
assigned-clocks = <&gpt2_fck>;
|
||||
assigned-clock-parents = <&sys_ck>;
|
||||
};
|
||||
};
|
||||
|
||||
&twl_gpio {
|
||||
ti,use-leds;
|
||||
/* pullups: BIT(1) */
|
||||
|
||||
@@ -158,6 +158,24 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
/* Unusable as clockevent because if unreliable oscillator, allow to idle */
|
||||
&timer1_target {
|
||||
/delete-property/ti,no-reset-on-init;
|
||||
/delete-property/ti,no-idle;
|
||||
timer@0 {
|
||||
/delete-property/ti,timer-alwon;
|
||||
};
|
||||
};
|
||||
|
||||
/* Preferred timer for clockevent */
|
||||
&timer12_target {
|
||||
ti,no-reset-on-init;
|
||||
ti,no-idle;
|
||||
timer@0 {
|
||||
/* Always clocked by secure_32k_fck */
|
||||
};
|
||||
};
|
||||
|
||||
&twl_gpio {
|
||||
ti,use-leds;
|
||||
/*
|
||||
|
||||
@@ -14,36 +14,3 @@
|
||||
display2 = &tv0;
|
||||
};
|
||||
};
|
||||
|
||||
/* Unusable as clocksource because of unreliable oscillator */
|
||||
&counter32k {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
/* Unusable as clockevent because if unreliable oscillator, allow to idle */
|
||||
&timer1_target {
|
||||
/delete-property/ti,no-reset-on-init;
|
||||
/delete-property/ti,no-idle;
|
||||
timer@0 {
|
||||
/delete-property/ti,timer-alwon;
|
||||
};
|
||||
};
|
||||
|
||||
/* Preferred always-on timer for clocksource */
|
||||
&timer12_target {
|
||||
ti,no-reset-on-init;
|
||||
ti,no-idle;
|
||||
timer@0 {
|
||||
/* Always clocked by secure_32k_fck */
|
||||
};
|
||||
};
|
||||
|
||||
/* Preferred timer for clockevent */
|
||||
&timer2_target {
|
||||
ti,no-reset-on-init;
|
||||
ti,no-idle;
|
||||
timer@0 {
|
||||
assigned-clocks = <&gpt2_fck>;
|
||||
assigned-clock-parents = <&sys_ck>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -142,7 +142,8 @@
|
||||
clocks {
|
||||
sleep_clk: sleep_clk {
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <32768>;
|
||||
clock-frequency = <32000>;
|
||||
clock-output-names = "gcc_sleep_clk_src";
|
||||
#clock-cells = <0>;
|
||||
};
|
||||
|
||||
|
||||
@@ -146,7 +146,9 @@
|
||||
reg = <0x108000 0x1000>;
|
||||
qcom,ipc = <&l2cc 0x8 2>;
|
||||
|
||||
interrupts = <0 19 0>, <0 21 0>, <0 22 0>;
|
||||
interrupts = <GIC_SPI 19 IRQ_TYPE_EDGE_RISING>,
|
||||
<GIC_SPI 21 IRQ_TYPE_EDGE_RISING>,
|
||||
<GIC_SPI 22 IRQ_TYPE_EDGE_RISING>;
|
||||
interrupt-names = "ack", "err", "wakeup";
|
||||
|
||||
regulators {
|
||||
@@ -192,7 +194,7 @@
|
||||
compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm";
|
||||
reg = <0x16440000 0x1000>,
|
||||
<0x16400000 0x1000>;
|
||||
interrupts = <0 154 0x0>;
|
||||
interrupts = <GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&gcc GSBI5_UART_CLK>, <&gcc GSBI5_H_CLK>;
|
||||
clock-names = "core", "iface";
|
||||
status = "disabled";
|
||||
@@ -318,7 +320,7 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0x16080000 0x1000>;
|
||||
interrupts = <0 147 0>;
|
||||
interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>;
|
||||
spi-max-frequency = <24000000>;
|
||||
cs-gpios = <&msmgpio 8 0>;
|
||||
|
||||
|
||||
@@ -640,8 +640,8 @@
|
||||
interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
|
||||
assigned-clocks = <&cru SCLK_HDMI_PHY>;
|
||||
assigned-clock-parents = <&hdmi_phy>;
|
||||
clocks = <&cru SCLK_HDMI_HDCP>, <&cru PCLK_HDMI_CTRL>, <&cru SCLK_HDMI_CEC>;
|
||||
clock-names = "isfr", "iahb", "cec";
|
||||
clocks = <&cru PCLK_HDMI_CTRL>, <&cru SCLK_HDMI_HDCP>, <&cru SCLK_HDMI_CEC>;
|
||||
clock-names = "iahb", "isfr", "cec";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hdmii2c_xfer &hdmi_hpd &hdmi_cec>;
|
||||
resets = <&cru SRST_HDMI_P>;
|
||||
|
||||
@@ -990,7 +990,7 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
crypto: cypto-controller@ff8a0000 {
|
||||
crypto: crypto@ff8a0000 {
|
||||
compatible = "rockchip,rk3288-crypto";
|
||||
reg = <0x0 0xff8a0000 0x0 0x4000>;
|
||||
interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
@@ -413,7 +413,7 @@
|
||||
pmecc: ecc-engine@f8014070 {
|
||||
compatible = "atmel,sama5d2-pmecc";
|
||||
reg = <0xf8014070 0x490>,
|
||||
<0xf8014500 0x100>;
|
||||
<0xf8014500 0x200>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -136,9 +136,9 @@
|
||||
reg = <0xb4100000 0x1000>;
|
||||
interrupts = <0 105 0x4>;
|
||||
status = "disabled";
|
||||
dmas = <&dwdma0 12 0 1>,
|
||||
<&dwdma0 13 1 0>;
|
||||
dma-names = "tx", "rx";
|
||||
dmas = <&dwdma0 13 0 1>,
|
||||
<&dwdma0 12 1 0>;
|
||||
dma-names = "rx", "tx";
|
||||
};
|
||||
|
||||
thermal@e07008c4 {
|
||||
|
||||
@@ -284,9 +284,9 @@
|
||||
#size-cells = <0>;
|
||||
interrupts = <0 31 0x4>;
|
||||
status = "disabled";
|
||||
dmas = <&dwdma0 4 0 0>,
|
||||
<&dwdma0 5 0 0>;
|
||||
dma-names = "tx", "rx";
|
||||
dmas = <&dwdma0 5 0 0>,
|
||||
<&dwdma0 4 0 0>;
|
||||
dma-names = "rx", "tx";
|
||||
};
|
||||
|
||||
rtc@e0580000 {
|
||||
|
||||
@@ -154,10 +154,6 @@
|
||||
cap-sd-highspeed;
|
||||
cap-mmc-highspeed;
|
||||
/* All direction control is used */
|
||||
st,sig-dir-cmd;
|
||||
st,sig-dir-dat0;
|
||||
st,sig-dir-dat2;
|
||||
st,sig-dir-dat31;
|
||||
st,sig-pin-fbclk;
|
||||
full-pwr-cycle;
|
||||
vmmc-supply = <&ab8500_ldo_aux3_reg>;
|
||||
|
||||
@@ -524,6 +524,17 @@
|
||||
#size-cells = <0>;
|
||||
};
|
||||
|
||||
gic: interrupt-controller@1c81000 {
|
||||
compatible = "arm,gic-400";
|
||||
reg = <0x01c81000 0x1000>,
|
||||
<0x01c82000 0x2000>,
|
||||
<0x01c84000 0x2000>,
|
||||
<0x01c86000 0x2000>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <3>;
|
||||
interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
|
||||
};
|
||||
|
||||
csi1: camera@1cb4000 {
|
||||
compatible = "allwinner,sun8i-v3s-csi";
|
||||
reg = <0x01cb4000 0x3000>;
|
||||
@@ -535,16 +546,5 @@
|
||||
resets = <&ccu RST_BUS_CSI>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gic: interrupt-controller@1c81000 {
|
||||
compatible = "arm,gic-400";
|
||||
reg = <0x01c81000 0x1000>,
|
||||
<0x01c82000 0x2000>,
|
||||
<0x01c84000 0x2000>,
|
||||
<0x01c86000 0x2000>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <3>;
|
||||
interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -13,12 +13,15 @@
|
||||
"google,nyan-big-rev1", "google,nyan-big-rev0",
|
||||
"google,nyan-big", "google,nyan", "nvidia,tegra124";
|
||||
|
||||
host1x@50000000 {
|
||||
dpaux@545c0000 {
|
||||
aux-bus {
|
||||
panel: panel {
|
||||
compatible = "auo,b133xtn01";
|
||||
|
||||
power-supply = <&vdd_3v3_panel>;
|
||||
backlight = <&backlight>;
|
||||
ddc-i2c-bus = <&dpaux>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
mmc@700b0400 { /* SD Card on this bus */
|
||||
|
||||
@@ -15,12 +15,15 @@
|
||||
"google,nyan-blaze-rev0", "google,nyan-blaze",
|
||||
"google,nyan", "nvidia,tegra124";
|
||||
|
||||
host1x@50000000 {
|
||||
dpaux@545c0000 {
|
||||
aux-bus {
|
||||
panel: panel {
|
||||
compatible = "samsung,ltn140at29-301";
|
||||
|
||||
power-supply = <&vdd_3v3_panel>;
|
||||
backlight = <&backlight>;
|
||||
ddc-i2c-bus = <&dpaux>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
sound {
|
||||
|
||||
@@ -48,6 +48,13 @@
|
||||
dpaux@545c0000 {
|
||||
vdd-supply = <&vdd_3v3_panel>;
|
||||
status = "okay";
|
||||
|
||||
aux-bus {
|
||||
panel: panel {
|
||||
compatible = "lg,lp129qe";
|
||||
backlight = <&backlight>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1079,13 +1086,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
panel: panel {
|
||||
compatible = "lg,lp129qe";
|
||||
power-supply = <&vdd_3v3_panel>;
|
||||
backlight = <&backlight>;
|
||||
ddc-i2c-bus = <&dpaux>;
|
||||
};
|
||||
|
||||
vdd_mux: regulator@0 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "+VDD_MUX";
|
||||
|
||||
@@ -183,8 +183,8 @@
|
||||
};
|
||||
conf_ata {
|
||||
nvidia,pins = "ata", "atb", "atc", "atd", "ate",
|
||||
"cdev1", "cdev2", "dap1", "dtb", "gma",
|
||||
"gmb", "gmc", "gmd", "gme", "gpu7",
|
||||
"cdev1", "cdev2", "dap1", "dtb", "dtf",
|
||||
"gma", "gmb", "gmc", "gmd", "gme", "gpu7",
|
||||
"gpv", "i2cp", "irrx", "irtx", "pta",
|
||||
"rm", "slxa", "slxk", "spia", "spib",
|
||||
"uac";
|
||||
@@ -203,7 +203,7 @@
|
||||
};
|
||||
conf_crtp {
|
||||
nvidia,pins = "crtp", "dap2", "dap3", "dap4",
|
||||
"dtc", "dte", "dtf", "gpu", "sdio1",
|
||||
"dtc", "dte", "gpu", "sdio1",
|
||||
"slxc", "slxd", "spdi", "spdo", "spig",
|
||||
"uda";
|
||||
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
|
||||
|
||||
@@ -187,6 +187,7 @@ CONFIG_REGULATOR=y
|
||||
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
||||
CONFIG_MEDIA_SUPPORT=y
|
||||
CONFIG_MEDIA_CAMERA_SUPPORT=y
|
||||
CONFIG_MEDIA_PLATFORM_SUPPORT=y
|
||||
CONFIG_V4L_PLATFORM_DRIVERS=y
|
||||
CONFIG_VIDEO_ASPEED=m
|
||||
CONFIG_VIDEO_ATMEL_ISI=m
|
||||
|
||||
@@ -83,6 +83,8 @@ config CRYPTO_AES_ARM_BS
|
||||
depends on KERNEL_MODE_NEON
|
||||
select CRYPTO_SKCIPHER
|
||||
select CRYPTO_LIB_AES
|
||||
select CRYPTO_AES
|
||||
select CRYPTO_CBC
|
||||
select CRYPTO_SIMD
|
||||
help
|
||||
Use a faster and more secure NEON based implementation of AES in CBC,
|
||||
|
||||
@@ -107,6 +107,16 @@
|
||||
.endm
|
||||
#endif
|
||||
|
||||
#if __LINUX_ARM_ARCH__ < 7
|
||||
.macro dsb, args
|
||||
mcr p15, 0, r0, c7, c10, 4
|
||||
.endm
|
||||
|
||||
.macro isb, args
|
||||
mcr p15, 0, r0, c7, c5, 4
|
||||
.endm
|
||||
#endif
|
||||
|
||||
.macro asm_trace_hardirqs_off, save=1
|
||||
#if defined(CONFIG_TRACE_IRQFLAGS)
|
||||
.if \save
|
||||
|
||||
38
arch/arm/include/asm/spectre.h
Normal file
38
arch/arm/include/asm/spectre.h
Normal file
@@ -0,0 +1,38 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#ifndef __ASM_SPECTRE_H
|
||||
#define __ASM_SPECTRE_H
|
||||
|
||||
enum {
|
||||
SPECTRE_UNAFFECTED,
|
||||
SPECTRE_MITIGATED,
|
||||
SPECTRE_VULNERABLE,
|
||||
};
|
||||
|
||||
enum {
|
||||
__SPECTRE_V2_METHOD_BPIALL,
|
||||
__SPECTRE_V2_METHOD_ICIALLU,
|
||||
__SPECTRE_V2_METHOD_SMC,
|
||||
__SPECTRE_V2_METHOD_HVC,
|
||||
__SPECTRE_V2_METHOD_LOOP8,
|
||||
};
|
||||
|
||||
enum {
|
||||
SPECTRE_V2_METHOD_BPIALL = BIT(__SPECTRE_V2_METHOD_BPIALL),
|
||||
SPECTRE_V2_METHOD_ICIALLU = BIT(__SPECTRE_V2_METHOD_ICIALLU),
|
||||
SPECTRE_V2_METHOD_SMC = BIT(__SPECTRE_V2_METHOD_SMC),
|
||||
SPECTRE_V2_METHOD_HVC = BIT(__SPECTRE_V2_METHOD_HVC),
|
||||
SPECTRE_V2_METHOD_LOOP8 = BIT(__SPECTRE_V2_METHOD_LOOP8),
|
||||
};
|
||||
|
||||
#ifdef CONFIG_GENERIC_CPU_VULNERABILITIES
|
||||
void spectre_v2_update_state(unsigned int state, unsigned int methods);
|
||||
#else
|
||||
static inline void spectre_v2_update_state(unsigned int state,
|
||||
unsigned int methods)
|
||||
{}
|
||||
#endif
|
||||
|
||||
int spectre_bhb_update_vectors(unsigned int method);
|
||||
|
||||
#endif
|
||||
@@ -26,6 +26,19 @@
|
||||
#define ARM_MMU_DISCARD(x) x
|
||||
#endif
|
||||
|
||||
/*
|
||||
* ld.lld does not support NOCROSSREFS:
|
||||
* https://github.com/ClangBuiltLinux/linux/issues/1609
|
||||
*/
|
||||
#ifdef CONFIG_LD_IS_LLD
|
||||
#define NOCROSSREFS
|
||||
#endif
|
||||
|
||||
/* Set start/end symbol names to the LMA for the section */
|
||||
#define ARM_LMA(sym, section) \
|
||||
sym##_start = LOADADDR(section); \
|
||||
sym##_end = LOADADDR(section) + SIZEOF(section)
|
||||
|
||||
#define PROC_INFO \
|
||||
. = ALIGN(4); \
|
||||
__proc_info_begin = .; \
|
||||
@@ -110,19 +123,31 @@
|
||||
* only thing that matters is their relative offsets
|
||||
*/
|
||||
#define ARM_VECTORS \
|
||||
__vectors_start = .; \
|
||||
.vectors 0xffff0000 : AT(__vectors_start) { \
|
||||
__vectors_lma = .; \
|
||||
OVERLAY 0xffff0000 : NOCROSSREFS AT(__vectors_lma) { \
|
||||
.vectors { \
|
||||
*(.vectors) \
|
||||
} \
|
||||
. = __vectors_start + SIZEOF(.vectors); \
|
||||
__vectors_end = .; \
|
||||
.vectors.bhb.loop8 { \
|
||||
*(.vectors.bhb.loop8) \
|
||||
} \
|
||||
.vectors.bhb.bpiall { \
|
||||
*(.vectors.bhb.bpiall) \
|
||||
} \
|
||||
} \
|
||||
ARM_LMA(__vectors, .vectors); \
|
||||
ARM_LMA(__vectors_bhb_loop8, .vectors.bhb.loop8); \
|
||||
ARM_LMA(__vectors_bhb_bpiall, .vectors.bhb.bpiall); \
|
||||
. = __vectors_lma + SIZEOF(.vectors) + \
|
||||
SIZEOF(.vectors.bhb.loop8) + \
|
||||
SIZEOF(.vectors.bhb.bpiall); \
|
||||
\
|
||||
__stubs_start = .; \
|
||||
.stubs ADDR(.vectors) + 0x1000 : AT(__stubs_start) { \
|
||||
__stubs_lma = .; \
|
||||
.stubs ADDR(.vectors) + 0x1000 : AT(__stubs_lma) { \
|
||||
*(.stubs) \
|
||||
} \
|
||||
. = __stubs_start + SIZEOF(.stubs); \
|
||||
__stubs_end = .; \
|
||||
ARM_LMA(__stubs, .stubs); \
|
||||
. = __stubs_lma + SIZEOF(.stubs); \
|
||||
\
|
||||
PROVIDE(vector_fiq_offset = vector_fiq - ADDR(.vectors));
|
||||
|
||||
|
||||
@@ -107,4 +107,6 @@ endif
|
||||
|
||||
obj-$(CONFIG_HAVE_ARM_SMCCC) += smccc-call.o
|
||||
|
||||
obj-$(CONFIG_GENERIC_CPU_VULNERABILITIES) += spectre.o
|
||||
|
||||
extra-y := $(head-y) vmlinux.lds
|
||||
|
||||
@@ -1005,12 +1005,11 @@ vector_\name:
|
||||
sub lr, lr, #\correction
|
||||
.endif
|
||||
|
||||
@
|
||||
@ Save r0, lr_<exception> (parent PC) and spsr_<exception>
|
||||
@ (parent CPSR)
|
||||
@
|
||||
@ Save r0, lr_<exception> (parent PC)
|
||||
stmia sp, {r0, lr} @ save r0, lr
|
||||
mrs lr, spsr
|
||||
|
||||
@ Save spsr_<exception> (parent CPSR)
|
||||
2: mrs lr, spsr
|
||||
str lr, [sp, #8] @ save spsr
|
||||
|
||||
@
|
||||
@@ -1031,6 +1030,44 @@ vector_\name:
|
||||
movs pc, lr @ branch to handler in SVC mode
|
||||
ENDPROC(vector_\name)
|
||||
|
||||
#ifdef CONFIG_HARDEN_BRANCH_HISTORY
|
||||
.subsection 1
|
||||
.align 5
|
||||
vector_bhb_loop8_\name:
|
||||
.if \correction
|
||||
sub lr, lr, #\correction
|
||||
.endif
|
||||
|
||||
@ Save r0, lr_<exception> (parent PC)
|
||||
stmia sp, {r0, lr}
|
||||
|
||||
@ bhb workaround
|
||||
mov r0, #8
|
||||
3: b . + 4
|
||||
subs r0, r0, #1
|
||||
bne 3b
|
||||
dsb
|
||||
isb
|
||||
b 2b
|
||||
ENDPROC(vector_bhb_loop8_\name)
|
||||
|
||||
vector_bhb_bpiall_\name:
|
||||
.if \correction
|
||||
sub lr, lr, #\correction
|
||||
.endif
|
||||
|
||||
@ Save r0, lr_<exception> (parent PC)
|
||||
stmia sp, {r0, lr}
|
||||
|
||||
@ bhb workaround
|
||||
mcr p15, 0, r0, c7, c5, 6 @ BPIALL
|
||||
@ isb not needed due to "movs pc, lr" in the vector stub
|
||||
@ which gives a "context synchronisation".
|
||||
b 2b
|
||||
ENDPROC(vector_bhb_bpiall_\name)
|
||||
.previous
|
||||
#endif
|
||||
|
||||
.align 2
|
||||
@ handler addresses follow this label
|
||||
1:
|
||||
@@ -1039,6 +1076,10 @@ ENDPROC(vector_\name)
|
||||
.section .stubs, "ax", %progbits
|
||||
@ This must be the first word
|
||||
.word vector_swi
|
||||
#ifdef CONFIG_HARDEN_BRANCH_HISTORY
|
||||
.word vector_bhb_loop8_swi
|
||||
.word vector_bhb_bpiall_swi
|
||||
#endif
|
||||
|
||||
vector_rst:
|
||||
ARM( swi SYS_ERROR0 )
|
||||
@@ -1153,8 +1194,10 @@ vector_addrexcptn:
|
||||
* FIQ "NMI" handler
|
||||
*-----------------------------------------------------------------------------
|
||||
* Handle a FIQ using the SVC stack allowing FIQ act like NMI on x86
|
||||
* systems.
|
||||
* systems. This must be the last vector stub, so lets place it in its own
|
||||
* subsection.
|
||||
*/
|
||||
.subsection 2
|
||||
vector_stub fiq, FIQ_MODE, 4
|
||||
|
||||
.long __fiq_usr @ 0 (USR_26 / USR_32)
|
||||
@@ -1187,6 +1230,30 @@ vector_addrexcptn:
|
||||
W(b) vector_irq
|
||||
W(b) vector_fiq
|
||||
|
||||
#ifdef CONFIG_HARDEN_BRANCH_HISTORY
|
||||
.section .vectors.bhb.loop8, "ax", %progbits
|
||||
.L__vectors_bhb_loop8_start:
|
||||
W(b) vector_rst
|
||||
W(b) vector_bhb_loop8_und
|
||||
W(ldr) pc, .L__vectors_bhb_loop8_start + 0x1004
|
||||
W(b) vector_bhb_loop8_pabt
|
||||
W(b) vector_bhb_loop8_dabt
|
||||
W(b) vector_addrexcptn
|
||||
W(b) vector_bhb_loop8_irq
|
||||
W(b) vector_bhb_loop8_fiq
|
||||
|
||||
.section .vectors.bhb.bpiall, "ax", %progbits
|
||||
.L__vectors_bhb_bpiall_start:
|
||||
W(b) vector_rst
|
||||
W(b) vector_bhb_bpiall_und
|
||||
W(ldr) pc, .L__vectors_bhb_bpiall_start + 0x1008
|
||||
W(b) vector_bhb_bpiall_pabt
|
||||
W(b) vector_bhb_bpiall_dabt
|
||||
W(b) vector_addrexcptn
|
||||
W(b) vector_bhb_bpiall_irq
|
||||
W(b) vector_bhb_bpiall_fiq
|
||||
#endif
|
||||
|
||||
.data
|
||||
.align 2
|
||||
|
||||
|
||||
@@ -162,6 +162,29 @@ ENDPROC(ret_from_fork)
|
||||
*-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
.align 5
|
||||
#ifdef CONFIG_HARDEN_BRANCH_HISTORY
|
||||
ENTRY(vector_bhb_loop8_swi)
|
||||
sub sp, sp, #PT_REGS_SIZE
|
||||
stmia sp, {r0 - r12}
|
||||
mov r8, #8
|
||||
1: b 2f
|
||||
2: subs r8, r8, #1
|
||||
bne 1b
|
||||
dsb
|
||||
isb
|
||||
b 3f
|
||||
ENDPROC(vector_bhb_loop8_swi)
|
||||
|
||||
.align 5
|
||||
ENTRY(vector_bhb_bpiall_swi)
|
||||
sub sp, sp, #PT_REGS_SIZE
|
||||
stmia sp, {r0 - r12}
|
||||
mcr p15, 0, r8, c7, c5, 6 @ BPIALL
|
||||
isb
|
||||
b 3f
|
||||
ENDPROC(vector_bhb_bpiall_swi)
|
||||
#endif
|
||||
.align 5
|
||||
ENTRY(vector_swi)
|
||||
#ifdef CONFIG_CPU_V7M
|
||||
@@ -169,6 +192,7 @@ ENTRY(vector_swi)
|
||||
#else
|
||||
sub sp, sp, #PT_REGS_SIZE
|
||||
stmia sp, {r0 - r12} @ Calling r0 - r12
|
||||
3:
|
||||
ARM( add r8, sp, #S_PC )
|
||||
ARM( stmdb r8, {sp, lr}^ ) @ Calling sp, lr
|
||||
THUMB( mov r8, sp )
|
||||
|
||||
@@ -22,10 +22,7 @@
|
||||
* mcount can be thought of as a function called in the middle of a subroutine
|
||||
* call. As such, it needs to be transparent for both the caller and the
|
||||
* callee: the original lr needs to be restored when leaving mcount, and no
|
||||
* registers should be clobbered. (In the __gnu_mcount_nc implementation, we
|
||||
* clobber the ip register. This is OK because the ARM calling convention
|
||||
* allows it to be clobbered in subroutines and doesn't use it to hold
|
||||
* parameters.)
|
||||
* registers should be clobbered.
|
||||
*
|
||||
* When using dynamic ftrace, we patch out the mcount call by a "pop {lr}"
|
||||
* instead of the __gnu_mcount_nc call (see arch/arm/kernel/ftrace.c).
|
||||
@@ -70,24 +67,23 @@
|
||||
|
||||
.macro __ftrace_regs_caller
|
||||
|
||||
sub sp, sp, #8 @ space for PC and CPSR OLD_R0,
|
||||
str lr, [sp, #-8]! @ store LR as PC and make space for CPSR/OLD_R0,
|
||||
@ OLD_R0 will overwrite previous LR
|
||||
|
||||
add ip, sp, #12 @ move in IP the value of SP as it was
|
||||
@ before the push {lr} of the mcount mechanism
|
||||
|
||||
str lr, [sp, #0] @ store LR instead of PC
|
||||
|
||||
ldr lr, [sp, #8] @ get previous LR
|
||||
|
||||
str r0, [sp, #8] @ write r0 as OLD_R0 over previous LR
|
||||
|
||||
stmdb sp!, {ip, lr}
|
||||
stmdb sp!, {r0-r11, lr}
|
||||
str lr, [sp, #-4]! @ store previous LR as LR
|
||||
|
||||
add lr, sp, #16 @ move in LR the value of SP as it was
|
||||
@ before the push {lr} of the mcount mechanism
|
||||
|
||||
push {r0-r11, ip, lr}
|
||||
|
||||
@ stack content at this point:
|
||||
@ 0 4 48 52 56 60 64 68 72
|
||||
@ R0 | R1 | ... | LR | SP + 4 | previous LR | LR | PSR | OLD_R0 |
|
||||
@ R0 | R1 | ... | IP | SP + 4 | previous LR | LR | PSR | OLD_R0 |
|
||||
|
||||
mov r3, sp @ struct pt_regs*
|
||||
|
||||
@@ -112,11 +108,9 @@ ftrace_graph_regs_call:
|
||||
#endif
|
||||
|
||||
@ pop saved regs
|
||||
ldmia sp!, {r0-r12} @ restore r0 through r12
|
||||
ldr ip, [sp, #8] @ restore PC
|
||||
ldr lr, [sp, #4] @ restore LR
|
||||
ldr sp, [sp, #0] @ restore SP
|
||||
mov pc, ip @ return
|
||||
pop {r0-r11, ip, lr} @ restore r0 through r12
|
||||
ldr lr, [sp], #4 @ restore LR
|
||||
ldr pc, [sp], #12
|
||||
.endm
|
||||
|
||||
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
|
||||
@@ -132,11 +126,9 @@ ftrace_graph_regs_call:
|
||||
bl prepare_ftrace_return
|
||||
|
||||
@ pop registers saved in ftrace_regs_caller
|
||||
ldmia sp!, {r0-r12} @ restore r0 through r12
|
||||
ldr ip, [sp, #8] @ restore PC
|
||||
ldr lr, [sp, #4] @ restore LR
|
||||
ldr sp, [sp, #0] @ restore SP
|
||||
mov pc, ip @ return
|
||||
pop {r0-r11, ip, lr} @ restore r0 through r12
|
||||
ldr lr, [sp], #4 @ restore LR
|
||||
ldr pc, [sp], #12
|
||||
|
||||
.endm
|
||||
#endif
|
||||
@@ -202,16 +194,17 @@ ftrace_graph_call\suffix:
|
||||
.endm
|
||||
|
||||
.macro mcount_exit
|
||||
ldmia sp!, {r0-r3, ip, lr}
|
||||
ret ip
|
||||
ldmia sp!, {r0-r3}
|
||||
ldr lr, [sp, #4]
|
||||
ldr pc, [sp], #8
|
||||
.endm
|
||||
|
||||
ENTRY(__gnu_mcount_nc)
|
||||
UNWIND(.fnstart)
|
||||
#ifdef CONFIG_DYNAMIC_FTRACE
|
||||
mov ip, lr
|
||||
ldmia sp!, {lr}
|
||||
ret ip
|
||||
push {lr}
|
||||
ldr lr, [sp, #4]
|
||||
ldr pc, [sp], #8
|
||||
#else
|
||||
__mcount
|
||||
#endif
|
||||
|
||||
@@ -154,22 +154,38 @@ static int kgdb_compiled_brk_fn(struct pt_regs *regs, unsigned int instr)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct undef_hook kgdb_brkpt_hook = {
|
||||
static struct undef_hook kgdb_brkpt_arm_hook = {
|
||||
.instr_mask = 0xffffffff,
|
||||
.instr_val = KGDB_BREAKINST,
|
||||
.cpsr_mask = MODE_MASK,
|
||||
.cpsr_mask = PSR_T_BIT | MODE_MASK,
|
||||
.cpsr_val = SVC_MODE,
|
||||
.fn = kgdb_brk_fn
|
||||
};
|
||||
|
||||
static struct undef_hook kgdb_compiled_brkpt_hook = {
|
||||
static struct undef_hook kgdb_brkpt_thumb_hook = {
|
||||
.instr_mask = 0xffff,
|
||||
.instr_val = KGDB_BREAKINST & 0xffff,
|
||||
.cpsr_mask = PSR_T_BIT | MODE_MASK,
|
||||
.cpsr_val = PSR_T_BIT | SVC_MODE,
|
||||
.fn = kgdb_brk_fn
|
||||
};
|
||||
|
||||
static struct undef_hook kgdb_compiled_brkpt_arm_hook = {
|
||||
.instr_mask = 0xffffffff,
|
||||
.instr_val = KGDB_COMPILED_BREAK,
|
||||
.cpsr_mask = MODE_MASK,
|
||||
.cpsr_mask = PSR_T_BIT | MODE_MASK,
|
||||
.cpsr_val = SVC_MODE,
|
||||
.fn = kgdb_compiled_brk_fn
|
||||
};
|
||||
|
||||
static struct undef_hook kgdb_compiled_brkpt_thumb_hook = {
|
||||
.instr_mask = 0xffff,
|
||||
.instr_val = KGDB_COMPILED_BREAK & 0xffff,
|
||||
.cpsr_mask = PSR_T_BIT | MODE_MASK,
|
||||
.cpsr_val = PSR_T_BIT | SVC_MODE,
|
||||
.fn = kgdb_compiled_brk_fn
|
||||
};
|
||||
|
||||
static int __kgdb_notify(struct die_args *args, unsigned long cmd)
|
||||
{
|
||||
struct pt_regs *regs = args->regs;
|
||||
@@ -210,8 +226,10 @@ int kgdb_arch_init(void)
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
|
||||
register_undef_hook(&kgdb_brkpt_hook);
|
||||
register_undef_hook(&kgdb_compiled_brkpt_hook);
|
||||
register_undef_hook(&kgdb_brkpt_arm_hook);
|
||||
register_undef_hook(&kgdb_brkpt_thumb_hook);
|
||||
register_undef_hook(&kgdb_compiled_brkpt_arm_hook);
|
||||
register_undef_hook(&kgdb_compiled_brkpt_thumb_hook);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -224,8 +242,10 @@ int kgdb_arch_init(void)
|
||||
*/
|
||||
void kgdb_arch_exit(void)
|
||||
{
|
||||
unregister_undef_hook(&kgdb_brkpt_hook);
|
||||
unregister_undef_hook(&kgdb_compiled_brkpt_hook);
|
||||
unregister_undef_hook(&kgdb_brkpt_arm_hook);
|
||||
unregister_undef_hook(&kgdb_brkpt_thumb_hook);
|
||||
unregister_undef_hook(&kgdb_compiled_brkpt_arm_hook);
|
||||
unregister_undef_hook(&kgdb_compiled_brkpt_thumb_hook);
|
||||
unregister_die_notifier(&kgdb_notifier);
|
||||
}
|
||||
|
||||
|
||||
71
arch/arm/kernel/spectre.c
Normal file
71
arch/arm/kernel/spectre.c
Normal file
@@ -0,0 +1,71 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
#include <linux/bpf.h>
|
||||
#include <linux/cpu.h>
|
||||
#include <linux/device.h>
|
||||
|
||||
#include <asm/spectre.h>
|
||||
|
||||
static bool _unprivileged_ebpf_enabled(void)
|
||||
{
|
||||
#ifdef CONFIG_BPF_SYSCALL
|
||||
return !sysctl_unprivileged_bpf_disabled;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
ssize_t cpu_show_spectre_v1(struct device *dev, struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
return sprintf(buf, "Mitigation: __user pointer sanitization\n");
|
||||
}
|
||||
|
||||
static unsigned int spectre_v2_state;
|
||||
static unsigned int spectre_v2_methods;
|
||||
|
||||
void spectre_v2_update_state(unsigned int state, unsigned int method)
|
||||
{
|
||||
if (state > spectre_v2_state)
|
||||
spectre_v2_state = state;
|
||||
spectre_v2_methods |= method;
|
||||
}
|
||||
|
||||
ssize_t cpu_show_spectre_v2(struct device *dev, struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
const char *method;
|
||||
|
||||
if (spectre_v2_state == SPECTRE_UNAFFECTED)
|
||||
return sprintf(buf, "%s\n", "Not affected");
|
||||
|
||||
if (spectre_v2_state != SPECTRE_MITIGATED)
|
||||
return sprintf(buf, "%s\n", "Vulnerable");
|
||||
|
||||
if (_unprivileged_ebpf_enabled())
|
||||
return sprintf(buf, "Vulnerable: Unprivileged eBPF enabled\n");
|
||||
|
||||
switch (spectre_v2_methods) {
|
||||
case SPECTRE_V2_METHOD_BPIALL:
|
||||
method = "Branch predictor hardening";
|
||||
break;
|
||||
|
||||
case SPECTRE_V2_METHOD_ICIALLU:
|
||||
method = "I-cache invalidation";
|
||||
break;
|
||||
|
||||
case SPECTRE_V2_METHOD_SMC:
|
||||
case SPECTRE_V2_METHOD_HVC:
|
||||
method = "Firmware call";
|
||||
break;
|
||||
|
||||
case SPECTRE_V2_METHOD_LOOP8:
|
||||
method = "History overwrite";
|
||||
break;
|
||||
|
||||
default:
|
||||
method = "Multiple mitigations";
|
||||
break;
|
||||
}
|
||||
|
||||
return sprintf(buf, "Mitigation: %s\n", method);
|
||||
}
|
||||
@@ -195,7 +195,7 @@ static int swp_handler(struct pt_regs *regs, unsigned int instr)
|
||||
destreg, EXTRACT_REG_NUM(instr, RT2_OFFSET), data);
|
||||
|
||||
/* Check access in reasonable access range for both SWP and SWPB */
|
||||
if (!access_ok((address & ~3), 4)) {
|
||||
if (!access_ok((void __user *)(address & ~3), 4)) {
|
||||
pr_debug("SWP{B} emulation: access to %p not allowed!\n",
|
||||
(void *)address);
|
||||
res = -EFAULT;
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <linux/atomic.h>
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm/exception.h>
|
||||
#include <asm/spectre.h>
|
||||
#include <asm/unistd.h>
|
||||
#include <asm/traps.h>
|
||||
#include <asm/ptrace.h>
|
||||
@@ -588,7 +589,7 @@ do_cache_op(unsigned long start, unsigned long end, int flags)
|
||||
if (end < start || flags)
|
||||
return -EINVAL;
|
||||
|
||||
if (!access_ok(start, end - start))
|
||||
if (!access_ok((void __user *)start, end - start))
|
||||
return -EFAULT;
|
||||
|
||||
return __do_cache_op(start, end);
|
||||
@@ -806,10 +807,59 @@ static inline void __init kuser_init(void *vectors)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_CPU_V7M
|
||||
static void copy_from_lma(void *vma, void *lma_start, void *lma_end)
|
||||
{
|
||||
memcpy(vma, lma_start, lma_end - lma_start);
|
||||
}
|
||||
|
||||
static void flush_vectors(void *vma, size_t offset, size_t size)
|
||||
{
|
||||
unsigned long start = (unsigned long)vma + offset;
|
||||
unsigned long end = start + size;
|
||||
|
||||
flush_icache_range(start, end);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_HARDEN_BRANCH_HISTORY
|
||||
int spectre_bhb_update_vectors(unsigned int method)
|
||||
{
|
||||
extern char __vectors_bhb_bpiall_start[], __vectors_bhb_bpiall_end[];
|
||||
extern char __vectors_bhb_loop8_start[], __vectors_bhb_loop8_end[];
|
||||
void *vec_start, *vec_end;
|
||||
|
||||
if (system_state > SYSTEM_SCHEDULING) {
|
||||
pr_err("CPU%u: Spectre BHB workaround too late - system vulnerable\n",
|
||||
smp_processor_id());
|
||||
return SPECTRE_VULNERABLE;
|
||||
}
|
||||
|
||||
switch (method) {
|
||||
case SPECTRE_V2_METHOD_LOOP8:
|
||||
vec_start = __vectors_bhb_loop8_start;
|
||||
vec_end = __vectors_bhb_loop8_end;
|
||||
break;
|
||||
|
||||
case SPECTRE_V2_METHOD_BPIALL:
|
||||
vec_start = __vectors_bhb_bpiall_start;
|
||||
vec_end = __vectors_bhb_bpiall_end;
|
||||
break;
|
||||
|
||||
default:
|
||||
pr_err("CPU%u: unknown Spectre BHB state %d\n",
|
||||
smp_processor_id(), method);
|
||||
return SPECTRE_VULNERABLE;
|
||||
}
|
||||
|
||||
copy_from_lma(vectors_page, vec_start, vec_end);
|
||||
flush_vectors(vectors_page, 0, vec_end - vec_start);
|
||||
|
||||
return SPECTRE_MITIGATED;
|
||||
}
|
||||
#endif
|
||||
|
||||
void __init early_trap_init(void *vectors_base)
|
||||
{
|
||||
#ifndef CONFIG_CPU_V7M
|
||||
unsigned long vectors = (unsigned long)vectors_base;
|
||||
extern char __stubs_start[], __stubs_end[];
|
||||
extern char __vectors_start[], __vectors_end[];
|
||||
unsigned i;
|
||||
@@ -830,17 +880,20 @@ void __init early_trap_init(void *vectors_base)
|
||||
* into the vector page, mapped at 0xffff0000, and ensure these
|
||||
* are visible to the instruction stream.
|
||||
*/
|
||||
memcpy((void *)vectors, __vectors_start, __vectors_end - __vectors_start);
|
||||
memcpy((void *)vectors + 0x1000, __stubs_start, __stubs_end - __stubs_start);
|
||||
copy_from_lma(vectors_base, __vectors_start, __vectors_end);
|
||||
copy_from_lma(vectors_base + 0x1000, __stubs_start, __stubs_end);
|
||||
|
||||
kuser_init(vectors_base);
|
||||
|
||||
flush_icache_range(vectors, vectors + PAGE_SIZE * 2);
|
||||
flush_vectors(vectors_base, 0, PAGE_SIZE * 2);
|
||||
}
|
||||
#else /* ifndef CONFIG_CPU_V7M */
|
||||
void __init early_trap_init(void *vectors_base)
|
||||
{
|
||||
/*
|
||||
* on V7-M there is no need to copy the vector table to a dedicated
|
||||
* memory area. The address is configurable and so a table in the kernel
|
||||
* image can be used.
|
||||
*/
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
mrc p6, 0, \irqstat, c8, c0, 0 @ Read IINTSRC
|
||||
cmp \irqstat, #0
|
||||
clzne \irqnr, \irqstat
|
||||
rsbne \irqnr, \irqnr, #31
|
||||
rsbne \irqnr, \irqnr, #32
|
||||
.endm
|
||||
|
||||
.macro arch_ret_to_user, tmp1, tmp2
|
||||
|
||||
@@ -9,6 +9,6 @@
|
||||
#ifndef __IRQS_H
|
||||
#define __IRQS_H
|
||||
|
||||
#define NR_IRQS 32
|
||||
#define NR_IRQS 33
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,14 +32,14 @@ static void intstr_write(u32 val)
|
||||
static void
|
||||
iop32x_irq_mask(struct irq_data *d)
|
||||
{
|
||||
iop32x_mask &= ~(1 << d->irq);
|
||||
iop32x_mask &= ~(1 << (d->irq - 1));
|
||||
intctl_write(iop32x_mask);
|
||||
}
|
||||
|
||||
static void
|
||||
iop32x_irq_unmask(struct irq_data *d)
|
||||
{
|
||||
iop32x_mask |= 1 << d->irq;
|
||||
iop32x_mask |= 1 << (d->irq - 1);
|
||||
intctl_write(iop32x_mask);
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ void __init iop32x_init_irq(void)
|
||||
machine_is_em7210())
|
||||
*IOP3XX_PCIIRSR = 0x0f;
|
||||
|
||||
for (i = 0; i < NR_IRQS; i++) {
|
||||
for (i = 1; i < NR_IRQS; i++) {
|
||||
irq_set_chip_and_handler(i, &ext_chip, handle_level_irq);
|
||||
irq_clear_status_flags(i, IRQ_NOREQUEST | IRQ_NOPROBE);
|
||||
}
|
||||
|
||||
@@ -7,36 +7,40 @@
|
||||
#ifndef __IOP32X_IRQS_H
|
||||
#define __IOP32X_IRQS_H
|
||||
|
||||
/* Interrupts in Linux start at 1, hardware starts at 0 */
|
||||
|
||||
#define IOP_IRQ(x) ((x) + 1)
|
||||
|
||||
/*
|
||||
* IOP80321 chipset interrupts
|
||||
*/
|
||||
#define IRQ_IOP32X_DMA0_EOT 0
|
||||
#define IRQ_IOP32X_DMA0_EOC 1
|
||||
#define IRQ_IOP32X_DMA1_EOT 2
|
||||
#define IRQ_IOP32X_DMA1_EOC 3
|
||||
#define IRQ_IOP32X_AA_EOT 6
|
||||
#define IRQ_IOP32X_AA_EOC 7
|
||||
#define IRQ_IOP32X_CORE_PMON 8
|
||||
#define IRQ_IOP32X_TIMER0 9
|
||||
#define IRQ_IOP32X_TIMER1 10
|
||||
#define IRQ_IOP32X_I2C_0 11
|
||||
#define IRQ_IOP32X_I2C_1 12
|
||||
#define IRQ_IOP32X_MESSAGING 13
|
||||
#define IRQ_IOP32X_ATU_BIST 14
|
||||
#define IRQ_IOP32X_PERFMON 15
|
||||
#define IRQ_IOP32X_CORE_PMU 16
|
||||
#define IRQ_IOP32X_BIU_ERR 17
|
||||
#define IRQ_IOP32X_ATU_ERR 18
|
||||
#define IRQ_IOP32X_MCU_ERR 19
|
||||
#define IRQ_IOP32X_DMA0_ERR 20
|
||||
#define IRQ_IOP32X_DMA1_ERR 21
|
||||
#define IRQ_IOP32X_AA_ERR 23
|
||||
#define IRQ_IOP32X_MSG_ERR 24
|
||||
#define IRQ_IOP32X_SSP 25
|
||||
#define IRQ_IOP32X_XINT0 27
|
||||
#define IRQ_IOP32X_XINT1 28
|
||||
#define IRQ_IOP32X_XINT2 29
|
||||
#define IRQ_IOP32X_XINT3 30
|
||||
#define IRQ_IOP32X_HPI 31
|
||||
#define IRQ_IOP32X_DMA0_EOT IOP_IRQ(0)
|
||||
#define IRQ_IOP32X_DMA0_EOC IOP_IRQ(1)
|
||||
#define IRQ_IOP32X_DMA1_EOT IOP_IRQ(2)
|
||||
#define IRQ_IOP32X_DMA1_EOC IOP_IRQ(3)
|
||||
#define IRQ_IOP32X_AA_EOT IOP_IRQ(6)
|
||||
#define IRQ_IOP32X_AA_EOC IOP_IRQ(7)
|
||||
#define IRQ_IOP32X_CORE_PMON IOP_IRQ(8)
|
||||
#define IRQ_IOP32X_TIMER0 IOP_IRQ(9)
|
||||
#define IRQ_IOP32X_TIMER1 IOP_IRQ(10)
|
||||
#define IRQ_IOP32X_I2C_0 IOP_IRQ(11)
|
||||
#define IRQ_IOP32X_I2C_1 IOP_IRQ(12)
|
||||
#define IRQ_IOP32X_MESSAGING IOP_IRQ(13)
|
||||
#define IRQ_IOP32X_ATU_BIST IOP_IRQ(14)
|
||||
#define IRQ_IOP32X_PERFMON IOP_IRQ(15)
|
||||
#define IRQ_IOP32X_CORE_PMU IOP_IRQ(16)
|
||||
#define IRQ_IOP32X_BIU_ERR IOP_IRQ(17)
|
||||
#define IRQ_IOP32X_ATU_ERR IOP_IRQ(18)
|
||||
#define IRQ_IOP32X_MCU_ERR IOP_IRQ(19)
|
||||
#define IRQ_IOP32X_DMA0_ERR IOP_IRQ(20)
|
||||
#define IRQ_IOP32X_DMA1_ERR IOP_IRQ(21)
|
||||
#define IRQ_IOP32X_AA_ERR IOP_IRQ(23)
|
||||
#define IRQ_IOP32X_MSG_ERR IOP_IRQ(24)
|
||||
#define IRQ_IOP32X_SSP IOP_IRQ(25)
|
||||
#define IRQ_IOP32X_XINT0 IOP_IRQ(27)
|
||||
#define IRQ_IOP32X_XINT1 IOP_IRQ(28)
|
||||
#define IRQ_IOP32X_XINT2 IOP_IRQ(29)
|
||||
#define IRQ_IOP32X_XINT3 IOP_IRQ(30)
|
||||
#define IRQ_IOP32X_HPI IOP_IRQ(31)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -72,6 +72,8 @@ static int sram_probe(struct platform_device *pdev)
|
||||
if (!info)
|
||||
return -ENOMEM;
|
||||
|
||||
platform_set_drvdata(pdev, info);
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (res == NULL) {
|
||||
dev_err(&pdev->dev, "no memory resource defined\n");
|
||||
@@ -107,8 +109,6 @@ static int sram_probe(struct platform_device *pdev)
|
||||
list_add(&info->node, &sram_bank_list);
|
||||
mutex_unlock(&sram_lock);
|
||||
|
||||
platform_set_drvdata(pdev, info);
|
||||
|
||||
dev_info(&pdev->dev, "initialized\n");
|
||||
return 0;
|
||||
|
||||
@@ -127,9 +127,8 @@ static int sram_remove(struct platform_device *pdev)
|
||||
struct sram_bank_info *info;
|
||||
|
||||
info = platform_get_drvdata(pdev);
|
||||
if (info == NULL)
|
||||
return -ENODEV;
|
||||
|
||||
if (info->sram_size) {
|
||||
mutex_lock(&sram_lock);
|
||||
list_del(&info->node);
|
||||
mutex_unlock(&sram_lock);
|
||||
@@ -137,7 +136,10 @@ static int sram_remove(struct platform_device *pdev)
|
||||
gen_pool_destroy(info->gpool);
|
||||
iounmap(info->sram_virt);
|
||||
kfree(info->pool_name);
|
||||
}
|
||||
|
||||
kfree(info);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ menuconfig ARCH_MSTARV7
|
||||
depends on ARCH_MULTI_V7
|
||||
select ARM_GIC
|
||||
select ARM_HEAVY_MB
|
||||
select HAVE_ARM_ARCH_TIMER
|
||||
select MST_IRQ
|
||||
help
|
||||
Support for newer MStar/Sigmastar SoC families that are
|
||||
|
||||
@@ -263,9 +263,9 @@ static int __init omapdss_init_of(void)
|
||||
}
|
||||
|
||||
r = of_platform_populate(node, NULL, NULL, &pdev->dev);
|
||||
put_device(&pdev->dev);
|
||||
if (r) {
|
||||
pr_err("Unable to populate DSS submodule devices\n");
|
||||
put_device(&pdev->dev);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
@@ -749,9 +749,11 @@ static int __init _init_clkctrl_providers(void)
|
||||
|
||||
for_each_matching_node(np, ti_clkctrl_match_table) {
|
||||
ret = _setup_clkctrl_provider(np);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
of_node_put(np);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -236,11 +236,11 @@ static int __init jive_mtdset(char *options)
|
||||
unsigned long set;
|
||||
|
||||
if (options == NULL || options[0] == '\0')
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
if (kstrtoul(options, 10, &set)) {
|
||||
printk(KERN_ERR "failed to parse mtdset=%s\n", options);
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
switch (set) {
|
||||
@@ -255,7 +255,7 @@ static int __init jive_mtdset(char *options)
|
||||
"using default.", set);
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* parse the mtdset= option given to the kernel command line */
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
menuconfig ARCH_SOCFPGA
|
||||
bool "Altera SOCFPGA family"
|
||||
depends on ARCH_MULTI_V7
|
||||
select ARCH_HAS_RESET_CONTROLLER
|
||||
select ARCH_SUPPORTS_BIG_ENDIAN
|
||||
select ARM_AMBA
|
||||
select ARM_GIC
|
||||
@@ -18,6 +19,7 @@ menuconfig ARCH_SOCFPGA
|
||||
select PL310_ERRATA_727915
|
||||
select PL310_ERRATA_753970 if PL310
|
||||
select PL310_ERRATA_769419
|
||||
select RESET_CONTROLLER
|
||||
|
||||
if ARCH_SOCFPGA
|
||||
config SOCFPGA_SUSPEND
|
||||
|
||||
@@ -833,6 +833,7 @@ config CPU_BPREDICT_DISABLE
|
||||
|
||||
config CPU_SPECTRE
|
||||
bool
|
||||
select GENERIC_CPU_VULNERABILITIES
|
||||
|
||||
config HARDEN_BRANCH_PREDICTOR
|
||||
bool "Harden the branch predictor against aliasing attacks" if EXPERT
|
||||
@@ -853,6 +854,16 @@ config HARDEN_BRANCH_PREDICTOR
|
||||
|
||||
If unsure, say Y.
|
||||
|
||||
config HARDEN_BRANCH_HISTORY
|
||||
bool "Harden Spectre style attacks against branch history" if EXPERT
|
||||
depends on CPU_SPECTRE
|
||||
default y
|
||||
help
|
||||
Speculation attacks against some high-performance processors can
|
||||
make use of branch history to influence future speculation. When
|
||||
taking an exception, a sequence of branches overwrites the branch
|
||||
history, or branch history is invalidated.
|
||||
|
||||
config TLS_REG_EMUL
|
||||
bool
|
||||
select NEED_KUSER_HELPERS
|
||||
|
||||
@@ -212,12 +212,14 @@ early_param("ecc", early_ecc);
|
||||
static int __init early_cachepolicy(char *p)
|
||||
{
|
||||
pr_warn("cachepolicy kernel parameter not supported without cp15\n");
|
||||
return 0;
|
||||
}
|
||||
early_param("cachepolicy", early_cachepolicy);
|
||||
|
||||
static int __init noalign_setup(char *__unused)
|
||||
{
|
||||
pr_warn("noalign kernel parameter not supported without cp15\n");
|
||||
return 1;
|
||||
}
|
||||
__setup("noalign", noalign_setup);
|
||||
|
||||
|
||||
@@ -6,8 +6,35 @@
|
||||
#include <asm/cp15.h>
|
||||
#include <asm/cputype.h>
|
||||
#include <asm/proc-fns.h>
|
||||
#include <asm/spectre.h>
|
||||
#include <asm/system_misc.h>
|
||||
|
||||
#ifdef CONFIG_ARM_PSCI
|
||||
static int __maybe_unused spectre_v2_get_cpu_fw_mitigation_state(void)
|
||||
{
|
||||
struct arm_smccc_res res;
|
||||
|
||||
arm_smccc_1_1_invoke(ARM_SMCCC_ARCH_FEATURES_FUNC_ID,
|
||||
ARM_SMCCC_ARCH_WORKAROUND_1, &res);
|
||||
|
||||
switch ((int)res.a0) {
|
||||
case SMCCC_RET_SUCCESS:
|
||||
return SPECTRE_MITIGATED;
|
||||
|
||||
case SMCCC_ARCH_WORKAROUND_RET_UNAFFECTED:
|
||||
return SPECTRE_UNAFFECTED;
|
||||
|
||||
default:
|
||||
return SPECTRE_VULNERABLE;
|
||||
}
|
||||
}
|
||||
#else
|
||||
static int __maybe_unused spectre_v2_get_cpu_fw_mitigation_state(void)
|
||||
{
|
||||
return SPECTRE_VULNERABLE;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_HARDEN_BRANCH_PREDICTOR
|
||||
DEFINE_PER_CPU(harden_branch_predictor_fn_t, harden_branch_predictor_fn);
|
||||
|
||||
@@ -36,13 +63,61 @@ static void __maybe_unused call_hvc_arch_workaround_1(void)
|
||||
arm_smccc_1_1_hvc(ARM_SMCCC_ARCH_WORKAROUND_1, NULL);
|
||||
}
|
||||
|
||||
static void cpu_v7_spectre_init(void)
|
||||
static unsigned int spectre_v2_install_workaround(unsigned int method)
|
||||
{
|
||||
const char *spectre_v2_method = NULL;
|
||||
int cpu = smp_processor_id();
|
||||
|
||||
if (per_cpu(harden_branch_predictor_fn, cpu))
|
||||
return;
|
||||
return SPECTRE_MITIGATED;
|
||||
|
||||
switch (method) {
|
||||
case SPECTRE_V2_METHOD_BPIALL:
|
||||
per_cpu(harden_branch_predictor_fn, cpu) =
|
||||
harden_branch_predictor_bpiall;
|
||||
spectre_v2_method = "BPIALL";
|
||||
break;
|
||||
|
||||
case SPECTRE_V2_METHOD_ICIALLU:
|
||||
per_cpu(harden_branch_predictor_fn, cpu) =
|
||||
harden_branch_predictor_iciallu;
|
||||
spectre_v2_method = "ICIALLU";
|
||||
break;
|
||||
|
||||
case SPECTRE_V2_METHOD_HVC:
|
||||
per_cpu(harden_branch_predictor_fn, cpu) =
|
||||
call_hvc_arch_workaround_1;
|
||||
cpu_do_switch_mm = cpu_v7_hvc_switch_mm;
|
||||
spectre_v2_method = "hypervisor";
|
||||
break;
|
||||
|
||||
case SPECTRE_V2_METHOD_SMC:
|
||||
per_cpu(harden_branch_predictor_fn, cpu) =
|
||||
call_smc_arch_workaround_1;
|
||||
cpu_do_switch_mm = cpu_v7_smc_switch_mm;
|
||||
spectre_v2_method = "firmware";
|
||||
break;
|
||||
}
|
||||
|
||||
if (spectre_v2_method)
|
||||
pr_info("CPU%u: Spectre v2: using %s workaround\n",
|
||||
smp_processor_id(), spectre_v2_method);
|
||||
|
||||
return SPECTRE_MITIGATED;
|
||||
}
|
||||
#else
|
||||
static unsigned int spectre_v2_install_workaround(unsigned int method)
|
||||
{
|
||||
pr_info("CPU%u: Spectre V2: workarounds disabled by configuration\n",
|
||||
smp_processor_id());
|
||||
|
||||
return SPECTRE_VULNERABLE;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void cpu_v7_spectre_v2_init(void)
|
||||
{
|
||||
unsigned int state, method = 0;
|
||||
|
||||
switch (read_cpuid_part()) {
|
||||
case ARM_CPU_PART_CORTEX_A8:
|
||||
@@ -51,69 +126,133 @@ static void cpu_v7_spectre_init(void)
|
||||
case ARM_CPU_PART_CORTEX_A17:
|
||||
case ARM_CPU_PART_CORTEX_A73:
|
||||
case ARM_CPU_PART_CORTEX_A75:
|
||||
per_cpu(harden_branch_predictor_fn, cpu) =
|
||||
harden_branch_predictor_bpiall;
|
||||
spectre_v2_method = "BPIALL";
|
||||
state = SPECTRE_MITIGATED;
|
||||
method = SPECTRE_V2_METHOD_BPIALL;
|
||||
break;
|
||||
|
||||
case ARM_CPU_PART_CORTEX_A15:
|
||||
case ARM_CPU_PART_BRAHMA_B15:
|
||||
per_cpu(harden_branch_predictor_fn, cpu) =
|
||||
harden_branch_predictor_iciallu;
|
||||
spectre_v2_method = "ICIALLU";
|
||||
state = SPECTRE_MITIGATED;
|
||||
method = SPECTRE_V2_METHOD_ICIALLU;
|
||||
break;
|
||||
|
||||
#ifdef CONFIG_ARM_PSCI
|
||||
case ARM_CPU_PART_BRAHMA_B53:
|
||||
/* Requires no workaround */
|
||||
state = SPECTRE_UNAFFECTED;
|
||||
break;
|
||||
|
||||
default:
|
||||
/* Other ARM CPUs require no workaround */
|
||||
if (read_cpuid_implementor() == ARM_CPU_IMP_ARM)
|
||||
if (read_cpuid_implementor() == ARM_CPU_IMP_ARM) {
|
||||
state = SPECTRE_UNAFFECTED;
|
||||
break;
|
||||
}
|
||||
|
||||
fallthrough;
|
||||
|
||||
/* Cortex A57/A72 require firmware workaround */
|
||||
case ARM_CPU_PART_CORTEX_A57:
|
||||
case ARM_CPU_PART_CORTEX_A72: {
|
||||
struct arm_smccc_res res;
|
||||
|
||||
arm_smccc_1_1_invoke(ARM_SMCCC_ARCH_FEATURES_FUNC_ID,
|
||||
ARM_SMCCC_ARCH_WORKAROUND_1, &res);
|
||||
if ((int)res.a0 != 0)
|
||||
return;
|
||||
case ARM_CPU_PART_CORTEX_A72:
|
||||
state = spectre_v2_get_cpu_fw_mitigation_state();
|
||||
if (state != SPECTRE_MITIGATED)
|
||||
break;
|
||||
|
||||
switch (arm_smccc_1_1_get_conduit()) {
|
||||
case SMCCC_CONDUIT_HVC:
|
||||
per_cpu(harden_branch_predictor_fn, cpu) =
|
||||
call_hvc_arch_workaround_1;
|
||||
cpu_do_switch_mm = cpu_v7_hvc_switch_mm;
|
||||
spectre_v2_method = "hypervisor";
|
||||
method = SPECTRE_V2_METHOD_HVC;
|
||||
break;
|
||||
|
||||
case SMCCC_CONDUIT_SMC:
|
||||
per_cpu(harden_branch_predictor_fn, cpu) =
|
||||
call_smc_arch_workaround_1;
|
||||
cpu_do_switch_mm = cpu_v7_smc_switch_mm;
|
||||
spectre_v2_method = "firmware";
|
||||
method = SPECTRE_V2_METHOD_SMC;
|
||||
break;
|
||||
|
||||
default:
|
||||
state = SPECTRE_VULNERABLE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (state == SPECTRE_MITIGATED)
|
||||
state = spectre_v2_install_workaround(method);
|
||||
|
||||
spectre_v2_update_state(state, method);
|
||||
}
|
||||
|
||||
if (spectre_v2_method)
|
||||
pr_info("CPU%u: Spectre v2: using %s workaround\n",
|
||||
smp_processor_id(), spectre_v2_method);
|
||||
#ifdef CONFIG_HARDEN_BRANCH_HISTORY
|
||||
static int spectre_bhb_method;
|
||||
|
||||
static const char *spectre_bhb_method_name(int method)
|
||||
{
|
||||
switch (method) {
|
||||
case SPECTRE_V2_METHOD_LOOP8:
|
||||
return "loop";
|
||||
|
||||
case SPECTRE_V2_METHOD_BPIALL:
|
||||
return "BPIALL";
|
||||
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
static int spectre_bhb_install_workaround(int method)
|
||||
{
|
||||
if (spectre_bhb_method != method) {
|
||||
if (spectre_bhb_method) {
|
||||
pr_err("CPU%u: Spectre BHB: method disagreement, system vulnerable\n",
|
||||
smp_processor_id());
|
||||
|
||||
return SPECTRE_VULNERABLE;
|
||||
}
|
||||
|
||||
if (spectre_bhb_update_vectors(method) == SPECTRE_VULNERABLE)
|
||||
return SPECTRE_VULNERABLE;
|
||||
|
||||
spectre_bhb_method = method;
|
||||
}
|
||||
|
||||
pr_info("CPU%u: Spectre BHB: using %s workaround\n",
|
||||
smp_processor_id(), spectre_bhb_method_name(method));
|
||||
|
||||
return SPECTRE_MITIGATED;
|
||||
}
|
||||
#else
|
||||
static void cpu_v7_spectre_init(void)
|
||||
static int spectre_bhb_install_workaround(int method)
|
||||
{
|
||||
return SPECTRE_VULNERABLE;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void cpu_v7_spectre_bhb_init(void)
|
||||
{
|
||||
unsigned int state, method = 0;
|
||||
|
||||
switch (read_cpuid_part()) {
|
||||
case ARM_CPU_PART_CORTEX_A15:
|
||||
case ARM_CPU_PART_BRAHMA_B15:
|
||||
case ARM_CPU_PART_CORTEX_A57:
|
||||
case ARM_CPU_PART_CORTEX_A72:
|
||||
state = SPECTRE_MITIGATED;
|
||||
method = SPECTRE_V2_METHOD_LOOP8;
|
||||
break;
|
||||
|
||||
case ARM_CPU_PART_CORTEX_A73:
|
||||
case ARM_CPU_PART_CORTEX_A75:
|
||||
state = SPECTRE_MITIGATED;
|
||||
method = SPECTRE_V2_METHOD_BPIALL;
|
||||
break;
|
||||
|
||||
default:
|
||||
state = SPECTRE_UNAFFECTED;
|
||||
break;
|
||||
}
|
||||
|
||||
if (state == SPECTRE_MITIGATED)
|
||||
state = spectre_bhb_install_workaround(method);
|
||||
|
||||
spectre_v2_update_state(state, method);
|
||||
}
|
||||
|
||||
static __maybe_unused bool cpu_v7_check_auxcr_set(bool *warned,
|
||||
u32 mask, const char *msg)
|
||||
{
|
||||
@@ -142,16 +281,17 @@ static bool check_spectre_auxcr(bool *warned, u32 bit)
|
||||
void cpu_v7_ca8_ibe(void)
|
||||
{
|
||||
if (check_spectre_auxcr(this_cpu_ptr(&spectre_warned), BIT(6)))
|
||||
cpu_v7_spectre_init();
|
||||
cpu_v7_spectre_v2_init();
|
||||
}
|
||||
|
||||
void cpu_v7_ca15_ibe(void)
|
||||
{
|
||||
if (check_spectre_auxcr(this_cpu_ptr(&spectre_warned), BIT(0)))
|
||||
cpu_v7_spectre_init();
|
||||
cpu_v7_spectre_v2_init();
|
||||
}
|
||||
|
||||
void cpu_v7_bugs_init(void)
|
||||
{
|
||||
cpu_v7_spectre_init();
|
||||
cpu_v7_spectre_v2_init();
|
||||
cpu_v7_spectre_bhb_init();
|
||||
}
|
||||
|
||||
@@ -1184,6 +1184,15 @@ config UNMAP_KERNEL_AT_EL0
|
||||
|
||||
If unsure, say Y.
|
||||
|
||||
config MITIGATE_SPECTRE_BRANCH_HISTORY
|
||||
bool "Mitigate Spectre style attacks against branch history" if EXPERT
|
||||
default y
|
||||
help
|
||||
Speculation attacks against some high-performance processors can
|
||||
make use of branch history to influence future speculation.
|
||||
When taking an exception from user-space, a sequence of branches
|
||||
or a firmware call overwrites the branch history.
|
||||
|
||||
config RODATA_FULL_DEFAULT_ENABLED
|
||||
bool "Apply r/o permissions of VM areas also to their linear aliases"
|
||||
default y
|
||||
|
||||
@@ -101,6 +101,12 @@
|
||||
no-map;
|
||||
};
|
||||
|
||||
/* 32 MiB reserved for ARM Trusted Firmware (BL32) */
|
||||
secmon_reserved_bl32: secmon@5300000 {
|
||||
reg = <0x0 0x05300000 0x0 0x2000000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
linux,cma {
|
||||
compatible = "shared-dma-pool";
|
||||
reusable;
|
||||
|
||||
@@ -157,14 +157,6 @@
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
reserved-memory {
|
||||
/* TEE Reserved Memory */
|
||||
bl32_reserved: bl32@5000000 {
|
||||
reg = <0x0 0x05300000 0x0 0x2000000>;
|
||||
no-map;
|
||||
};
|
||||
};
|
||||
|
||||
sdio_pwrseq: sdio-pwrseq {
|
||||
compatible = "mmc-pwrseq-simple";
|
||||
reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
ethernet0 = ðmac;
|
||||
};
|
||||
|
||||
dioo2133: audio-amplifier-0 {
|
||||
dio2133: audio-amplifier-0 {
|
||||
compatible = "simple-audio-amplifier";
|
||||
enable-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
|
||||
VCC-supply = <&vcc_5v>;
|
||||
@@ -215,7 +215,7 @@
|
||||
audio-widgets = "Line", "Lineout";
|
||||
audio-aux-devs = <&tdmout_b>, <&tdmout_c>, <&tdmin_a>,
|
||||
<&tdmin_b>, <&tdmin_c>, <&tdmin_lb>,
|
||||
<&dioo2133>;
|
||||
<&dio2133>;
|
||||
audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
|
||||
"TDMOUT_B IN 1", "FRDDR_B OUT 1",
|
||||
"TDMOUT_B IN 2", "FRDDR_C OUT 1",
|
||||
|
||||
@@ -43,6 +43,12 @@
|
||||
no-map;
|
||||
};
|
||||
|
||||
/* 32 MiB reserved for ARM Trusted Firmware (BL32) */
|
||||
secmon_reserved_bl32: secmon@5300000 {
|
||||
reg = <0x0 0x05300000 0x0 0x2000000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
linux,cma {
|
||||
compatible = "shared-dma-pool";
|
||||
reusable;
|
||||
|
||||
@@ -203,14 +203,6 @@
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
reserved-memory {
|
||||
/* TEE Reserved Memory */
|
||||
bl32_reserved: bl32@5000000 {
|
||||
reg = <0x0 0x05300000 0x0 0x2000000>;
|
||||
no-map;
|
||||
};
|
||||
};
|
||||
|
||||
sdio_pwrseq: sdio-pwrseq {
|
||||
compatible = "mmc-pwrseq-simple";
|
||||
reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
|
||||
|
||||
@@ -111,8 +111,8 @@
|
||||
compatible = "silabs,si3226x";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <5000000>;
|
||||
spi-cpha = <1>;
|
||||
spi-cpol = <1>;
|
||||
spi-cpha;
|
||||
spi-cpol;
|
||||
pl022,hierarchy = <0>;
|
||||
pl022,interface = <0>;
|
||||
pl022,slave-tx-disable = <0>;
|
||||
@@ -135,8 +135,8 @@
|
||||
at25,byte-len = <0x8000>;
|
||||
at25,addr-mode = <2>;
|
||||
at25,page-size = <64>;
|
||||
spi-cpha = <1>;
|
||||
spi-cpol = <1>;
|
||||
spi-cpha;
|
||||
spi-cpol;
|
||||
pl022,hierarchy = <0>;
|
||||
pl022,interface = <0>;
|
||||
pl022,slave-tx-disable = <0>;
|
||||
|
||||
@@ -687,7 +687,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
sata: ahci@663f2000 {
|
||||
sata: sata@663f2000 {
|
||||
compatible = "brcm,iproc-ahci", "generic-ahci";
|
||||
reg = <0x663f2000 0x1000>;
|
||||
dma-coherent;
|
||||
|
||||
@@ -524,7 +524,7 @@
|
||||
assigned-clock-rates = <0>, <0>, <0>, <594000000>;
|
||||
status = "disabled";
|
||||
|
||||
port@0 {
|
||||
port {
|
||||
lcdif_mipi_dsi: endpoint {
|
||||
remote-endpoint = <&mipi_dsi_lcdif_in>;
|
||||
};
|
||||
|
||||
@@ -476,7 +476,7 @@
|
||||
};
|
||||
|
||||
usb0: usb@ffb00000 {
|
||||
compatible = "snps,dwc2";
|
||||
compatible = "intel,socfpga-agilex-hsotg", "snps,dwc2";
|
||||
reg = <0xffb00000 0x40000>;
|
||||
interrupts = <0 93 4>;
|
||||
phys = <&usbphy0>;
|
||||
@@ -489,7 +489,7 @@
|
||||
};
|
||||
|
||||
usb1: usb@ffb40000 {
|
||||
compatible = "snps,dwc2";
|
||||
compatible = "intel,socfpga-agilex-hsotg", "snps,dwc2";
|
||||
reg = <0xffb40000 0x40000>;
|
||||
interrupts = <0 94 4>;
|
||||
phys = <&usbphy0>;
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
aliases {
|
||||
spi0 = &spi0;
|
||||
ethernet0 = ð0;
|
||||
ethernet1 = ð1;
|
||||
mmc0 = &sdhci0;
|
||||
mmc1 = &sdhci1;
|
||||
@@ -137,7 +138,9 @@
|
||||
/*
|
||||
* U-Boot port for Turris Mox has a bug which always expects that "ranges" DT property
|
||||
* contains exactly 2 ranges with 3 (child) address cells, 2 (parent) address cells and
|
||||
* 2 size cells and also expects that the second range starts at 16 MB offset. If these
|
||||
* 2 size cells and also expects that the second range starts at 16 MB offset. Also it
|
||||
* expects that first range uses same address for PCI (child) and CPU (parent) cells (so
|
||||
* no remapping) and that this address is the lowest from all specified ranges. If these
|
||||
* conditions are not met then U-Boot crashes during loading kernel DTB file. PCIe address
|
||||
* space is 128 MB long, so the best split between MEM and IO is to use fixed 16 MB window
|
||||
* for IO and the rest 112 MB (64+32+16) for MEM, despite that maximal IO size is just 64 kB.
|
||||
@@ -146,6 +149,9 @@
|
||||
* https://source.denx.de/u-boot/u-boot/-/commit/cb2ddb291ee6fcbddd6d8f4ff49089dfe580f5d7
|
||||
* https://source.denx.de/u-boot/u-boot/-/commit/c64ac3b3185aeb3846297ad7391fc6df8ecd73bf
|
||||
* https://source.denx.de/u-boot/u-boot/-/commit/4a82fca8e330157081fc132a591ebd99ba02ee33
|
||||
* Bug related to requirement of same child and parent addresses for first range is fixed
|
||||
* in U-Boot version 2022.04 by following commit:
|
||||
* https://source.denx.de/u-boot/u-boot/-/commit/1fd54253bca7d43d046bba4853fe5fafd034bc17
|
||||
*/
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
|
||||
@@ -495,7 +495,7 @@
|
||||
* (totaling 127 MiB) for MEM.
|
||||
*/
|
||||
ranges = <0x82000000 0 0xe8000000 0 0xe8000000 0 0x07f00000 /* Port 0 MEM */
|
||||
0x81000000 0 0xefff0000 0 0xefff0000 0 0x00010000>; /* Port 0 IO */
|
||||
0x81000000 0 0x00000000 0 0xefff0000 0 0x00010000>; /* Port 0 IO */
|
||||
interrupt-map-mask = <0 0 0 7>;
|
||||
interrupt-map = <0 0 0 1 &pcie_intc 0>,
|
||||
<0 0 0 2 &pcie_intc 1>,
|
||||
|
||||
@@ -3406,10 +3406,10 @@
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <9600000>;
|
||||
clock-output-names = "mclk";
|
||||
qcom,micbias1-millivolt = <1800>;
|
||||
qcom,micbias2-millivolt = <1800>;
|
||||
qcom,micbias3-millivolt = <1800>;
|
||||
qcom,micbias4-millivolt = <1800>;
|
||||
qcom,micbias1-microvolt = <1800000>;
|
||||
qcom,micbias2-microvolt = <1800000>;
|
||||
qcom,micbias3-microvolt = <1800000>;
|
||||
qcom,micbias4-microvolt = <1800000>;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
@@ -1114,9 +1114,9 @@
|
||||
qcom,tcs-offset = <0xd00>;
|
||||
qcom,drv-id = <2>;
|
||||
qcom,tcs-config = <ACTIVE_TCS 2>,
|
||||
<SLEEP_TCS 1>,
|
||||
<WAKE_TCS 1>,
|
||||
<CONTROL_TCS 0>;
|
||||
<SLEEP_TCS 3>,
|
||||
<WAKE_TCS 3>,
|
||||
<CONTROL_TCS 1>;
|
||||
|
||||
rpmhcc: clock-controller {
|
||||
compatible = "qcom,sm8150-rpmh-clk";
|
||||
|
||||
@@ -665,8 +665,8 @@
|
||||
sd-uhs-sdr104;
|
||||
|
||||
/* Power supply */
|
||||
vqmmc-supply = &vcc1v8_s3; /* IO line */
|
||||
vmmc-supply = &vcc_sdio; /* card's power */
|
||||
vqmmc-supply = <&vcc1v8_s3>; /* IO line */
|
||||
vmmc-supply = <&vcc_sdio>; /* card's power */
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
@@ -281,7 +281,7 @@
|
||||
|
||||
sound: sound {
|
||||
compatible = "rockchip,rk3399-gru-sound";
|
||||
rockchip,cpu = <&i2s0 &i2s2>;
|
||||
rockchip,cpu = <&i2s0 &spdif>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -432,10 +432,6 @@ ap_i2c_audio: &i2c8 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2s2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&io_domains {
|
||||
status = "okay";
|
||||
|
||||
@@ -532,6 +528,17 @@ ap_i2c_audio: &i2c8 {
|
||||
vqmmc-supply = <&ppvar_sd_card_io>;
|
||||
};
|
||||
|
||||
&spdif {
|
||||
status = "okay";
|
||||
|
||||
/*
|
||||
* SPDIF is routed internally to DP; we either don't use these pins, or
|
||||
* mux them to something else.
|
||||
*/
|
||||
/delete-property/ pinctrl-0;
|
||||
/delete-property/ pinctrl-names;
|
||||
};
|
||||
|
||||
&spi1 {
|
||||
status = "okay";
|
||||
|
||||
|
||||
@@ -472,6 +472,12 @@
|
||||
};
|
||||
|
||||
&sdhci {
|
||||
/*
|
||||
* Signal integrity isn't great at 200MHz but 100MHz has proven stable
|
||||
* enough.
|
||||
*/
|
||||
max-frequency = <100000000>;
|
||||
|
||||
bus-width = <8>;
|
||||
mmc-hs400-1_8v;
|
||||
mmc-hs400-enhanced-strobe;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user