| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Revert "optee_os: add alignment to struct internal_aes_gcm_state" This reverts commit 0a3fb6756d71beff6ad42ee9be9e09855d08f284. Reason for revert: since we do not perform alignmeng check on non-ARHC_ARM64 platform, and sim/qemu are all defined as ARCH_ARM, so we do not need to add these force alignment actions at here. Signed-off-by: guoshichao <guoshichao@xiaomi.com> | 3 个月前 | |
drivers: imx_mu: increase maximum MU message size Increase MU message maximum size to 17 words. It corresponds to the biggest message of the ELE API. Signed-off-by: Clement Faure <clement.faure@nxp.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> | 3 年前 | |
drivers: clk: sam: export audiopll_fracck and usbck This allows to modify the clocks rate and parents from the device-tree using assigned-clock-parents/rate properties rather than hardcoding the clocks rate. Signed-off-by: Clément Léger <clement.leger@bootlin.com> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> | 3 年前 | |
core/include/kernel: add missing stdbool.h include in refcount.h Add #include <stdbool.h> to refcount.h to fix missing type dependency for bool type usage. Signed-off-by: shaoboan <shaoboan@bestechnic.com> | 3 个月前 | |
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> | 3 年前 | |
optee/key_management: Support configuration to derive unique SSK dependson:3661225 Signed-off-by: makejian <makejian@xiaomi.com> | 3 个月前 | |
core/include/*.h: use U() for unsigned constants Updates with the U() macro as described in the recently updated coding guidelines. Acked-by: Ruchika Gupta <ruchika.gupta@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> | 5 年前 | |
core: console: fix use after free when CFG_DT=y Commit 770b2afacf33 ("core: more flexible console init from DT") has split configure_console_from_dt() in two parts, the first one being moved to a new function: get_console_node_from_dt(). Unfortunately, this function may return pointers to a freed buffer. Fix the problem by allocating each output string on the heap and letting the caller clean on return. Fixes: 770b2afacf33 ("core: more flexible console init from DT") Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Rouven Czerwinski <r.czerwinksi@pengutronix.de> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> | 6 年前 | |
core: change the pattern used to generate asm-defines.h This commit prepares support for the Clang compiler. $O/core/include/generated/asm-defines.h is generated from core/arch/arm/kernel/asm-defines.c by the C compiler with the -S flag (generate assembler code), followed by some light post-processing with sed. The intermediate file ($O/core/include/generated/.asm-defines.s) is actually not a valid assembler file. It contains illegal tokens, which where chosen to make it easy to parse with sed. For example: ==>SM_CTX_SIZE #256 sizeof(struct sm_ctx) @ ...is turned into: #define SM_CTX_SIZE 256 /* sizeof(struct sm_ctx) */ While this works fine with GCC, the Clang compiler won't accept to output invalid assembler. This commit slightly modifies the inline assembler so that the needed information is contained within a .ascii directive: .ascii "==>SM_CTX_SIZE 248 sizeof(struct sm_ctx)" @ The 'c' constraint (%c0) is added to avoid the # prefix before an immediate value, which is not accepted by Clang either. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> | 6 年前 | |
core: gpio.h: Add 'struct gpio_chip *chip' in 'struct gpio_ops' To get the GPIO controller base address, 'struct gpio_chip *chip' is passed as a member in the container 'struct gpio_ops' Also updated bcm_gpio and pl061_gpio as per modified gpio.h definition. Signed-off-by: Manish Tomar <manish.tomar@nxp.com> Reviewed-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: Clement Faure <clement.faure@nxp.com> Reviewed-by: Sahil Malhotra <sahil.malhotra@nxp.com> | 5 年前 | |
optee_os: make the initcall can work on x64 platform When building on an x64 system, if we do not add alignment attribute for struct initcall{}, we observe that the intervals between the scattered_array sections where our registered initcalls are located are not directly adjacent. Instead, there is an 8-byte padding between each initcall, which causes issues when optee_os traverses the scattered_array sections containing the initcalls. In order to fix this bug, we need to add alignment attribute for struct initcall{}, and we find out that in x64 platform, the default alignment is 0x10 for struct initcall{}, so add force alignment(0x10) to struct initcall{} Signed-off-by: guoshichao <guoshichao@xiaomi.com> | 3 个月前 | |
core: include: io.h: define io_read64() and io_write64() helpers Add 64 bits read/write functions. Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> | 4 年前 | |
core: keep.h: set SHF_ALLOC flag in all __keep_meta_vars_pager sections The DECLARE_KEEP_PAGER() and DECLARE_KEEP_INIT() macros create symbols in a special section called __keep_meta_vars_pager. The behavior differs slightly in C and assembler: - In C, the section is of type SHT_PROGBITS and has (SHF_ALLOC | SHF_WRITE) flags, - In assembler, the section is also SHT_PROGBITS but has no flags. Enter the Clang linker, ld.lld. When used with --gc-sections, all sections without the SHF_ALLOC flag (and a few other conditions) are marked "live" in a first pass before dependencies on other sections are considered. A side effect is that the reference to the symbol given in DECLARE_KEEP_*() is ignored and the macro does not pull the desired section in the link. That section is garbage collected instead. Whether or not it is a bug in the linker is slightly above my level of expertise. However, the DECLARE_KEEP_*() macros declare global symbols that reference other symbols, so it really is allocatable stuff and having the SHF_ALLOC flag does make sense. It is also consistent with the C version. Note that adding the flag does not take more space in the final executable since core/arch/arm/kernel/kern.ld.S discards the __keep_meta_vars_pager output section anyways. Therefore, add "a" to the .section command in DECLARE_KEEP_*(). Fixes a core crash which may be reproduced on QEMUv8 with xtest 1013 when OP-TEE is compiled with Clang 11 and CFG_WITH_PAGER=y. Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> | 5 年前 | |
core: add asynchronous notifications Adds support for asynchronous notifications from secure world to normal world. This allows a design with a top half and bottom half type of driver where the top half runs in secure interrupt context and a notifications tells normal world to schedule a yielding call to do the bottom half processing. The protocol is defined in optee_msg.h optee_rpc_cmd.h and optee_smc.h. A notification consists of a 32-bit value which normal world can retrieve using a fastcall into secure world. OP-TEE is currently only supporting the value 0-63 where 0 has a special meaning. When 0 is sent it means that normal world is supposed to make a yielding call OPTEE_MSG_CMD_DO_BOTTOM_HALF. The notification framework in OP-TEE defines an interface where drivers can register a callback which is called on each yielding bottom half call. Notification capability is negotiated with the normal world while it initializes its driver. If both sides supports these notifications then they are enabled. CFG_CORE_ASYNC_NOTIF_GIC_INTID is added to define the hardware interrupt used to notify normal world. This is added to the DTB in case OP-TEE can is configured with CFG_DT=y. Other cases requires the normal world DTB to be kept in sync with this. Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> | 4 年前 | |
core: add asynchronous notifications Adds support for asynchronous notifications from secure world to normal world. This allows a design with a top half and bottom half type of driver where the top half runs in secure interrupt context and a notifications tells normal world to schedule a yielding call to do the bottom half processing. The protocol is defined in optee_msg.h optee_rpc_cmd.h and optee_smc.h. A notification consists of a 32-bit value which normal world can retrieve using a fastcall into secure world. OP-TEE is currently only supporting the value 0-63 where 0 has a special meaning. When 0 is sent it means that normal world is supposed to make a yielding call OPTEE_MSG_CMD_DO_BOTTOM_HALF. The notification framework in OP-TEE defines an interface where drivers can register a callback which is called on each yielding bottom half call. Notification capability is negotiated with the normal world while it initializes its driver. If both sides supports these notifications then they are enabled. CFG_CORE_ASYNC_NOTIF_GIC_INTID is added to define the hardware interrupt used to notify normal world. This is added to the DTB in case OP-TEE can is configured with CFG_DT=y. Other cases requires the normal world DTB to be kept in sync with this. Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> | 4 年前 | |
[BugFix]: add tee api header file [Desc]: frameworks/security/optee_vela/ uses clang-format coding style that break the sort of header files. In file included from compat/random.c:17: apps/external/optee/optee_os/optee_os/core/include/rng_support.h:10:1: error: unknown type name 'TEE_Result' 10 | TEE_Result hw_get_random_bytes(void *buf, size_t blen); | ^~~~~~~~~~ apps/external/optee/optee_os/optee_os/core/include/rng_support.h:10:43: error: unknown type name 'size_t' 10 | TEE_Result hw_get_random_bytes(void *buf, size_t blen); Signed-off-by: pengyinjie <pengyinjie@xiaomi.com> | 3 个月前 | |
core: kern.ld.S: move .scattered_array* into .data.rel.ro Moves the symbols tagged with .scattered_array* from the .rodata output section into a new output section: .data.rel.ro, which is also writeable (hence the suppression of __SECTION_FLAGS_RODATA in scattered_array.h) but placed in tee.elf to be mapped read-only after relocations are applied. The new section is created only when core ASLR is enabled, otherwise no relocation can occur and we can keep the previous code. Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Sumit Garg <sumit.garg@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> | 4 年前 | |
core: support loading TAs signed with a subkey Adds support to load TAs signed with subkey or a chain of subkeys. This allows delegation of TA signing without distributing the root key. TAs signed with a subkey are confined to the UUID-V5 namespace of the subkey to avoid TA UUID clashes with different subkeys. SHDR_SUBKEY is a type of header which enables chains of public keys. The public root key is used to verify the first public subkey, which then is used to verify the next public subkey and so on. The TA is finally verified using the last subkey. All these headers are added in front of the TA binary so everything needed to verify the TA is available when it's loaded into memory. For example: Subkey struct shdr magic: 0x4f545348 img_type: 3 (SHDR_SUBKEY) img_size: 320 bytes algo: 0x70414930 (TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA256) hash_size: 32 bytes sig_size: 256 bytes hash: f573f329fe77be686ce71647909c4ea35b5e1cd7de86369bd7d9fca31f6a4d65 struct shdr_subkey uuid: f04fa996-148a-453c-b037-1dcfbad120a6 name_size: 64 subkey_version: 1 max_depth: 4 algo: 0x70414930 (TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA256) attr_count: 2 next name: "mid_level_subkey" Next header at offset: 692 (0x2b4) Subkey struct shdr magic: 0x4f545348 img_type: 3 (SHDR_SUBKEY) img_size: 320 bytes algo: 0x70414930 (TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA256) hash_size: 32 bytes sig_size: 256 bytes hash: 233a6dcf1a2cf69e50cde8e20c4129157da707c76fa86ce12ee31037edef02d7 struct shdr_subkey uuid: 1a5948c5-1aa0-518c-86f4-be6f6a057b16 name_size: 64 subkey_version: 1 max_depth: 3 algo: 0x70414930 (TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA256) attr_count: 2 next name: "subkey1_ta" Next header at offset: 1384 (0x568) Bootstrap TA struct shdr magic: 0x4f545348 img_type: 1 (SHDR_BOOTSTRAP_TA) img_size: 84576 bytes algo: 0x70414930 (TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA256) hash_size: 32 bytes sig_size: 256 bytes hash: ea31ac7dc2cc06a9dc2853cd791dd00f784b5edc062ecfa274deeb66589b4ca5 struct shdr_bootstrap_ta uuid: 5c206987-16a3-59cc-ab0f-64b9cfc9e758 ta_version: 0 TA offset: 1712 (0x6b0) bytes TA size: 84576 (0x14a60) bytes Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (vexpress-qemu_virt) Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> | 3 年前 | |
spi: pl022: expose internal fifo flush API We identified that the caller of the pl022 driver needs to flush the pl022's internal fifo to make sure next transaction starts clean. This PR expose existing pl022_flush_fifo API to caller via spi_ops. The validation is performed on bcm platform. Signed-off-by: Vahid Dukandar <vahidd@microsoft.com> Reviewed-by: Victor Chong <victor.chong@linaro.org> | 5 年前 | |
Remove 'All rights reserved' from Linaro files The text 'All rights reserved' is useless [1]. The Free Software Foundation's REUSE Initiative best practices document [2] does not contain these words. Therefore, we can safely remove the text from the files that are owned by Linaro. Generated by: spdxify.py --linaro-only --strip-arr optee_os/ Link: [1] https://en.wikipedia.org/wiki/All_rights_reserved Link: [2] https://reuse.software/practices/ Link: [3] https://github.com/jforissier/misc/blob/f7b56c8/spdxify.py Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Joakim Bech <joakim.bech@linaro.org> | 8 年前 | |
tpm2: Add commands to GetCapability, Read/Extend PCR Add support for TPM2_PCR_{Read/Extend} and TPM2_GetCapability. TPM uses PCR for integrity collections. Add support to read and extend PCR's. For PCR's some generic information like number of banks, number of PCR's, supported and active algorithms etc. is required which can be obtained from TPM using TPM2_GetCapability command. This information is required at lot of places, so save the basic capability information with tpm2_chip. Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> | 4 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 3 个月前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 个月前 | ||
| 3 年前 | ||
| 3 个月前 | ||
| 5 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 5 年前 | ||
| 3 个月前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 3 个月前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 5 年前 | ||
| 8 年前 | ||
| 4 年前 |