Hello. I am new in board based on Mediatek chips. And my question goes more lower then BPi board itself. I want to get access (read values from eFuses).
At first I have access to SMC using the command:
arm_smccc_smc(fid, a1, a2, a3, a4, 0, 0, 0, &smc_res);
I can successfully get SMCCC version (I have v1.4 from return value):
SMC: FID: 80000000
SMC: A1: 0
SMC: A2: 0
SMC: A3: 0
SMC: A4: 0
R0: 10004
R1: 0
R2: 0
R3: 0
Then I try read eFuse length of efuse field (using SIP service commands) and I have the next (R0 = 3)
SMC: FID: c2000501
SMC: A1: d
SMC: A2: 0
SMC: A3: 0
SMC: A4: 0
R0: 3
R1: 0
R2: 0
R3: 0
Docs says that “Zero and positive values denote success, and negative values indicate error.”
I have positive (=3) but I am misunderstanding what it means. I expected R0=0
and R1=length size
But I don’t have…
QUESTION: What 3 returned code means? How to interpret this SMC return.? How could I get the valid answer with SUCCESS (should be 0)?? Thanks.