arm64: Support 6 arguments for SMC

According to the ARM SMC Calling Convention (ARM DEN 0028A):
SMC64: A 64-bit interface which can be used only by 64-bit
client code and which passes up to six 64-bit arguments.
And arguments are passed in registers X0-X6.

BUG=b:249552664
TEST=Test with the cros_widevine SMC
BRANCH=None

Change-Id: If87c22052065736f195bd6af1a430dd6d6aef01e
Signed-off-by: Yi Chou <yich@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/depthcharge/+/4333402
Reviewed-by: Julius Werner <jwerner@chromium.org>
diff --git a/src/arch/arm/smc.S b/src/arch/arm/smc.S
index 4d7b5fb..f48216b 100644
--- a/src/arch/arm/smc.S
+++ b/src/arch/arm/smc.S
@@ -18,6 +18,6 @@
 	.global smc
 	.type smc, function
 smc:
-	/* X0-X3 passed through as call parameters. X0 is always Function ID. */
+	/* X0-X6 passed through as call parameters. X0 is always Function ID. */
 	smc	#0
 	ret			/* X0 passed through as return value */
diff --git a/src/arch/arm/smc.h b/src/arch/arm/smc.h
index 1b8e8d6..90373a3 100644
--- a/src/arch/arm/smc.h
+++ b/src/arch/arm/smc.h
@@ -27,6 +27,7 @@
 };
 
 // Conforms to ARM SMC Calling Convention (ARM DEN 0028A).
-uint64_t smc(uint64_t function_id, uint64_t arg1, uint64_t arg2, uint64_t arg3);
+uint64_t smc(uint64_t function_id, uint64_t arg1, uint64_t arg2, uint64_t arg3,
+	     uint64_t arg4, uint64_t arg5, uint64_t arg6);
 
 #endif /* __ARCH_ARM_SMC_H__ */
diff --git a/src/drivers/power/psci.c b/src/drivers/power/psci.c
index 9aaf7e5..33f04cf 100644
--- a/src/drivers/power/psci.c
+++ b/src/drivers/power/psci.c
@@ -22,13 +22,13 @@
 
 static int psci_reset(PowerOps *me)
 {
-	smc(PSCI_SYSTEM_RESET, 0, 0, 0);
+	smc(PSCI_SYSTEM_RESET, 0, 0, 0, 0, 0, 0);
 	halt();
 }
 
 static int psci_off(PowerOps *me)
 {
-	smc(PSCI_SYSTEM_OFF, 0, 0, 0);
+	smc(PSCI_SYSTEM_OFF, 0, 0, 0, 0, 0, 0);
 	halt();
 }