Pratik R. Sampat
3c14b73454
powerpc/pseries: Interface to represent PAPR firmware attributes
...
Adds a syscall interface to represent the energy and frequency related
PAPR attributes on the system using the new H_CALL
"H_GET_ENERGY_SCALE_INFO".
H_GET_EM_PARMS H_CALL was previously responsible for exporting this
information in the lparcfg, however the H_GET_EM_PARMS H_CALL
will be deprecated P10 onwards.
The H_GET_ENERGY_SCALE_INFO H_CALL is of the following call format:
hcall(
uint64 H_GET_ENERGY_SCALE_INFO, // Get energy scale info
uint64 flags, // Per the flag request
uint64 firstAttributeId,// The attribute id
uint64 bufferAddress, // Guest physical address of the output buffer
uint64 bufferSize // The size in bytes of the output buffer
);
As specified in PAPR+ v2.11, section 14.14.3.
This H_CALL can query either all the attributes at once with
firstAttributeId = 0, flags = 0 as well as query only one attribute
at a time with firstAttributeId = id, flags = 1.
The output buffer consists of the following
1. number of attributes - 8 bytes
2. array offset to the data location - 8 bytes
3. version info - 1 byte
4. A data array of size num attributes, which contains the following:
a. attribute ID - 8 bytes
b. attribute value in number - 8 bytes
c. attribute name in string - 64 bytes
d. attribute value in string - 64 bytes
The new H_CALL exports information in direct string value format, hence
a new interface has been introduced in
/sys/firmware/papr/energy_scale_info to export this information to
userspace so that the firmware can add new values without the need for
the kernel to be changed.
The H_CALL returns the name, numeric value and string value (if exists)
The format of exposing the sysfs information is as follows:
/sys/firmware/papr/energy_scale_info/
|-- <id>/
|-- desc
|-- value
|-- value_desc (if exists)
|-- <id>/
|-- desc
|-- value
|-- value_desc (if exists)
...
The energy information that is exported is useful for userspace tools
such as powerpc-utils. Currently these tools infer the
"power_mode_data" value in the lparcfg, which in turn is obtained from
the to be deprecated H_GET_EM_PARMS H_CALL.
On future platforms, such userspace utilities will have to look at the
data returned from the new H_CALL being populated in this new sysfs
interface and report this information directly without the need of
interpretation.
Signed-off-by: Pratik R. Sampat <psampat@linux.ibm.com >
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au >
Link: https://lore.kernel.org/r/20220217105321.52941-2-psampat@linux.ibm.com
2022-03-08 00:05:00 +11:00
..
2022-02-03 22:57:19 +11:00
2022-02-03 22:57:00 +11:00
2022-02-12 22:47:44 +11:00
2019-05-30 11:26:32 -07:00
2020-01-25 12:18:51 -05:00
2022-02-12 22:47:43 +11:00
2021-10-09 00:15:59 +11:00
2021-11-24 21:08:58 +11:00
2019-05-24 17:27:11 +02:00
2021-11-30 11:45:57 +11:00
2021-06-10 21:44:57 +10:00
2022-01-23 06:20:44 +02:00
2021-12-23 22:33:10 +11:00
2022-02-14 13:06:43 +11:00
2019-05-30 11:26:32 -07:00
2020-10-25 14:51:49 -07:00
2021-04-14 23:04:19 +10:00
2019-05-30 11:26:32 -07:00
2021-06-16 00:16:47 +10:00
2020-12-04 01:01:10 +11:00
2021-05-26 13:20:52 +02:00
2018-08-08 00:32:25 +10:00
2022-02-16 23:25:10 +11:00
2021-09-08 15:32:35 -07:00
2019-05-30 11:26:32 -07:00
2020-12-09 17:00:54 +11:00
2021-12-23 22:33:12 +11:00
2019-12-09 13:54:34 -06:00
2021-03-14 20:32:24 +11:00
2020-11-19 14:49:56 +11:00
2019-05-30 11:26:32 -07:00
2021-12-23 22:33:15 +11:00
2021-01-29 10:05:51 +05:30
2021-11-29 22:48:32 +11:00
2021-02-09 00:10:49 +11:00
2020-07-29 23:47:54 +10:00
2019-08-20 21:22:15 +10:00
2020-07-29 21:02:09 +10:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:35 -07:00
2021-03-01 12:33:31 +11:00
2019-05-30 11:26:35 -07:00
2021-02-09 00:02:12 +11:00
2020-10-08 21:17:15 +11:00
2020-08-11 14:13:24 -07:00
2019-06-05 17:30:28 +02:00
2020-09-11 09:14:43 +02:00
2020-04-01 14:30:50 +11:00
2021-08-10 23:14:55 +10:00
2018-07-30 22:48:17 +10:00
2020-07-10 12:00:01 +02:00
2019-05-30 11:26:35 -07:00
2021-12-23 22:33:10 +11:00
2022-02-16 23:25:10 +11:00
2019-08-30 09:40:15 +10:00
2019-06-05 17:37:07 +02:00
2022-02-03 21:35:56 +11:00
2021-12-23 22:36:55 +11:00
2021-06-10 22:12:12 +10:00
2021-08-15 13:49:24 +10:00
2021-12-23 22:33:10 +11:00
2019-09-14 00:04:45 +10:00
2021-01-20 15:58:19 +11:00
2022-03-08 00:05:00 +11:00
2022-01-24 17:29:05 +11:00
2022-01-04 16:00:59 +11:00
2019-05-24 17:36:45 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:35 -07:00
2021-04-07 10:56:52 +02:00
2019-05-30 11:26:32 -07:00
2022-02-16 23:09:47 +11:00
2021-03-26 23:19:43 +11:00
2020-07-29 23:47:53 +10:00
2021-12-23 22:35:12 +11:00
2021-01-24 10:34:53 -08:00
2019-05-24 17:39:01 +02:00
2022-02-12 22:47:44 +11:00
2022-03-08 00:05:00 +11:00
2021-03-24 14:09:30 +11:00
2019-05-30 11:26:35 -07:00
2019-01-14 20:39:27 +11:00
2021-12-09 22:41:21 +11:00
2022-01-16 20:50:20 +11:00
2021-03-24 14:09:29 +11:00
2021-12-23 22:33:12 +11:00
2020-08-25 01:31:33 +10:00
2020-04-30 12:35:26 +10:00
2020-07-16 13:12:46 +10:00
2021-12-23 22:36:58 +11:00
2022-03-01 23:41:00 +11:00
2019-05-30 11:26:32 -07:00
2019-08-27 13:03:34 +10:00
2022-03-01 23:51:08 +11:00
2021-12-23 22:33:15 +11:00
2021-12-23 22:33:12 +11:00
2018-03-13 15:50:37 +11:00
2021-12-09 22:41:19 +11:00
2021-06-15 23:35:57 +10:00
2021-04-25 21:29:04 +10:00
2021-04-14 23:04:16 +10:00
2020-07-29 23:47:53 +10:00
2021-12-23 22:33:10 +11:00
2021-03-24 14:09:30 +11:00
2018-10-20 13:26:47 +11:00
2021-09-30 21:24:06 -04:00
2021-12-09 22:41:19 +11:00
2021-11-24 21:09:02 +11:00
2019-06-05 17:30:28 +02:00
2022-01-25 16:39:41 +11:00
2021-02-10 14:31:08 +11:00
2020-07-28 12:34:52 +10:00
2021-11-24 21:08:59 +11:00
2019-06-19 17:09:55 +02:00
2020-07-29 21:02:09 +10:00
2019-06-05 17:30:28 +02:00
2021-12-23 22:33:10 +11:00
2022-02-02 20:30:26 +11:00
2020-12-04 01:01:22 +11:00
2022-02-02 20:30:26 +11:00
2022-02-07 21:03:11 +11:00
2019-11-24 15:06:33 -08:00
2020-07-10 12:00:01 +02:00
2019-05-30 11:26:39 -07:00
2022-03-08 00:05:00 +11:00
2019-05-30 11:26:32 -07:00
2022-03-08 00:05:00 +11:00
2021-10-04 11:47:24 +02:00
2021-08-10 23:14:55 +10:00
2020-08-24 14:12:54 +10:00
2019-04-08 12:09:27 +01:00
2021-12-23 22:33:11 +11:00
2021-12-09 22:40:24 +11:00
2021-06-29 10:53:55 -07:00
2020-06-05 12:39:30 -07:00
2020-09-25 00:36:41 +09:00
2019-05-24 17:27:12 +02:00
2018-05-25 12:04:42 +10:00
2019-05-24 17:27:12 +02:00
2019-06-05 17:37:18 +02:00
2019-06-05 17:37:17 +02:00
2019-05-30 11:26:32 -07:00
2021-12-23 22:33:12 +11:00
2019-06-05 17:37:17 +02:00
2022-02-12 22:47:44 +11:00
2019-05-30 11:26:32 -07:00
2021-11-25 11:25:30 +11:00
2021-12-23 22:33:15 +11:00
2022-03-08 00:05:00 +11:00
2020-12-09 23:48:14 +11:00
2020-04-10 15:36:21 -07:00
2020-07-27 00:01:30 +10:00
2021-10-09 00:15:59 +11:00
2019-06-05 17:37:06 +02:00
2021-08-10 23:14:57 +10:00
2021-12-23 22:33:10 +11:00
2020-08-04 23:15:59 +10:00
2019-05-30 11:26:32 -07:00
2021-12-23 22:33:11 +11:00
2021-02-09 01:09:44 +11:00
2021-07-01 11:06:03 -07:00
2019-05-03 01:20:23 +10:00
2021-10-22 15:22:06 +11:00
2021-07-02 12:54:34 -07:00
2021-02-09 01:09:44 +11:00
2021-05-12 11:07:38 +10:00
2022-02-07 21:02:20 +11:00
2019-05-30 11:26:32 -07:00
2018-05-25 12:04:41 +10:00
2021-08-25 16:37:18 +10:00
2019-05-30 11:26:32 -07:00
2020-12-04 01:01:30 +11:00
2021-08-10 23:15:01 +10:00
2019-07-13 16:08:36 -07:00
2019-05-24 17:27:12 +02:00
2022-02-23 14:49:27 +11:00
2022-03-08 00:04:55 +11:00
2021-10-12 17:50:12 -05:00
2021-06-25 00:06:55 +10:00
2021-12-09 22:41:19 +11:00
2021-08-13 22:04:27 +10:00
2021-06-10 21:44:58 +10:00
2019-05-30 11:26:39 -07:00
2019-06-05 17:37:07 +02:00
2019-07-13 16:08:36 -07:00
2021-05-28 22:54:27 +10:00
2021-12-09 22:41:19 +11:00
2020-07-27 00:01:29 +10:00
2021-05-26 13:20:52 +02:00
2020-01-23 21:31:14 +11:00
2019-05-30 11:26:32 -07:00
2021-02-11 23:35:12 +11:00
2018-07-30 22:48:17 +10:00
2021-12-09 22:41:21 +11:00
2018-05-25 12:04:43 +10:00
2019-05-30 11:26:32 -07:00
2020-12-08 21:41:02 +11:00
2022-02-12 22:47:44 +11:00
2020-11-20 11:16:35 -08:00
2022-02-16 23:25:11 +11:00
2019-11-12 12:25:49 +11:00
2021-10-07 19:52:58 +11:00
2019-11-13 00:33:22 +11:00
2019-05-30 11:26:32 -07:00
2022-02-12 22:47:42 +11:00
2020-04-01 14:30:51 +11:00
2021-12-23 22:35:24 +11:00
2018-12-04 19:45:01 +11:00
2020-04-01 13:42:13 +11:00
2021-12-07 15:14:12 +01:00
2021-10-30 16:37:28 +02:00
2020-05-26 22:22:21 +10:00
2021-09-30 16:13:11 +02:00
2021-12-23 22:33:14 +11:00
2020-11-22 10:48:22 -08:00
2021-12-07 15:14:12 +01:00
2021-03-26 23:19:43 +11:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:39 -07:00
2021-01-29 10:05:51 +05:30
2021-12-09 22:41:21 +11:00
2018-10-03 15:40:03 +10:00
2018-08-08 00:32:30 +10:00
2021-10-22 15:22:05 +11:00
2020-10-06 11:18:04 +02:00
2020-09-14 23:07:14 +10:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2021-11-24 21:09:01 +11:00
2020-10-06 23:22:23 +11:00
2022-01-15 12:21:26 +11:00
2021-08-23 19:28:21 +10:00
2019-02-23 22:31:39 +11:00
2022-01-04 23:12:27 +11:00
2021-08-27 00:56:54 +10:00
2019-05-30 11:26:32 -07:00
2022-02-07 21:03:10 +11:00
2021-11-24 21:08:57 +11:00
2020-12-04 01:01:10 +11:00
2021-07-08 11:48:23 -07:00
2018-07-30 22:48:21 +10:00
2018-05-24 16:04:02 +10:00
2021-08-27 00:56:54 +10:00
2019-06-19 17:09:55 +02:00
2019-05-01 16:45:05 +10:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:32 -07:00
2022-03-08 00:04:57 +11:00
2022-03-01 23:51:08 +11:00
2021-12-23 22:33:14 +11:00
2019-05-30 11:26:32 -07:00
2019-11-28 17:02:31 +11:00
2019-11-28 17:02:31 +11:00
2021-08-23 19:28:20 +10:00
2021-12-09 22:41:21 +11:00
2018-10-19 15:09:04 +11:00
2022-03-08 00:04:56 +11:00
2021-04-14 23:04:44 +10:00
2020-12-04 01:01:19 +11:00
2020-04-23 10:50:26 +09:00
2021-04-20 14:22:24 +10:00
2021-04-30 11:20:40 -07:00
2021-12-23 22:33:12 +11:00
2021-08-10 23:15:02 +10:00
2021-08-10 23:15:02 +10:00
2021-12-23 22:33:12 +11:00
2018-05-25 12:04:38 +10:00
2019-05-30 11:26:35 -07:00