1 /*
2  * Copyright 2018 The Hafnium Authors.
3  *
4  * Use of this source code is governed by a BSD-style
5  * license that can be found in the LICENSE file or at
6  * https://opensource.org/licenses/BSD-3-Clause.
7  */
8 
9 #pragma once
10 
11 #include <stddef.h>
12 
13 #include "test/vmapi/ffa.h"
14 
15 /*
16  * FF-A UUIDs related to the test partitions providing test services to the
17  * Primary VM. These service partitions can either be SPs or VMs, and should
18  * be used only once for either an SP or VM.
19  * This allows for the PVM to communicate with the service partition, regardless
20  * of the ID, which has a bit related to the security state of the partition.
21  * The PVM should use the UUID to retrieve the FF-A ID of the partition, before
22  * attempting to communicate with it. Thus, the code for the PVM becomes
23  * portable between setups where the test service is either a VM or an SP.
24  */
25 #define SERVICE1                                                        \
26 	&(struct ffa_uuid)                                              \
27 	{                                                               \
28 		{                                                       \
29 			0xb4b5671e, 0x4a904fe1, 0xb81ffb13, 0xdae1dacb, \
30 		}                                                       \
31 	}
32 
33 #define SERVICE2                                               \
34 	&(struct ffa_uuid)                                     \
35 	{                                                      \
36 		{                                              \
37 			0x5d45882e, 0xf637, 0xa720, 0xe8669dc, \
38 		}                                              \
39 	}
40 
41 #define SERVICE3                                             \
42 	&(struct ffa_uuid)                                   \
43 	{                                                    \
44 		{                                            \
45 			0xcbd4482f, 0xcbab, 0x4dba, 0x0738d, \
46 		}                                            \
47 	}
48 
49 #define SERVICE_VM1 (HF_VM_ID_OFFSET + 1)
50 #define SERVICE_VM2 (HF_VM_ID_OFFSET + 2)
51 #define SERVICE_VM3 (HF_VM_ID_OFFSET + 3)
52 
53 #define SELF_INTERRUPT_ID 5
54 #define EXTERNAL_INTERRUPT_ID_A 7
55 #define EXTERNAL_INTERRUPT_ID_B 8
56 #define EXTERNAL_INTERRUPT_ID_C 9
57