audk/ArmPkg
Minh Nguyen 11b5093ce4 ArmPkg: Correct return value of "SMCCC_ARCH_SOC_ID" Function ID call
According to "SMC Calling Convention" specification, section 7.4,
return value of Arm Architecture Calls is stored at first argument of
SMC aguments (ARM_SMC_ARGS). This value can be negative values indicating
error or positive values (including zero) indicating success. Positive
value would contain information of respective Function ID (Section 7.3.4
and 7.4.4).

For that reason, "SMCCC_VERSION" and "SMCCC_ARCH_FEATURES"
Function ID calls read return value from "SmcCallStatus" variable
(Args.Arg0 - first argument of SMC call). But "SMCCC_ARCH_SOC_ID"
Function ID call is reading return value from "SmcParam" variable
(Args.Arg1 - second argument of SMC call) so it leads to unexpected
results of "Jep106Code" and "SocRevision". This patch is to correct it.

Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
Reviewed-by: Rebecca Cran <rebecca@quicinc.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Leif Lindholm <quic_llindhol@quicinc.com>
2022-09-23 14:39:10 +00:00
..
Drivers ArmPkg: Remove duplicated words 2022-09-05 13:52:51 +00:00
Filesystem/SemihostFs ArmPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Include ArmPkg/ProcessorSubClassDxe: Get processor version from OemMiscLib 2022-09-23 14:39:10 +00:00
Library ArmPkg: Remove duplicated words 2022-09-05 13:52:51 +00:00
Universal/Smbios ArmPkg: Correct return value of "SMCCC_ARCH_SOC_ID" Function ID call 2022-09-23 14:39:10 +00:00
ArmPkg.ci.yaml ArmPkg, ArmVirtPkg: put SpellCheck in AuditOnly mode 2022-09-10 08:23:27 +00:00
ArmPkg.dec ArmPkg: Implement PlatformBootManagerLib for LinuxBoot 2021-10-23 08:38:20 +00:00
ArmPkg.dsc ArmPkg: Implement PlatformBootManagerLib for LinuxBoot 2021-10-23 08:38:20 +00:00