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