#include <Pi/PiSmmCis.h>\r
#include <Protocol/SmmCpuIo.h>\r
\r
-#define EFI_SMM_CPU_IO_GUID \\r
- { \\r
- 0x5f439a0b, 0x45d8, 0x4682, {0xa4, 0xf4, 0xf0, 0x57, 0x6b, 0x51, 0x34, 0x41 } \\r
- }\r
-\r
typedef struct _EFI_SMM_SYSTEM_TABLE EFI_SMM_SYSTEM_TABLE;\r
typedef struct _EFI_SMM_CPU_IO_INTERFACE EFI_SMM_CPU_IO_INTERFACE;\r
\r
-\r
//\r
// SMM Base specification constant and types\r
//\r
#define EFI_SMM_SYSTEM_TABLE_REVISION (0 << 16) | (0x09)\r
\r
-/**\r
- Provides the basic memory and I/O interfaces that are used to\r
- abstract accesses to devices.\r
-\r
- @param This The EFI_SMM_CPU_IO_INTERFACE instance.\r
- @param Width Signifies the width of the I/O operations.\r
- @param Address The base address of the I/O operations.\r
- @param Count The number of I/O operations to perform.\r
- @param Buffer For read operations, the destination buffer to store the results (out parameter).\r
- For write operations, the source buffer from which to write data (in parameter).\r
-\r
- @retval EFI_SUCCESS The data was read from or written to the device.\r
- @retval EFI_UNSUPPORTED The Address is not valid for this system.\r
- @retval EFI_INVALID_PARAMETER Width or Count, or both, were invalid.\r
- @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r
-\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_CPU_IO)(\r
- IN EFI_SMM_CPU_IO_INTERFACE *This,\r
- IN EFI_SMM_IO_WIDTH Width,\r
- IN UINT64 Address,\r
- IN UINTN Count,\r
- IN OUT VOID *Buffer\r
- );\r
-\r
-typedef struct {\r
- EFI_SMM_CPU_IO Read; ///< This service provides the various modalities of memory and I/O read.\r
- EFI_SMM_CPU_IO Write; ///< This service provides the various modalities of memory and I/O write.\r
-} EFI_SMM_IO_ACCESS;\r
-\r
-///\r
-/// The EFI_SMM_CPU_IO_INTERFACE service provides the basic memory, I/O, and PCI\r
-/// interfaces that are used to abstract accesses to devices.\r
-///\r
-struct _EFI_SMM_CPU_IO_INTERFACE {\r
- ///\r
- /// Allows reads and writes to memory-mapped I/O space. \r
- ///\r
- EFI_SMM_IO_ACCESS Mem;\r
- ///\r
- /// Allows reads and writes to I/O space. \r
- ///\r
- EFI_SMM_IO_ACCESS Io;\r
-};\r
-\r
/**\r
Allocates pool memory from SMRAM for IA-32 or runtime memory for\r
the Itanium processor family.\r
--- /dev/null
+/** @file\r
+ SMM CPU I/O protocol as defined in the Intel Framework specification.\r
+\r
+ This protocol provides CPU I/O and memory access within SMM.\r
+\r
+ Copyright (c) 2009 - 2010, Intel Corporation\r
+ All rights reserved. This program and the accompanying materials\r
+ are licensed and made available under the terms and conditions of the BSD License\r
+ which accompanies this distribution. The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#ifndef _SMM_CPU_IO_H_\r
+#define _SMM_CPU_IO_H_\r
+\r
+#include <Protocol/SmmCpuIo2.h>\r
+\r
+#define EFI_SMM_CPU_IO_GUID \\r
+ { \\r
+ 0x5f439a0b, 0x45d8, 0x4682, {0xa4, 0xf4, 0xf0, 0x57, 0x6b, 0x51, 0x34, 0x41} \\r
+ }\r
+\r
+typedef struct _EFI_SMM_CPU_IO_INTERFACE EFI_SMM_CPU_IO_INTERFACE;\r
+\r
+/**\r
+ Provides the basic memory and I/O interfaces used to abstract accesses to devices.\r
+\r
+ The I/O operations are carried out exactly as requested. The caller is \r
+ responsible for any alignment and I/O width issues that the bus, device, \r
+ platform, or type of I/O might require.\r
+\r
+ @param[in] This The EFI_SMM_CPU_IO_INTERFACE instance.\r
+ @param[in] Width Signifies the width of the I/O operations.\r
+ @param[in] Address The base address of the I/O operations. The caller is \r
+ responsible for aligning the Address if required. \r
+ @param[in] Count The number of I/O operations to perform.\r
+ @param[in,out] Buffer For read operations, the destination buffer to store \r
+ the results. For write operations, the source buffer \r
+ from which to write data.\r
+\r
+ @retval EFI_SUCCESS The data was read from or written to the device.\r
+ @retval EFI_UNSUPPORTED The Address is not valid for this system.\r
+ @retval EFI_INVALID_PARAMETER Width or Count, or both, were invalid.\r
+ @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack\r
+ of resources.\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_SMM_CPU_IO)(\r
+ IN EFI_SMM_CPU_IO_INTERFACE *This,\r
+ IN EFI_SMM_IO_WIDTH Width,\r
+ IN UINT64 Address,\r
+ IN UINTN Count,\r
+ IN OUT VOID *Buffer\r
+ );\r
+\r
+typedef struct {\r
+ ///\r
+ /// This service provides the various modalities of memory and I/O read.\r
+ ///\r
+ EFI_SMM_CPU_IO Read;\r
+ ///\r
+ /// This service provides the various modalities of memory and I/O write.\r
+ ///\r
+ EFI_SMM_CPU_IO Write;\r
+} EFI_SMM_IO_ACCESS;\r
+\r
+///\r
+/// SMM CPU I/O Protocol provides CPU I/O and memory access within SMM.\r
+///\r
+struct _EFI_SMM_CPU_IO_INTERFACE {\r
+ ///\r
+ /// Allows reads and writes to memory-mapped I/O space.\r
+ ///\r
+ EFI_SMM_IO_ACCESS Mem;\r
+ ///\r
+ /// Allows reads and writes to I/O space.\r
+ ///\r
+ EFI_SMM_IO_ACCESS Io;\r
+};\r
+\r
+extern EFI_GUID gEfiSmmCpuIoGuid;\r
+\r
+#endif\r
# Intel Framework Package Reference Implementations\r
#\r
# This package provides definitions and libraries that comply to Intel Framework Specifications.\r
-# Copyright (c) 2007 - 2009, Intel Corporation.\r
+# Copyright (c) 2007 - 2010, Intel Corporation.\r
#\r
# All rights reserved.\r
# This program and the accompanying materials are licensed and made available\r
## Include/Protocol/SmmStatusCode.h\r
gEfiSmmStatusCodeProtocolGuid = { 0x6afd2b77, 0x98c1, 0x4acd, {0xa6, 0xf9, 0x8a, 0x94, 0x39, 0xde, 0xf, 0xb1 }}\r
\r
+ ## Include/Protocol/SmmCpuIo.h\r
+ gEfiSmmCpuIoGuid = { 0x5f439a0b, 0x45d8, 0x4682, {0xa4, 0xf4, 0xf0, 0x57, 0x6b, 0x51, 0x34, 0x41}}\r
+ \r
## Include/Protocol/FrameworkFormCallback.h\r
gEfiFormCallbackProtocolGuid = { 0xF3E4543D, 0xCF35, 0x6CEF, { 0x35, 0xC4, 0x4F, 0xE6, 0x34, 0x4D, 0xFC, 0x54 }}\r
\r