xref: /openbmc/qemu/include/qemu/target-info.h (revision e452053097371880910c744a5d42ae2df058a4a7)
1 /*
2  * QEMU target info API (returning native types)
3  *
4  *  Copyright (c) Linaro
5  *
6  * SPDX-License-Identifier: GPL-2.0-or-later
7  */
8 
9 #ifndef QEMU_TARGET_INFO_H
10 #define QEMU_TARGET_INFO_H
11 
12 /**
13  * target_name:
14  *
15  * Returns: Canonical target name (i.e. "i386").
16  */
17 const char *target_name(void);
18 
19 /**
20  * target_long_bits:
21  *
22  * Returns: number of bits in a long type for this target (i.e. 64).
23  */
24 unsigned target_long_bits(void);
25 
26 /**
27  * target_machine_typename:
28  *
29  * Returns: Name of the QOM interface implemented by machines
30  *          usable on this target binary.
31  */
32 const char *target_machine_typename(void);
33 
34 /**
35  * target_cpu_type:
36  *
37  * Returns: target CPU base QOM type name (i.e. TYPE_X86_CPU).
38  */
39 const char *target_cpu_type(void);
40 
41 /**
42  * target_big_endian:
43  *
44  * Returns: %true if the (default) endianness of the target is big endian,
45  *          %false otherwise.
46  *
47  * Common code should normally never need to know about the endianness of
48  * the target, so please do *not* use this function unless you  know very
49  * well what you are doing!
50  */
51 bool target_big_endian(void);
52 
53 #endif
54