Skip to content

Latest commit

 

History

History
277 lines (227 loc) · 6.06 KB

srvgrp-management.adoc

File metadata and controls

277 lines (227 loc) · 6.06 KB

Service Group - MANAGEMENT_MODE (SERVICEGROUP_ID: 0x000A)

This MANAGEMENT_MODE service group provides RPMI client a mechanism to invoke the Management Mode (MM) in a secure execution environment. For general background on Management Mode, refer to the Platform Initialization (PI) specifications cite:[PI], Volume 4: Management Mode Core Interface.

The Management Mode (MM) provides an environment for implementing OS agnostic MM services such as secure variable storage, and firmware updates in the platform firmware. The MANAGEMENT_MODE service group defines RPMI services for invoking an MM service synchronously where the MM_COMMUNICATE RPMI service is used as a synchronous call from the non-secure world to the secure world and the data exchanged with the MM service is passed via special Management Mode (MM) shared memory.

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

Table 1. MANAGEMENT_MODE Services
Service ID Service Name Request Type

0x01

MM_ENABLE_NOTIFICATION

NORMAL_REQUEST

0x02

MM_GET_ATTRIBUTES

NORMAL_REQUEST

0x03

MM_COMMUNICATE

NORMAL_REQUEST

Notifications

This service group does not support any events for notification.

Service: MM_ENABLE_NOTIFICATION (SERVICE_ID: 0x01)

This service allows the application processor to subscribe to MANAGEMENT_MODE 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 2. 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 3. 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: MM_GET_ATTRIBUTES (SERVICE_ID: 0x02)

This RPMI service gets the attributes about Management Mode, including MM version, MM shared memory location, etc.

Table 4. Request Data
NA
Table 5. Response Data
Word Name Type Description

0

STATUS

int32

Return error code

Error Code Description

RPMI_SUCCESS

Service completed successfully.

1

MM_VERSION

uint32

Management Mode version.

Bits Description

[31:16]

Major version

[15:0]

Minor version

2

MM_SHMEM_ADDR_LOW

uint32

Lower 32-bit of the MM shared memory physical address.

3

MM_SHMEM_ADDR_HIGH

uint32

Upper 32-bit of the MM shared memory physical address.

4

MM_SHMEM_SIZE

uint32

The size of MM shared memory in bytes.

Service: MM_COMMUNICATE (SERVICE_ID: 0x03)

The MM_COMMUNICATE service invokes an MM service implemented in the secure execution environment. The input data needed to identify and invoke the MM service is referred to as MM_COMM_INPUT_DATA whereas the output data returned by the MM service is referred to as MM_COMM_OUTPUT_DATA. The RPMI client in the non-secure execution environment provides the location of MM_COMM_INPUT_DATA and MM_COMM_OUTPUT_DATA in the MM shared memory as parameters of MM_COMMUNICATE service.

Table 6. Request Data
Word Name Type Description

0

MM_COMM_INPUT_DATA_OFFSET

uint32

The offset in the MM shared memory where the input data is passed to the MM service.

1

MM_COMM_INPUT_DATA_SIZE

uint32

The size of the input data in the MM shared memory.

2

MM_COMM_OUTPUT_DATA_OFFSET

uint32

The offset in the MM shared memory where the output data will be written by the MM service.

3

MM_COMM_OUTPUT_DATA_SIZE

uint32

The maximum size of the output data which can be written by the MM service in the MM shared memory.

Table 7. Response Data
Word Name Type Description

0

STATUS

int32

Return error code

Error Code Description

RPMI_SUCCESS

Service completed successfully.

RPMI_ERR_INVALID_ADDR

Input data end (or Output data end) is outside MM shared memory.

RPMI_ERR_DENIED

Denied due to no permission.

1

MM_COMM_RETURN_DATA_SIZE

uint32

Actual size of the output data written by the MM service in the MM shared memory.