Could anyone give me the code to get the current secure state?
I could not access Secure monitor code. But, exception level of my machine is EL2 on bootloader.
According to ARM Cortex -A53 MPCore Processor TRM, 3.2.6 ARMv8 security model, "EL2 exists only in Non-secure state."
And then, is it Non-secure state certainly?
That's correct. EL2 is only supported in Non-secure state, therefore when in EL2 the core must be in Non-secure state.