blob: 2143d8f1f38f7048f00c11a64fb23cb7bd956d5b [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
Soby Mathewb4c6df42022-11-09 11:13:29 +000038#endif /* RIPAS_H */