xref: /openbmc/qemu/target-info.c (revision 0af00042a9290626e3c9f05cdc35b6e3d62ecd49)
1 /*
2  * QEMU target info helpers
3  *
4  *  Copyright (c) Linaro
5  *
6  * SPDX-License-Identifier: GPL-2.0-or-later
7  */
8 
9 #include "qemu/osdep.h"
10 #include "qemu/target-info.h"
11 #include "qemu/target-info-qapi.h"
12 #include "qemu/target-info-impl.h"
13 #include "qapi/error.h"
14 
15 const char *target_name(void)
16 {
17     return target_info()->target_name;
18 }
19 
20 unsigned target_long_bits(void)
21 {
22     return target_info()->long_bits;
23 }
24 
25 SysEmuTarget target_arch(void)
26 {
27     return qapi_enum_parse(&SysEmuTarget_lookup, target_name(), -1,
28                            &error_abort);
29 }
30 
31 const char *target_cpu_type(void)
32 {
33     return target_info()->cpu_type;
34 }
35 
36 const char *target_machine_typename(void)
37 {
38     return target_info()->machine_typename;
39 }
40