Is it legal to execute SVC from EL1 in ARMv8?
I have two cores in the same A53, and both are configured the same way with respect to system registers and MMU. When executing SVC #1 from EL1(S), one of the cores correctly generates syndrome 0x56000001 in ESR_EL1 (EC 0b01010101: "SVC instruction execution in AArch64 state"), but the other core generates syndrome 0x02000000 (EC 0b000000: "reason unknown").
Yes, I did single step through the code. As soon as I execute the SVC instruction, I find myself at the current level sync SPx exception vector, and the ESR is 0x02000000. As I explained to 42Bastian Schick, I suspect that the 0x02000000 is the syndrome of some higher priority exception, and I suspect that my debugger is to blame.
Thank you for referencing the pseudocode. I'll mark this as an answer. But in response to your comment that "SVC is not supported at EL2, EL3," the pseudocode makes it fairly clear that the exception would be taken at the current PSTATE.EL. It couldn't be processed at EL1, but it would be available for higher-level processing if that was desirable.
"SVC is not supported at EL2, EL3" really means that SVC would not be used as system call function.
>I suspect that the 0x02000000 is the syndrome of some higher priority exception, and I suspect that my debugger is to blame
You could verify it by not using debugger and print out the ESR in the handler, to check whether the debugger should be blamed.