blob: 4750dacd3123791cd453b88a5bb72b7c168485ba [file] [log] [blame]
Soby Mathewa28d46e2023-01-17 02:40:22 +00001/*
2 * SPDX-License-Identifier: BSD-3-Clause
3 * SPDX-FileCopyrightText: Copyright TF-RMM Contributors.
4 */
5
6#include <smc-rmi.h>
7#include <stddef.h>
8
9COMPILER_ASSERT(sizeof(struct rmi_realm_params) == 0x1000);
10COMPILER_ASSERT(offsetof(struct rmi_realm_params, features_0) == 0);
11COMPILER_ASSERT(offsetof(struct rmi_realm_params, hash_algo) == 0x100);
12COMPILER_ASSERT(offsetof(struct rmi_realm_params, rpv) == 0x400);
13COMPILER_ASSERT(offsetof(struct rmi_realm_params, vmid) == 0x800);
14COMPILER_ASSERT(offsetof(struct rmi_realm_params, rtt_base) == 0x808);
15COMPILER_ASSERT(offsetof(struct rmi_realm_params, rtt_level_start) == 0x810);
16COMPILER_ASSERT(offsetof(struct rmi_realm_params, rtt_num_start) == 0x818);
17
18
19COMPILER_ASSERT(sizeof(struct rmi_rec_params) == 0x1000);
20COMPILER_ASSERT(offsetof(struct rmi_rec_params, flags) == 0);
21COMPILER_ASSERT(offsetof(struct rmi_rec_params, mpidr) == 0x100);
22COMPILER_ASSERT(offsetof(struct rmi_rec_params, pc) == 0x200);
23COMPILER_ASSERT(offsetof(struct rmi_rec_params, gprs) == 0x300);
24COMPILER_ASSERT(offsetof(struct rmi_rec_params, num_aux) == 0x800);
25COMPILER_ASSERT(offsetof(struct rmi_rec_params, aux) == 0x808);
26
27COMPILER_ASSERT(sizeof(struct rmi_rec_entry) == 0x800);
28COMPILER_ASSERT(offsetof(struct rmi_rec_entry, flags) == 0);
29COMPILER_ASSERT(offsetof(struct rmi_rec_entry, gprs) == 0x200);
30COMPILER_ASSERT(offsetof(struct rmi_rec_entry, gicv3_hcr) == 0x300);
31COMPILER_ASSERT(offsetof(struct rmi_rec_entry, gicv3_lrs) == 0x308);
32
33
34COMPILER_ASSERT(offsetof(struct rmi_rec_exit, exit_reason) == 0);
35COMPILER_ASSERT(offsetof(struct rmi_rec_exit, esr) == 0x100);
36COMPILER_ASSERT(offsetof(struct rmi_rec_exit, far) == 0x108);
37COMPILER_ASSERT(offsetof(struct rmi_rec_exit, hpfar) == 0x110);
38COMPILER_ASSERT(offsetof(struct rmi_rec_exit, gprs) == 0x200);
39COMPILER_ASSERT(offsetof(struct rmi_rec_exit, gicv3_hcr) == 0x300);
40COMPILER_ASSERT(offsetof(struct rmi_rec_exit, gicv3_lrs) == 0x308);
41COMPILER_ASSERT(offsetof(struct rmi_rec_exit, gicv3_misr) == 0x388);
42COMPILER_ASSERT(offsetof(struct rmi_rec_exit, gicv3_vmcr) == 0x390);
43COMPILER_ASSERT(offsetof(struct rmi_rec_exit, cntp_ctl) == 0x400);
44COMPILER_ASSERT(offsetof(struct rmi_rec_exit, cntp_cval) == 0x408);
45COMPILER_ASSERT(offsetof(struct rmi_rec_exit, cntv_ctl) == 0x410);
46COMPILER_ASSERT(offsetof(struct rmi_rec_exit, cntv_cval) == 0x418);
47COMPILER_ASSERT(offsetof(struct rmi_rec_exit, ripas_base) == 0x500);
48COMPILER_ASSERT(offsetof(struct rmi_rec_exit, ripas_size) == 0x508);
49COMPILER_ASSERT(offsetof(struct rmi_rec_exit, ripas_value) == 0x510);
50COMPILER_ASSERT(offsetof(struct rmi_rec_exit, imm) == 0x600);
51
52COMPILER_ASSERT(sizeof(struct rmi_rec_run) <= GRANULE_SIZE);
53COMPILER_ASSERT(offsetof(struct rmi_rec_run, entry) == 0);
54COMPILER_ASSERT(offsetof(struct rmi_rec_run, exit) == 0x800);