Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In the case that SEL2(SPMC) is enabled, when hafnium execute the vcpu_restore_all_and_run, below errors occured #5674

Closed
zzbios opened this issue Nov 27, 2022 · 0 comments

Comments

@zzbios
Copy link

zzbios commented Nov 27, 2022

INFO: Loading VM id 0x8001: op-tee.
VERBOSE: VM has 0 physical interrupts defined in manifest.
INFO: Loaded with 8 vCPUs, entry at 0xff400000.
vcpu_secondary_reset_and_start:113
one_time_init:177
one_time_init:183
one_time_init:187
one_time_init:190
one_time_init:194
one_time_init:198
one_time_init:202
INFO: Hafnium initialisation completed
cpu_main:26
VERBOSE: plat_psci_cpu_resume: cpu mpidr 0x0 ON
arch_cpu_init:260
arch_cpu_init:262
arch_cpu_init:265
arch_cpu_init:269
arch_cpu_sve_configure_sve_vector_length:235
arch_cpu_sve_configure_sve_vector_length:238
arch_cpu_sve_configure_sve_vector_length:241
arch_cpu_sve_configure_sve_vector_length:247
arch_cpu_sve_configure_sve_vector_length:249
arch_cpu_init:273
arch_cpu_init:275
cpu_main:39
vcpu_set_phys_core_idx:209
cpu_main:42
cpu_main:45
mpidr=0x0
NOTICE: SMC 0x00000001 attempted from VM 0x8001, blocked=1

It seems that after the hafnuim enter into the optee os, the optee os cannot generate the smc forward to the el3.

use trace32 debug tool to track the optee code as follows:

                     00000000            udf     #0x0
                     00000000            udf     #0x0
                     00000000            udf     #0x0
                     00000000            udf     #0x0
                     00000000            udf     #0x0
                      00000000            udf     #0x0
zsx:ff404000         D2800020            mov     x0,#0x1          ; x0,#1
                     D4000003            smc     #0x0             ; #0   (error occurs here)
                     14000000             b       0xFF404008
                     AA0003F3            mov     x19,x0
                     AA0203F4            mov     x20,x2
                     10007F60             adr     x0,0xFF405000
                     D518C000            msr     #0x3,#0x0,c12,c0,#0x0,x0   ;  VBAR
                     D5033FDF            isb     sy
                     D5381000            mrs     x0,#0x3,#0x0,c1,c0,#0x0   ; x0, SC
                     B2740000            orr     x0,x0,#0x1000    ; x0,x0,#4096
                     B27D0000            orr     x0,x0,#0x8       ; x0,x0,#8
                     B2690000            orr     x0,x0,#0x800000   ; x0,x0,#8388608
                     B26D0000            orr     x0,x0,#0x80000   ; x0,x0,#524288
                     927EF800             and     x0,x0,#-0x3      ; x0,x0,#-3
                     D5181000             msr     #0x3,#0x0,c1,c0,#0x0,x0   ;  SCTLR
                     D5033FDF            isb     sy
                     B0000600            adrp    x0,0xFF4C5000
                     91200000            add     x0,x0,#0x800     ; x0,x0,#2048
                     F0000321            adrp    x1,0xFF46B000
                     911E8021             add     x1,x1,#0x7A0     ; x1,x1,#1952
                     B9400022            ldr     w2,[x1]
zsx:ff404054         8B020000            add     x0,x0,x2


@zzbios zzbios closed this as completed Nov 28, 2022
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

No branches or pull requests

1 participant