Skip to content

Update aeabi_divmod.c#7

Merged
1 commit merged intoOP-TEE:masterfrom
pascal-brand38:issue/2
Jun 26, 2014
Merged

Update aeabi_divmod.c#7
1 commit merged intoOP-TEE:masterfrom
pascal-brand38:issue/2

Conversation

@pascal-brand38
Copy link
Copy Markdown

On behalf of Herve Sibert (hsibert)
Corrected division_qr to work on unsigned ints, and simplified
uint_div_qr accordingly
Note - this file is no longer ARM-specific.

It fixes #2 (GitHub issue)

On behalf of Herve Sibert (hsibert)
    Corrected division_qr to work on unsigned ints, and simplified
    uint_div_qr accordingly
    Note - this file is no longer ARM-specific.

It fixes #2 (GitHub issue)
@ghost ghost merged commit b824235 into OP-TEE:master Jun 26, 2014
@pascal-brand38 pascal-brand38 deleted the issue/2 branch October 10, 2014 13:37
jforissier referenced this pull request in jforissier/optee_os Jun 14, 2019
Since commit eeb866c ("Add TA entry point function: __ta_entry()"),
__ta_entry() is the first function in the user space call stack, not
__utee_entry(). Therefore, the asm(".cantunwind") declaration should be
moved from __utee_entry() to __ta_entry().

When utee_return() was moved from __utee_entry() to __ta_entry() by
commit fde3a7f ("Remove redundant __noreturn from __utee_entry()"),
it caused a regression in xtest 1010.3. The stack unwinding would enter
an infinite loop as follows:

 E/TC:? 0 User TA prefetch-abort at address 0x0 (translation fault)
 E/TC:? 0  fsr 0x00000005  ttbr0 0x3f07906a  ttbr1 0x3f06c06a  cidr 0x2
 E/TC:? 0  cpu #7          cpsr 0x80000110
 E/TC:? 0  r0 0x00000001      r4 0x00161448    r8 0x00161438   r12 0x00152f80
 E/TC:? 0  r1 0x00000002      r5 0x00152f40    r9 0x00152f30    sp 0x00152f10
 E/TC:? 0  r2 0x00000000      r6 0x00152f80   r10 0x0000000a    lr 0x0015498d
 E/TC:? 0  r3 0x00152f14      r7 0x00161458   r11 0x00245420    pc 0x00000000
 E/TC:? 0 Status of TA 5b9e0e40-2636-11e1-ad9e-0002a5d5c51b (0x3f069c30) (active)
 E/TC:? 0  arch: arm  load address: 0x00153000 ctx-idr: 2
 E/TC:? 0  stack: 0x00150000 12288
 E/TC:? 0  region  0: va 0x00100000 pa 0x3f000000 size 0x002000 flags ---R-X
 E/TC:? 0  region  1: va 0x00150000 pa 0x3f110000 size 0x003000 flags rw-RW-
 E/TC:? 0  region  2: va 0x00153000 pa 0x3f113000 size 0x00e000 flags r-xR-- [0] .ta_head .text .plt .rodata .ARM.extab .ARM.extab.text.unlikely .ARM.extab.text.__aeabi_ldivmod .ARM.extab.text.__aeabi_uldivmod .ARM.extab.text.utee_panic .ARM.exidx .dynsym .dynstr .hash
 E/TC:? 0  region  3: va 0x00161000 pa 0x3f121000 size 0x0e5000 flags rw-RW- [0] .got .rel.got .rel.plt .dynamic .data .bss .rel.dyn
 E/TC:? 0  region  4: va 0x00246000 pa 0x3f101000 size 0x001000 flags r-xR-- [1] .hash .dynsym .dynstr .rel.plt .plt .text .ARM.exidx
 E/TC:? 0  region  5: va 0x00247000 pa 0x3f102000 size 0x001000 flags rw-RW- [1] .dynamic .got
 E/TC:? 0  region  6: va 0x00248000 pa 0x3f100000 size 0x001000 flags r-----
 E/TC:? 0  [0] 5b9e0e40-2636-11e1-ad9e-0002a5d5c51b @ 0x00153000 (optee_test/out/ta/os_test/5b9e0e40-2636-11e1-ad9e-0002a5d5c51b.elf)
 E/TC:? 0  [1] ffd2bded-ab7d-4988-95ee-e4962fff7154 @ 0x00246000 (optee_test/out/ta/os_test_lib/libos_test.so)
 E/TC:? 0 Call stack:
 E/TC:? 0  0x00000000 ???
 E/TC:? 0  0x0015c629 __ta_entry at optee_os/out/arm/export-ta_arm32/src/user_ta_header.c:41
 E/TC:? 0  0x0015c62d tahead_get_trace_level at optee_os/out/arm/export-ta_arm32/src/user_ta_header.c:117
 E/TC:? 0  0x0015c62d tahead_get_trace_level at optee_os/out/arm/export-ta_arm32/src/user_ta_header.c:117
 ...

Moving the .cantunwind directive fixes the issue.

Fixes: fde3a7f ("Remove redundant __noreturn from __utee_entry()")
Fixes: eeb866c ("Add TA entry point function: __ta_entry()")
Signed-off-by: Jerome Forissier <[email protected]>
jforissier referenced this pull request in jforissier/optee_os Jun 14, 2019
Since commit eeb866c ("Add TA entry point function: __ta_entry()"),
__ta_entry() is the first function in the user space call stack, not
__utee_entry(). Therefore, the asm(".cantunwind") declaration should be
moved from __utee_entry() to __ta_entry().

When utee_return() was moved from __utee_entry() to __ta_entry() by
commit fde3a7f ("Remove redundant __noreturn from __utee_entry()"),
it caused a regression in xtest 1010.3. The stack unwinding would enter
an infinite loop as follows:

 E/TC:? 0 User TA prefetch-abort at address 0x0 (translation fault)
 E/TC:? 0  fsr 0x00000005  ttbr0 0x3f07906a  ttbr1 0x3f06c06a  cidr 0x2
 E/TC:? 0  cpu #7          cpsr 0x80000110
 E/TC:? 0  r0 0x00000001      r4 0x00161448    r8 0x00161438   r12 0x00152f80
 E/TC:? 0  r1 0x00000002      r5 0x00152f40    r9 0x00152f30    sp 0x00152f10
 E/TC:? 0  r2 0x00000000      r6 0x00152f80   r10 0x0000000a    lr 0x0015498d
 E/TC:? 0  r3 0x00152f14      r7 0x00161458   r11 0x00245420    pc 0x00000000
 E/TC:? 0 Status of TA 5b9e0e40-2636-11e1-ad9e-0002a5d5c51b (0x3f069c30) (active)
 E/TC:? 0  arch: arm  load address: 0x00153000 ctx-idr: 2
 E/TC:? 0  stack: 0x00150000 12288
 E/TC:? 0  region  0: va 0x00100000 pa 0x3f000000 size 0x002000 flags ---R-X
 E/TC:? 0  region  1: va 0x00150000 pa 0x3f110000 size 0x003000 flags rw-RW-
 E/TC:? 0  region  2: va 0x00153000 pa 0x3f113000 size 0x00e000 flags r-xR-- [0] .ta_head .text .plt .rodata .ARM.extab .ARM.extab.text.unlikely .ARM.extab.text.__aeabi_ldivmod .ARM.extab.text.__aeabi_uldivmod .ARM.extab.text.utee_panic .ARM.exidx .dynsym .dynstr .hash
 E/TC:? 0  region  3: va 0x00161000 pa 0x3f121000 size 0x0e5000 flags rw-RW- [0] .got .rel.got .rel.plt .dynamic .data .bss .rel.dyn
 E/TC:? 0  region  4: va 0x00246000 pa 0x3f101000 size 0x001000 flags r-xR-- [1] .hash .dynsym .dynstr .rel.plt .plt .text .ARM.exidx
 E/TC:? 0  region  5: va 0x00247000 pa 0x3f102000 size 0x001000 flags rw-RW- [1] .dynamic .got
 E/TC:? 0  region  6: va 0x00248000 pa 0x3f100000 size 0x001000 flags r-----
 E/TC:? 0  [0] 5b9e0e40-2636-11e1-ad9e-0002a5d5c51b @ 0x00153000 (optee_test/out/ta/os_test/5b9e0e40-2636-11e1-ad9e-0002a5d5c51b.elf)
 E/TC:? 0  [1] ffd2bded-ab7d-4988-95ee-e4962fff7154 @ 0x00246000 (optee_test/out/ta/os_test_lib/libos_test.so)
 E/TC:? 0 Call stack:
 E/TC:? 0  0x00000000 ???
 E/TC:? 0  0x0015c629 __ta_entry at optee_os/out/arm/export-ta_arm32/src/user_ta_header.c:41
 E/TC:? 0  0x0015c62d tahead_get_trace_level at optee_os/out/arm/export-ta_arm32/src/user_ta_header.c:117
 E/TC:? 0  0x0015c62d tahead_get_trace_level at optee_os/out/arm/export-ta_arm32/src/user_ta_header.c:117
 ...

Moving the .cantunwind directive fixes the issue.

Fixes: fde3a7f ("Remove redundant __noreturn from __utee_entry()")
Fixes: eeb866c ("Add TA entry point function: __ta_entry()")
Signed-off-by: Jerome Forissier <[email protected]>
Reviewed-by: Jens Wiklander <[email protected]>
jforissier referenced this pull request in jforissier/optee_os Jun 17, 2019
Since commit eeb866c ("Add TA entry point function: __ta_entry()"),
__ta_entry() is the first function in the user space call stack, not
__utee_entry(). Therefore, the asm(".cantunwind") declaration should be
moved from __utee_entry() to __ta_entry().

When utee_return() was moved from __utee_entry() to __ta_entry() by
commit fde3a7f ("Remove redundant __noreturn from __utee_entry()"),
it caused a regression in xtest 1010.3. The stack unwinding would enter
an infinite loop as follows:

 E/TC:? 0 User TA prefetch-abort at address 0x0 (translation fault)
 E/TC:? 0  fsr 0x00000005  ttbr0 0x3f07906a  ttbr1 0x3f06c06a  cidr 0x2
 E/TC:? 0  cpu #7          cpsr 0x80000110
 E/TC:? 0  r0 0x00000001      r4 0x00161448    r8 0x00161438   r12 0x00152f80
 E/TC:? 0  r1 0x00000002      r5 0x00152f40    r9 0x00152f30    sp 0x00152f10
 E/TC:? 0  r2 0x00000000      r6 0x00152f80   r10 0x0000000a    lr 0x0015498d
 E/TC:? 0  r3 0x00152f14      r7 0x00161458   r11 0x00245420    pc 0x00000000
 E/TC:? 0 Status of TA 5b9e0e40-2636-11e1-ad9e-0002a5d5c51b (0x3f069c30) (active)
 E/TC:? 0  arch: arm  load address: 0x00153000 ctx-idr: 2
 E/TC:? 0  stack: 0x00150000 12288
 E/TC:? 0  region  0: va 0x00100000 pa 0x3f000000 size 0x002000 flags ---R-X
 E/TC:? 0  region  1: va 0x00150000 pa 0x3f110000 size 0x003000 flags rw-RW-
 E/TC:? 0  region  2: va 0x00153000 pa 0x3f113000 size 0x00e000 flags r-xR-- [0] .ta_head .text .plt .rodata .ARM.extab .ARM.extab.text.unlikely .ARM.extab.text.__aeabi_ldivmod .ARM.extab.text.__aeabi_uldivmod .ARM.extab.text.utee_panic .ARM.exidx .dynsym .dynstr .hash
 E/TC:? 0  region  3: va 0x00161000 pa 0x3f121000 size 0x0e5000 flags rw-RW- [0] .got .rel.got .rel.plt .dynamic .data .bss .rel.dyn
 E/TC:? 0  region  4: va 0x00246000 pa 0x3f101000 size 0x001000 flags r-xR-- [1] .hash .dynsym .dynstr .rel.plt .plt .text .ARM.exidx
 E/TC:? 0  region  5: va 0x00247000 pa 0x3f102000 size 0x001000 flags rw-RW- [1] .dynamic .got
 E/TC:? 0  region  6: va 0x00248000 pa 0x3f100000 size 0x001000 flags r-----
 E/TC:? 0  [0] 5b9e0e40-2636-11e1-ad9e-0002a5d5c51b @ 0x00153000 (optee_test/out/ta/os_test/5b9e0e40-2636-11e1-ad9e-0002a5d5c51b.elf)
 E/TC:? 0  [1] ffd2bded-ab7d-4988-95ee-e4962fff7154 @ 0x00246000 (optee_test/out/ta/os_test_lib/libos_test.so)
 E/TC:? 0 Call stack:
 E/TC:? 0  0x00000000 ???
 E/TC:? 0  0x0015c629 __ta_entry at optee_os/out/arm/export-ta_arm32/src/user_ta_header.c:41
 E/TC:? 0  0x0015c62d tahead_get_trace_level at optee_os/out/arm/export-ta_arm32/src/user_ta_header.c:117
 E/TC:? 0  0x0015c62d tahead_get_trace_level at optee_os/out/arm/export-ta_arm32/src/user_ta_header.c:117
 ...

Moving the .cantunwind directive fixes the issue.

Fixes: fde3a7f ("Remove redundant __noreturn from __utee_entry()")
Fixes: eeb866c ("Add TA entry point function: __ta_entry()")
Signed-off-by: Jerome Forissier <[email protected]>
Reviewed-by: Jens Wiklander <[email protected]>
Acked-by: Sumit Garg <[email protected]>
jforissier added a commit that referenced this pull request Jun 17, 2019
Since commit eeb866c ("Add TA entry point function: __ta_entry()"),
__ta_entry() is the first function in the user space call stack, not
__utee_entry(). Therefore, the asm(".cantunwind") declaration should be
moved from __utee_entry() to __ta_entry().

When utee_return() was moved from __utee_entry() to __ta_entry() by
commit fde3a7f ("Remove redundant __noreturn from __utee_entry()"),
it caused a regression in xtest 1010.3. The stack unwinding would enter
an infinite loop as follows:

 E/TC:? 0 User TA prefetch-abort at address 0x0 (translation fault)
 E/TC:? 0  fsr 0x00000005  ttbr0 0x3f07906a  ttbr1 0x3f06c06a  cidr 0x2
 E/TC:? 0  cpu #7          cpsr 0x80000110
 E/TC:? 0  r0 0x00000001      r4 0x00161448    r8 0x00161438   r12 0x00152f80
 E/TC:? 0  r1 0x00000002      r5 0x00152f40    r9 0x00152f30    sp 0x00152f10
 E/TC:? 0  r2 0x00000000      r6 0x00152f80   r10 0x0000000a    lr 0x0015498d
 E/TC:? 0  r3 0x00152f14      r7 0x00161458   r11 0x00245420    pc 0x00000000
 E/TC:? 0 Status of TA 5b9e0e40-2636-11e1-ad9e-0002a5d5c51b (0x3f069c30) (active)
 E/TC:? 0  arch: arm  load address: 0x00153000 ctx-idr: 2
 E/TC:? 0  stack: 0x00150000 12288
 E/TC:? 0  region  0: va 0x00100000 pa 0x3f000000 size 0x002000 flags ---R-X
 E/TC:? 0  region  1: va 0x00150000 pa 0x3f110000 size 0x003000 flags rw-RW-
 E/TC:? 0  region  2: va 0x00153000 pa 0x3f113000 size 0x00e000 flags r-xR-- [0] .ta_head .text .plt .rodata .ARM.extab .ARM.extab.text.unlikely .ARM.extab.text.__aeabi_ldivmod .ARM.extab.text.__aeabi_uldivmod .ARM.extab.text.utee_panic .ARM.exidx .dynsym .dynstr .hash
 E/TC:? 0  region  3: va 0x00161000 pa 0x3f121000 size 0x0e5000 flags rw-RW- [0] .got .rel.got .rel.plt .dynamic .data .bss .rel.dyn
 E/TC:? 0  region  4: va 0x00246000 pa 0x3f101000 size 0x001000 flags r-xR-- [1] .hash .dynsym .dynstr .rel.plt .plt .text .ARM.exidx
 E/TC:? 0  region  5: va 0x00247000 pa 0x3f102000 size 0x001000 flags rw-RW- [1] .dynamic .got
 E/TC:? 0  region  6: va 0x00248000 pa 0x3f100000 size 0x001000 flags r-----
 E/TC:? 0  [0] 5b9e0e40-2636-11e1-ad9e-0002a5d5c51b @ 0x00153000 (optee_test/out/ta/os_test/5b9e0e40-2636-11e1-ad9e-0002a5d5c51b.elf)
 E/TC:? 0  [1] ffd2bded-ab7d-4988-95ee-e4962fff7154 @ 0x00246000 (optee_test/out/ta/os_test_lib/libos_test.so)
 E/TC:? 0 Call stack:
 E/TC:? 0  0x00000000 ???
 E/TC:? 0  0x0015c629 __ta_entry at optee_os/out/arm/export-ta_arm32/src/user_ta_header.c:41
 E/TC:? 0  0x0015c62d tahead_get_trace_level at optee_os/out/arm/export-ta_arm32/src/user_ta_header.c:117
 E/TC:? 0  0x0015c62d tahead_get_trace_level at optee_os/out/arm/export-ta_arm32/src/user_ta_header.c:117
 ...

Moving the .cantunwind directive fixes the issue.

Fixes: fde3a7f ("Remove redundant __noreturn from __utee_entry()")
Fixes: eeb866c ("Add TA entry point function: __ta_entry()")
Signed-off-by: Jerome Forissier <[email protected]>
Reviewed-by: Jens Wiklander <[email protected]>
Acked-by: Sumit Garg <[email protected]>
andyzsh68 pushed a commit to andyzsh68/optee_os that referenced this pull request Jul 5, 2019
Since commit eeb866c ("Add TA entry point function: __ta_entry()"),
__ta_entry() is the first function in the user space call stack, not
__utee_entry(). Therefore, the asm(".cantunwind") declaration should be
moved from __utee_entry() to __ta_entry().

When utee_return() was moved from __utee_entry() to __ta_entry() by
commit fde3a7f ("Remove redundant __noreturn from __utee_entry()"),
it caused a regression in xtest 1010.3. The stack unwinding would enter
an infinite loop as follows:

 E/TC:? 0 User TA prefetch-abort at address 0x0 (translation fault)
 E/TC:? 0  fsr 0x00000005  ttbr0 0x3f07906a  ttbr1 0x3f06c06a  cidr 0x2
 E/TC:? 0  cpu OP-TEE#7          cpsr 0x80000110
 E/TC:? 0  r0 0x00000001      r4 0x00161448    r8 0x00161438   r12 0x00152f80
 E/TC:? 0  r1 0x00000002      r5 0x00152f40    r9 0x00152f30    sp 0x00152f10
 E/TC:? 0  r2 0x00000000      r6 0x00152f80   r10 0x0000000a    lr 0x0015498d
 E/TC:? 0  r3 0x00152f14      r7 0x00161458   r11 0x00245420    pc 0x00000000
 E/TC:? 0 Status of TA 5b9e0e40-2636-11e1-ad9e-0002a5d5c51b (0x3f069c30) (active)
 E/TC:? 0  arch: arm  load address: 0x00153000 ctx-idr: 2
 E/TC:? 0  stack: 0x00150000 12288
 E/TC:? 0  region  0: va 0x00100000 pa 0x3f000000 size 0x002000 flags ---R-X
 E/TC:? 0  region  1: va 0x00150000 pa 0x3f110000 size 0x003000 flags rw-RW-
 E/TC:? 0  region  2: va 0x00153000 pa 0x3f113000 size 0x00e000 flags r-xR-- [0] .ta_head .text .plt .rodata .ARM.extab .ARM.extab.text.unlikely .ARM.extab.text.__aeabi_ldivmod .ARM.extab.text.__aeabi_uldivmod .ARM.extab.text.utee_panic .ARM.exidx .dynsym .dynstr .hash
 E/TC:? 0  region  3: va 0x00161000 pa 0x3f121000 size 0x0e5000 flags rw-RW- [0] .got .rel.got .rel.plt .dynamic .data .bss .rel.dyn
 E/TC:? 0  region  4: va 0x00246000 pa 0x3f101000 size 0x001000 flags r-xR-- [1] .hash .dynsym .dynstr .rel.plt .plt .text .ARM.exidx
 E/TC:? 0  region  5: va 0x00247000 pa 0x3f102000 size 0x001000 flags rw-RW- [1] .dynamic .got
 E/TC:? 0  region  6: va 0x00248000 pa 0x3f100000 size 0x001000 flags r-----
 E/TC:? 0  [0] 5b9e0e40-2636-11e1-ad9e-0002a5d5c51b @ 0x00153000 (optee_test/out/ta/os_test/5b9e0e40-2636-11e1-ad9e-0002a5d5c51b.elf)
 E/TC:? 0  [1] ffd2bded-ab7d-4988-95ee-e4962fff7154 @ 0x00246000 (optee_test/out/ta/os_test_lib/libos_test.so)
 E/TC:? 0 Call stack:
 E/TC:? 0  0x00000000 ???
 E/TC:? 0  0x0015c629 __ta_entry at optee_os/out/arm/export-ta_arm32/src/user_ta_header.c:41
 E/TC:? 0  0x0015c62d tahead_get_trace_level at optee_os/out/arm/export-ta_arm32/src/user_ta_header.c:117
 E/TC:? 0  0x0015c62d tahead_get_trace_level at optee_os/out/arm/export-ta_arm32/src/user_ta_header.c:117
 ...

Moving the .cantunwind directive fixes the issue.

Fixes: fde3a7f ("Remove redundant __noreturn from __utee_entry()")
Fixes: eeb866c ("Add TA entry point function: __ta_entry()")
Signed-off-by: Jerome Forissier <[email protected]>
Reviewed-by: Jens Wiklander <[email protected]>
Acked-by: Sumit Garg <[email protected]>
@ldts ldts mentioned this pull request Oct 31, 2019
vingu-linaro pushed a commit to vingu-linaro/optee_os that referenced this pull request May 20, 2020
A squashed series of changes in stm32mp1 clock driver for
supporting SCMI server as a clock consumer. These changes
have not been upstream yet in OP-TEE OS. Below the details.

Signed-off-by: Etienne Carriere <[email protected]>

### Commit message OP-TEE#1
plat-stm32mp1: clock: remove oscillators and PLLs from shared resources

Oscillators, PLL1 and PLL2 are not resources allocated upon platform
configuration, these are always under secure world control. This change
removes them fro the list of the shared resources.

Since these resource are always secure, there is no need to look up
clock tree when a leaf clock is registered as secure to know which
parent clock(s) is/are secure. This removes functions from
shared_resources.c and stm32mp1_clk.c.

stm32mp_register_clock_parents_secure() can be removed and all its
private dependencies.

Signed-off-by: Etienne Carriere <[email protected]>

### Commit message OP-TEE#2
plat-stm32mp1: clock: fix mcu/axi parent clock

Correct MCU clock parent selector: MCU subsystem clock is derived
from clock  PLL3_P, not PLL3.

Correct AXI clock parent selector: AXI subsystem clock is derived
from clock  PLL2_P, not PLL2.

This change also renames MCU clock and AXI clock resources to
prevent confusion.

Signed-off-by: Etienne Carriere <[email protected]>

### Commit message OP-TEE#3
plat-stm32mp1: clock: allow tree lookup for several system clocks

Oscillators, PLLs and some system clocks can be related straight to
a parent clock. Prior this change were only oscillators and few
clocks supported by this look up. This changes adds PLLs and other
system clocks. This enables for flexible use of clock tree exploration
when computing a clock frequency value.

Signed-off-by: Etienne Carriere <[email protected]>

### Commit message OP-TEE#4
plat-stm32mp1: clock: handle always on clocks

Oscillators and PLLs are not gated on stm32mp_clk_enable/disable()
calls. This change allows function to blindly call clock gating function
on always on clocks. Gating these clock is out of the scope of this
change even if preferred for power consumption optimization.

Signed-off-by: Etienne Carriere <[email protected]>

### Commit message OP-TEE#5
plat-stm32mp1: clock: add rtc as gateable clock

Add clock RTC as a clock one can access through the
stm32_util.h API function stm32_clock_*().

Signed-off-by: Etienne Carriere <[email protected]>

### Commit message OP-TEE#6
plat-stm32mp1: clock: enable some secure clocks at init

With this change some system clock are enabled by core at
boot time and have a reference counter synchronized with
the clock hardware state.

Signed-off-by: Etienne Carriere <[email protected]>

### Commit message OP-TEE#7
plat-stm32mp1: factorize rtc clock gating bit position

For consistency, define macro RCC_BDCR_RTCCKEN_POS in stm32mp1_rcc.h
to factorize definition of the RTC clock gating resources.

Signed-off-by: Etienne Carriere <[email protected]>

### Commit message OP-TEE#8
plat-stm32mp1: add mdma secure clock

Add support for MDMA secure clock.

Signed-off-by: Etienne Carriere <[email protected]>

### Commit message OP-TEE#9
plat-stm32mp1: remove unused usb non-secure clock

Remove unused clocks USBO_CLK and USBPHY_K resources.

Signed-off-by: Etienne Carriere <[email protected]>

### Commit message OP-TEE#10
plat-stm32mp1: clock: secure and non-secure gateable clocks

Array stm32mp1_clk_gate[] defines the clock resources. This change
add a secure attribute to the clock: secure upon RCC[TZEN] (SEC),
secure upon RCC[TZEN] and RCC[MCKPROT] (MKP) or always accessible
from non-secure (N_S).

At init, lookup clock tree to ensure that parents of a secure clock
are registered a secure resources in the shared_resources.c driver.

Non-secure clock that OP-TEE expect to enable are enabled without
increase the clock refcount. For consistency, such clocks are not
disabled by core. Such clocks may be accessed by OP-TEE Core when
the non-secure world is not executing, for example at boot time
or could be when system is suspending/resuming.

Signed-off-by: Etienne Carriere <[email protected]>

### Commit message OP-TEE#11
plat-stm32mp1: clock: fixup parent clock ids

Use _UNKNOWN_ID macro rather than 0xff for clocks parent IDs
that do not relate to a gateable clock.

Fix parent clock ID _HSE_KER_DIV2 that relates to clock
CK_HSE_KER_DIV2, not CK_HSE.

Signed-off-by: Etienne Carriere <[email protected]>

### Commit message OP-TEE#12
plat-stm32mp1: clock: don't embed unused non-secure uart clock

Embed UART parent clock resource upon CFG_WITH_NSEC_UARTS=y.
This configuration switch was already used to embed or not
the non-secure UART clocks but not the resources used to
looks there ascendant clocks.

Signed-off-by: Etienne Carriere <[email protected]>

### Commit message OP-TEE#13
plat-stm32mp1: shared resources: get shared clock controller state

stm32mp_nsec_can_access_clock() reports whether a clock is assigned
to the secure world only, or when it can be manipulated by the
non-secure world.

Signed-off-by: Etienne Carriere <[email protected]>

### Commit message OP-TEE#14
plat-stm32mp1: shared resource: remove unused stm32mp_clock_is_*()

Remove unused functions stm32mp_clock_is_shareable(),
stm32mp_clock_is_shared() and stm32mp_clock_is_non_secure().

Signed-off-by: Etienne Carriere <[email protected]>
jforissier referenced this pull request in jforissier/optee_os Jul 26, 2022
The code_style job runs checkpatch, which checks if commit references
found in commit descriptions are valid or not. In order for this to
work, the Git repo must contain the full history otherwise some IDs
might be reported as unknown. For example [1]:

 WARNING: Unknown commit id '60801696667d', maybe rebased or not pulled?
 #7:
 - Commit 6080169 ("plat: arm: refactor GIC initialization")

Link: [1] https://github.com/OP-TEE/optee_os/runs/7529955940?check_suite_focus=true#step:5:35
Signed-off-by: Jerome Forissier <[email protected]>
jforissier referenced this pull request in jforissier/optee_os Jul 26, 2022
The code_style job runs checkpatch, which checks if commit references
found in commit descriptions are valid or not. In order for this to
work, the Git repo must contain the full history otherwise some IDs
might be reported as unknown. For example [1]:

 WARNING: Unknown commit id '60801696667d', maybe rebased or not pulled?
 #7:
 - Commit 6080169 ("plat: arm: refactor GIC initialization")

Link: [1] https://github.com/OP-TEE/optee_os/runs/7529955940?check_suite_focus=true#step:5:35
Signed-off-by: Jerome Forissier <[email protected]>
jforissier referenced this pull request in jforissier/optee_os Jul 27, 2022
The code_style job runs checkpatch, which checks if commit references
found in commit descriptions are valid or not. In order for this to
work, the Git repo must contain the full history otherwise some IDs
might be reported as unknown. For example [1]:

 WARNING: Unknown commit id '60801696667d', maybe rebased or not pulled?
 #7:
 - Commit 6080169 ("plat: arm: refactor GIC initialization")

Link: [1] https://github.com/OP-TEE/optee_os/runs/7529955940?check_suite_focus=true#step:5:35
Signed-off-by: Jerome Forissier <[email protected]>
Acked-by: Jens Wiklander <[email protected]>
jforissier added a commit that referenced this pull request Jul 27, 2022
The code_style job runs checkpatch, which checks if commit references
found in commit descriptions are valid or not. In order for this to
work, the Git repo must contain the full history otherwise some IDs
might be reported as unknown. For example [1]:

 WARNING: Unknown commit id '60801696667d', maybe rebased or not pulled?
 #7:
 - Commit 6080169 ("plat: arm: refactor GIC initialization")

Link: [1] https://github.com/OP-TEE/optee_os/runs/7529955940?check_suite_focus=true#step:5:35
Signed-off-by: Jerome Forissier <[email protected]>
Acked-by: Jens Wiklander <[email protected]>
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant