| 630d13fb | 29-Nov-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: serial8250_uart_dev_init(): use calloc()
Allocate pl011_data with calloc() instead of malloc() get initialized memory.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Fixes: d2769
core: serial8250_uart_dev_init(): use calloc()
Allocate pl011_data with calloc() instead of malloc() get initialized memory.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Fixes: d276907c8c4f ("core: drivers: serial8250_uart: Add DT support") Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 052bffff | 29-Nov-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: pl011_dev_alloc(): use calloc()
Allocate pl011_data with calloc() instead of malloc() get initialized memory.
Without this could pd->base.va contain garbage when pl011_init() is called.
Revi
core: pl011_dev_alloc(): use calloc()
Allocate pl011_data with calloc() instead of malloc() get initialized memory.
Without this could pd->base.va contain garbage when pl011_init() is called.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Fixes: ddf45954360c ("pl011: dt: Add DT support") Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| f41e7926 | 20-Nov-2018 |
Bryan O'Donoghue <bryan.odonoghue@linaro.org> |
core: generic_boot: Add init_dt_overlay()
This patch adds init_dt_overlay() into to the DT boot flow.
init_dt_overlay() operates in one of two ways.
1. By appending to a DT overlay passed from a p
core: generic_boot: Add init_dt_overlay()
This patch adds init_dt_overlay() into to the DT boot flow.
init_dt_overlay() operates in one of two ways.
1. By appending to a DT overlay passed from a prior boot stage such as ATF. In this case OPTEE DT nodes will be appended to the existing DT overlay.
2. By creating an OPTEE specific DT overlay at CFG_DT_ADDR.
A subsequent boot phase must then pick up the DT overlay in-memory and merge that overlay into a main DTB structure.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 2c803670 | 19-Nov-2018 |
Bryan O'Donoghue <bryan.odonoghue@linaro.org> |
core: generic_boot: Add device-tree fragments
This patch adds a call into add_dt_overlay_fragment() at add_dt_path_subnode() affecting at the time of writing
- /firmware/optee - /psci - /memory/res
core: generic_boot: Add device-tree fragments
This patch adds a call into add_dt_overlay_fragment() at add_dt_path_subnode() affecting at the time of writing
- /firmware/optee - /psci - /memory/reserved
if CFG_EXTERNAL_DTB_OVERLAY is defined then the set of OPTEE DTB entries is treated as a set of DT overlay fragments to be populated into the specified address at CFG_DTB_ADDR.
This allows ATF or u-boot to pass a blank DTB instead of a populated DTB into OPTEE and for OPTEE then to return back a DTB with overlay fragments.
A subsequent boot stage can then merge the OPTEE provided overlay into the main DTB.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 0a3ad9b6 | 19-Nov-2018 |
Bryan O'Donoghue <bryan.odonoghue@linaro.org> |
core: generic_boot: Add add_dt_overlay_fragment()
This patch adds a dt routine add_dt_overlay_fragment(). This purpose of which is to encapsulate the dynamic FDT node entries OPTEE provides inside o
core: generic_boot: Add add_dt_overlay_fragment()
This patch adds a dt routine add_dt_overlay_fragment(). This purpose of which is to encapsulate the dynamic FDT node entries OPTEE provides inside of a
fragment@0 { target-path = "/"; __overlay__ { /* OPTEE nodes go here */ }; };
A subsequent set of patches will wrapper up existing dynamic OPTEE nodes
- /firmware/optee - /psci - /reserved/memory optee@0xaddress
Once done it will be possible for a DTB in memory to be populated with OPTEE fragments and for a subsequent bootloader to merge the OPTEE populated overlay into a DTB loaded by a later stage.
if CFG_EXTERNAL_DTB_OVERLAY is not defined then this code has no effect.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| fe24f1a1 | 22-Nov-2018 |
Bryan O'Donoghue <bryan.odonoghue@linaro.org> |
core: generic_boot: Utilize add_dt_path_subnode where appropriate
This patch replaces some repetitive code of the form
offs = fdt_path_offset(fdt, "path"); if (offs < 0) return -1; offs = fdt_add_
core: generic_boot: Utilize add_dt_path_subnode where appropriate
This patch replaces some repetitive code of the form
offs = fdt_path_offset(fdt, "path"); if (offs < 0) return -1; offs = fdt_add_subnode(fdt, offs, "subnode");
with
offs = add_dt_path_subnode(fdt, "path", "subnode");
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| d89697a0 | 22-Nov-2018 |
Bryan O'Donoghue <bryan.odonoghue@linaro.org> |
core: generic_boot: Add helper add_dt_path_subnode()
A common pattern in the DT code is
offs = fdt_path_offset(fdt, "/"); if (offs < 0) return -1; offs = fdt_add_subnode(fdt, offs, "newnode"); if
core: generic_boot: Add helper add_dt_path_subnode()
A common pattern in the DT code is
offs = fdt_path_offset(fdt, "/"); if (offs < 0) return -1; offs = fdt_add_subnode(fdt, offs, "newnode"); if (offs < 0) return -1;
as was pointed out by Jerome in a related PR to-do with adding overlays this is a candidate for functional decomposition.
This patch adds the necessary helper function.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Suggested-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| de36bcad | 23-Nov-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: base TA store on scatter array
The TA store interface is now implemented using scatter array.
The priorities of the different TA store are also changed to use 2, 4 and 9 instead or 5, 9, 10 a
core: base TA store on scatter array
The TA store interface is now implemented using scatter array.
The priorities of the different TA store are also changed to use 2, 4 and 9 instead or 5, 9, 10 as they are now sorted alphabetically. The new allocation makes it easier to stick something between "Secure Storage TA" and the "REE" stores. It's doubtful that anyone would ever want to make something higher priority than the "early TA" store, but just in case a few numbers are reserved.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey960) Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| f9da4034 | 22-Nov-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: base memory registration on scatter array
The register_*() macros are now implemented using scatter array.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissi
core: base memory registration on scatter array
The register_*() macros are now implemented using scatter array.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 2f0cd8af | 22-Nov-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: base pseudo_ta_register() on scatter array
The pseudo_ta_register() implementation is now based on scatter array.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome
core: base pseudo_ta_register() on scatter array
The pseudo_ta_register() implementation is now based on scatter array.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 9e592338 | 22-Nov-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: initcall.h use scattered array
Initcalls uses generic scattered array instead of special implementation.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier
core: initcall.h use scattered array
Initcalls uses generic scattered array instead of special implementation.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 5e4210e9 | 22-Nov-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add scattered array
Adds a scattered array which allows defining arrays scattered over several source files. The implementation is based on some support by the linker.
This is a generic solut
core: add scattered array
Adds a scattered array which allows defining arrays scattered over several source files. The implementation is based on some support by the linker.
This is a generic solution to initcalls and other similar scattered initializations.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 8d527cd6 | 22-Nov-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: keep.h: avoid duplicate symbols
Prior to this patch if the KEEP_*() macros are used with two static variables with the same name but in different source files it will result in a duplicated gl
core: keep.h: avoid duplicate symbols
Prior to this patch if the KEEP_*() macros are used with two static variables with the same name but in different source files it will result in a duplicated global symbol. This happens because the internal trickery uses global variables based on the static symbol it's supposed to keep. With this patch the global variables uses the file unique define __FILE_ID__ to avoid the conflict.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 57cf66e1 | 23-Nov-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: asan: support GCC version >= 7.0
With GCC 7.0 there was an ABI change for the address sanitizer. This patch extends struct asan_global with the new odr_indicator field to work with this new AB
core: asan: support GCC version >= 7.0
With GCC 7.0 there was an ABI change for the address sanitizer. This patch extends struct asan_global with the new odr_indicator field to work with this new ABI.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| c95b9511 | 23-Nov-2018 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: embedded secure device tree
This change introduces configurations CFG_EMDED_DTB and CFG_EMBED_DTB_SOURCE_FILE. When CFG_EMDED_DTB=y a device tree blob (DTB) is embedded in a read-only section
core: embedded secure device tree
This change introduces configurations CFG_EMDED_DTB and CFG_EMBED_DTB_SOURCE_FILE. When CFG_EMDED_DTB=y a device tree blob (DTB) is embedded in a read-only section of the core based on an in-tree device tree source (DTS) file.
CFG_EMBED_DTS_SOURCE_FILE defines the relative path of the target device in core/arch/$(ARCH)/dts.
Non empty CFG_EMBED_DTS_SOURCE_FILE content implies CFG_EMBED_DTB=y. CFG_EMBED_DTB=y mandates CFG_EMBED_DTS_SOURCE_FILE definition. CFG_EMDED_DTB=y mandates CFG_DT=y.
Since the embedded DTB is read-only, core do not attempt to modify it adding information such as OP-TEE resources nodes and properties. Core still get generic information such as system memory address range and debug console configuration from the embedded DTB.
Documentation includes a DT section in the OP-TEE design description.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| a67a20cb | 23-Nov-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: fix bug in vm_map() causing pager panic()
Prior to this patch vm_map() didn't allocate new page tables (PGTs) as needed, it only checked that it later would be possible to allocate the needed
core: fix bug in vm_map() causing pager panic()
Prior to this patch vm_map() didn't allocate new page tables (PGTs) as needed, it only checked that it later would be possible to allocate the needed PGTs. This is enough if the user_ta_ctx (UTC) isn't active. With dynamically linked libraries the UTC will be active when vm_map() is called to make room for the new segments. If the already allocated PGTs happen to cover even the new memory range it will still work, this is normally the case with CFG_WITH_LPAE=y since each page table covers 2 MiB. With CFG_WITH_LPAE=n the page tables only covers 1 MiB and that's not enough when loading the os_test TA in xtest case 1006.
This patch fixes the problem by instead of just checking that it later will be possible to allocate needed PGTs, it also allocates the PGTs if the UTC is active.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| a01855fd | 20-Nov-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove MOBJ_INVALID_COOKIE
Removes MOBJ_INVALID_COOKIE which resulted in an unexpected ABI change against the normal world driver. Instead 0 is continued to be used as an invalid/absent cookie
core: remove MOBJ_INVALID_COOKIE
Removes MOBJ_INVALID_COOKIE which resulted in an unexpected ABI change against the normal world driver. Instead 0 is continued to be used as an invalid/absent cookie value.
Tested-by: Sumit Garg <sumit.garg@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reported-by: Sumit Garg <sumit.garg@linaro.org> Fixes: cd278f78382b ("core: simplify shm cookie handling") Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| abb61b0e | 15-Nov-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
zlib: fix compiler warning
GCC 8.x warns when building core/lib/zlib/inflate.c:
$ make PLATFORM=hikey-hikey960 out/arm-plat-hikey/core/lib/zlib/inflate.o [...] core/lib/zlib/inflate.c: In functi
zlib: fix compiler warning
GCC 8.x warns when building core/lib/zlib/inflate.c:
$ make PLATFORM=hikey-hikey960 out/arm-plat-hikey/core/lib/zlib/inflate.o [...] core/lib/zlib/inflate.c: In function ‘inflate’: core/lib/zlib/inflate.c:842:25: warning: this statement may fall through [-Wimplicit-fallthrough=] state->mode = DICT; ~~~~~~~~~~~~^~~~~~ core/lib/zlib/inflate.c:843:9: note: here case DICT: ^~~~ [...]
Fix that by adding some /* Fall through */ comments.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 56859c53 | 14-Sep-2018 |
Gabor Szekely <szvgabor@gmail.com> |
core: crypto: add TEE_ALG_RSASSA_PKCS1_V1_5
This change integrates the LTC_PKCS_1_V1_5_NA1 into OPTEE as an extension as TEE_ALG_RSASSA_PKCS1_V1_5. This scheme allows to do PKCS#1 v1.5 EMSA without
core: crypto: add TEE_ALG_RSASSA_PKCS1_V1_5
This change integrates the LTC_PKCS_1_V1_5_NA1 into OPTEE as an extension as TEE_ALG_RSASSA_PKCS1_V1_5. This scheme allows to do PKCS#1 v1.5 EMSA without ASN.1 around the hash. It is used for implementing the pkcs#11 CKM_RSA_PKCS mechanism for signing and verifying in SKS.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Gabor Szekely <szvgabor@gmail.com>
show more ...
|
| e1b4b7ed | 14-Sep-2018 |
Gabor Szekely <szvgabor@gmail.com> |
libtomcrypt: port LTC_PKCS_1_V1_5_NA1 from ltc v1.18.2
This change ports LTC_PKCS_1_V1_5_NA1 from libtomcrypt v1.18.2. This scheme allows to do PKCS#1 v1.5 EMSA without ASN.1 around the hash. It is
libtomcrypt: port LTC_PKCS_1_V1_5_NA1 from ltc v1.18.2
This change ports LTC_PKCS_1_V1_5_NA1 from libtomcrypt v1.18.2. This scheme allows to do PKCS#1 v1.5 EMSA without ASN.1 around the hash. It is used for implementing the pkcs#11 CKM_RSA_PKCS mechanism for signing and verifying in SKS. This commit is a cherry pick of aa4bae5ae9a2 from the libtomcrypt repository.
Link: <https://github.com/libtom/libtomcrypt/commit/aa4bae5ae9a2>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Gabor Szekely <szvgabor@gmail.com>
show more ...
|
| 6009538c | 24-Oct-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: introduce generic optee_rpc_cmd.h
Replaces the OPTEE_MSG RPC command protocol descriptions in optee_msg.h and optee_msg_supplicant with a generic optee_rpc_cmd.h. Defined names are also refact
core: introduce generic optee_rpc_cmd.h
Replaces the OPTEE_MSG RPC command protocol descriptions in optee_msg.h and optee_msg_supplicant with a generic optee_rpc_cmd.h. Defined names are also refactored to mirror the new structure.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 19c8abe1 | 23-Oct-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: pta/gprof.c: get rid of init_memparam()
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens
core: pta/gprof.c: get rid of init_memparam()
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 7c350378 | 22-Oct-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: tadb.c: get rid of init_memparam()
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wikl
core: tadb.c: get rid of init_memparam()
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| f4feeeef | 22-Oct-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: tee_fs_rpc.c get rid of init_memparam()
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens
core: tee_fs_rpc.c get rid of init_memparam()
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 05aaaa3b | 19-Oct-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: pta_socket.c: simplify struct thread_param
Simplify struct thread_param usage in PTA socket with direct initialization.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jero
core: pta_socket.c: simplify struct thread_param
Simplify struct thread_param usage in PTA socket with direct initialization.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|