| a564092c | 14-May-2023 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: dt_driver_test: move source file to core/pta/test/
Moves dt_driver_test.c from core/kernel/ to core/pta/test/ where most embedded tests implementation are located. This is legitimate as the te
core: dt_driver_test: move source file to core/pta/test/
Moves dt_driver_test.c from core/kernel/ to core/pta/test/ where most embedded tests implementation are located. This is legitimate as the test results are retrieved from the Invoke PTA interface, even if the test is not effectively run from an invocation command of that PTA.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| eb238769 | 27-Mar-2023 |
Clement Faure <clement.faure@nxp.com> |
pta: attestation: fix compilation incompatible pointer warning
To reproduce (any 64bits platform will do): $ make PLATFORM=imx-mx8mmevk CFG_ATTESTATION_PTA=y CFG_WERROR=y
core/pta/attestation.c: In
pta: attestation: fix compilation incompatible pointer warning
To reproduce (any 64bits platform will do): $ make PLATFORM=imx-mx8mmevk CFG_ATTESTATION_PTA=y CFG_WERROR=y
core/pta/attestation.c: In function ‘cmd_get_pubkey’: core/pta/attestation.c:358:30: warning: initialization of ‘uint32_t *’ {aka ‘unsigned int *’} from incompatible pointer type ‘size_t *’ {aka ‘long unsigned int *’} [-Wincompatible-pointer-types] 358 | uint32_t *e_out_sz = ¶ms[0].memref.size; | ^ core/pta/attestation.c:360:30: warning: initialization of ‘uint32_t *’ {aka ‘unsigned int *’} from incompatible pointer type ‘size_t *’ {aka ‘long unsigned int *’} [-Wincompatible-pointer-types] 360 | uint32_t *n_out_sz = ¶ms[1].memref.size; | ^
Fixes: 7509620b8b95 ("GP131: Update TEE_Param") Signed-off-by: Clement Faure <clement.faure@nxp.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 0db29820 | 23-Jan-2023 |
Clement Faure <clement.faure@nxp.com> |
core: pta: imx: add manufacturing protection
Add the i.MX PTA to expose CAAM manufacturing protection features: * Get manufacturing protection public key. * Get manufacturing protection message.
core: pta: imx: add manufacturing protection
Add the i.MX PTA to expose CAAM manufacturing protection features: * Get manufacturing protection public key. * Get manufacturing protection message. * Message signature with manufacturing protection private key.
Signed-off-by: Cedric Neveux <cedric.neveux@nxp.com> Signed-off-by: Clement Faure <clement.faure@nxp.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| c6d054eb | 12-Dec-2022 |
Manorit Chawdhry <m-chawdhry@ti.com> |
core: pta: Add K3 specific PTA for writing into extended OTP
Writing into the extended OTP has been a vendor specific thing and no generic drivers exists for it in the OP-TEE framework.
Add a PTA t
core: pta: Add K3 specific PTA for writing into extended OTP
Writing into the extended OTP has been a vendor specific thing and no generic drivers exists for it in the OP-TEE framework.
Add a PTA to write into the custom extended OTP bits in K3 architecture.
This header should be exported out of optee-os to be used by the host binary for interacting with the PTA.
Includes OTP keywriting PTA header file in libutee
Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| b76b2296 | 03-Feb-2023 |
Jerome Forissier <jerome.forissier@linaro.org> |
virt: rename CFG_VIRTUALIZATION to CFG_NS_VIRTUALIZATION
With the advent of virtualization support at S-EL2 in the Armv8.4-A architecture, CFG_VIRTUALIZATION has become ambiguous. Let's rename it to
virt: rename CFG_VIRTUALIZATION to CFG_NS_VIRTUALIZATION
With the advent of virtualization support at S-EL2 in the Armv8.4-A architecture, CFG_VIRTUALIZATION has become ambiguous. Let's rename it to CFG_NS_VIRTUALIZATION to indicate more clearly that it is about supporting virtualization on the non-secure side.
This commit is the result of the following command:
$ for f in $(git grep -l -w CFG_VIRTUALIZATION); do \ sed -i -e 's/CFG_VIRTUALIZATION/CFG_NS_VIRTUALIZATION/g' $f; \ done
...plus the compatibility line in mk/config.mk:
CFG_NS_VIRTUALIZATION ?= $(CFG_VIRTUALIZATION)
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
show more ...
|
| 1428fce8 | 23-Jan-2023 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: gic: rename macros GIC_SGI, GIC_PPI and GIC_SPI
Renames OP-TEE core macros GIC_SGI(), GIC_PPI() and GIC_SPI() to GIC_xxx_TO_ITNUM() to prevent collision with macros GIC_SPI and CFG_PPI defined
core: gic: rename macros GIC_SGI, GIC_PPI and GIC_SPI
Renames OP-TEE core macros GIC_SGI(), GIC_PPI() and GIC_SPI() to GIC_xxx_TO_ITNUM() to prevent collision with macros GIC_SPI and CFG_PPI defined in GIC DT bindings.
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 7509620b | 30-Nov-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
GP131: Update TEE_Param
Updates TEE_Param according to TEE Internal Core API version 1.3.1.
A compatibility type with a __GP11_ prefix is added for compatibility with version 1.1. The two API funct
GP131: Update TEE_Param
Updates TEE_Param according to TEE Internal Core API version 1.3.1.
A compatibility type with a __GP11_ prefix is added for compatibility with version 1.1. The two API functions TEE_InvokeTACommand() and TEE_OpenTASession() are updated in a similar manner.
For the two TA entry functions TA_InvokeCommandEntryPoint() and TA_OpenSessionEntryPoint() we are implementing those in directly in user_ta_header.c since it's compiled with the TA and can used conditionals based on __OPTEE_CORE_API_COMPAT_1_1.
These TA entry points calls __ta_open_sess() and __ta_invoke_cmd() to convert TEE_Param to the compatibility __GP11_TEE_Param and in then call the compatibility entry points __GP11_TA_OpenSessionEntryPoint() and __GP11_TA_InvokeCommandEntryPoint().
Supplying __GP11_TA_OpenSessionEntryPoint() and __GP11_TA_InvokeCommandEntryPoint() as function pointers ensures that libutee doesn't try to look up the compatibility entry points when not needed.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 8f31ccb0 | 25-Jan-2023 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add StMM to reported services
Adds StMM to the list of services reported by the device pseudo TA.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Ilias Apalodimas <ilias
core: add StMM to reported services
Adds StMM to the list of services reported by the device pseudo TA.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 9e7f74ce | 19-Oct-2021 |
Clement Faure <clement.faure@nxp.com> |
pta: imx: add OCOTP PTA
Add a OCOTP PTA for i.MX platforms. This PTA exposes two commands: - the read of OCOTP shadow registers. - the read of the platform UID.
Signed-off-by: Clement Faure <clem
pta: imx: add OCOTP PTA
Add a OCOTP PTA for i.MX platforms. This PTA exposes two commands: - the read of OCOTP shadow registers. - the read of the platform UID.
Signed-off-by: Clement Faure <clement.faure@nxp.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| e91fa6a0 | 19-Oct-2021 |
Clement Faure <clement.faure@nxp.com> |
pta: imx: add DIGPROG PTA
Add an i.MX PTA to get the platform digprog value. This 32 bits value holds the SOC type and the minor and major revision number.
Signed-off-by: Clement Faure <clement.fau
pta: imx: add DIGPROG PTA
Add an i.MX PTA to get the platform digprog value. This 32 bits value holds the SOC type and the minor and major revision number.
Signed-off-by: Clement Faure <clement.faure@nxp.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 3bc3809a | 13-Jan-2023 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: pta: scmi: fix typo in open session test
Fixes a typo in config switch name CFG_SCMI_MSG_DRIVERS in SCMI PTA open session function.
Fixes: 7ff454421a8c ("core: pta: scmi: support SCP-firmware
core: pta: scmi: fix typo in open session test
Fixes a typo in config switch name CFG_SCMI_MSG_DRIVERS in SCMI PTA open session function.
Fixes: 7ff454421a8c ("core: pta: scmi: support SCP-firmware SCMI resources") Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 7ff45442 | 02-Dec-2022 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: pta: scmi: support SCP-firmware SCMI resources
Updates SCMI PTA to use SCP-firmware resources when CFG_SCMI_SCPFW=y.
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Fori
core: pta: scmi: support SCP-firmware SCMI resources
Updates SCMI PTA to use SCP-firmware resources when CFG_SCMI_SCPFW=y.
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 8b7eff36 | 17-Jun-2022 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: pta: scmi: simplify scmi-msg case in open session
Allows session opening when CFG_SCMI_MSG_DRIVERS is enabled instead of testing the 2 possible scmi-msg transport protocol config switches.
Ac
core: pta: scmi: simplify scmi-msg case in open session
Allows session opening when CFG_SCMI_MSG_DRIVERS is enabled instead of testing the 2 possible scmi-msg transport protocol config switches.
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 16a5030f | 02-Dec-2022 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: pta: scmi: internal switches for supported transports
Adds internal configuration switch _CFG_SMCI_PTA_SMT_HEADER and _CFG_SCMI_PTA_MSG_HEADER to specify which are supported. This change will
core: pta: scmi: internal switches for supported transports
Adds internal configuration switch _CFG_SMCI_PTA_SMT_HEADER and _CFG_SCMI_PTA_MSG_HEADER to specify which are supported. This change will ease integration of the alternate SCMI server build from SCP-firmware.
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 4583de06 | 12-Dec-2022 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
pta: stm32mp: add BSEC PTA
Add BSEC PTA to offer an interface with One Time Programmed resources (OTPs) of stm32mp1x platforms.
This interface allows non-secure world clients to get the state of th
pta: stm32mp: add BSEC PTA
Add BSEC PTA to offer an interface with One Time Programmed resources (OTPs) of stm32mp1x platforms.
This interface allows non-secure world clients to get the state of the BSEC, and read and write the OTPs. The REE has restricted access on OTPs, the policy is defined in the embedded DT.
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| cb94c145 | 21-Oct-2022 |
Weizhao Jiang <weizhaoj@amazon.com> |
core: implement a method to dump user TA runtime status
This patch is to dump user TA runtime status for debug purposes. The change includes: 1. Add new command (STATS_CMD_TA_STATS) in the stats PTA
core: implement a method to dump user TA runtime status
This patch is to dump user TA runtime status for debug purposes. The change includes: 1. Add new command (STATS_CMD_TA_STATS) in the stats PTA. 2. Add tee_ta_dump_stats() to scan all ongoing TA instance and sessions and snapshot their status. 3. Add new function: entry_dump_memstats() to __utee_entry() to get TA heap statistics. 4. Add new compile option (CFG_TA_STATS, default n) to enable this feature.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Weizhao Jiang <weizhaoj@amazon.com> Signed-off-by: Weizhao Jiang <weizhaoj@amazon.com> [jf: edit commit message] Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| ec1aa4fa | 05-Sep-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add offset argument to shdr_alloc_and_copy()
Adds an offset argument to shdr_alloc_and_copy() to make it easier to copy a signed header located further into a non-secure buffer.
Reviewed-by:
core: add offset argument to shdr_alloc_and_copy()
Adds an offset argument to shdr_alloc_and_copy() to make it easier to copy a signed header located further into a non-secure buffer.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| e0cfd556 | 22-Sep-2022 |
Andrew Mustea <andrew.mustea@microsoft.com> |
core: pta: bcm: add option to disable SOTP PTA after first session
- If the config flag CFG_BCM_SOTP_SINGLE_SESSION is enabled, the BCM SOTP driver should prevent any further connections after the
core: pta: bcm: add option to disable SOTP PTA after first session
- If the config flag CFG_BCM_SOTP_SINGLE_SESSION is enabled, the BCM SOTP driver should prevent any further connections after the first PTA SOTP session disconnects. - When enabling this flag, it will be possible to restrict any SOTP access after firmware bootup is complete.
Signed-off-by: Andrew Mustea <andrew.mustea@microsoft.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 48ca91ed | 31-Mar-2021 |
Vahid Dukandar <vahidd@microsoft.com> |
drivers: bcm_sotp: add sotp write support
- Added write support for bcm secure one time programmable fuses. - bcm_iproc_sotp_mem_read() now takes in a bool value for sotp_add_ecc instead of an int
drivers: bcm_sotp: add sotp write support
- Added write support for bcm secure one time programmable fuses. - bcm_iproc_sotp_mem_read() now takes in a bool value for sotp_add_ecc instead of an int to denote if error checking memory is supported. - Updated debug and error messages to return TEE_result codes.
Signed-off-by: Vahid Dukandar <vahidd@microsoft.com> Signed-off-by: Andrew Mustea <andrew.mustea@microsoft.com> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| d3126240 | 29-Apr-2022 |
Andrew Davis <afd@ti.com> |
core: pta: Use common crypto_rng_read() over hw_get_random_byte()
This PTA is one of the only direct users of hw_get_random_byte(), the common path is through crypto_rng_read().
This does mean in s
core: pta: Use common crypto_rng_read() over hw_get_random_byte()
This PTA is one of the only direct users of hw_get_random_byte(), the common path is through crypto_rng_read().
This does mean in systems without a HW RNG this may go through the software PRNG, but this path is locked out by build-time checks on platforms that enable this PTA already.
Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| e27e865a | 28-Jun-2022 |
Etienne Carriere <etienne.carriere@linaro.org> |
pta: rng: rename rng_pta_client.h to pta_rng.h
Renames RNG PTA exported header file from rng_pta_client.h to pta_rng.h as the later follows PTAs header file name convention in optee_os that is pta_x
pta: rng: rename rng_pta_client.h to pta_rng.h
Renames RNG PTA exported header file from rng_pta_client.h to pta_rng.h as the later follows PTAs header file name convention in optee_os that is pta_xxx.h.
Preserve rng_pta_client.h for backward compatibility. That header file only includes pta_rng.h.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| e2cac47b | 16-Jun-2022 |
Clement Faure <clement.faure@nxp.com> |
core: pta: return error code when failing to deserialize saved key
When deserializing the key, TEE_SUCCESS code is returned even the bignum deserialization of one of the key component fails.
Make s
core: pta: return error code when failing to deserialize saved key
When deserializing the key, TEE_SUCCESS code is returned even the bignum deserialization of one of the key component fails.
Make sure to free the allocated key in case of an error in the deserialization of one of the key component.
Fixes: 7e05ec25b ("core: pta: add remote attestation PTA") Signed-off-by: Clement Faure <clement.faure@nxp.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 62e37796 | 03-Jun-2022 |
Clement Faure <clement.faure@nxp.com> |
core: pta: attestation: fix buffer size for generated key
There is assertion error in the attestation PTA when it comes to deserialize the key. Here are the logs:
* regression_1037 Remote attestati
core: pta: attestation: fix buffer size for generated key
There is assertion error in the attestation PTA when it comes to deserialize the key. Here are the logs:
* regression_1037 Remote attestation o regression_1037.1 Get public key E/TC:? 0 assertion '!buf_sz' failed at core/pta/attestation.c:199 <deserialize_key> E/TC:3 0 Panic at core/kernel/assert.c:28 <_assert_break> E/TC:3 0 TEE load address @ 0xbe000000 E/TC:3 0 Call stack: E/TC:3 0 0xbe0091b4 E/TC:3 0 0xbe024b5c E/TC:3 0 0xbe02292c E/TC:3 0 0xbe02fde4 E/TC:3 0 0xbe0300c4 E/TC:3 0 0xbe029a3c E/TC:3 0 0xbe025e70 E/TC:3 0 0xbe0336e0 E/TC:3 0 0xbe007070 E/TC:3 0 0xbe0071ec
To reproduce the issue, you need a persistent storage and follow these steps: $ xtest 1037 *reboot the platform* $ xtest 1037
When allocating the key buffer, the maximum buffer size is allocated (1033 bytes) whatever the size specified by CFG_ATTESTATION_PTA_KEY_SIZE.
With default attestation key size (CFG_ATTESTATION_PTA_KEY_SIZE) of 3072 bits, only 777 bytes is needed to store the key but the allocated buffer size is still 1033 bytes.
When the key has already been generated, the key stored is deserialized and the deserialize_key() function expects the size of the previously generated key to be equal to the maximum buffer size.
The assertion can be removed as the buffer size and the key size could mismatch. The deserialize_bignum() function, however, still checks the buffer size is big enough to hold the given key size.
Fixes: 7e05ec25b ("core: pta: add remote attestation PTA") Signed-off-by: Clement Faure <clement.faure@nxp.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 46747ab4 | 16-Jun-2022 |
Ludvig Pärsson <ludvig.parsson@axis.com> |
core: pta: scmi: Add error checking for MSG message protocol
It is an error to use MSG_HEADER capability if it is not enabled in the config.
Signed-off-by: Ludvig Pärsson <ludvig.parsson@axis.com>
core: pta: scmi: Add error checking for MSG message protocol
It is an error to use MSG_HEADER capability if it is not enabled in the config.
Signed-off-by: Ludvig Pärsson <ludvig.parsson@axis.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 67b5f81b | 16-Jun-2022 |
Ludvig Pärsson <ludvig.parsson@axis.com> |
core: pta: scmi: Fix open_session for CFG_SCMI_MSG_SHM_MSG
Currently you have to enable CFG_SCMI_MSG_SMT, even if you only want to use CFG_SCMI_MSG_SHM_MSG, in order to open a session to the PTA.
S
core: pta: scmi: Fix open_session for CFG_SCMI_MSG_SHM_MSG
Currently you have to enable CFG_SCMI_MSG_SMT, even if you only want to use CFG_SCMI_MSG_SHM_MSG, in order to open a session to the PTA.
Signed-off-by: Ludvig Pärsson <ludvig.parsson@axis.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|