github.com/jlmucb/cloudproxy@v0.0.0-20170830161738-b5aa0b619bc4/cpvmm/common/include/ia32_registers.equ (about) 1 ; page 60,132 2 ; TITLE Equates, Structures, etc. used in uVMM Loader 3 ;**************************************************************************** 4 ; Copyright (c) 2013 Intel Corporation 5 ; 6 ; Licensed under the Apache License, Version 2.0 (the "License"); 7 ; you may not use this file except in compliance with the License. 8 ; You may obtain a copy of the License at 9 ; 10 ; http://www.apache.org/licenses/LICENSE-2.0 11 12 ; Unless required by applicable law or agreed to in writing, software 13 ; distributed under the License is distributed on an "AS IS" BASIS, 14 ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 ; See the License for the specific language governing permissions and 16 ; limitations under the License. 17 ;***************************************************************************/ 18 19 ;**************************************************************************** 20 ; INTEL CONFIDENTIAL 21 ; Copyright 2001-2013 Intel Corporation All Rights Reserved. 22 ; 23 ; The source code contained or described herein and all documents related to 24 ; the source code ("Material") are owned by Intel Corporation or its 25 ; suppliers or licensors. Title to the Material remains with Intel 26 ; Corporation or its suppliers and licensors. The Material contains trade 27 ; secrets and proprietary and confidential information of Intel or its 28 ; suppliers and licensors. The Material is protected by worldwide copyright 29 ; and trade secret laws and treaty provisions. No part of the Material may 30 ; be used, copied, reproduced, modified, published, uploaded, posted, 31 ; transmitted, distributed, or disclosed in any way without Intel's prior 32 ; express written permission. 33 ; 34 ; No license under any patent, copyright, trade secret or other intellectual 35 ; property right is granted to or conferred upon you by disclosure or 36 ; delivery of the Materials, either expressly, by implication, inducement, 37 ; estoppel or otherwise. Any license under such intellectual property rights 38 ; must be express and approved by Intel in writing. 39 ;***************************************************************************/ 40 ; 41 ; $Header: $ 42 ; $Log: $ 43 ; 44 ; 45 ;**************************************************************************** 46 UINT8 typedef byte 47 UINT16 typedef word 48 UINT32 typedef dword 49 UINT48 typedef fword 50 UINT64 typedef qword 51 52 UINT128 struc 53 low_part UINT64 00h 54 high_part UINT64 00h 55 UINT128 ends 56 57 ; copy of VMM_SEGMENT_STRUCT struct 58 VMM_SEGMENT_STRUCT struc 59 base UINT64 00h 60 limit UINT32 00h 61 attributes UINT32 00h 62 selector UINT16 00h 63 reserved UINT48 00h 64 VMM_SEGMENT_STRUCT ends 65 66 ; copy of VMM_IA32_GDT_REGISTER struct 67 VMM_IA32_GDT_REGISTER struc 68 base UINT64 00h 69 limit UINT32 00h 70 VMM_IA32_GDT_REGISTER ends 71 72 VMM_IA32_IDT_REGISTER typedef VMM_IA32_GDT_REGISTER 73 74 75 GP_REG typedef UINT64 76 XMM_REG typedef UINT128 77 CONTROL_REG typedef UINT64 78 79 ; copy of VMM_IA32_GP_REGISTERS enum 80 IA32_REG_RAX equ 0 * size GP_REG 81 IA32_REG_RBX equ 1 * size GP_REG 82 IA32_REG_RCX equ 2 * size GP_REG 83 IA32_REG_RDX equ 3 * size GP_REG 84 IA32_REG_RDI equ 4 * size GP_REG 85 IA32_REG_RSI equ 5 * size GP_REG 86 IA32_REG_RBP equ 6 * size GP_REG 87 IA32_REG_RSP equ 7 * size GP_REG 88 IA32_REG_R8 equ 8 * size GP_REG 89 IA32_REG_R9 equ 9 * size GP_REG 90 IA32_REG_R10 equ 10 * size GP_REG 91 IA32_REG_R11 equ 11 * size GP_REG 92 IA32_REG_R12 equ 12 * size GP_REG 93 IA32_REG_R13 equ 13 * size GP_REG 94 IA32_REG_R14 equ 14 * size GP_REG 95 IA32_REG_R15 equ 15 * size GP_REG 96 IA32_REG_RIP equ 16 * size GP_REG 97 IA32_REG_RFLAGS equ 17 * size GP_REG 98 IA32_REG_GP_COUNT equ 18 99 100 101 ; copy of VMM_IA32_XMM_REGISTERS enum 102 IA32_REG_XMM0 equ 0 * size XMM_REG 103 IA32_REG_XMM1 equ 1 * size XMM_REG 104 IA32_REG_XMM2 equ 2 * size XMM_REG 105 IA32_REG_XMM3 equ 3 * size XMM_REG 106 IA32_REG_XMM4 equ 4 * size XMM_REG 107 IA32_REG_XMM5 equ 5 * size XMM_REG 108 IA32_REG_XMM6 equ 6 * size XMM_REG 109 IA32_REG_XMM7 equ 7 * size XMM_REG 110 IA32_REG_XMM8 equ 8 * size XMM_REG 111 IA32_REG_XMM9 equ 9 * size XMM_REG 112 IA32_REG_XMM10 equ 10 * size XMM_REG 113 IA32_REG_XMM11 equ 11 * size XMM_REG 114 IA32_REG_XMM12 equ 12 * size XMM_REG 115 IA32_REG_XMM13 equ 13 * size XMM_REG 116 IA32_REG_XMM14 equ 14 * size XMM_REG 117 IA32_REG_XMM15 equ 15 * size XMM_REG 118 IA32_REG_XMM_COUNT equ 16 119 120 121 ; copy of VMM_IA32_CONTROL_REGISTERS enum 122 IA32_CTRL_CR0 equ 0 * size CONTROL_REG 123 IA32_CTRL_CR2 equ 1 * size CONTROL_REG 124 IA32_CTRL_CR3 equ 2 * size CONTROL_REG 125 IA32_CTRL_CR4 equ 3 * size CONTROL_REG 126 IA32_CTRL_CR8 equ 4 * size CONTROL_REG 127 IA32_CTRL_COUNT equ 5 128 129 130 ; copy of VMM_IA32_SEGMENT_REGISTERS enum 131 IA32_SEG_CS equ 0 * size VMM_SEGMENT_STRUCT 132 IA32_SEG_DS equ 1 * size VMM_SEGMENT_STRUCT 133 IA32_SEG_SS equ 2 * size VMM_SEGMENT_STRUCT 134 IA32_SEG_ES equ 3 * size VMM_SEGMENT_STRUCT 135 IA32_SEG_FS equ 4 * size VMM_SEGMENT_STRUCT 136 IA32_SEG_GS equ 5 * size VMM_SEGMENT_STRUCT 137 IA32_SEG_LDTR equ 6 * size VMM_SEGMENT_STRUCT 138 IA32_SEG_TR equ 7 * size VMM_SEGMENT_STRUCT 139 IA32_SEG_COUNT equ 8 140 141 ; copy of VMM_GP_REGISTERS struct 142 VMM_GP_REGISTERS struc 143 reg GP_REG IA32_REG_GP_COUNT DUP (00h) 144 VMM_GP_REGISTERS ends 145 146 ; copy of VMM_GP_REGISTERS struct 147 VMM_XMM_REGISTERS struc 148 reg XMM_REG IA32_REG_XMM_COUNT DUP ({}) 149 VMM_XMM_REGISTERS ends 150 151 ; copy of VMM_IA32_CONTROL_REGISTERS struct 152 VMM_IA32_CONTROL_REGISTERS struc 153 reg CONTROL_REG IA32_CTRL_COUNT dup (00h) 154 VMM_IA32_CONTROL_REGISTERS ends 155 156 ; copy of VMM_SEGMENTS struct 157 VMM_SEGMENTS struc 158 reg VMM_SEGMENT_STRUCT IA32_SEG_COUNT dup ({}) 159 VMM_SEGMENTS ends 160 161 ; copy of VMM_CONTROL_REGISTERS struct 162 VMM_CONTROL_REGISTERS struc 163 cr VMM_IA32_CONTROL_REGISTERS {} 164 gdtr VMM_IA32_GDT_REGISTER {00h} 165 reserved_1 UINT32 00h 166 idtr VMM_IA32_IDT_REGISTER {00h} 167 reserved_2 UINT32 00h 168 VMM_CONTROL_REGISTERS ends 169 170 ; copy of VMM_MODEL_SPECIFIC_REGISTERS struct 171 VMM_MODEL_SPECIFIC_REGISTERS struc 172 msr_debugctl UINT64 00h; 173 msr_efer UINT64 00h; 174 msr_pat UINT64 00h; 175 176 msr_sysenter_esp UINT64 00h; 177 msr_sysenter_eip UINT64 00h; 178 179 pending_exceptions UINT64 00h; 180 181 msr_sysenter_cs UINT32 00h; 182 183 interruptibility_state UINT32 00h; 184 activity_state UINT32 00h; 185 smbase UINT32 00h; 186 VMM_MODEL_SPECIFIC_REGISTERS ends 187 188 ; copy of VMM_GUEST_CPU_STARTUP_STATE struct, must update when the C 189 ; definition is updated! 190 191 VMM_GUEST_CPU_STARTUP_STATE_VERSION equ 1 192 193 VMM_GUEST_CPU_STARTUP_STATE struc 194 size_of_this_struct UINT16 00h 195 version_of_this_struct UINT16 00h 196 reserved_1 UINT32 00h 197 gp_regs VMM_GP_REGISTERS {} 198 xmm_regs VMM_XMM_REGISTERS {} 199 segment_regs VMM_SEGMENTS {} 200 control_regs VMM_CONTROL_REGISTERS {} 201 msr VMM_MODEL_SPECIFIC_REGISTERS {} 202 VMM_GUEST_CPU_STARTUP_STATE ends 203