MdePkg: Reference new definitions for Management Mode.
In PI 1.5 version, system management mode name(SMM) has been changed to Management Mode(MM). It impacts the current code which still use SMM/Smram/SMI keywords. This patch update the original files which related to old SMM modules, also keep the compatible with old SMM related drivers. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
This protocol provides CPU I/O and memory access within SMM.
|
||||
|
||||
Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -17,79 +17,24 @@
|
||||
#ifndef _SMM_CPU_IO2_H_
|
||||
#define _SMM_CPU_IO2_H_
|
||||
|
||||
#define EFI_SMM_CPU_IO2_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x3242A9D8, 0xCE70, 0x4AA0, { 0x95, 0x5D, 0x5E, 0x7B, 0x14, 0x0D, 0xE4, 0xD2 } \
|
||||
}
|
||||
#include <Protocol/MmCpuIo.h>
|
||||
|
||||
typedef struct _EFI_SMM_CPU_IO2_PROTOCOL EFI_SMM_CPU_IO2_PROTOCOL;
|
||||
#define EFI_SMM_CPU_IO2_PROTOCOL_GUID EFI_MM_CPU_IO_PROTOCOL_GUID
|
||||
|
||||
typedef EFI_MM_CPU_IO_PROTOCOL EFI_SMM_CPU_IO2_PROTOCOL;
|
||||
|
||||
///
|
||||
/// Width of the SMM CPU I/O operations
|
||||
///
|
||||
typedef enum {
|
||||
SMM_IO_UINT8 = 0,
|
||||
SMM_IO_UINT16 = 1,
|
||||
SMM_IO_UINT32 = 2,
|
||||
SMM_IO_UINT64 = 3
|
||||
} EFI_SMM_IO_WIDTH;
|
||||
#define SMM_IO_UINT8 MM_IO_UINT8
|
||||
#define SMM_IO_UINT16 MM_IO_UINT16
|
||||
#define SMM_IO_UINT32 MM_IO_UINT32
|
||||
#define SMM_IO_UINT64 MM_IO_UINT64
|
||||
|
||||
/**
|
||||
Provides the basic memory and I/O interfaces used toabstract accesses to devices.
|
||||
typedef EFI_MM_IO_WIDTH EFI_SMM_IO_WIDTH;
|
||||
typedef EFI_MM_CPU_IO EFI_SMM_CPU_IO2;
|
||||
|
||||
The I/O operations are carried out exactly as requested. The caller is
|
||||
responsible for any alignment and I/O width issues that the bus, device,
|
||||
platform, or type of I/O might require.
|
||||
|
||||
@param[in] This The EFI_SMM_CPU_IO2_PROTOCOL instance.
|
||||
@param[in] Width Signifies the width of the I/O operations.
|
||||
@param[in] Address The base address of the I/O operations. The caller is
|
||||
responsible for aligning the Address if required.
|
||||
@param[in] Count The number of I/O operations to perform.
|
||||
@param[in,out] Buffer For read operations, the destination buffer to store
|
||||
the results. For write operations, the source buffer
|
||||
from which to write data.
|
||||
|
||||
@retval EFI_SUCCESS The data was read from or written to the device.
|
||||
@retval EFI_UNSUPPORTED The Address is not valid for this system.
|
||||
@retval EFI_INVALID_PARAMETER Width or Count, or both, were invalid.
|
||||
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack
|
||||
of resources.
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SMM_CPU_IO2)(
|
||||
IN CONST EFI_SMM_CPU_IO2_PROTOCOL *This,
|
||||
IN EFI_SMM_IO_WIDTH Width,
|
||||
IN UINT64 Address,
|
||||
IN UINTN Count,
|
||||
IN OUT VOID *Buffer
|
||||
);
|
||||
|
||||
typedef struct {
|
||||
///
|
||||
/// This service provides the various modalities of memory and I/O read.
|
||||
///
|
||||
EFI_SMM_CPU_IO2 Read;
|
||||
///
|
||||
/// This service provides the various modalities of memory and I/O write.
|
||||
///
|
||||
EFI_SMM_CPU_IO2 Write;
|
||||
} EFI_SMM_IO_ACCESS2;
|
||||
|
||||
///
|
||||
/// SMM CPU I/O Protocol provides CPU I/O and memory access within SMM.
|
||||
///
|
||||
struct _EFI_SMM_CPU_IO2_PROTOCOL {
|
||||
///
|
||||
/// Allows reads and writes to memory-mapped I/O space.
|
||||
///
|
||||
EFI_SMM_IO_ACCESS2 Mem;
|
||||
///
|
||||
/// Allows reads and writes to I/O space.
|
||||
///
|
||||
EFI_SMM_IO_ACCESS2 Io;
|
||||
};
|
||||
typedef EFI_MM_IO_ACCESS EFI_SMM_IO_ACCESS2;
|
||||
|
||||
extern EFI_GUID gEfiSmmCpuIo2ProtocolGuid;
|
||||
|
||||
|
Reference in New Issue
Block a user