This protocol allows SMM drivers to access architecture-standard registers from any of the CPU save state areas. In some cases, difference processors provide the same information in the save state, but not in the same format. These so-called pseudo-registers provide this information in a standard format.
Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define EFI_SMM_CPU_PROTOCOL_GUID |
Value:
{ \ 0xeb346b97, 0x975f, 0x4a9f, { 0x8b, 0x22, 0xf8, 0xe9, 0x2b, 0xb3, 0xd5, 0x69 } \ }
#define EFI_SMM_SAVE_STATE_REGISTER_LMA_32BIT 32 |
The EFI_SMM_SAVE_STATE_REGISTER_LMA pseudo-register values If the processor acts in 32-bit mode at the time the SMI occurred, the pseudo register value EFI_SMM_SAVE_STATE_REGISTER_LMA_32BIT is returned in Buffer. Otherwise, EFI_SMM_SAVE_STATE_REGISTER_LMA_64BIT is returned in Buffer.
#define EFI_SMM_SAVE_STATE_REGISTER_LMA_64BIT 64 |
typedef struct _EFI_SMM_CPU_PROTOCOL EFI_SMM_CPU_PROTOCOL |
typedef EFI_STATUS(EFIAPI * EFI_SMM_READ_SAVE_STATE)(IN CONST EFI_SMM_CPU_PROTOCOL *This, IN UINTN Width, IN EFI_SMM_SAVE_STATE_REGISTER Register, IN UINTN CpuIndex, OUT VOID *Buffer) |
Read data from the CPU save state.
This function is used to read the specified number of bytes of the specified register from the CPU save state of the specified CPU and place the value into the buffer. If the CPU does not support the specified register Register, then EFI_NOT_FOUND should be returned. If the CPU does not support the specified register width Width, then EFI_INVALID_PARAMETER is returned.
[in] | This | The EFI_SMM_CPU_PROTOCOL instance. |
[in] | Width | The number of bytes to read from the CPU save state. |
[in] | Register | Specifies the CPU register to read form the save state. |
[in] | CpuIndex | Specifies the zero-based index of the CPU save state. |
[out] | Buffer | Upon return, this holds the CPU register value read from the save state. |
EFI_SUCCESS | The register was read from Save State. | |
EFI_NOT_FOUND | The register is not defined for the Save State of Processor. | |
EFI_INVALID_PARAMETER | Input parameters are not valid, for example, Processor No or register width is not correct.This or Buffer is NULL. |
typedef struct _EFI_SMM_SAVE_STATE_IO_INFO EFI_SMM_SAVE_STATE_IO_INFO |
Structure of the data which is returned when ReadSaveState() is called with EFI_SMM_SAVE_STATE_REGISTER_IO. If there was no I/O then ReadSaveState() will return EFI_NOT_FOUND.
This structure describes the I/O operation which was in process when the SMI was generated.
typedef EFI_STATUS(EFIAPI * EFI_SMM_WRITE_SAVE_STATE)(IN CONST EFI_SMM_CPU_PROTOCOL *This, IN UINTN Width, IN EFI_SMM_SAVE_STATE_REGISTER Register, IN UINTN CpuIndex, IN CONST VOID *Buffer) |
Write data to the CPU save state.
This function is used to write the specified number of bytes of the specified register to the CPU save state of the specified CPU and place the value into the buffer. If the CPU does not support the specified register Register, then EFI_UNSUPPORTED should be returned. If the CPU does not support the specified register width Width, then EFI_INVALID_PARAMETER is returned.
[in] | This | The EFI_SMM_CPU_PROTOCOL instance. |
[in] | Width | The number of bytes to write to the CPU save state. |
[in] | Register | Specifies the CPU register to write to the save state. |
[in] | CpuIndex | Specifies the zero-based index of the CPU save state. |
[in] | Buffer | Upon entry, this holds the new CPU register value. |
EFI_SUCCESS | The register was written to Save State. | |
EFI_NOT_FOUND | The register is not defined for the Save State of Processor. | |
EFI_INVALID_PARAMETER | Input parameters are not valid. For example: ProcessorIndex or Width is not correct. |
Save State register index