master
h 44 lines 1.13 KB
Raw
1 /*
2 * ARM SSE (Subsystems for Embedded): IoTKit, SSE-200
3 *
4 * Copyright (c) 2020 Linaro Limited
5 * Written by Peter Maydell
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 or
9 * (at your option) any later version.
10 */
11
12 #ifndef ARMSSE_VERSION_H
13 #define ARMSSE_VERSION_H
14
15
16 /*
17 * Define an enumeration of the possible values of the sse-version
18 * property implemented by various sub-devices of the SSE, and
19 * a validation function that checks that a valid value has been passed.
20 * These are arbitrary QEMU-internal values (nobody should be creating
21 * the sub-devices of the SSE except for the SSE object itself), but
22 * we pick obvious numbers for the benefit of people debugging with gdb.
23 */
24 enum {
25 ARMSSE_IOTKIT = 0,
26 ARMSSE_SSE200 = 200,
27 ARMSSE_SSE300 = 300,
28 ARMSSE_SSE310 = 310
29 };
30
31 static inline bool armsse_version_valid(uint32_t sse_version)
32 {
33 switch (sse_version) {
34 case ARMSSE_IOTKIT:
35 case ARMSSE_SSE200:
36 case ARMSSE_SSE300:
37 case ARMSSE_SSE310:
38 return true;
39 default:
40 return false;
41 }
42 }
43
44 #endif