History log of /optee_os/core/include/io.h (Results 1 – 24 of 24)
Revision Date Author Comments
# 98d105a5 19-Feb-2024 Etienne Carriere <etienne.carriere@foss.st.com>

core: io: fix IO_READ32_POLL_TIMEOUT() when delay is 0us

Fix detection of timeout condition in IO_READ32_POLL_TIMEOUT() that was
never triggered when delay argument is 0us. Indeed 0 is not a useful

core: io: fix IO_READ32_POLL_TIMEOUT() when delay is 0us

Fix detection of timeout condition in IO_READ32_POLL_TIMEOUT() that was
never triggered when delay argument is 0us. Indeed 0 is not a useful
increment value for a timeout counter.

Fixes: 97ea199a2ae8 ("core: io: IO_READ32_POLL_TIMEOUT()")
Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>

show more ...


# 239dffeb 02-Nov-2023 Etienne Carriere <etienne.carriere@foss.st.com>

core: io: fix missing include of delay.h

Adds missing include of kernel/delay.h for udelay() used in
IO_READ32_POLL_TIMEOUT() macro.

Fixes: 97ea199a2ae8 ("core: io: IO_READ32_POLL_TIMEOUT()")
Revie

core: io: fix missing include of delay.h

Adds missing include of kernel/delay.h for udelay() used in
IO_READ32_POLL_TIMEOUT() macro.

Fixes: 97ea199a2ae8 ("core: io: IO_READ32_POLL_TIMEOUT()")
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>

show more ...


# 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 ...


# 97ea199a 15-Sep-2023 Xiaoxu Zeng <zengxiaoxu@huawei.com>

core: io: IO_READ32_POLL_TIMEOUT()

Implement Polling Read Register Interface inspired by linux kernel.

Signed-off-by: Xiaoxu Zeng <zengxiaoxu@huawei.com>
Reviewed-by: Etienne Carriere <etienne.carr

core: io: IO_READ32_POLL_TIMEOUT()

Implement Polling Read Register Interface inspired by linux kernel.

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

show more ...


# 6a041def 14-Feb-2022 Marouene Boubakri <marouene.boubakri@nxp.com>

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

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>

show more ...


# 679b0ed6 30-Mar-2022 Ruchika Gupta <ruchika.gupta@linaro.org>

core: io: add {get/put}_unaligned_le{16/32/64}()

Add 16, 32 and 64 bits put/get functions for little endian
unaligned access

Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org>
Reviewed-by: Jen

core: io: add {get/put}_unaligned_le{16/32/64}()

Add 16, 32 and 64 bits put/get functions for little endian
unaligned access

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

show more ...


# 2ba6031a 24-Mar-2022 Ruchika Gupta <ruchika.gupta@linaro.org>

core: io: add {get/put}_unaligned_be{16/32/64}()

Add 16, 32 and 64 bits put/get functions for big endian
unaligned access

Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org>
Reviewed-by: Jens W

core: io: add {get/put}_unaligned_be{16/32/64}()

Add 16, 32 and 64 bits put/get functions for big endian
unaligned access

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

show more ...


# 4d3ad62d 03-Dec-2021 Etienne Carriere <etienne.carriere@linaro.org>

io.h: add WRITE_ONCE macro

Implements WRITE_ONCE() macro that ensures compiler will write memory
only once. It is simple wrapper over __compiler_atomic_store() but
its name emphasizes its purpose.

io.h: add WRITE_ONCE macro

Implements WRITE_ONCE() macro that ensures compiler will write memory
only once. It is simple wrapper over __compiler_atomic_store() but
its name emphasizes its purpose.

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

show more ...


# c22e4872 01-Aug-2019 Cedric Neveux <cedric.neveux@nxp.com>

core: io: add {get/put}_le{32/64}()

Add 32 and 64 bits little endian put/get functions

Signed-off-by: Cedric Neveux <cedric.neveux@nxp.com>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.or

core: io: add {get/put}_le{32/64}()

Add 32 and 64 bits little endian put/get functions

Signed-off-by: Cedric Neveux <cedric.neveux@nxp.com>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


# ae21bcac 12-Feb-2019 Etienne Carriere <etienne.carriere@linaro.org>

core: deprecate read32(), write32() and friends

read8(), read16(), read32() write8(), write16() and write32()
are deprecated since the equivalent, prefixed with io_ were
introduced are aligns functi

core: deprecate read32(), write32() and friends

read8(), read16(), read32() write8(), write16() and write32()
are deprecated since the equivalent, prefixed with io_ were
introduced are aligns functions API with other memory cell
accesses util functions as io_mask32() or pub_be32().

This change fully removes support for the deprecated functions.

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

show more ...


# b7d2b849 12-Feb-2019 Etienne Carriere <etienne.carriere@linaro.org>

libutil: io_clrsetbitsX() firends for 8bit and 16bit accesses

Introduce io_setbits8(), io_clrbits8(), io_clrsetbits8() and
io_setbits16(), io_clrbits16(), io_clrsetbits16() for bit clear/set
util ov

libutil: io_clrsetbitsX() firends for 8bit and 16bit accesses

Introduce io_setbits8(), io_clrbits8(), io_clrsetbits8() and
io_setbits16(), io_clrbits16(), io_clrsetbits16() for bit clear/set
util over 8bit and 16bit memory cells on the model of existing
io_clrsetbits32() and friends.

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

show more ...


# 2d0c93df 12-Feb-2019 Etienne Carriere <etienne.carriere@linaro.org>

libutil: replace write*() util functions with io_write*()

write8(), write16() and write32() expect the target written address
as 1st argument and the written value as 2nd argument. This is
confusing

libutil: replace write*() util functions with io_write*()

write8(), write16() and write32() expect the target written address
as 1st argument and the written value as 2nd argument. This is
confusing as put_be32(), put_be64(), io_mask32(), and the io_*bits32()
functions expect the opposite: 1st argument is the address and 2nd
argument is the written value(s).

This change introduces functions io_write8(), io_write16() and
io_write32() with io_mask32() like APIs. This change introduces
io_read*() for consistency: all prefixed with io_.

This change preserve the write8/write16/write32 functions for
compatibility. These will be deprecated in the next OP-TEE release
to lower confusion around these.

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

show more ...


# 4d22155c 12-Feb-2019 Etienne Carriere <etienne.carriere@linaro.org>

core: change io_{clr|set|clrset}bits32() address argument type

Change API for io_clrbits32(), io_setbits32() and io_clrsetbits32() to
have a vaddr_t type address argument, rather than uintptr_t as
p

core: change io_{clr|set|clrset}bits32() address argument type

Change API for io_clrbits32(), io_setbits32() and io_clrsetbits32() to
have a vaddr_t type address argument, rather than uintptr_t as
previously.

This change updates accordingly the callers of these functions
that cover only stm32mp1 related resources.

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

show more ...


# 54815590 17-Dec-2018 Etienne Carriere <etienne.carriere@linaro.org>

core: io_{set|clr|clrset}bits32() helpers

Introduce new iomem util functions to set, clear or set and clear
bit masks in peripheral interfaces.

io_setbits32(addr, mask) sets the bits enabled in mas

core: io_{set|clr|clrset}bits32() helpers

Introduce new iomem util functions to set, clear or set and clear
bit masks in peripheral interfaces.

io_setbits32(addr, mask) sets the bits enabled in mask at address.
io_clrbits32(addr, mask) clears the bits enabled in mask.
io_clrsetbits32(addr, clear_mask, set_mask) clears the bits enabled in
clear_mask and sets the bits enabled in set_mask.

These functions are more friendly in instruction blocks to sets and
clears bitmasks in peripheral registers. They provide a more readable
implementation than playing with io_mask32() for the equivalent
sequence, for example, extracted from a DDR controller driver:

(...)
/* IOs powering down (PUBL registers) */

io_setbits32(ddrphy_base + DDRPHYC_ACIOCR, DDRPHYC_ACIOCR_ACPDD);
io_setbits_32(ddrphy_base + DDRPHYC_ACIOCR, DDRPHYC_ACIOCR_ACPDR);

io_clrsetbits32(ddrphy_base + DDRPHYC_ACIOCR,
DDRPHYC_ACIOCR_CKPDD_MASK, DDRPHYC_ACIOCR_CKPDD_0);

io_clrsetbits32(ddrphy_base + DDRPHYC_ACIOCR,
DDRPHYC_ACIOCR_CKPDR_MASK, DDRPHYC_ACIOCR_CKPDR_0);

io_clrsetbits32(ddrphy_base + DDRPHYC_ACIOCR,
DDRPHYC_ACIOCR_CSPDD_MASK, DDRPHYC_ACIOCR_CSPDD_0);
(...)

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

show more ...


# 81801f83 03-Sep-2018 Volodymyr Babchuk <vlad.babchuk@gmail.com>

io.h: add READ_ONCE macro

Compiler can rearrange memory reads and writes if it does
not see any dependency on them. This can be troublesome
if we deal with memory which is shared with non-secure wor

io.h: add READ_ONCE macro

Compiler can rearrange memory reads and writes if it does
not see any dependency on them. This can be troublesome
if we deal with memory which is shared with non-secure world.

READ_ONCE macro ensures that compiler will read memory only once.
It is simple wrapper over __compiler_atomic_load(), but it's name
emphasizes it's function.

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

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 ...


# 685204eb 16-Nov-2017 Jens Wiklander <jens.wiklander@linaro.org>

core: io.h: add {get,put}_be{16,32,64}()

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


# d5c7fcbd 17-Mar-2017 Jens Wiklander <jens.wiklander@linaro.org>

core: remove IO() macro

Removes the now unused IO() macro.

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


# 14ed3274 05-Jul-2016 Victor Chong <victor.chong@linaro.org>

io.h: add io_mask{8,16,32} functions

When writing peripheral drivers, there's very often a need to read a
register value, set/clear some bits and then write the new value
back. Instead of having to

io.h: add io_mask{8,16,32} functions

When writing peripheral drivers, there's very often a need to read a
register value, set/clear some bits and then write the new value
back. Instead of having to 'manually' call read, do bit manipulations
and write every single time, add this helper function for convenience.

Signed-off-by: Victor Chong <victor.chong@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>

show more ...


# ec219598 13-Aug-2014 Pascal Brand <pascal.brand@st.com>

Remove core dependencies from generic part

This concerns:
- Communication Non-Secure <--> Secure
- sys/types.h contains some types not defined on all compilers

Signed-off-by: Pascal Brand <pascal.b

Remove core dependencies from generic part

This concerns:
- Communication Non-Secure <--> Secure
- sys/types.h contains some types not defined on all compilers

Signed-off-by: Pascal Brand <pascal.brand@st.com>

show more ...


# 1f70169d 24-Jun-2014 Joakim Bech <joakim.bech@linaro.org>

Removed unused KTA related defines

- Moved IO macro from kta_mem.h to io.h.
- Removed unused TEE_MEM_xyz defines.
- Removed code that was used for TA's in TEE RAM (impossible to reach
that code).

Removed unused KTA related defines

- Moved IO macro from kta_mem.h to io.h.
- Removed unused TEE_MEM_xyz defines.
- Removed code that was used for TA's in TEE RAM (impossible to reach
that code).

Signed-off-by: Joakim Bech <joakim.bech@linaro.org>

show more ...


# b0104773 12-Jun-2014 Pascal Brand <pascal.brand@st.com>

Open-source the TEE Core

Signed-off-by: Pascal Brand <pascal.brand@st.com>