From: Naveen Krishna Chatradhi <nchatrad@amd.com>
To: linux-hwmon@vger.kernel.org
Cc: naveenkrishna.ch@gmail.com,
Naveen Krishna Chatradhi <nchatrad@amd.com>,
Guenter Roeck <linux@roeck-us.net>
Subject: [PATCH 2/2] hwmon: (amd_energy) Add documentation
Date: Thu, 9 Apr 2020 21:09:39 +0530 [thread overview]
Message-ID: <20200409153939.38730-2-nchatrad@amd.com> (raw)
In-Reply-To: <20200409153939.38730-1-nchatrad@amd.com>
Document amd_energy driver with all chips supported by it.
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Naveen Krishna Chatradhi <nchatrad@amd.com>
---
Documentation/hwmon/amd_energy.rst | 78 ++++++++++++++++++++++++++++++++++++++
Documentation/hwmon/index.rst | 1 +
2 files changed, 79 insertions(+)
create mode 100644 Documentation/hwmon/amd_energy.rst
diff --git a/Documentation/hwmon/amd_energy.rst b/Documentation/hwmon/amd_energy.rst
new file mode 100644
index 000000000000..516694d3c1e0
--- /dev/null
+++ b/Documentation/hwmon/amd_energy.rst
@@ -0,0 +1,78 @@
+Kernel driver amd_energy
+==========================
+
+Supported chips:
+
+* AMD Family 17h Processors
+
+ Prefix: 'amd_energy'
+
+ Addresses used: RAPL MSRs
+
+ Datasheets:
+
+ - Processor Programming Reference (PPR) for
+ AMD Family 17h Model 01h, Revision B1 Processors
+ - Preliminary Processor Programming Reference (PPR) for
+ AMD Family 17h Model 31h, Revision B0 Processors
+
+Author: Naveen Krishna Chatradhi <nchatrad@amd.com>
+
+Description
+-----------
+
+The Energy driver exposes the energy counters that are
+reported via the Running Average Power Limit (RAPL)
+Model-specific Registers (MSRs) via the hardware monitor
+(HWMON) sysfs interface.
+
+1. Power, Energy and Time Units
+ * MSR_RAPL_POWER_UNIT/ C001_0299:
+ -> 32-bit(RO), Configured in BIOS
+ -> shared with all cores in the socket
+
+ * A sysfs entry "energy_units" is created to show the
+ [ESU] energy units in joules
+
+2. Energy consumed by each Core
+ * MSR_CORE_ENERGY_STATUS/ C001_029A:
+ -> 32-bitRO, Accumulator, core-level power reporting
+
+ * A sysfs entry "core_energy%d_input" for each core is
+ created to show the core energy counter value.
+
+3. Energy consumed by Socket
+ * MSR_PACKAGE_ENERGY_STATUS/ C001_029B:
+ -> 32-bitRO, Accumulator, socket-level power reporting,
+ -> shared with all cores in socket
+
+ * A sysfs entry "socket_energy%d_input" for each socket
+ is created to show the socket energy counter value.
+
+Energy Caluclation:
+
+Energy information (in Joules) is based on the multiplier,
+1/2^ESU; where ESU is an unsigned integer read from
+MSR_RAPL_POWER_UNIT register. Default value is 10000b,
+indicating energy status unit is 15.3 micro-Joules increment.
+
+These registers are updated every 1ms and cleared on
+reset of the system.
+
+Users calculate power for a given domain by calculating
+ dEnergy/dTime for that domain.
+
+Sysfs attributes
+----------------
+
+======================= =================================
+
+core_energy[N]_input Measured input core energy
+ [one sysfs entry for each core]
+
+socket_energy[N]_input Measured input socket energy
+ [one sysfs entry for each socket]
+
+energy_units ESU Energy Status Units.
+
+======================= ==================================
diff --git a/Documentation/hwmon/index.rst b/Documentation/hwmon/index.rst
index 8ef62fd39787..fc4b89810e67 100644
--- a/Documentation/hwmon/index.rst
+++ b/Documentation/hwmon/index.rst
@@ -39,6 +39,7 @@ Hardware Monitoring Kernel Drivers
adt7470
adt7475
amc6821
+ amd_energy
asb100
asc7621
aspeed-pwm-tacho
--
2.16.4
next prev parent reply other threads:[~2020-04-09 15:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-09 15:39 [PATCH 1/2] hwmon: Add amd_energy driver to report energy counters Naveen Krishna Chatradhi
2020-04-09 15:39 ` Naveen Krishna Chatradhi [this message]
2020-04-10 15:57 ` Guenter Roeck
2020-04-11 4:49 ` Naveen Krishna Ch
2020-04-11 5:16 ` Guenter Roeck
2020-04-11 5:43 ` Naveen Krishna Ch
2020-04-11 12:26 ` Naveen Krishna Ch
2020-04-11 15:48 ` Guenter Roeck
2020-04-11 17:07 ` Naveen Krishna Ch
2020-04-12 20:04 ` Naveen Krishna Ch
2020-04-12 22:27 ` Guenter Roeck
2020-04-20 10:51 ` Naveen Krishna Ch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200409153939.38730-2-nchatrad@amd.com \
--to=nchatrad@amd.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=naveenkrishna.ch@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.