1 /*
2  * Copyright (c) 2022, Arm Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef FEAT_DETECT_H
8 #define FEAT_DETECT_H
9 
10 #include <arch_features.h>
11 #include <common/debug.h>
12 
13 /* Function Prototypes */
14 void detect_arch_features(void);
15 
16 /* Macro Definitions */
17 #define FEAT_STATE_1	1
18 #define FEAT_STATE_2	2
19 #define feat_detect_panic(a, b)		((a) ? (void)0 : feature_panic(b))
20 
21 /*******************************************************************************
22  * Function : feature_panic
23  * Customised panic module with error logging mechanism to list the feature
24  * not supported by the PE.
25  ******************************************************************************/
feature_panic(char * feat_name)26 static inline void feature_panic(char *feat_name)
27 {
28 	ERROR("FEAT_%s not supported by the PE\n", feat_name);
29 	panic();
30 }
31 
32 #endif /* FEAT_DETECT_H */
33