diff options
Diffstat (limited to 'src/arch/x86')
-rw-r--r-- | src/arch/x86/boot/acpigen.c | 26 | ||||
-rw-r--r-- | src/arch/x86/include/arch/acpigen.h | 1 |
2 files changed, 27 insertions, 0 deletions
diff --git a/src/arch/x86/boot/acpigen.c b/src/arch/x86/boot/acpigen.c index 71aa10cd17..47845a01a6 100644 --- a/src/arch/x86/boot/acpigen.c +++ b/src/arch/x86/boot/acpigen.c @@ -396,6 +396,32 @@ int acpigen_write_PPC(u8 nr) return len; } +/* generates a func with max supported P states */ +int acpigen_write_PPC_NVS(void) +{ +/* + Method (_PPC, 0, NotSerialized) + { + Return (PPCM) + } +*/ + int len; + /* method op */ + acpigen_emit_byte(0x14); + len = acpigen_write_len_f(); + len += acpigen_emit_namestring("_PPC"); + /* no fnarg */ + acpigen_emit_byte(0x00); + /* return */ + acpigen_emit_byte(0xa4); + /* arg */ + len += acpigen_emit_namestring("PPCM"); + /* add all single bytes */ + len += 3; + acpigen_patch_len(len - 1); + return len; +} + int acpigen_write_TPC(const char *gnvs_tpc_limit) { /* diff --git a/src/arch/x86/include/arch/acpigen.h b/src/arch/x86/include/arch/acpigen.h index aebf508b5e..5297aff013 100644 --- a/src/arch/x86/include/arch/acpigen.h +++ b/src/arch/x86/include/arch/acpigen.h @@ -42,6 +42,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_PPC(u8 nr); +int acpigen_write_PPC_NVS(void); int acpigen_write_empty_PCT(void); int acpigen_write_empty_PTC(void); int acpigen_write_TPC(const char *gnvs_tpc_limit); |