blob: 4b6b58fac5b7f580ce023e60d74dfb9bdab8b761 [file] [log] [blame]
Soby Mathewb4c6df42022-11-09 11:13:29 +00001/*
2 * SPDX-License-Identifier: BSD-3-Clause
3 * SPDX-FileCopyrightText: Copyright TF-RMM Contributors.
4 */
5
6#ifndef RIPAS_H
7#define RIPAS_H
8
Yousuf A62808152022-10-31 10:35:42 +00009#include <smc-rmi.h>
AlexeiFedorov63614ea2023-07-14 17:07:20 +010010#include <smc-rsi.h>
Soby Mathewb4c6df42022-11-09 11:13:29 +000011
12/*
AlexeiFedorovc53b1f72023-07-04 15:37:03 +010013 * The RmmRipas enumeration represents realm IPA state.
Soby Mathewb4c6df42022-11-09 11:13:29 +000014 *
15 * Map RmmRipas to RmiRipas to simplify code/decode operations.
16 */
17enum ripas {
Yousuf A62808152022-10-31 10:35:42 +000018 RIPAS_EMPTY = RMI_EMPTY, /* Unused IPA for Realm */
AlexeiFedorov20afb5c2023-04-18 11:44:19 +010019 RIPAS_RAM = RMI_RAM, /* IPA used for Code/Data by Realm */
AlexeiFedorovc53b1f72023-07-04 15:37:03 +010020 RIPAS_DESTROYED = RMI_DESTROYED /* IPA is inaccessible to the Realm */
Soby Mathewb4c6df42022-11-09 11:13:29 +000021};
22
AlexeiFedorov63614ea2023-07-14 17:07:20 +010023/*
24 * The RmmRipasChangeDestroyed enumeration represents whether a RIPAS change
25 * from DESTROYED should be permitted.
26 *
27 * Map RmmRipasChangeDestroyed to RsiRipasChangeDestroyed to simplify check
28 * operation.
29 */
30enum ripas_change_destroyed {
31 /* A RIPAS change from DESTROYED should not be permitted */
32 NO_CHANGE_DESTROYED = RSI_NO_CHANGE_DESTROYED,
33
34 /* A RIPAS change from DESTROYED should be permitted */
35 CHANGE_DESTROYED = RSI_CHANGE_DESTROYED
36};
37
AlexeiFedorov9b29c6b2023-09-12 17:09:50 +010038/*
39 * The RmmRecResponse enumeration represents whether the Host accepted
40 * or rejected a Realm request.
41 *
42 * Map RmmRecResponse to RmiResponse to simplify check operation.
43 */
44enum ripas_response {
45 ACCEPT = RMI_ACCEPT, /* Host accepted Realm request */
46 REJECT = RMI_REJECT /* Host rejected Realm request */
47};
48
Soby Mathewb4c6df42022-11-09 11:13:29 +000049#endif /* RIPAS_H */