xref: /openbmc/qemu/host/include/riscv/host/cpuinfo.h (revision b86c6ba6)
1 /*
2  * SPDX-License-Identifier: GPL-2.0-or-later
3  * Host specific cpu identification for RISC-V.
4  */
5 
6 #ifndef HOST_CPUINFO_H
7 #define HOST_CPUINFO_H
8 
9 #define CPUINFO_ALWAYS          (1u << 0)  /* so cpuinfo is nonzero */
10 #define CPUINFO_ZBA             (1u << 1)
11 #define CPUINFO_ZBB             (1u << 2)
12 #define CPUINFO_ZICOND          (1u << 3)
13 
14 /* Initialized with a constructor. */
15 extern unsigned cpuinfo;
16 
17 /*
18  * We cannot rely on constructor ordering, so other constructors must
19  * use the function interface rather than the variable above.
20  */
21 unsigned cpuinfo_init(void);
22 
23 #endif /* HOST_CPUINFO_H */
24