TianoCore EDK2 master
|
#include <Base.h>
#include <Uefi.h>
#include <Register/Amd/Ghcb.h>
#include <IndustryStandard/InstructionParsing.h>
#include <Protocol/DebugSupport.h>
Go to the source code of this file.
Data Structures | |
struct | CC_INSTRUCTION_MODRM_EXT |
struct | CC_INSTRUCTION_SIB_EXT |
struct | CC_INSTRUCTION_OPCODE_EXT |
struct | CC_INSTRUCTION_DATA |
Functions | |
EFI_STATUS | CcInitInstructionData (IN OUT CC_INSTRUCTION_DATA *InstructionData, IN GHCB *Ghcb, IN EFI_SYSTEM_CONTEXT_X64 *Regs) |
UINT64 * | CcGetRegisterPointer (IN EFI_SYSTEM_CONTEXT_X64 *Regs, IN UINT8 Register) |
VOID | CcDecodeModRm (IN EFI_SYSTEM_CONTEXT_X64 *Regs, IN OUT CC_INSTRUCTION_DATA *InstructionData) |
UINT64 | CcInstructionLength (IN CC_INSTRUCTION_DATA *InstructionData) |
Confidential Computing X64 Instruction
Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.
Copyright (c) 2022, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file CcInstruction.h.
enum CC_INSTRUCTION_MODE |
Definition at line 22 of file CcInstruction.h.
enum CC_INSTRUCTION_REP |
Definition at line 53 of file CcInstruction.h.
enum CC_INSTRUCTION_SEGMENT |
Definition at line 41 of file CcInstruction.h.
enum CC_INSTRUCTION_SIZE |
Definition at line 31 of file CcInstruction.h.
VOID CcDecodeModRm | ( | IN EFI_SYSTEM_CONTEXT_X64 * | Regs, |
IN OUT CC_INSTRUCTION_DATA * | InstructionData | ||
) |
Decode a ModRM byte.
Examine the instruction parsing context to decode a ModRM byte and the SIB byte, if present.
[in] | Regs | x64 processor context |
[in,out] | InstructionData | Instruction parsing context |
Definition at line 245 of file CcInstruction.c.
UINT64 * CcGetRegisterPointer | ( | IN EFI_SYSTEM_CONTEXT_X64 * | Regs, |
IN UINT8 | Register | ||
) |
Return a pointer to the contents of the specified register.
Based upon the input register, return a pointer to the registers contents in the x86 processor context.
[in] | Regs | x64 processor context |
[in] | Register | Register to obtain pointer for |
Definition at line 31 of file CcInstruction.c.
EFI_STATUS CcInitInstructionData | ( | IN OUT CC_INSTRUCTION_DATA * | InstructionData, |
IN GHCB * | Ghcb, | ||
IN EFI_SYSTEM_CONTEXT_X64 * | Regs | ||
) |
Initialize the instruction parsing context.
Initialize the instruction parsing context, which includes decoding the instruction prefixes.
[in,out] | InstructionData | Instruction parsing context |
[in] | Ghcb | Pointer to the Guest-Hypervisor Communication Block |
[in] | Regs | x64 processor context |
EFI_SUCCESS | Successfully initialize InstructionData |
Others | Other error as indicated |
Definition at line 442 of file CcInstruction.c.
UINT64 CcInstructionLength | ( | IN CC_INSTRUCTION_DATA * | InstructionData | ) |
Determine instruction length
Return the total length of the parsed instruction.
[in] | InstructionData | Instruction parsing context |
Definition at line 420 of file CcInstruction.c.