Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] SCMI PTA with OCALL #90

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
9e38023
Add upstream-tee-subsys-patches.txt
jenswi-linaro Apr 4, 2018
9d5c773
tee: new ioctl to a register tee_shm from a dmabuf file descriptor
etienne-lms Oct 27, 2016
595188c
arm64: dt: Remove timer from mt8173 **not for mainline**
jbech-linaro Apr 1, 2016
1d5f2c3
arm64: dt: OP-TEE for foundation-v8 **not for mainline**
jenswi-linaro Aug 17, 2016
ef79f9e
arm64: dt: OP-TEE for Juno **not for mainline**
jenswi-linaro Mar 29, 2016
767ffb6
arm64: dt: Add no-map to the reserved-memory node for OP-TEE for foun…
jenswi-linaro Dec 2, 2016
c9108c8
arm64: dt: Add no-map to the reserved-memory node for OP-TEE for juno…
jenswi-linaro Jan 3, 2017
f9029fe
arm64: dt: Add OP-TEE firmware to mt8173 **not for mainline**
jbech-linaro Mar 24, 2016
9f5731c
OP-TEE Benchmark **not for mainline**
Oct 25, 2016
41e9290
tee: support of allocating DMA shared buffers **not for mainline**
Feb 5, 2018
0b1c103
upstream-tee-subsys-patches.txt: patches up to v4.20-rc1
jenswi-linaro Nov 5, 2018
f795a4f
upstream-tee-subsys-patches.txt: patches up to v5.0
jforissier Mar 4, 2019
578ce3c
upstream-tee-subsys-patches.txt: patches up to v5.1
jforissier May 7, 2019
fa11127
staging/ion: add Allwinner ION "secure" heap
etienne-lms Aug 14, 2017
11ed7ae
ion: "unmapped" heap for secure data path
etienne-lms Aug 14, 2017
366e674
staging/ion: condition unmapped heap to supported architectures
etienne-lms Sep 8, 2017
05790c9
staging/ion: ARM64 supports ION_UNMAPPED_HEAP
etienne-lms Sep 14, 2017
6af0afc
staging:ion: add a no-map property to ion dmabuf attachment
etienne-lms Oct 9, 2017
816b967
staging: android: ion: do not clear dma_address of unmapped heap
jforissier Aug 31, 2018
bfc70e1
upstream-tee-subsys-patches.txt: patches up to v5.4-rc7
jforissier Nov 15, 2019
10ef4b8
upstream-tee-subsys-patches.txt: patches up to v5.5
jforissier Nov 15, 2019
185d754
driver: tee: Handle NULL pointer indication from client
cneveux Mar 4, 2019
4b38a0a
arm64: dts: hi3798cv200-poplar: memreserve for bootloader
igoropaniuk May 11, 2020
50c5965
arm64: dts: hi3798cv200-poplar: add optee node
igoropaniuk May 11, 2020
bc1e135
ARM: dts: stm32: Define OP-TEE resources on stm32mp15 and enable on DK2
etienne-lms May 27, 2020
d297719
upstream-tee-subsys-patches.txt: patches up to v5.9
jforissier Nov 15, 2019
a1f8ac0
tee: client UUID: Skip REE kernel login method as well
b49020 Sep 17, 2020
28676a5
checkpatch: add --kconfig-prefix
jforissier Oct 16, 2020
436d15c
upstream-tee-subsys-patches.txt: fix wrong commit ID
jforissier Jan 14, 2021
4c38674
Enable Microsoft fTPM driver on Arm Foundation v8 models.
javieralso-arm Feb 2, 2021
5247548
stm32mp157c-ev1.dts: Fix optee status to 'okay'
Mar 2, 2021
2d3ba7d
optee: refactor call queue code
HernanGatta Apr 11, 2020
5cc3b41
tee: add support for supplicant-style memory registration
HernanGatta Apr 11, 2020
ff602f2
tee: optee: detect and report OCALL support
HernanGatta Apr 11, 2020
be70804
tee: add helper method to increase the refcount on an SHM
HernanGatta Apr 11, 2020
647242c
tee: OCALL support
HernanGatta Oct 19, 2020
fda5c7c
optee: OCALL support
HernanGatta Oct 19, 2020
7277385
dt-bindings: arm: OP-TEE as transport channel for SCMI messages
etienne-lms Mar 7, 2021
1fc6863
firmware: arm_scmi: add optee transport
etienne-lms Mar 1, 2021
29d63c7
firmware: arm_scmi: Ocall support in optee transport
etienne-lms Apr 7, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions Documentation/devicetree/bindings/arm/arm,scmi.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ Required properties:

The scmi node with the following properties shall be under the /firmware/ node.

- compatible : shall be "arm,scmi" or "arm,scmi-smc" for smc/hvc transports
- mboxes: List of phandle and mailbox channel specifiers. It should contain
exactly one or two mailboxes, one for transmitting messages("tx")
and another optional for receiving the notifications("rx") if
- compatible : shall be "arm,scmi" or "arm,scmi-smc" for smc/hvc transports,
or "linaro,scmi-optee" for OP-TEE transport.
- mboxes: List of phandle and mailbox channel specifiers. When used, it should
contain exactly one or two mailboxes, one for transmitting messages
("tx") and another optional for receiving the notifications("rx") if
supported.
- shmem : List of phandle pointing to the shared memory(SHM) area as per
generic mailbox client binding.
Expand All @@ -26,6 +27,7 @@ The scmi node with the following properties shall be under the /firmware/ node.
- #size-cells : should be '0' as 'reg' property doesn't have any size
associated with it.
- arm,smc-id : SMC id required when using smc or hvc transports
- linaro,channel-id : Channel ID required when using OP-TEE transports

Optional properties:

Expand Down
8 changes: 8 additions & 0 deletions arch/arm/boot/dts/stm32mp151.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@
method = "smc";
};

firmware {
optee: optee {
compatible = "linaro,optee-tz";
method = "smc";
status = "disabled";
};
};

intc: interrupt-controller@a0021000 {
compatible = "arm,cortex-a7-gic";
#interrupt-cells = <3>;
Expand Down
11 changes: 11 additions & 0 deletions arch/arm/boot/dts/stm32mp157c-dk2.dts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@
model = "STMicroelectronics STM32MP157C-DK2 Discovery Board";
compatible = "st,stm32mp157c-dk2", "st,stm32mp157";

reserved-memory {
optee_memory: optee@0xde000000 {
reg = <0xde000000 0x02000000>;
no-map;
};
};

aliases {
ethernet0 = &ethernet0;
serial0 = &uart4;
Expand Down Expand Up @@ -95,3 +102,7 @@
pinctrl-2 = <&usart2_idle_pins_c>;
status = "disabled";
};

&optee {
status = "okay";
};
4 changes: 4 additions & 0 deletions arch/arm/boot/dts/stm32mp157c-ev1.dts
Original file line number Diff line number Diff line change
Expand Up @@ -372,3 +372,7 @@
&usbphyc {
status = "okay";
};

&optee {
status = "okay";
};
32 changes: 23 additions & 9 deletions arch/arm64/boot/dts/arm/foundation-v8.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@

aliases {
serial0 = &v2m_serial0;
serial1 = &v2m_serial1;
serial2 = &v2m_serial2;
serial3 = &v2m_serial3;
};

ftpm {
compatible = "microsoft,ftpm";
};

cpus {
#address-cells = <2>;
#size-cells = <0>;
Expand Down Expand Up @@ -67,6 +70,17 @@
<0x00000008 0x80000000 0 0x80000000>;
};

reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;

optee@0x83000000 {
reg = <0x00000000 0x83000000 0 0x01000000>;
no-map;
};
};

timer {
compatible = "arm,armv8-timer";
interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
Expand Down Expand Up @@ -197,14 +211,6 @@
clock-names = "uartclk", "apb_pclk";
};

v2m_serial1: serial@a0000 {
compatible = "arm,pl011", "arm,primecell";
reg = <0x0a0000 0x1000>;
interrupts = <6>;
clocks = <&v2m_clk24mhz>, <&v2m_clk24mhz>;
clock-names = "uartclk", "apb_pclk";
};

v2m_serial2: serial@b0000 {
compatible = "arm,pl011", "arm,primecell";
reg = <0x0b0000 0x1000>;
Expand All @@ -228,4 +234,12 @@
};
};
};

firmware {
optee {
compatible = "linaro,optee-tz";
method = "smc";
};
};

};
19 changes: 19 additions & 0 deletions arch/arm64/boot/dts/arm/juno-base.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,18 @@
<0x00000008 0x80000000 0x1 0x80000000>;
};

reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;

/* Shared memory between secure and non-secure world */
optee@0xfee00000 {
reg = <0x00000000 0xfee00000 0 0x00200000>;
no-map;
};
};

bus@8000000 {
compatible = "simple-bus";
#address-cells = <2>;
Expand Down Expand Up @@ -837,4 +849,11 @@
interrupt-map-mask = <0 0>;
interrupt-map = <0 0 &gic 0 GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>;
};

firmware {
optee {
compatible = "linaro,optee-tz";
method = "smc";
};
};
};
8 changes: 8 additions & 0 deletions arch/arm64/boot/dts/hisilicon/hi3798cv200-poplar.dts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

/dts-v1/;
/memreserve/ 0x00000000 0x04080000;

#include <dt-bindings/gpio/gpio.h>
#include "hi3798cv200.dtsi"
Expand Down Expand Up @@ -70,6 +71,13 @@
gpio = <&gpio6 7 0>;
enable-active-high;
};

firmware {
optee {
compatible = "linaro,optee-tz";
method = "smc";
};
};
};

&ehci {
Expand Down
7 changes: 7 additions & 0 deletions arch/arm64/boot/dts/mediatek/mt8173-evb.dts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@
gpio = <&pio 9 GPIO_ACTIVE_HIGH>;
enable-active-high;
};

firmware {
optee {
compatible = "linaro,optee-tz";
method = "smc";
};
};
};

&cec {
Expand Down
9 changes: 0 additions & 9 deletions arch/arm64/boot/dts/mediatek/mt8173.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -468,15 +468,6 @@
reg = <0 0x10007000 0 0x100>;
};

timer: timer@10008000 {
compatible = "mediatek,mt8173-timer",
"mediatek,mt6577-timer";
reg = <0 0x10008000 0 0x1000>;
interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_LOW>;
clocks = <&infracfg CLK_INFRA_CLK_13M>,
<&topckgen CLK_TOP_RTC_SEL>;
};

pwrap: pwrap@1000d000 {
compatible = "mediatek,mt8173-pwrap";
reg = <0 0x1000d000 0 0x1000>;
Expand Down
2 changes: 1 addition & 1 deletion drivers/firmware/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ menu "Firmware Drivers"
config ARM_SCMI_PROTOCOL
bool "ARM System Control and Management Interface (SCMI) Message Protocol"
depends on ARM || ARM64 || COMPILE_TEST
depends on MAILBOX
depends on MAILBOX || HAVE_ARM_SMCCC_DISCOVERY || OPTEE
help
ARM System Control and Management Interface (SCMI) protocol is a
set of operating system-independent software interfaces that are
Expand Down
1 change: 1 addition & 0 deletions drivers/firmware/arm_scmi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ scmi-driver-y = driver.o notify.o
scmi-transport-y = shmem.o
scmi-transport-$(CONFIG_MAILBOX) += mailbox.o
scmi-transport-$(CONFIG_HAVE_ARM_SMCCC_DISCOVERY) += smc.o
scmi-transport-$(CONFIG_OPTEE) += optee_service.o
scmi-protocols-y = base.o clock.o perf.o power.o reset.o sensors.o
obj-$(CONFIG_ARM_SCMI_POWER_DOMAIN) += scmi_pm_domain.o
5 changes: 4 additions & 1 deletion drivers/firmware/arm_scmi/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,12 @@ struct scmi_desc {
};

extern const struct scmi_desc scmi_mailbox_desc;
#ifdef CONFIG_HAVE_ARM_SMCCC
#ifdef CONFIG_HAVE_ARM_SMCCC_DISCOVERY
extern const struct scmi_desc scmi_smc_desc;
#endif
#ifdef CONFIG_OPTEE
extern const struct scmi_desc scmi_optee_desc;
#endif

void scmi_rx_callback(struct scmi_chan_info *cinfo, u32 msg_hdr);
void scmi_free_channel(struct scmi_chan_info *cinfo, struct idr *idr, int id);
Expand Down
3 changes: 3 additions & 0 deletions drivers/firmware/arm_scmi/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,9 @@ static const struct of_device_id scmi_of_match[] = {
{ .compatible = "arm,scmi", .data = &scmi_mailbox_desc },
#ifdef CONFIG_HAVE_ARM_SMCCC_DISCOVERY
{ .compatible = "arm,scmi-smc", .data = &scmi_smc_desc},
#endif
#ifdef CONFIG_OPTEE
{ .compatible = "linaro,scmi-optee", .data = &scmi_optee_desc },
#endif
{ /* Sentinel */ },
};
Expand Down
Loading