summaryrefslogtreecommitdiff
path: root/src/arch/x86/include
diff options
context:
space:
mode:
authorNaresh G Solanki <naresh.solanki@intel.com>2016-11-15 10:13:15 +0530
committerMartin Roth <martinroth@google.com>2016-11-24 05:01:37 +0100
commitab77cd4785ce24715c33fd4ec8562cad3ea5bffc (patch)
tree612d8d3ffb2325cdea0d1a2bb9bc8613713220dd /src/arch/x86/include
parentc36fa6433e04f9a6fcb51921de743625e5068ce7 (diff)
arch/x86/acpigen: Write DSM method with multiple UUID's
Enable generic way of writing DSM method which can write acpi table for multiple UUID's. Change-Id: Ic1fbdc0647e8fdc50ffa407887feb19a63cb48e4 Signed-off-by: Naresh G Solanki <naresh.solanki@intel.com> Reviewed-on: https://review.coreboot.org/17424 Tested-by: build bot (Jenkins) Reviewed-by: Subrata Banik <subrata.banik@intel.com> Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/arch/x86/include')
-rw-r--r--src/arch/x86/include/arch/acpigen.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/arch/x86/include/arch/acpigen.h b/src/arch/x86/include/arch/acpigen.h
index dcd8fb7a64..f76d85e9bc 100644
--- a/src/arch/x86/include/arch/acpigen.h
+++ b/src/arch/x86/include/arch/acpigen.h
@@ -144,6 +144,20 @@ struct opregion {
unsigned long regionlen;
};
+#define DSM_UUID(DSM_UUID, DSM_CALLBACKS, DSM_COUNT, DSM_ARG) \
+ { .uuid = DSM_UUID, \
+ .callbacks = DSM_CALLBACKS, \
+ .count = DSM_COUNT, \
+ .arg = DSM_ARG, \
+ }
+
+struct dsm_uuid {
+ const char *uuid;
+ void (**callbacks)(void *);
+ size_t count;
+ void *arg;
+};
+
void acpigen_write_return_integer(uint64_t arg);
void acpigen_write_return_string(const char *arg);
void acpigen_write_len_f(void);
@@ -235,8 +249,9 @@ void acpigen_write_return_byte(uint8_t arg);
* argument to pass into the callbacks. Callbacks should ensure that Local0 and
* Local1 are left untouched. Use of Local2-Local7 is permitted in callbacks.
*/
-void acpigen_write_dsm(const char *uuid, void (*callbacks[])(void *),
+void acpigen_write_dsm(const char *uuid, void (**callbacks)(void *),
size_t count, void *arg);
+void acpigen_write_dsm_uuid_arr(struct dsm_uuid *ids, size_t count);
/*
* Generate ACPI AML code for OperationRegion
* This function takes input region name, region space, region offset & region