History log of /optee_os/core/drivers/ (Results 926 – 950 of 1301)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
9b61a2bc07-Oct-2021 Jorge Ramirez-Ortiz <jorge@foundries.io>

zynqmp: drivers: PM firmware

These routines call TF-A exported SiP services that implement IPI
protocol for communication with PMUFW (Platform Management Unit).

To access eFuses, PMUFW should be bu

zynqmp: drivers: PM firmware

These routines call TF-A exported SiP services that implement IPI
protocol for communication with PMUFW (Platform Management Unit).

To access eFuses, PMUFW should be built with -DENABLE_EFUSE_ACCESS=1.

Notice however that certain eFuses will not be available unless the
Xilskey library linked to the PMUFW is compiled removing some of those
security restrictions.

Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io>
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

f072eea404-Oct-2021 Jorge Ramirez-Ortiz <jorge@foundries.io>

zynqmp: drivers: AES-GCM with PUF KEK

Provide a mechanism to encrypt a red key using the KEK; the KEK is
only available on secured boards after the RSA_EN and PPK eFUSES have
been burnt (the system

zynqmp: drivers: AES-GCM with PUF KEK

Provide a mechanism to encrypt a red key using the KEK; the KEK is
only available on secured boards after the RSA_EN and PPK eFUSES have
been burnt (the system will only boot ROM authenticated bootloaders
from here on).

The main use case for OP-TEE would be to encode the zynqmp per device
unique identifier (DNA0, DNA1, DNA2 eFUSEs - ie, a red key) using the
KEK. The encryption key generated this way is cryptographically strong
and will be used as the device HUK (ie, black key).

Test code:

csu_aes_encrypt_data(src, dst, BLOB_DATA_SIZE, tag, GCM_TAG_SIZE,
iv, GCM_IV_SIZE, CSU_AES_KEY_SRC_DEV);
csu_aes_decrypt_data(dst, src, BLOB_DATA_SIZE, tag, GCM_TAG_SIZE,
iv, GCM_IV_SIZE, CSU_AES_KEY_SRC_DEV);
if (memcmp(src, buffer, BLOB_DATA_SIZE)) {
EMSG(" - encrypt/decrypt test failed");

Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

777da53804-Oct-2021 Jorge Ramirez-Ortiz <jorge@foundries.io>

zynqmp: drivers: CSUDMA module

This module provides a mechanism to transfer data between memory and
peripherals. The data path is selected in the Secure Stream Switch
register in the CSU.

Signed-of

zynqmp: drivers: CSUDMA module

This module provides a mechanism to transfer data between memory and
peripherals. The data path is selected in the Secure Stream Switch
register in the CSU.

Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

e4a0a85204-Oct-2021 Jorge Ramirez-Ortiz <jorge@foundries.io>

zynqmp: drivers: Physically Unclonable Function (PUF)

This block is used to generate black keys via the AES-GCM module.
The PUF KEK - feeding the AES-GCM block - is also unique for each
device.

The

zynqmp: drivers: Physically Unclonable Function (PUF)

This block is used to generate black keys via the AES-GCM module.
The PUF KEK - feeding the AES-GCM block - is also unique for each
device.

The KEK is only available once the board has been secured via
programmable eFUSES (RSA_EN authentication via the PPK fuses).

Registering the PUF should be done using the Xilinx tools so the
adequate eFUSES are written.

Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

88544a9f17-Feb-2020 Remi Koman <remi.koman@nxp.com>

drivers: imx: add MU driver

Add Message Unit driver. This driver is needed to communicate with the
security controller.

Signed-off-by: Remi Koman <remi.koman@nxp.com>
Signed-off-by: Clement Faure <

drivers: imx: add MU driver

Add Message Unit driver. This driver is needed to communicate with the
security controller.

Signed-off-by: Remi Koman <remi.koman@nxp.com>
Signed-off-by: Clement Faure <clement.faure@nxp.com>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

8bddeb8522-Oct-2021 Jorge Ramirez-Ortiz <jorge@foundries.io>

drivers: crypto: rsa/ecc/dsa: input parameter validation

To comply with the PKCS#11 convention for functions returning output
in a variable-length buffer, prefer to check the required size of the
ou

drivers: crypto: rsa/ecc/dsa: input parameter validation

To comply with the PKCS#11 convention for functions returning output
in a variable-length buffer, prefer to check the required size of the
output buffer before the existence of the output buffer itself.

This will save callers from having to allocate a buffer that might not
be used.

Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Clement Faure <clement.faure@nxp.com>
Acked-by: Cedric Neveux <cedric.neveux@nxp.com>

show more ...

ced0ec6315-Sep-2021 Etienne Carriere <etienne.carriere@linaro.org>

drivers: clk: rename setup callback to probe

Rename clock core and fixed_clk setup functions to probe functions and
update in-line description as per handler description in the framework.

Acked-by:

drivers: clk: rename setup callback to probe

Rename clock core and fixed_clk setup functions to probe functions and
update in-line description as per handler description in the framework.

Acked-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

6e4e7a2327-Oct-2021 Etienne Carriere <etienne.carriere@linaro.org>

drivers: clk: rename clk_dt_get_fn to clk_dt_get_func

Rename type clk_dt_get_fn to clk_dt_get_func for consistency in OP-TEE
OS implementation where all other function prototype type definitions
use

drivers: clk: rename clk_dt_get_fn to clk_dt_get_func

Rename type clk_dt_get_fn to clk_dt_get_func for consistency in OP-TEE
OS implementation where all other function prototype type definitions
use _func as suffix.

Acked-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

6c9ed84219-Sep-2021 Etienne Carriere <etienne.carriere@linaro.org>

drivers: clk: implement clk_is_enabled()

Add clock API function clk_is_enabled(). It is not very useful at
runtime since clock state can change at any time. The API function
is useful during specifi

drivers: clk: implement clk_is_enabled()

Add clock API function clk_is_enabled(). It is not very useful at
runtime since clock state can change at any time. The API function
is useful during specific system sequences where OP-TEE core knows
is executes atomically (primary core boot, low power sequences).

Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

7e6a39fe03-Sep-2021 Etienne Carriere <etienne.carriere@linaro.org>

drivers: clk: add platform data per compatible identifier

Add a platform data reference field in struct dt_device_match so
that a driver knows data related to the compatible it is probed for.

Signe

drivers: clk: add platform data per compatible identifier

Add a platform data reference field in struct dt_device_match so
that a driver knows data related to the compatible it is probed for.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

804e32d714-Jun-2021 Clément Léger <clement.leger@bootlin.com>

drivers: clk: add fixed-clock driver

fixed-clock are a really common clock types used in device tree and
when there is a clock hierarchy, they are needed to query the clock
rate. This driver is buil

drivers: clk: add fixed-clock driver

fixed-clock are a really common clock types used in device tree and
when there is a clock hierarchy, they are needed to query the clock
rate. This driver is build by default when CFG_DRIVERS_CLK_DT is
enabled.

Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Clément Léger <clement.leger@bootlin.com>

show more ...

dbe94a8525-Jun-2021 Clément Léger <clement.leger@bootlin.com>

drivers: clk: add devicetree support

When using a devicetree, it is often useful to have clocks parsing.
This support adds clocks properties parsing and allow having clock
providers and users. Clock

drivers: clk: add devicetree support

When using a devicetree, it is often useful to have clocks parsing.
This support adds clocks properties parsing and allow having clock
providers and users. Clocks drivers can also be declared with
CLK_DT_DECLARE. They will be probed automatically by the clock core.
On the user side, function clk_dt_get_by_name and clk_dt_get_by_idx
allows to retrieve a clock from the device tree description and match
it with the provider clocks. The core ensure the clocks are probed
hierarchically.
This support is enabled using CFG_DRIVERS_CLK_DT.

Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Clément Léger <clement.leger@bootlin.com>

show more ...

2305544b10-Jun-2021 Clément Léger <clement.leger@bootlin.com>

drivers: clk: add generic clock framework

In order to ease clock support in OP-TEE, add a generic clock framework
which allows to add clocks driver and handle clock hierarchy.
This clock framework p

drivers: clk: add generic clock framework

In order to ease clock support in OP-TEE, add a generic clock framework
which allows to add clocks driver and handle clock hierarchy.
This clock framework provides various functions to enable/disable clock
and to get their rate. Some basic behavior are supported such as gating
when parent or rate is set. This option is enabled using
CFG_DRIVERS_CLK which is disabled by default.

Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Clément Léger <clement.leger@bootlin.com>

show more ...

5e58877110-Jun-2021 Clément Léger <clement.leger@bootlin.com>

drivers: add type field to dt_driver struct

In order to keep the current mechanism simple but allow parsing the
device tree by iterating on driver (clocks for instance), add a type
field to dt drive

drivers: add type field to dt_driver struct

In order to keep the current mechanism simple but allow parsing the
device tree by iterating on driver (clocks for instance), add a type
field to dt driver struct which will allow differentiating drivers
when iterating on entries and thus avoid casting struct
dt_driver::driver to the wrong type in case a bad DT is provided. This
will also allow adding a more generic driver model by probing generic
driver based on their compatible.

Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Clément Léger <clement.leger@bootlin.com>

show more ...

be501eb105-Oct-2021 Jorge Ramirez-Ortiz <jorge@foundries.io>

util: rename ALIGNMENT_IS_OK to IS_ALIGNED_WITH_TYPE

Implement the renamed macro using the IS_ALIGNED definition.

Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Reviewed-by: Etienne Carrie

util: rename ALIGNMENT_IS_OK to IS_ALIGNED_WITH_TYPE

Implement the renamed macro using the IS_ALIGNED definition.

Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

6d777f2605-Oct-2021 Jorge Ramirez-Ortiz <jorge@foundries.io>

util: define IS_ALIGNED macro

Keep a single version of the macro definition.

Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Revi

util: define IS_ALIGNED macro

Keep a single version of the macro definition.

Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

702fe5a710-Aug-2021 Clément Léger <clement.leger@bootlin.com>

core: kernel: interrupt: add type and prio for interrupts

When describing a device in the device tree, it is sometimes necessary
to parse the interrupts properties and propagates them until adding
t

core: kernel: interrupt: add type and prio for interrupts

When describing a device in the device tree, it is sometimes necessary
to parse the interrupts properties and propagates them until adding
the interrupt. For instance some interrupt-cells allows to describe
priority and type of interrupt:

interrupts = <67 IRQ_TYPE_LEVEL_HIGH 2>;

With existing support, only the interrupt number is returned by
`dt_get_irq()`. This patch adds type and prio parameter which are passed
to `dt_get_irq_type_prio()` and `itr_add_type_prio()`. This allows
interrupt drivers to fill this from devicetree in `dt_get_irq()` but also
use these information in the `add()` callback. Additionally, it allows to
specify these flags manually when not using devicetree.

These parameters can then be used by the interrupt controller driver to
setup the irq line correctly.

Signed-off-by: Clément Léger <clement.leger@bootlin.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

888bb63d13-Oct-2021 Clément Léger <clement.leger@bootlin.com>

core: kernel: interrupt: rename len argument of dt_get_irq to count

len can be missleading, use a more descriptive name.

Signed-off-by: Clément Léger <clement.leger@bootlin.com>
Reviewed-by: Etienn

core: kernel: interrupt: rename len argument of dt_get_irq to count

len can be missleading, use a more descriptive name.

Signed-off-by: Clément Léger <clement.leger@bootlin.com>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

f02c0ee207-Oct-2021 Clement Faure <clement.faure@nxp.com>

drivers: imx_ocotp: fix clock enablement for imx7 platforms

Set the correct CCM clock domain ID to enabled the OCOTP clock
on imx7 platforms.

Fixes: e4ca953c38 ("drivers: imx: add OCOTP driver")
Si

drivers: imx_ocotp: fix clock enablement for imx7 platforms

Set the correct CCM clock domain ID to enabled the OCOTP clock
on imx7 platforms.

Fixes: e4ca953c38 ("drivers: imx: add OCOTP driver")
Signed-off-by: Clement Faure <clement.faure@nxp.com>
Acked-by: Jerome Forissier <jerome@forissier.org>

show more ...

e08643a405-Oct-2021 Clement Faure <clement.faure@nxp.com>

drivers: crypto: fix RSAES-OAEP encryption length check

According to PKCS#1 v2.2: RSA Cryptography Standard, for RSAES-OAEP
Encryption operation function, the following length check must be done
pri

drivers: crypto: fix RSAES-OAEP encryption length check

According to PKCS#1 v2.2: RSA Cryptography Standard, for RSAES-OAEP
Encryption operation function, the following length check must be done
prior the encryptioon operation [1]:

Return error if mLen > k - 2*hlen - 2

Because (k - 2*hlen - 2) must be superior or equal to zero, return an
error also if 2*hlen >= k - 2

Links: [1] https://datatracker.ietf.org/doc/html/rfc8017
Fixes: f5a70e3efb ("drivers: crypto: generic resources for crypto device driver - RSA")
Signed-off-by: Clement Faure <clement.faure@nxp.com>
Reviewed-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

5d49c2f401-Oct-2021 Clement Faure <clement.faure@nxp.com>

drivers: caam: check destination buffer size before copying message

At the end of the RSA-OAEP decryption operation, check if the
destination message buffer is big enough to hold the output of the
d

drivers: caam: check destination buffer size before copying message

At the end of the RSA-OAEP decryption operation, check if the
destination message buffer is big enough to hold the output of the
decryption operation.
If the buffer is too small, return TEE_ERROR_SHORT_BUFFER error code
along the expected buffer size.

Fixes: 796ea6d867 ("drivers: caam: implement NXP CAAM Driver - RSA")
Signed-off-by: Clement Faure <clement.faure@nxp.com>
Reviewed-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

e4ca953c10-Aug-2021 Clement Faure <clement.faure@nxp.com>

drivers: imx: add OCOTP driver

Add OCOTP driver for imx6, imx7, imx7ulp and imx8m platforms.
The implementation only supports the read of OCOTP shadow registers.
It also implements the tee_otp_get_d

drivers: imx: add OCOTP driver

Add OCOTP driver for imx6, imx7, imx7ulp and imx8m platforms.
The implementation only supports the read of OCOTP shadow registers.
It also implements the tee_otp_get_die_id() function.

Signed-off-by: Clement Faure <clement.faure@nxp.com>
Acked-by: Jerome Forissier <jerome@forissier.org>

show more ...

0d7e03a901-Sep-2021 Clement Faure <clement.faure@nxp.com>

drivers: crypto: fix ECC key size bytes to bits conversion

Convert the ECC key size from bytes to bits.
By adding the new key_size variable, it also fixes the crypto driver
traces bellow printing th

drivers: crypto: fix ECC key size bytes to bits conversion

Convert the ECC key size from bytes to bits.
By adding the new key_size variable, it also fixes the crypto driver
traces bellow printing the ECC key size from the variable that was
missing.

Fixes: d29cd2e ("core: driver: generic resources for crypto device driver - ECC")
Signed-off-by: Clement Faure <clement.faure@nxp.com>
Acked-by: Jerome Forissier <jerome@forissier.org>
Acked-by: Ruchika Gupta <ruchika.gupta@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

2391d61931-Aug-2021 Clement Faure <clement.faure@nxp.com>

drivers: crypto: acipher: fix traces compilation

Cast key pointers to uintptr_t to avoid compilation warnings when crypto
driver traces are enabled (CFG_CRYPTO_DRIVER_DEBUG=0x1)

Fixes: 62590f0 ("dr

drivers: crypto: acipher: fix traces compilation

Cast key pointers to uintptr_t to avoid compilation warnings when crypto
driver traces are enabled (CFG_CRYPTO_DRIVER_DEBUG=0x1)

Fixes: 62590f0 ("drivers: crypto: implement crypto device driver - DSA")
Signed-off-by: Clement Faure <clement.faure@nxp.com>
Acked-by: Jerome Forissier <jerome@forissier.org>
Acked-by: Ruchika Gupta <ruchika.gupta@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

4278ad1825-Aug-2021 Clement Faure <clement.faure@nxp.com>

drivers: caam: dma: fix copy data size

After each crypto operation that involves a DMA output, the content of
the SGT buffer is copied to the actual output buffer. Fix the DMA copy
function where th

drivers: caam: dma: fix copy data size

After each crypto operation that involves a DMA output, the content of
the SGT buffer is copied to the actual output buffer. Fix the DMA copy
function where the size of the data to be copied is either the full size
of the data processed by the CAAM (obj->sgtbuf.length) or the size of
the output buffer.

In some cases, the output buffer is smaller than the CAAM output. The
size of data to be copied is the smallest size between the CAAM output
data size and the output buffer size.

Fixes: 38923d4 ("drivers: caam: implement CAAM DMA Object")
Signed-off-by: Clement Faure <clement.faure@nxp.com>
Acked-by: Jerome Forissier <jerome@forissier.org>
Acked-by: Ruchika Gupta <ruchika.gupta@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

1...<<31323334353637383940>>...53