From 7323efd73c2faf192160149dd13a96762a1975b0 Mon Sep 17 00:00:00 2001 From: Brian Inglis Date: Tue, 29 Jun 2021 11:09:24 -0600 Subject: [PATCH] format_proc_cpuinfo: add Linux 5.13 AMD/Hygon rapl Linux 5.13 Opossums on Parade added features and changes: add AMD 0x80000007 EDX:14 rapl runtime average power limit --- winsup/cygwin/fhandler_proc.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index eb4efb07d..66d19ab82 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -1165,6 +1165,14 @@ format_proc_cpuinfo (void *, char *&destbuf) ftcprint (features1, 0, "aperfmperf"); /* P state hw coord fb */ } + /* cpuid 0x80000007 edx Advanced power management */ + if (maxe >= 0x80000007) + { + cpuid (&unused, &unused, &unused, &features2, 0x80000007); + + ftcprint (features2, 14, "rapl"); /* runtime avg power limit */ + } + /* Penwell, Cloverview, ... TSC doesn't sleep on S3 */ if (is_intel && family == 6) switch (model)