History log of /optee_os/core/kernel/console.c (Results 1 – 25 of 27)
Revision Date Author Comments
# 799f2000 23-Jun-2023 Andrew Davis <afd@ti.com>

core: console: Allow setting logging verbosity during runtime

The default console can be disabled at runtime for power management. Any
prints after boot from OP-TEE could cause a bus data abort if t

core: console: Allow setting logging verbosity during runtime

The default console can be disabled at runtime for power management. Any
prints after boot from OP-TEE could cause a bus data abort if the UART has
been disabled. Add an option to change the log level after boot has
completed which can be used to disable the console log.

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>

show more ...


# d4a87690 17-May-2024 Sungbae Yoo <sungbaey@nvidia.com>

drivers: Add FFA_CONSOLE based console driver for log

This console driver uses FFA_CONSOLE ABI to write the trace logs.

If CFG_FFA_CONSOLE is enabled, OP-TEE will try to initialize the console
driv

drivers: Add FFA_CONSOLE based console driver for log

This console driver uses FFA_CONSOLE ABI to write the trace logs.

If CFG_FFA_CONSOLE is enabled, OP-TEE will try to initialize the console
driver that uses FFA interface to print trace logs.

Signed-off-by: Sungbae Yoo <sungbaey@nvidia.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>

show more ...


# 458ef442 21-Feb-2024 Alvin Chang <alvinga@andestech.com>

drivers: Implement semihosting based console driver for log

Implement a simple console driver which uses semihosting operations to
read/write the trace messages. There are two paths to output the tr

drivers: Implement semihosting based console driver for log

Implement a simple console driver which uses semihosting operations to
read/write the trace messages. There are two paths to output the trace
messages:
- If the caller of semihosting_console_init() provides the path of the
file, the driver will try to open that file, and output the log to
that host side file.
- If the caller of semihosting_console_init() does not provide the path
of the file, the driver will connect the console to the host debug
console directly.

If CFG_SEMIHOSTING_CONSOLE is enabled, OP-TEE will try to initialize the
semihosting console driver by given CFG_SEMIHOSTING_CONSOLE_FILE.

Signed-off-by: Alvin Chang <alvinga@andestech.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 55ab8f06 27-Feb-2024 Alvin Chang <alvinga@andestech.com>

core: Refactor console_init() and introduce plat_console_init()

Since there are some cross-platform console drivers, we let
console_init() be common code to have a chance to initialize those
console

core: Refactor console_init() and introduce plat_console_init()

Since there are some cross-platform console drivers, we let
console_init() be common code to have a chance to initialize those
console drivers (e.g., semihosting console).

If the cross-platform console drivers are not configured to be compiled,
plat_console_init() will be invoked to initialize platform-specific
console driver.

Signed-off-by: Alvin Chang <alvinga@andestech.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>

show more ...


# 5ca2c365 10-Jan-2024 Clement Faure <clement.faure@nxp.com>

core: remove unnecessary includes

Remove unnecessary includes.

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

core: remove unnecessary includes

Remove unnecessary includes.

Signed-off-by: Clement Faure <clement.faure@nxp.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>

show more ...


# 426790bd 13-Feb-2023 Jeffrey Kardatzke <jkardatzke@google.com>

drivers: add cbmem console driver

This adds a CBMEM console driver which gets the cbmem address from a
device tree with the coreboot table information.

Signed-off-by: Jeffrey Kardatzke <jkardatzke@

drivers: add cbmem console driver

This adds a CBMEM console driver which gets the cbmem address from a
device tree with the coreboot table information.

Signed-off-by: Jeffrey Kardatzke <jkardatzke@google.com>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 9e3c57c8 28-Feb-2023 Etienne Carriere <etienne.carriere@linaro.org>

core: dt_driver: move related content from dt.h to dt_driver.h

Moves so-called dt_driver related declarations and definitions from
dt.h to dt_drivers.h. Incidentally adds an inline description to
en

core: dt_driver: move related content from dt.h to dt_driver.h

Moves so-called dt_driver related declarations and definitions from
dt.h to dt_drivers.h. Incidentally adds an inline description to
enum dt_driver_type. This change clarifies when a source file shall
include dt.h and/or dt_driver.h.

This change updates driver source files to include none, one or both of
these header files where applicable.

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

show more ...


# 7b84e23d 06-Dec-2022 Jerome Forissier <jerome.forissier@linaro.org>

drivers: struct serial_ops: make all functions optional except putc()

Many platforms only use the putc() function pointer in struct
serial_ops. Therefore, explicitly make the others optional (flush(

drivers: struct serial_ops: make all functions optional except putc()

Many platforms only use the putc() function pointer in struct
serial_ops. Therefore, explicitly make the others optional (flush(),
have_rx_data() and getchar()) by adding comments to the struct and
making sure the code checks the pointer before using them.

With this it should be clear that drivers do not need to provide
stub functions.

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

show more ...


# 3c6cfce4 24-Nov-2021 Jens Wiklander <jens.wiklander@linaro.org>

core: Fix warning in find_chosen_node()

Fixes a -Wdeclaration-after-statement warning in find_chosen_node():
core/kernel/console.c:48:2: error: ISO C90 forbids mixed declarations and code [-Werror=d

core: Fix warning in find_chosen_node()

Fixes a -Wdeclaration-after-statement warning in find_chosen_node():
core/kernel/console.c:48:2: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
int offset = fdt_path_offset(fdt, "/secure-chosen");
^~~

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

show more ...


# 5e588771 10-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 ...


# 65401337 07-Jun-2020 Jens Wiklander <jens.wiklander@linaro.org>

core: remove generic_ from generic_boot

Now that the CFG_GENERIC_BOOT configuration flag has been removed also
remove "generic_" prefix from and in the related files.

Acked-by: Etienne Carriere <et

core: remove generic_ from generic_boot

Now that the CFG_GENERIC_BOOT configuration flag has been removed also
remove "generic_" prefix from and in the related files.

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

show more ...


# a2fc83d1 11-May-2020 Jerome Forissier <jerome@forissier.org>

core: always build libfdt

libfdt is built only when CFG_DT=y. As a result, the libfdt header
files are only available when CFG_DT=y and any source file that makes
optional use of the library has to

core: always build libfdt

libfdt is built only when CFG_DT=y. As a result, the libfdt header
files are only available when CFG_DT=y and any source file that makes
optional use of the library has to guard the #include <libfdt.h> with
a #ifdef CFG_DT ... #endif block. This contrasts with other features
which don't require such guards.

This patch builds libfdt unconditionally and removes the include
guards. No change is expected in the binaries.

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

show more ...


# 75dc8729 05-May-2020 Etienne Carriere <etienne.carriere@linaro.org>

core: console: console initialization from embedded DTB

In case CFG_EMBED_DTB is enabled, get the chosen console from the
embedded DTB instead of the external DTB.

Signed-off-by: Sahil Malhotra <sa

core: console: console initialization from embedded DTB

In case CFG_EMBED_DTB is enabled, get the chosen console from the
embedded DTB instead of the external DTB.

Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com>
[ec: simplify by calling get_dt(), slightly rephrase commit log]
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Tested-by: Sahil Malhotra <sahil.malhotra@nxp.com> (ls-lx2160ardb)

show more ...


# d2c717b2 02-Jul-2019 Jerome Forissier <jerome.forissier@linaro.org>

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 ne

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>

show more ...


# 286c31d4 29-Apr-2019 Etienne Carriere <etienne.carriere@linaro.org>

core: move embedded DTB out of init sections

This change makes generic boot to discover non-secure memory and
console configuration from the external DTB only, no more from the
embedded DTB as prior

core: move embedded DTB out of init sections

This change makes generic boot to discover non-secure memory and
console configuration from the external DTB only, no more from the
embedded DTB as prior this change. When generic boot attempts to access
embedded DTB, the embedded DTB gets located in init read-only data
section become unnecessary too big. With this change, embedded DTB now
lies in the standard pageable read-only data section, relaxing memory
footprint constraint.

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

show more ...


# 4a810b90 17-Dec-2018 Volodymyr Babchuk <vlad.babchuk@gmail.com>

console: use nex_strdup() instead of strdup()

strdup() uses malloc() internally, which is not good for
nexus part of OP-TEE.

Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
Reviewed-by: J

console: use nex_strdup() instead of strdup()

strdup() uses malloc() internally, which is not good for
nexus part of OP-TEE.

Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# c211d0a4 06-Feb-2018 Volodymyr Babchuk <vlad.babchuk@gmail.com>

virt: tag variables with __nex_data and __nex_bss

Variables that are needed by OP-TEE nexus will be moved
to nexus memory.

Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
Acked-by: Jens W

virt: tag variables with __nex_data and __nex_bss

Variables that are needed by OP-TEE nexus will be moved
to nexus memory.

Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 770b2afa 08-Jan-2019 Etienne Carriere <etienne.carriere@linaro.org>

core: more flexible console init from DT

Introduce get_console_node_from_dt() that collects the references
to the console configuration in the DTB.

Existing configure_console_from_dt() relies on it

core: more flexible console init from DT

Introduce get_console_node_from_dt() that collects the references
to the console configuration in the DTB.

Existing configure_console_from_dt() relies on it when initiating
the console from the early core inits based on registered matching
device tables.

get_console_node_from_dt() allows a driver probed from the driver
initialization sequence (i.e registered from driver_init()) to
get the console DT directive.

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

show more ...


# 08baa8c9 30-Nov-2018 Etienne Carriere <etienne.carriere@linaro.org>

core: console: allow fallback to /chosen/stdout-path

Makes chosen console selection more flexible being probed
from either secure-chosen node or chosen node and from
either secure embedded DTB or no

core: console: allow fallback to /chosen/stdout-path

Makes chosen console selection more flexible being probed
from either secure-chosen node or chosen node and from
either secure embedded DTB or non-secure external DTB.

Secure-chosen node has precedence over chosen node. Chosen console
from the secure DTB as precedence over chosen console defined by
the non-secure device tree.

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

show more ...


# 6179ebfa 30-Nov-2018 Etienne Carriere <etienne.carriere@linaro.org>

core: rename get_dt_blob() into get_dt()

Rename get_dt_blob() into get_dt() to get some consistency in `dt`,
`dtb`, `fdt` labelling in generic_boot.c

Signed-off-by: Etienne Carriere <etienne.carrie

core: rename get_dt_blob() into get_dt()

Rename get_dt_blob() into get_dt() to get some consistency in `dt`,
`dtb`, `fdt` labelling in generic_boot.c

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


# 2f82082f 02-Feb-2018 Edison Ai <edison.ai@arm.com>

core: add ddr overall register

register_ddr() is used to add overall DDR address range.
SDP memories, static SHM, secure DDR and so on need to fix the
problem that intersect with the overall DDR.

R

core: add ddr overall register

register_ddr() is used to add overall DDR address range.
SDP memories, static SHM, secure DDR and so on need to fix the
problem that intersect with the overall DDR.

Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Edison Ai <edison.ai@arm.com>

show more ...


# b1d7375c 15-Dec-2017 Jerome Forissier <jerome.forissier@linaro.org>

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

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>

show more ...


# 78b7c7c7 15-Dec-2017 Jerome Forissier <jerome.forissier@linaro.org>

Remove license notice from Linaro files

Now that we have added SPDX identifiers, we can safely remove the
verbose license text from the files that are owned by Linaro.

Generated by [1]:
spdxify.p

Remove license notice from Linaro files

Now that we have added SPDX identifiers, we can safely remove the
verbose license text from the files that are owned by Linaro.

Generated by [1]:
spdxify.py --linaro-only --strip-license-text optee_os/

Link: [1] 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>

show more ...


# 1bb92983 15-Dec-2017 Jerome Forissier <jerome.forissier@linaro.org>

Add SPDX license identifiers

Adds one SPDX-License-Identifier line [1] to each source files that
contains license text.

Generated by [2]:
spdxify.py --add-spdx optee_os/

The scancode tool [3] wa

Add SPDX license identifiers

Adds one SPDX-License-Identifier line [1] to each source files that
contains license text.

Generated by [2]:
spdxify.py --add-spdx optee_os/

The scancode tool [3] was used to double check the license matching
code in the Python script. All the licenses detected by scancode are
either detected by spdxify.py, or have no SPDX identifier, or are false
matches.

Link: [1] https://spdx.org/licenses/
Link: [2] https://github.com/jforissier/misc/blob/f7b56c8/spdxify.py
Link: [3] https://github.com/nexB/scancode-toolkit
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Joakim Bech <joakim.bech@linaro.org>

show more ...


# 23660121 08-Mar-2017 Jerome Forissier <jerome.forissier@linaro.org>

core: remove __early_bss

Initialize the .bss section early from assembler before entering C
code. As a result, the __early_bss qualifier is not needed anymore.
Remove it, as well as the related symb

core: remove __early_bss

Initialize the .bss section early from assembler before entering C
code. As a result, the __early_bss qualifier is not needed anymore.
Remove it, as well as the related symbols (__early_bss_start and
__early_bss_end).

This makes the code simpler hence easier to maintain, at the expense
of initialization time, since .bss is cleared before CPU caches are
turned on (and doing it later would mean some C function have been
called already). Here are some performance numbers measured on HiKey.
The "memset" column measures the time it takes to clear .bss in C,
without this patch. The "assembly" column reports the time taken by the
clear_bss loop in this patch. Timings were performed using CNTPCT.
Worst case is a ~1 ms overhead in boot time.

memset(): | assembly:
ms (bytes) | ms (bytes)
--------------+--------------
Aarch64 0.30 (72824) | 0.08 (73528)
Aarch32 0.27 (65016) | 1.24 (65408)
Aarch32/pager 0.03 (11328) | 0.23 (11736)

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (QEMU)
Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey 32/64)
Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey/pager)
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


12