xref: /xnu-8796.141.3/EXTERNAL_HEADERS/img4/chip_x86.h (revision 1b191cb58250d0705d8a51287127505aa4bc0789)
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 OS_ASSUME_NONNULL_BEGIN
13 
14 /*!
15  * @const IMG4_CHIP_X86
16  * An Intel x86 processor which cannot be uniquely identified.
17  */
18 #if !XNU_KERNEL_PRIVATE
19 IMG4_API_AVAILABLE_20200508
20 OS_EXPORT
21 const img4_chip_t _img4_chip_x86;
22 #define IMG4_CHIP_X86 (&_img4_chip_x86)
23 #else
24 #define IMG4_CHIP_X86 (img4if->i4if_v7.chip_x86)
25 #endif
26 
27 /*!
28  * @const IMG4_CHIP_X86_SOFTWARE_8012
29  * A software-defined chip environment describing a virtualized x86 processor.
30  * Since the virtual machine is at the mercy of the VM, support for any sort of
31  * chip identity may not be available. Therefore this environment is returned
32  * from {@link img4_chip_select_personalized_ap} and
33  * {@link img4_chip_select_effective_ap} when it is called on a virtual machine
34  * so that the appropriate chip environment is present entirely in software.
35  *
36  * This environment provides an equivalent software identity to that of
37  * the {@link IMG4_CHIP_X86} chip environment on non-Gibraltar Macs.
38  *
39  * @discussion
40  * Do not use this environment directly.
41  */
42 #if !XNU_KERNEL_PRIVATE
43 IMG4_API_AVAILABLE_20200508
44 OS_EXPORT
45 const img4_chip_t _img4_chip_x86_software_8012;
46 #define IMG4_CHIP_X86_SOFTWARE_8012 (&_img4_chip_x86_software_8012)
47 #else
48 #define IMG4_CHIP_X86_SOFTWARE_8012 (img4if->i4if_v7.chip_x86_software_8012)
49 #endif
50 
51 OS_ASSUME_NONNULL_END
52 
53 #endif // __IMG4_CHIP_X86_H
54