| 1 | /* |
| 2 | * QEMU TargetInfo structure definition |
| 3 | * |
| 4 | * Copyright (c) Linaro |
| 5 | * |
| 6 | * SPDX-License-Identifier: GPL-2.0-or-later |
| 7 | */ |
| 8 | |
| 9 | #ifndef QEMU_TARGET_INFO_IMPL_H |
| 10 | #define QEMU_TARGET_INFO_IMPL_H |
| 11 | |
| 12 | #include "qapi/qapi-types-common.h" |
| 13 | #include "qapi/qapi-types-machine.h" |
| 14 | |
| 15 | typedef struct TargetInfo { |
| 16 | /* runtime equivalent of TARGET_NAME definition */ |
| 17 | const char *target_name; |
| 18 | /* related to TARGET_ARCH definition */ |
| 19 | SysEmuTarget target_arch; |
| 20 | /* runtime equivalent of TARGET_LONG_BITS definition */ |
| 21 | unsigned long_bits; |
| 22 | /* runtime equivalent of CPU_RESOLVING_TYPE definition */ |
| 23 | const char *cpu_type; |
| 24 | /* QOM typename machines for this binary must implement */ |
| 25 | const char *machine_typename; |
| 26 | /* related to TARGET_BIG_ENDIAN definition */ |
| 27 | EndianMode endianness; |
| 28 | /* |
| 29 | * runtime equivalent of |
| 30 | * TARGET_PAGE_BITS_VARY ? TARGET_PAGE_BITS_LEGACY : TARGET_PAGE_BITS |
| 31 | */ |
| 32 | unsigned page_bits_init; |
| 33 | /* runtime equivalent of TARGET_PAGE_BITS_VARY definition */ |
| 34 | bool page_bits_vary; |
| 35 | } TargetInfo; |
| 36 | |
| 37 | /** |
| 38 | * target_info: |
| 39 | * |
| 40 | * Returns: The TargetInfo structure definition for this target binary. |
| 41 | */ |
| 42 | const TargetInfo *target_info(void); |
| 43 | |
| 44 | #endif |