1/*!
2 * @header
3 * x86 chip environments.
4 */
5#ifndef __IMG4_CHIP_X86_H
6#define __IMG4_CHIP_X86_H
7
8#ifndef __IMG4_INDIRECT
9#error "Please #include <img4/firmware.h> instead of this file directly"
10#endif // __IMG4_INDIRECT
11
12__BEGIN_DECLS
13OS_ASSUME_NONNULL_BEGIN
14OS_ASSUME_PTR_ABI_SINGLE_BEGIN
15
16/*!
17 * @const IMG4_CHIP_X86
18 * An Intel x86 processor which cannot be uniquely identified.
19 */
20#if !XNU_KERNEL_PRIVATE
21IMG4_API_AVAILABLE_20200508
22OS_EXPORT
23const img4_chip_t _img4_chip_x86;
24#define IMG4_CHIP_X86 (&_img4_chip_x86)
25#else
26#define IMG4_CHIP_X86 (img4if->i4if_v7.chip_x86)
27#endif
28
29/*!
30 * @const IMG4_CHIP_X86_SOFTWARE_8012
31 * A software-defined chip environment describing a virtualized x86 processor.
32 * Since the virtual machine is at the mercy of the VM, support for any sort of
33 * chip identity may not be available. Therefore this environment is returned
34 * from {@link img4_chip_select_personalized_ap} and
35 * {@link img4_chip_select_effective_ap} when it is called on a virtual machine
36 * so that the appropriate chip environment is present entirely in software.
37 *
38 * This environment provides an equivalent software identity to that of
39 * the {@link IMG4_CHIP_X86} chip environment on non-Gibraltar Macs.
40 *
41 * @discussion
42 * Do not use this environment directly.
43 */
44#if !XNU_KERNEL_PRIVATE
45IMG4_API_AVAILABLE_20200508
46OS_EXPORT
47const img4_chip_t _img4_chip_x86_software_8012;
48#define IMG4_CHIP_X86_SOFTWARE_8012 (&_img4_chip_x86_software_8012)
49#else
50#define IMG4_CHIP_X86_SOFTWARE_8012 (img4if->i4if_v7.chip_x86_software_8012)
51#endif
52
53OS_ASSUME_PTR_ABI_SINGLE_END
54OS_ASSUME_NONNULL_END
55__END_DECLS
56
57#endif // __IMG4_CHIP_X86_H
58