aboutsummaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/boot/acpigen.c13
-rw-r--r--src/arch/x86/include/arch/acpigen.h1
2 files changed, 14 insertions, 0 deletions
diff --git a/src/arch/x86/boot/acpigen.c b/src/arch/x86/boot/acpigen.c
index 0eee78a141..f714d5985b 100644
--- a/src/arch/x86/boot/acpigen.c
+++ b/src/arch/x86/boot/acpigen.c
@@ -408,6 +408,19 @@ int acpigen_write_method(const char *name, int nargs)
return len;
}
+int acpigen_write_device(const char *name)
+{
+ int len;
+
+ /* method op */
+ len = acpigen_emit_byte(0x5b);
+ len += acpigen_emit_byte(0x82);
+ len += acpigen_write_len_f();
+ len += acpigen_emit_namestring(name);
+
+ return len;
+}
+
/*
* Generates a func with max supported P-states.
*/
diff --git a/src/arch/x86/include/arch/acpigen.h b/src/arch/x86/include/arch/acpigen.h
index babfb4014b..e07a0f5c22 100644
--- a/src/arch/x86/include/arch/acpigen.h
+++ b/src/arch/x86/include/arch/acpigen.h
@@ -44,6 +44,7 @@ int acpigen_write_name_qword(const char *name, uint64_t val);
int acpigen_write_name_byte(const char *name, uint8_t val);
int acpigen_write_scope(const char *name);
int acpigen_write_method(const char *name, int nargs);
+int acpigen_write_device(const char *name);
int acpigen_write_PPC(u8 nr);
int acpigen_write_PPC_NVS(void);
int acpigen_write_empty_PCT(void);