Vol. 3D 38-9
ENCLAVE ACCESS CONTROL AND DATA STRUCTURES
38.9.1.2 VECTOR Field Definition
Table 38-10 contains the VECTOR field. This field contains information about some exceptions which occur inside
the enclave. These vector values are the same as the values that would be used when vectoring into regular excep-
tion handlers. All values not shown are not reported inside an enclave.
38.9.2 MISC
Region
The layout of the MISC region is shown in Table 38-11. The number of components that the processor supports in
the MISC region corresponds to the set bits of CPUID.(EAX=12H, ECX=0):EBX[31:0] set to 1. Each set bit in
CPUID.(EAX=12H, ECX=0):EBX[31:0] has a defined size for the corresponding component, as shown in Table
38-11. Enclave writers needs to do the following:
•
Decide which MISC region components will be supported for the enclave.
•
Allocate an SSA frame large enough to hold the components chosen above.
•
Instruct each enclave builder software to set the appropriate bits in SECS.MISCSELECT.
The first component, EXINFO, starts next to the GPRSGX region. Additional components in the MISC region grow
in ascending order within the MISC region towards the XSAVE region.
The size of the MISC region is calculated as follows:
•
If CPUID.(EAX=12H, ECX=0):EBX[31:0] = 0, MISC region is not supported.
•
If CPUID.(EAX=12H, ECX=0):EBX[31:0] != 0, the size of MISC region is derived from sum of the highest bit set
in SECS.MISCSELECT and the size of the MISC component corresponding to that bit. Offset and size
Table 38-9. Layout of EXITINFO Field
Field
Bit Position
Description
VECTOR
7:0
Exception number of exceptions reported inside enclave.
EXIT_TYPE
10:8
011b: Hardware exceptions.
110b: Software exceptions.
Other values: Reserved.
RESERVED
30:11
Reserved as zero.
VALID
31
0: unsupported exceptions.
1: Supported exceptions. Includes two categories:
•
Unconditionally supported exceptions: #DE, #DB, #BP, #BR, #UD, #MF, #AC, #XM.
•
Conditionally supported exception:
— #PF, #GP if SECS.MISCSELECT.EXINFO = 1.
Table 38-10. Exception Vectors
Name
Vector #
Description
#DE
0
Divider exception.
#DB
1
Debug exception.
#BP
3
Breakpoint exception.
#BR
5
Bound range exceeded exception.
#UD
6
Invalid opcode exception.
#GP
13
General protection exception. Only reported if SECS.MISCSELECT.EXINFO = 1.
#PF
14
Page fault exception. Only reported if SECS.MISCSELECT.EXINFO = 1.
#MF
16
x87 FPU floating-point error.
#AC
17
Alignment check exceptions.
#XM
19
SIMD floating-point exceptions.