Skip to content

Latest commit

 

History

History
201 lines (174 loc) · 6.29 KB

srvgrp-management.adoc

File metadata and controls

201 lines (174 loc) · 6.29 KB

Service Group - MANAGEMENT (servicegroup_id: 0x0000A)

This management service extension is designed to be used for software invocation of Management Mode (MM) in a secure execution environment. For general background on Management Mode (MM), review the Platform Initialization (PI) specifications, Volume 4: Management Mode Core Interface. Management Mode (MM) provides an environment for implementing OS agnostic services (MM services) like secure variable storage, and firmware updates in system firmware. The services can be invoked synchronously and asynchronously. This service group describes the interfaces for invoking MM services synchronously.

Table 1. Management Services
Service ID Service Name Request Type

0x01

ENABLE_NOTIFICATION

NORMAL_REQUEST

0x02

MM_VERSION

NORMAL_REQUEST

0x03

MM_COMMUNICATE

NORMAL_REQUEST

0x04

MM_COMPLETE

NORMAL_REQUEST

0x05

MM_INITIALIZE

NORMAL_REQUEST

Management Notifications

This service group does not support any event for notification.

Service: ENABLE_NOTIFICATION

This service allows AP to subscribe to management service group notifications. Platform can optionally support notifications of events which might occur in the platform. PuC can send these notification messages to AP if they are implemented and AP has subscribed to these. Events supported are described above in Management Notifications.

Table 2. Request Data
Word Name Type Description

0

EVENT_ID

uint32

Event to be subscribed for notification.

Table 3. Response Data
Word Name Type Description

0

STATUS

int32

Return Status Code

Error Code

Description

RPMI_SUCCESS

Notifications are subscribed successfully.

RPMI_ERROR_NOT_FOUND

EVENT_ID is not supported or invalid.

RPMI_ERROR_NOT_SUPPORTED

Notifications not supported.

Service: MM_VERSION

This service returns the version of a management mode service.

Request Data
  • NA

Table 4. Response Data
Word Name Type Description

0

STATUS

int32

Return Status Code

Error Code

Description

RPMI_SUCCESS

Service completed successfully.

RPMI_ERROR_DENIED

Denied due to no permission.

1

MM_VERSION

uint32

Management mode service version.

Bits

Description

[31:16]

Major Version

[15:0]

Minor Version

Service: MM_COMMUNICATE

Calling this MM_COMMUNICATE api invokes a MM service that is implemented in the secure execution environment. The MM_COMM_BUFFER contains data to identify and invoke the MM service. This synchronous call is returned by using MM_COMPLETE.

Table 5. Request Data
Word Name Type Description

0

MM_COMM_BUFFER

uint32

MM data from non-secure to secure world.

Table 6. Response Data
Word Name Type Description

0

STATUS

int32

Return Status Code

Error Code

Description

RPMI_SUCCESS

Service completed successfully.

RPMI_ERROR_DENIED

Denied due to no permission.

Service: MM_COMPLETE

Use this MM_COMPLETE as the “world-switch synchronous call” normally at the end of a synchronous MM_COMMUNICATE call to signal the readiness for handling the synchronous request. The MM_COMM_BUFFER contains the returned data of the MM service invoked.

Table 7. Request Data
Word Name Type Description

0

MM_COMM_BUFFER

uint32

MM data from non-secure to secure world.

Table 8. Response Data
Word Name Type Description

0

STATUS

int32

Return Status Code

Error Code

Description

RPMI_SUCCESS

Service completed successfully.

RPMI_ERROR_DENIED

Denied due to no permission.

Service: MM_INITIALIZE

This is an optional service. The MM modules may come in the firmware volume or FD files, loaded by the M-mode firmware like u-boot spl and initialized by the OpenSBI domain during the M-Mode firmware boot time. If so, this service api is not needed as default. But there is still case that the MM modules are requested to be loaded or initialized by the S-Mode firmware components, thus this service is used to launch the MM related modules as needed.

Table 9. Request Data
Word Name Type Description

0

HART_ID

uint8

Hart ID to launch

1

DOMAIN_ID

uint8

Secure domain ID to be used to initialize the mm modules.

2:3

FLAGS

uint16

Bits

Description

[31:1]

Reserved

[0]

0b0: No payload information.
0b1: With payload information.

4:5

MM_PAYLOAD_BASE

uint64

Base address of MM payload loaded by the S-Mode firmware.

6:7

MM_PAYLOAD_SIZE

uint64

MM payload size loaded by the S-Mode firmware.

8:263

MM_PAYLOAD_SIGNATURE

uint8

MM payload signature loaded by the S-Mode firmware.

Table 10. Response Data
Word Name Type Description

0

STATUS

int32

Return Status Code

Error Code

Description

RPMI_SUCCESS

Service completed successfully.

RPMI_ERROR_DENIED

Denied due to no permission.