Varshit B Pandya has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/63697 )
Change subject: drivers/intel/dptf: Add support for PROP method ......................................................................
drivers/intel/dptf: Add support for PROP method
Add PROP method under _SB.DPTF.TPWR scope which will return static worst case rest of platform power in miliWatts.
This value is static, which has to configured from devicetree of overridetree for each platform
BUG=b:205928013 TEST=Build, boot brya0 and dump SSDT to check PROP method
Scope (_SB.DPTF.TPWR) { Method (PROP, 0, Serialized) { Return (XXXX) } }
Signed-off-by: Varshit B Pandya varshit.b.pandya@intel.com Change-Id: I1415d2a9eb55cfadc3a7b41b53ecbec657002759 --- M src/drivers/intel/dptf/chip.h M src/drivers/intel/dptf/dptf.c 2 files changed, 17 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/97/63697/1
diff --git a/src/drivers/intel/dptf/chip.h b/src/drivers/intel/dptf/chip.h index 59b1e25..060f196 100644 --- a/src/drivers/intel/dptf/chip.h +++ b/src/drivers/intel/dptf/chip.h @@ -59,6 +59,9 @@ struct { uint32_t oem_variables[DPTF_OEM_VARIABLE_COUNT]; } oem_data; + + /* Rest of platform Power */ + uint32_t prop; };
#endif /* _DRIVERS_INTEL_DPTF_CHIP_H_ */ diff --git a/src/drivers/intel/dptf/dptf.c b/src/drivers/intel/dptf/dptf.c index 27c7133..f7980ef 100644 --- a/src/drivers/intel/dptf/dptf.c +++ b/src/drivers/intel/dptf/dptf.c @@ -508,6 +508,19 @@ } }
+static void write_prop(const struct drivers_intel_dptf_config *config) +{ + /* Rest of Platform Power */ + dptf_write_scope(DPTF_POWER); + acpigen_write_method_serialized("PROP", 0); + + acpigen_emit_byte(RETURN_OP); + acpigen_write_integer(config->prop); + + acpigen_pop_len(); /* Method PROP */ + acpigen_pop_len(); /* DPTF_POWER scope */ +} + /* Add custom tables and methods to SSDT */ static void dptf_fill_ssdt(const struct device *dev) { @@ -517,6 +530,7 @@ write_policies(config); write_controls(config); write_options(config); + write_prop(config);
printk(BIOS_INFO, DPTF_DEVICE_PATH ": %s at %s\n", dev->chip_ops->name, dev_path(dev)); }