From 052889b8e96d24625043cd5901ab91dd38aca49f Mon Sep 17 00:00:00 2001 From: Xiao Guangrong Date: Tue, 7 Jun 2016 20:22:00 +0800 Subject: acpi: add aml_call5 It will be used by NVDIMM ACPI Signed-off-by: Xiao Guangrong Reviewed-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/acpi/aml-build.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'hw/acpi/aml-build.c') diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index c71fd16136..db3e914fb4 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -660,6 +660,20 @@ Aml *aml_call4(const char *method, Aml *arg1, Aml *arg2, Aml *arg3, Aml *arg4) return var; } +/* helper to call method with 5 arguments */ +Aml *aml_call5(const char *method, Aml *arg1, Aml *arg2, Aml *arg3, Aml *arg4, + Aml *arg5) +{ + Aml *var = aml_alloc(); + build_append_namestring(var->buf, "%s", method); + aml_append(var, arg1); + aml_append(var, arg2); + aml_append(var, arg3); + aml_append(var, arg4); + aml_append(var, arg5); + return var; +} + /* * ACPI 5.0: 6.4.3.8.1 GPIO Connection Descriptor * Type 1, Large Item Name 0xC -- cgit v1.2.3