Skip to content

Latest commit

 

History

History
603 lines (491 loc) · 11.4 KB

srvgrp-base.adoc

File metadata and controls

603 lines (491 loc) · 11.4 KB

Service Group: BASE (SERVICEGROUP_ID: 0x0001)

The BASE service group is mandatory and provides the following services:

  • Initial handshaking between the application processor and the platform microcontroller.

  • Discovering the RPMI implementation version information.

  • Discovering the implementation of a service group.

  • Discovering platform specific information.

The following table lists the services in the BASE service group:

Table 1. BASE Services
Service ID Service Name Request Type

0x01

BASE_ENABLE_NOTIFICATION

NORMAL_REQUEST

0x02

BASE_GET_IMPLEMENTATION_VERSION

NORMAL_REQUEST

0x03

BASE_GET_IMPLEMENTATION_ID

NORMAL_REQUEST

0x04

BASE_GET_SPEC_VERSION

NORMAL_REQUEST

0x05

BASE_GET_PLATFORM_INFO

NORMAL_REQUEST

0x06

BASE_PROBE_SERVICE_GROUP

NORMAL_REQUEST

0x07

BASE_GET_ATTRIBUTES

NORMAL_REQUEST

0x08

BASE_SET_MSI

NORMAL_REQUEST

RPMI Implementation IDs

Table 2. RPMI Implementation IDs
Implementation ID Name

0x0

libRPMI cite:[libRPMI]

Notifications

This service is used by the platform microcontroller to send the asynchronous message of type notification to the application processor. The message transfers the events defined by this service group. The events defined are listed in the below table.

Table 3. BASE Service Group Events
Event ID Event Name Event Data Description

0x01

REQUEST_HANDLE_ERROR

NA

This event indicates that the platform microcontroller is unable to serve the message requests.

Service: BASE_ENABLE_NOTIFICATION (SERVICE_ID: 0x01)

This service allows the application processor to subscribe to BASE service group notifications. The platform may optionally support notifications for events that may occur. The platform microcontroller can send these notification messages to the application processor if they are implemented and the application processor has subscribed to them. The supported events are described in Notifications.

Table 4. Request Data
Word Name Type Description

0

EVENT_ID

uint32

The event to be subscribed for notification.

1

REQ_STATE

uint32

Requested event notification state
Change or query the current state of EVENT_ID notification.

0: Disable
1: Enable
2: Return current state.

Any other values of REQ_STATE field other than the defined ones are reserved for future use.

Table 5. Response Data
Word Name Type Description

0

STATUS

int32

Return error code

Error Code Description

RPMI_SUCCESS

Event is subscribed successfully.

RPMI_ERR_INVALID_PARAM

EVENT_ID or REQ_STATE is invalid.

RPMI_ERR_NOT_SUPPORTED

Notification is not supported.

1

CURRENT_STATE

uint32

Current EVENT_ID notification state

0: Notification is disabled
1: Notification is enabled.

In case of REQ_STATE = 0 or 1, the CURRENT_STATE will return the requested state.
In case of an error, the value of CURRENT_STATE is unspecified.

Service: BASE_GET_IMPLEMENTATION_VERSION (SERVICE_ID: 0x02)

This service is used to get the RPMI implementation version of the platform microcontroller. The version returned is a 32-bit composite number containing the MAJOR and MINOR version numbers.

Table 6. Request Data
NA
Table 7. Response Data
Word Name Type Description

0

STATUS

int32

Return error code

Error Code Description

RPMI_SUCCESS

RPMI implementation version returned successfully.

1

IMPL_VERSION

uint32

Implementation version

Bits Description

[31:16]

MAJOR number

[15:0]

MINOR number

Service: BASE_GET_IMPLEMENTATION_ID (SERVICE_ID: 0x03)

This service is used to get a 32-bit RPMI implementation ID assigned to the software that implements the RPMI specification. Every implementation ID is unique and listed in the RPMI Implementation IDs.

Table 8. Request Data
NA
Table 9. Response Data
Word Name Type Description

0

STATUS

int32

Return error code

Error Code Description

RPMI_SUCCESS

RPMI implementation ID returned successfully.

1

IMPL_ID

uint32

Implementation ID

Service: BASE_GET_SPEC_VERSION (SERVICE_ID: 0x04)

This service is used to get the implemented RPMI specification version. The version returned is a 32-bit composite number containing the MAJOR and MINOR version numbers.

Table 10. Request Data
NA
Table 11. Response Data
Word Name Type Description

0

STATUS

int32

Return error code

Error Code Description

RPMI_SUCCESS

RPMI specification version returned successfully.

1

SPEC_VERSION

uint32

RPMI specification version

Bits Description

[31:16]

MAJOR number

[15:0]

MINOR number

Service: BASE_GET_PLATFORM_INFO (SERVICE_ID: 0x05)

This service is used to get additional platform information if available.

Table 12. Request Data
NA
Table 13. Response Data
Word Name Type Description

0

STATUS

int32

Return error code

Error Code Description

RPMI_SUCCESS

Platform information returned successfully.

1

PLATFORM_ID_LEN

uint32

Platform Identifier field length in bytes.

2

PLATFORM_ID

uint8[PLATFORM_ID_LEN]

Platform Identifier
Up to PLATFORM_ID_LEN bytes NULL terminated ASCII string. The use and interpretation of this field is implementation-defined. It can be used to convey details such as the vendor ID, vendor name, specific product model, revision, or configuration of the hardware.

Service: BASE_PROBE_SERVICE_GROUP (SERVICE_ID: 0x06)

This service is used to probe the implementation of a service group and to obtain the implemented service group version. The service group version is a 32-bit composite number containing the MAJOR and MINOR numbers.

If the service group is successfully probed then the implemented service group version is returned in the SERVICE_GROUP_VERSION field. Otherwise it returns 0.

Table 14. Request Data
Word Name Type Description

0

SERVICEGROUP_ID

uint32

Service group ID

Table 15. Response Data
Word Name Type Description

0

STATUS

int32

Return error code

Error Code Description

RPMI_SUCCESS

Service probed successfully.

1

SERVICE_GROUP_VERSION

uint32

Service group version.

Bits Description

[31:16]

MAJOR number

[15:0]

MINOR number

Service: BASE_GET_ATTRIBUTES (SERVICE_ID: 0x07)

This service is used to discover additional features supported by the BASE service group.

Table 16. Request Data
NA
Table 17. Response Data
Word Name Type Description

0

STATUS

int32

Return error code

Error Code Description

RPMI_SUCCESS

Attributes returned successfully.

1

FLAGS0

uint32

Bits Description

[31:3]

Reserved, must be initialized to 0.

[2]

RPMI context privilege level.

0b1: M-mode
0b0: S-mode

[1]

EVENT_NOTIFICATION

0b1: Supported
0b0: Not supported

[0]

MSI

0b1: Supported
0b0: Not supported

2

FLAGS1

uint32

Reserved, must be initialized to 0.

3

FLAGS2

uint32

Reserved, must be initialized to 0.

4

FLAGS3

uint32

Reserved, must be initialized to 0.

Service: BASE_SET_MSI (SERVICE_ID: 0x08)

This service is used to configure the MSI address and data which the platform microcontroller can use as a doorbell to the application processor. The application processor must first discover the MSI support via BASE_GET_ATTRIBUTES service.

If the MSI support is not present then this service will be ignored with appropriate STATUS returned.

The platform microcontroller will enable MSI only if support is present and this service configures MSI address and data successfully.

Note
If the platform supports PLIC, the platform need to provide a MMIO register to inject an edge-triggered interrupt.
Note
The platform microcontroller can use MSI for both sending the MSI directly or injecting wired interrupt in the application processor. If the MSI target address is IMSIC, then the application processor will take MSI whereas if the MSI target address is setipnum of the APLIC then the application processor will take the wired interrupt.
Table 18. Request Data
Word Name Type Description

0

MSI_ADDRESS_LOW

uint32

Lower 32-bit of the MSI address.

1

MSI_ADDRESS_HIGH

uint32

Upper 32-bit of the MSI address.

2

MSI_DATA

uint32

32-bit MSI data

Table 19. Response Data
Word Name Type Description

0

STATUS

int32

Return error code

Error Code Description

RPMI_SUCCESS

MSI address and data are configured successfully.

RPMI_ERR_NOT_SUPPORTED

MSI is not supported.

RPMI_ERR_INVALID_ADDR

MSI address is not 4-byte aligned.