History log of /optee_os/core/arch/arm/include/arm32.h (Results 1 – 25 of 42)
Revision Date Author Comments
# d50fee03 16-Oct-2023 Etienne Carriere <etienne.carriere@foss.st.com>

core: prefix header file guard names with __

Improves header files guard names consistency by using a __ prefix
where missing.

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

core: prefix header file guard names with __

Improves header files guard names consistency by using a __ prefix
where missing.

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

show more ...


# e9f2e2ab 04-Sep-2022 Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>

arm32: correct bit define for SCTLR.NMFI setting

In SCTLR register definition NMFI bit is 27th bit. Correct the define.

Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>
Reviewed-by:

arm32: correct bit define for SCTLR.NMFI setting

In SCTLR register definition NMFI bit is 27th bit. Correct the define.

Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 04b9df6c 09-Feb-2022 Jens Wiklander <jens.wiklander@linaro.org>

core: arm{32,64}.h: add "memory" constraint

Adds the missing memory constraint to the inline assembly instructions
isb, dsb, dmb, sev, wfe and wfi.

Reviewed-by: Jerome Forissier <jerome@forissier.o

core: arm{32,64}.h: add "memory" constraint

Adds the missing memory constraint to the inline assembly instructions
isb, dsb, dmb, sev, wfe and wfi.

Reviewed-by: Jerome Forissier <jerome@forissier.org>
Acked-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 4a6784ca 30-Apr-2021 Jens Wiklander <jens.wiklander@linaro.org>

core/arch/arm/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

core/arch/arm/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>

show more ...


# 135f53fe 04-May-2021 Jens Wiklander <jens.wiklander@linaro.org>

core/arch/arm/include/*.h: se BIT() and SHIFT_U32() macros

Uses the more safe BIT() and SHIFT_U32() macros instead of direct
shifting of 1 or some other constant integer.

Acked-by: Ruchika Gupta <r

core/arch/arm/include/*.h: se BIT() and SHIFT_U32() macros

Uses the more safe BIT() and SHIFT_U32() macros instead of direct
shifting of 1 or some other constant integer.

Acked-by: Ruchika Gupta <ruchika.gupta@linaro.org>
Acked-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# faa22a1f 04-Jun-2020 Jerome Forissier <jerome@forissier.org>

core: add __noprof attribute to register accessors

Allowing instrumentation of register accessor functions does not really
make sense, since they are normally inlined by the compiler. On the
contrar

core: add __noprof attribute to register accessors

Allowing instrumentation of register accessor functions does not really
make sense, since they are normally inlined by the compiler. On the
contrary, allowing the compiler to instrument these functions (if for
some reason they are not inlined) can cause serious problems such as
infinite recursion (in case the instrumentation ends up calling a
register accessor again) or unexpected results (if the accessor is used
by early code before the instrumentation is initialized).

Note that the accessors used by user space already have __noprof (see
lib/libutee/include/arm64_user_sysreg.h and scripts/arm32_sysreg.py).

For these reasons, add __noprof to core/arch/arm/include/arm{32,64}.h.

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

show more ...


# 5746bdef 01-Feb-2020 Jens Wiklander <jens.wiklander@linaro.org>

core: arm: add SCTLR_SPAN define

Adds define for setting SCTLR.SPAN which is available with the
architecture feature ARMv8.1-PAN in both AArch32 and AArch64.

Reviewed-by: Jerome Forissier <jerome@f

core: arm: add SCTLR_SPAN define

Adds define for setting SCTLR.SPAN which is available with the
architecture feature ARMv8.1-PAN in both AArch32 and AArch64.

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

show more ...


# 757331fc 21-Aug-2019 Jens Wiklander <jens.wiklander@linaro.org>

Replace ASM with compiler-builtin __ASSEMBLER__

The C preprocessor predefines __ASSEMBLER__ with value 1 when when
preprocessing assembly language, see [1]. Instead of using a special
defines, let's

Replace ASM with compiler-builtin __ASSEMBLER__

The C preprocessor predefines __ASSEMBLER__ with value 1 when when
preprocessing assembly language, see [1]. Instead of using a special
defines, let's use the define already provided.

Link: [1] https://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html

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

show more ...


# fcecb313 30-Apr-2019 Jens Wiklander <jens.wiklander@linaro.org>

core: arm32.h: add TLBI_{MVA_SHIFT,ASID_MASK}

Adds TLBI macros to help formatting source register for TLB
invalidations.

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: J

core: arm32.h: add TLBI_{MVA_SHIFT,ASID_MASK}

Adds TLBI macros to help formatting source register for TLB
invalidations.

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

show more ...


# c3d0b15d 17-Aug-2018 Jens Wiklander <jens.wiklander@linaro.org>

core: arm32: generate gicv3 register access code

Replaces the hand crafted system register code in <arm32.h> with
generated code based on arm32_gicv3_sysreg.txt which is extracted from
The ARM Gener

core: arm32: generate gicv3 register access code

Replaces the hand crafted system register code in <arm32.h> with
generated code based on arm32_gicv3_sysreg.txt which is extracted from
The ARM Generic Interrupt Controller Architecture Specification GIC
architecture version 3.0 and version 4.0.

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

show more ...


# 18b58024 16-Aug-2018 Jens Wiklander <jens.wiklander@linaro.org>

core: arm32: generate system register access code

Replaces the hand crafted system register code in <arm32.h> and
<arm32_macros.S> with generated code based on arm32_sysreg.txt which is
extracted fr

core: arm32: generate system register access code

Replaces the hand crafted system register code in <arm32.h> and
<arm32_macros.S> with generated code based on arm32_sysreg.txt which is
extracted from the ARM Architecture Reference Manual.

The remaining hand crafted code for cp15 accesses is not covered by the
ARM Architecture Reference Manual.

A script is added to generate both assembly macros and static inline
functions to access the system registers.

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

show more ...


# bbd8f31b 17-Aug-2018 Jens Wiklander <jens.wiklander@linaro.org>

core: rename to read_pmu_ccnt() to read_pmccntr()

Renames read_pmu_ccnt() to read_pmccntr() to use the real register name.

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

core: rename to read_pmu_ccnt() to read_pmccntr()

Renames read_pmu_ccnt() to read_pmccntr() to use the real register name.

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

show more ...


# 8267e19b 20-Jun-2018 Jerome Forissier <jerome.forissier@linaro.org>

core: arm: sm: initialize PMCR.DP to 1 and save/restore PMCR

Introduce CFG_SM_NO_CYCLE_COUNTING to intitialize PMCR.DP to 1 and
save/restore PMCR on world switch. Similar to what is done in ARM TF
c

core: arm: sm: initialize PMCR.DP to 1 and save/restore PMCR

Introduce CFG_SM_NO_CYCLE_COUNTING to intitialize PMCR.DP to 1 and
save/restore PMCR on world switch. Similar to what is done in ARM TF
commit 3e61b2b54336 ("Init and save / restore of PMCR_EL0 / PMCR") [1].

The purpose of this is to (hopefully) make attacks such as CLKSCREW [2]
harder to mount, although it is likely that timing information could be
obtained via other means.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Link: [1] https://github.com/ARM-software/arm-trusted-firmware/commit/3e61b2b54336
Link: [2] https://www.usenix.org/system/files/conference/usenixsecurity17/sec17-tang.pdf
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


# dc0f4ec2 16-May-2018 Etienne Carriere <etienne.carriere@st.com>

Remove license notice from STMicroelectronics files

Since a while the source files license info are defined by SPDX
identifiers. We can safely remove the verbose license text from the
files that are

Remove license notice from STMicroelectronics files

Since a while the source files license info are defined by SPDX
identifiers. We can safely remove the verbose license text from the
files that are owned by either only STMicroelectronics or only both
Linaro and STMicroelectronics.

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

show more ...


# 8d5160de 01-May-2018 Jordan Rhee <jordanrh@microsoft.com>

plat-imx: implement PL310 SMC protocol

When Windows runs in normal world, it expects the PL310 to be initially
disabled, and then invokes SMCs to enable it.
When CFG_PL310_SIP_PROTOCOL=y, the L2 cac

plat-imx: implement PL310 SMC protocol

When Windows runs in normal world, it expects the PL310 to be initially
disabled, and then invokes SMCs to enable it.
When CFG_PL310_SIP_PROTOCOL=y, the L2 cache will be left untouched until
the OS enables it.

Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Jordan Rhee <jordanrh@microsoft.com>
Tested-by: Jordan Rhee <jordanrh@microsoft.com>

show more ...


# 4366b8fe 28-Feb-2018 Jens Wiklander <jens.wiklander@linaro.org>

core: arm32.h: add read_midr()

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


# ae9208f1 30-Jan-2018 Jens Wiklander <jens.wiklander@linaro.org>

arm32: enable ACTLR_CA8_ENABLE_INVALIDATE_BTB

Enables ACTLR_CA8_ENABLE_INVALIDATE_BTB (ACTLR[6]) in generic boot if
compiled with CFG_CORE_WORKAROUND_SPECTRE_BP or
CFG_CORE_WORKAROUND_SPECTRE_BP_SEC

arm32: enable ACTLR_CA8_ENABLE_INVALIDATE_BTB

Enables ACTLR_CA8_ENABLE_INVALIDATE_BTB (ACTLR[6]) in generic boot if
compiled with CFG_CORE_WORKAROUND_SPECTRE_BP or
CFG_CORE_WORKAROUND_SPECTRE_BP_SEC and the cpu is discovered to be
Cortex-A8.

Fixes CVE-2017-5715
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 5051b512 15-Jan-2018 Peng Fan <peng.fan@nxp.com>

arm32: sm: init CNTVOFF

There is an property "arm,cpu-registers-not-fw-configured" in Linux side,
that could workaround the issue that firmare initialize CNTVOFF.

But if use that property, virtuali

arm32: sm: init CNTVOFF

There is an property "arm,cpu-registers-not-fw-configured" in Linux side,
that could workaround the issue that firmare initialize CNTVOFF.

But if use that property, virtualization support will be break in linux.

Also without CNTVOFF or that property no defined, kernel could not
boot up on i.MX7D with two cores.

So we init CNTVOFF in OP-TEE to make kernel work well.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 2a45d862 15-Jan-2018 Jens Wiklander <jens.wiklander@linaro.org>

core: arm.h: move midr definitions

Moves MIDR definitions from arm32.h to arm.h

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


# 02349cdb 15-Jan-2018 Jens Wiklander <jens.wiklander@linaro.org>

core: arm32.h: ACTLR_CA15_ENABLE_INVALIDATE_BTB

Adds Cortex-A15 only define ACTLR_CA15_ENABLE_INVALIDATE_BTB

Acked-by: Andrew Davis <andrew.davis@linaro.org>
Reviewed-by: Etienne Carriere <etienne.

core: arm32.h: ACTLR_CA15_ENABLE_INVALIDATE_BTB

Adds Cortex-A15 only define ACTLR_CA15_ENABLE_INVALIDATE_BTB

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

show more ...


# 5286d67d 15-Jan-2018 Jens Wiklander <jens.wiklander@linaro.org>

core: arm32.h: remove unused ACTLR_* defines

Removes unused ACTLR_* defines, only keeping ACTLR_SMP.

Acked-by: Andrew Davis <andrew.davis@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere

core: arm32.h: remove unused ACTLR_* defines

Removes unused ACTLR_* defines, only keeping ACTLR_SMP.

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

show more ...


# 7c43c0a3 12-Jan-2018 Jens Wiklander <jens.wiklander@linaro.org>

core: arm32.h: add MIDR defines

Adds MIDR defines for additional CPUs and also to extract implementer
field.

Acked-by: Andrew Davis <andrew.davis@linaro.org>
Reviewed-by: Jerome Forissier <jerome.f

core: arm32.h: add MIDR defines

Adds MIDR defines for additional CPUs and also to extract implementer
field.

Acked-by: Andrew Davis <andrew.davis@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@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 ...


# 86e50a60 18-Sep-2017 Peng Fan <peng.fan@nxp.com>

core: arm: psci: add suspend resume common functions

Add cpu suspend/resume common functions.

Platform psci suspend functions need to call
sm_pm_cpu_suspend(arg, platform_suspend) to runs into susp

core: arm: psci: add suspend resume common functions

Add cpu suspend/resume common functions.

Platform psci suspend functions need to call
sm_pm_cpu_suspend(arg, platform_suspend) to runs into suspend.

The i.MX flow is:
psci_cpu_suspend->imx7_cpu_suspend->sm_pm_cpu_suspend(arg, func)
The "func" runs in on-chip ram that not losing power when
system runs into suspend or low power state. Argument "arg" is
passed to function "func" as argument through register "r0".

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


# 0c07a905 10-Sep-2017 Igor Opaniuk <igor.opaniuk@linaro.org>

arm timers: add read/write functions for counter PL1 control register

Can be used for enabling user access to both Physical/Virtual counter
registers. Example of usage:

uint32_t cntkctl;
cntkctl =

arm timers: add read/write functions for counter PL1 control register

Can be used for enabling user access to both Physical/Virtual counter
registers. Example of usage:

uint32_t cntkctl;
cntkctl = read_cntkctl();
cntkctl |= CNTKCTL_PL0VCTEN;
write_cntkctl(cntkctl);

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

show more ...


12