From 7c28da08e1546dd3b2dc7d97a5d04b82f47b2767 Mon Sep 17 00:00:00 2001 From: Rahul Pathak Date: Mon, 21 Oct 2024 11:01:22 +0530 Subject: [PATCH 01/11] rpmi/intro: Reorganize rpmi service group definition text Signed-off-by: Rahul Pathak --- src/intro.adoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/intro.adoc b/src/intro.adoc index b3fb1a2..67e6ea7 100644 --- a/src/intro.adoc +++ b/src/intro.adoc @@ -44,10 +44,10 @@ only by that RISC-V privilege level. types of RPMI messages and the format for each RPMI message type. *RPMI Service Groups*: The services provided by the platform microcontrollers -to the application processors are grouped based functionality into RPMI service -groups. Each RPMI service group specifies the RISC-V privilege levels from which -the application processor can be access it. Platform vendors can implement -custom RPMI service groups. +to the application processors are grouped into RPMI service groups based on +functionality. Each RPMI service group specifies the RISC-V privilege levels +from which the application processor can access it. Platform vendors can +implement custom RPMI service groups. *RPMI Client*: An RPMI client is a software or a driver running on the application processor which is capable of sending and receiving RPMI messages. From 8a94401c3cb04ad1c2ed0377e0d249bd9849ff90 Mon Sep 17 00:00:00 2001 From: Rahul Pathak Date: Tue, 29 Oct 2024 08:11:30 +0530 Subject: [PATCH 02/11] rpmi/terms: Correct the APEI acronym Signed-off-by: Rahul Pathak --- src/terms.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/terms.adoc b/src/terms.adoc index 84c7246..14fb92c 100644 --- a/src/terms.adoc +++ b/src/terms.adoc @@ -6,7 +6,7 @@ | A2P | Application Processor to Platform Microcontroller | ACPI | Advanced Configuration and Power Interface Specification -| AEPI | ACPI Platform Error Interfaces +| APEI | ACPI Platform Error Interfaces | AP | Application Processor | CPPC | Collaborative Processor Performance Control | GHES | Generic Hardware Error Source From 64f2f62caa81a6c3e4529c2be7a47a507e169b11 Mon Sep 17 00:00:00 2001 From: Rahul Pathak Date: Tue, 29 Oct 2024 08:15:00 +0530 Subject: [PATCH 03/11] rpmi/messageprotocol: Make meaning of RPMI_ERR_BAD_RANGE generic RPMI_ERR_BAD_RANGE is meant for bad or invalid ranges of either index or offsets or addresses or just any plain number. Remove index word from the definition and make it generic Signed-off-by: Rahul Pathak --- src/message-protocol.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/message-protocol.adoc b/src/message-protocol.adoc index 3c579e8..4224168 100644 --- a/src/message-protocol.adoc +++ b/src/message-protocol.adoc @@ -330,7 +330,7 @@ specification or the extension version mismatch. | RPMI_ERR_BAD_RANGE | -11 -| Index out of range. +| Bad or invalid range. | RPMI_ERR_TIMEOUT | -12 From 71728adf8383d95d57b4525d4a2a3d6d1a12777b Mon Sep 17 00:00:00 2001 From: Rahul Pathak Date: Tue, 29 Oct 2024 08:18:10 +0530 Subject: [PATCH 04/11] rpmi/base: Correct the base service name in table The base service BASE_GET_HW_INFO was changed to BASE_GET_PLATFORM_INFO but table still mentioned the old name. Correct the right name in the service table in base service group Signed-off-by: Rahul Pathak --- src/srvgrp-base.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/srvgrp-base.adoc b/src/srvgrp-base.adoc index a283b86..c35658a 100644 --- a/src/srvgrp-base.adoc +++ b/src/srvgrp-base.adoc @@ -48,7 +48,7 @@ The following table lists the services in the BASE service group: | NORMAL_REQUEST | 0x05 -| BASE_GET_HW_INFO +| BASE_GET_PLATFORM_INFO | NORMAL_REQUEST | 0x06 From 444d8fa6ee46b08c6d15e29bcf1520b54749b1e8 Mon Sep 17 00:00:00 2001 From: Rahul Pathak Date: Tue, 29 Oct 2024 09:24:09 +0530 Subject: [PATCH 05/11] rpmi/clock: Mention about incorrect flags in error table for set rate Signed-off-by: Rahul Pathak --- src/srvgrp-clock.adoc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/srvgrp-clock.adoc b/src/srvgrp-clock.adoc index dffdfa5..db731af 100644 --- a/src/srvgrp-clock.adoc +++ b/src/srvgrp-clock.adoc @@ -585,7 +585,8 @@ This service is used to set the clock rate of a specific clock. 0b01: Round up 0b10: Auto 0b11: Reserved -Platform autonomously choose rate closest to the requested rate. + +In Auto mode the platform can autonomously chooses a supported rate closest to the requested rate. ---- ! [29:0] ! _Reserved_ and must be `0`. @@ -625,7 +626,7 @@ Platform autonomously choose rate closest to the requested rate. ! Service completed successfully. ! RPMI_ERR_INVALID_PARAM -! `CLOCK_ID` or clock rate is invalid. +! `CLOCK_ID` or clock rate is invalid or the flags passed are invalid or reserved. !=== - Other errors <> From 81fbafb02cb6a7fd4938cb1606102573a94cc024 Mon Sep 17 00:00:00 2001 From: Rahul Pathak Date: Wed, 6 Nov 2024 11:55:50 +0530 Subject: [PATCH 06/11] rpmi/sysreset: Remove RESET_TYPE invalid error from SYSRST_GET_ATTRIBUTES SYSRST_GET_ATTRIBUTES has flag which can encode if the provided RESET_TYPE is supported, not supported or invalid. Remove the RESET_TYPE invalid error from the status Signed-off-by: Rahul Pathak --- src/srvgrp-system-reset.adoc | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/srvgrp-system-reset.adoc b/src/srvgrp-system-reset.adoc index e4e817e..12264bc 100644 --- a/src/srvgrp-system-reset.adoc +++ b/src/srvgrp-system-reset.adoc @@ -156,9 +156,6 @@ default. System Warm Reset support can be discovered with this service. ! RPMI_SUCCESS ! Attributes returned successfully. -! RPMI_ERR_INVALID_PARAM -! `RESET_TYPE` is invalid. - !=== - Other errors <> From 84d58ce4a56ae975f2ae8fde3b8da3c05d4347e0 Mon Sep 17 00:00:00 2001 From: Rahul Pathak Date: Wed, 6 Nov 2024 12:02:00 +0530 Subject: [PATCH 07/11] rpmi/syssuspend: Remove SUSPEND_TYPE invalid error from SYSSUSP_GET_ATTRIBUTES SYSSUSP_GET_ATTRIBUTES as flag which can encode if the provided SUSPEND_TYPE is supported, not supported or invalid. Remove the SUSPEND_TYPE invalid error from the status Signed-off-by: Rahul Pathak --- src/srvgrp-system-suspend.adoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/srvgrp-system-suspend.adoc b/src/srvgrp-system-suspend.adoc index b01b57b..a89e3b2 100644 --- a/src/srvgrp-system-suspend.adoc +++ b/src/srvgrp-system-suspend.adoc @@ -148,9 +148,6 @@ a resume address. ! RPMI_SUCCESS ! Attributes returned successfully. - -! RPMI_ERR_INVALID_PARAM -! `SUSPEND_TYPE` is invalid. !=== - Other errors <> @@ -256,7 +253,10 @@ such as the `WFI` instruction. ! Service completed successfully. Suspend request has been accepted. ! RPMI_ERR_INVALID_PARAM -! `SUSPEND_TYPE` is invalid. +! `HART_ID` or `SUSPEND_TYPE` is invalid. + +! RPMI_ERR_INVALID_ADDR +! Resume address is invalid. !=== - Other errors <> |=== From 56b24ccbefafcf54b6a6dda57169b4c26843af7b Mon Sep 17 00:00:00 2001 From: Rahul Pathak Date: Wed, 6 Nov 2024 12:32:41 +0530 Subject: [PATCH 08/11] rpmi/sysreset: Add error codes for SYSRST_RESET SYSRST_RESET service can return if the service does not complete successfully. Add the possible error codes Signed-off-by: Rahul Pathak --- src/srvgrp-system-reset.adoc | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/src/srvgrp-system-reset.adoc b/src/srvgrp-system-reset.adoc index 12264bc..998f7de 100644 --- a/src/srvgrp-system-reset.adoc +++ b/src/srvgrp-system-reset.adoc @@ -184,8 +184,8 @@ default. System Warm Reset support can be discovered with this service. This service is used to initiate the system reset or system shutdown. The application processor must only request supported reset types, discovered using the `SYSRST_GET_ATTRIBUTES` service except for System Shutdown and System -Cold Reset which are supported by default. Requesting an unsupported or -invalid reset type may result in the system entering a non-functional state. +Cold Reset which are supported by default. This service does not return response +message in case of successful reset. [#table_sysreset_sysreset_request_data] .Request Data @@ -205,7 +205,25 @@ invalid reset type may result in the system entering a non-functional state. [#table_sysreset_sysreset_response_data] .Response Data -[cols="1", width=100%, align="center", options="header"] -|=== -| NA +[cols="1, 2, 1, 7a", width=100%, align="center", options="header"] |=== +| Word +| Name +| Type +| Description + +| 0 +| STATUS +| int32 +| Return error code + +[cols="5,5a", options="header"] +!=== +! Error Code +! Description + +! RPMI_ERR_INVALID_PARAM +! `RESET_TYPE` is not supported or invalid. +!=== +- Other errors <> +|=== \ No newline at end of file From f457f3bf859141a88d54a87dfcdf3744fae0916c Mon Sep 17 00:00:00 2001 From: Rahul Pathak Date: Thu, 7 Nov 2024 09:35:02 +0530 Subject: [PATCH 09/11] rpmi: Return RPMI_ERR_INVALID_PARAM for invalid index as input Currently in some service groups the error code for an invalid index in an array provided as an input in the request message is RPMI_ERR_BAD_RANGE. But input is not provided as a range but a index and RPMI_ERR_INVALID_PARAM is more appropriate error code Signed-off-by: Rahul Pathak --- src/srvgrp-clock.adoc | 4 ++-- src/srvgrp-cppc.adoc | 4 ++-- src/srvgrp-hart-state-management.adoc | 8 ++++---- src/srvgrp-voltage.adoc | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/srvgrp-clock.adoc b/src/srvgrp-clock.adoc index db731af..e7018ba 100644 --- a/src/srvgrp-clock.adoc +++ b/src/srvgrp-clock.adoc @@ -395,8 +395,8 @@ to get all the clock rates. In case the `CLOCK_FORMAT` is a linear range the ! RPMI_ERR_INVALID_PARAM ! `CLOCK_ID` is invalid. -! RPMI_ERR_BAD_RANGE -! `CLOCK_RATE_INDEX` is not in valid range. +! RPMI_ERR_INVALID_PARAM +! `CLOCK_RATE_INDEX` is invalid. !=== - Other errors <> diff --git a/src/srvgrp-cppc.adoc b/src/srvgrp-cppc.adoc index cf06534..ce4c543 100644 --- a/src/srvgrp-cppc.adoc +++ b/src/srvgrp-cppc.adoc @@ -693,8 +693,8 @@ may need to call this service again with the appropriate `START_INDEX` until the ! RPMI_SUCCESS ! Service completed successfully. -! RPMI_ERR_BAD_RANGE -! `START_INDEX` is not in valid range. +! RPMI_ERR_INVALID_PARAM +! `START_INDEX` is invalid. !=== - Other errors <> diff --git a/src/srvgrp-hart-state-management.adoc b/src/srvgrp-hart-state-management.adoc index ec8ab70..636dc1c 100644 --- a/src/srvgrp-hart-state-management.adoc +++ b/src/srvgrp-hart-state-management.adoc @@ -241,8 +241,8 @@ may need to call this service again with the appropriate `START_INDEX` until the ! RPMI_SUCCESS ! Service completed successfully. -! RPMI_ERR_BAD_RANGE -! `START_INDEX` is not in valid range. +! RPMI_ERR_INVALID_PARAM +! `START_INDEX` is invalid. !=== - Other errors <> @@ -314,8 +314,8 @@ items. ! RPMI_SUCCESS ! Service completed successfully. -! RPMI_ERR_BAD_RANGE -! `START_INDEX` is not in valid range. +! RPMI_ERR_INVALID_PARAM +! `START_INDEX` is invalid. !=== - Other errors <> diff --git a/src/srvgrp-voltage.adoc b/src/srvgrp-voltage.adoc index 587e00a..2362f2e 100644 --- a/src/srvgrp-voltage.adoc +++ b/src/srvgrp-voltage.adoc @@ -417,8 +417,8 @@ calls may be necessary to retrieve all the voltage levels. ! RPMI_ERR_INVALID_PARAM ! Voltage `DOMAIN_ID` is invalid. -! RPMI_ERR_BAD_RANGE -! `VOLTAGE_LEVEL_INDEX` is not in valid range. +! RPMI_ERR_INVALID_PARAM +! `VOLTAGE_LEVEL_INDEX` is invalid. !=== - Other errors <> From 03550f5c02a545b7f967c6ff2f48f231bd597f00 Mon Sep 17 00:00:00 2001 From: Rahul Pathak Date: Thu, 7 Nov 2024 11:34:19 +0530 Subject: [PATCH 10/11] rpmi/hsm: Reformat and clarify the flags details in HSM_GET_SUSPEND_INFO Signed-off-by: Rahul Pathak --- src/srvgrp-hart-state-management.adoc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/srvgrp-hart-state-management.adoc b/src/srvgrp-hart-state-management.adoc index 636dc1c..44dabae 100644 --- a/src/srvgrp-hart-state-management.adoc +++ b/src/srvgrp-hart-state-management.adoc @@ -392,9 +392,10 @@ This service is used to get the attributes of a suspend type. ! _Reserved_, must be initialized to `0`. ! [0] -! - 0b0: Counter does not stop if this bit is cleared. - 0b1: Local timer stops when the hart is suspended if this bit is set. +! Local timer running status + + 0b1: Local timer stops when the hart is suspended. + 0b0: Local timer does not stop when hart is suspended. !=== | 2 | ENTRY_LATENCY @@ -620,4 +621,4 @@ _Only used for non-retentive suspend types._ ! `HART_ID` or `SUSPEND_TYPE` is invalid. !=== - Other errors <> -|=== \ No newline at end of file +|=== From 1b1cb6897eea1a899bf086acdd371cfed3588973 Mon Sep 17 00:00:00 2001 From: Rahul Pathak Date: Thu, 7 Nov 2024 22:36:02 +0530 Subject: [PATCH 11/11] rpmi/clock: Reorder flags bits and remove duplicate error code Signed-off-by: Rahul Pathak --- src/srvgrp-clock.adoc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/srvgrp-clock.adoc b/src/srvgrp-clock.adoc index e7018ba..e7f49a4 100644 --- a/src/srvgrp-clock.adoc +++ b/src/srvgrp-clock.adoc @@ -205,7 +205,7 @@ described in <>. ==== Service: CLK_GET_NUM_CLOCKS (SERVICE_ID: 0x02) This service is used to query the number of clocks available in the system. All supported clocks in the system are designated by an integer identifier -called `CLOCK_ID`. `CLOCK_ID` are sequential starting from `0`. +called `CLOCK_ID`. [#table_clock_getnumclocks_request_data] .Request Data @@ -393,10 +393,7 @@ to get all the clock rates. In case the `CLOCK_FORMAT` is a linear range the ! Service completed successfully. ! RPMI_ERR_INVALID_PARAM -! `CLOCK_ID` is invalid. - -! RPMI_ERR_INVALID_PARAM -! `CLOCK_RATE_INDEX` is invalid. +! `CLOCK_ID` or `CLOCK_RATE_INDEX` is invalid. !=== - Other errors <> @@ -579,7 +576,11 @@ This service is used to set the clock rate of a specific clock. ! Bits ! Description -! [31:30] ! Clock rate round up/round down +! [31:2] +! _Reserved_ and must be `0`. + +! [1:0] +! Clock rate rounding mode ---- 0b00: Round down 0b01: Round up @@ -588,8 +589,6 @@ This service is used to set the clock rate of a specific clock. In Auto mode the platform can autonomously chooses a supported rate closest to the requested rate. ---- - -! [29:0] ! _Reserved_ and must be `0`. !=== | 2