summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library
diff options
context:
space:
mode:
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2010-01-14 04:20:04 +0000
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2010-01-14 04:20:04 +0000
commit8fc71decbe7ada34f96f04261e680265ce916a51 (patch)
tree623cac1ad66adc1958ef5b00db8a37080d925a21 /MdePkg/Library
parentf659880bfa42ded20a00d3e371c998b42dcdd0fd (diff)
downloadedk2-8fc71decbe7ada34f96f04261e680265ce916a51.tar.gz
edk2-8fc71decbe7ada34f96f04261e680265ce916a51.tar.bz2
edk2-8fc71decbe7ada34f96f04261e680265ce916a51.zip
Change SMM CPU I/O to SMM CPU I/O 2
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9735 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library')
-rw-r--r--MdePkg/Library/SmmIoLibSmmCpuIo2/IoHighLevel.c (renamed from MdePkg/Library/SmmIoLibCpuIo/IoHighLevel.c)5
-rw-r--r--MdePkg/Library/SmmIoLibSmmCpuIo2/IoLib.c (renamed from MdePkg/Library/SmmIoLibCpuIo/IoLib.c)37
-rw-r--r--MdePkg/Library/SmmIoLibSmmCpuIo2/IoLibMmioBuffer.c (renamed from MdePkg/Library/SmmIoLibCpuIo/IoLibMmioBuffer.c)5
-rw-r--r--MdePkg/Library/SmmIoLibSmmCpuIo2/SmmCpuIoLibInternal.h (renamed from MdePkg/Library/SmmIoLibCpuIo/SmmCpuIoLibInternal.h)7
-rw-r--r--MdePkg/Library/SmmIoLibSmmCpuIo2/SmmIoLibSmmCpuIo2.inf (renamed from MdePkg/Library/SmmIoLibCpuIo/SmmIoLibCpuIo.inf)15
5 files changed, 16 insertions, 53 deletions
diff --git a/MdePkg/Library/SmmIoLibCpuIo/IoHighLevel.c b/MdePkg/Library/SmmIoLibSmmCpuIo2/IoHighLevel.c
index 72ea425663..ae772b81bc 100644
--- a/MdePkg/Library/SmmIoLibCpuIo/IoHighLevel.c
+++ b/MdePkg/Library/SmmIoLibSmmCpuIo2/IoHighLevel.c
@@ -4,7 +4,7 @@
All assertions for bit field operations are handled bit field functions in the
Base Library.
- Copyright (c) 2009, Intel Corporation<BR>
+ Copyright (c) 2009 - 2010, Intel Corporation<BR>
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
@@ -13,8 +13,6 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
- Module Name: IoHighLevel.c
-
The following IoLib instances share the same version of this file:
BaseIoLibIntrinsic
@@ -23,7 +21,6 @@
SmmIoLibCpuIo
**/
-
#include "SmmCpuIoLibInternal.h"
/**
diff --git a/MdePkg/Library/SmmIoLibCpuIo/IoLib.c b/MdePkg/Library/SmmIoLibSmmCpuIo2/IoLib.c
index 4b74e9c222..53003d123d 100644
--- a/MdePkg/Library/SmmIoLibCpuIo/IoLib.c
+++ b/MdePkg/Library/SmmIoLibSmmCpuIo2/IoLib.c
@@ -3,7 +3,7 @@
The implementation of I/O operation for this library instance
are based on EFI_CPU_IO_PROTOCOL.
- Copyright (c) 2009, Intel Corporation<BR>
+ Copyright (c) 2009 - 2010, Intel Corporation<BR>
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
@@ -12,18 +12,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
- Module Name: IoLib.c
-
**/
-
#include "SmmCpuIoLibInternal.h"
//
// Globle varible to cache pointer to CpuIo protocol.
//
-EFI_SMM_CPU_IO_PROTOCOL *mCpuIo = NULL;
-EFI_SMM_PCI_ROOT_BRIDGE_IO_PROTOCOL *mPciRootBridgeIo = NULL;
+EFI_SMM_CPU_IO2_PROTOCOL *mCpuIo2 = NULL;
/**
The constructor function caches the pointer to CpuIo protocol.
@@ -46,10 +42,7 @@ IoLibConstructor (
{
EFI_STATUS Status;
- Status = gSmst->SmmLocateProtocol (&gEfiSmmPciRootBridgeIoProtocolGuid, NULL, (VOID **) &mPciRootBridgeIo);
- if (EFI_ERROR (Status)) {
- Status = gSmst->SmmLocateProtocol (&gEfiSmmCpuIoProtocolGuid, NULL, (VOID **) &mCpuIo);
- }
+ Status = gSmst->SmmLocateProtocol (&gEfiSmmCpuIo2ProtocolGuid, NULL, (VOID **) &mCpuIo2);
ASSERT_EFI_ERROR (Status);
return Status;
@@ -79,11 +72,7 @@ IoReadWorker (
EFI_STATUS Status;
UINT64 Data;
- if (mPciRootBridgeIo != NULL) {
- Status = mPciRootBridgeIo->Io.Read (mPciRootBridgeIo, (EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) Width, Port, 1, &Data);
- } else {
- Status = mCpuIo->Io.Read (mCpuIo, Width, Port, 1, &Data);
- }
+ Status = mCpuIo2->Io.Read (mCpuIo2, Width, Port, 1, &Data);
ASSERT_EFI_ERROR (Status);
return Data;
@@ -114,11 +103,7 @@ IoWriteWorker (
{
EFI_STATUS Status;
- if (mPciRootBridgeIo != NULL) {
- Status = mPciRootBridgeIo->Io.Write (mPciRootBridgeIo, (EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) Width, Port, 1, &Data);
- } else {
- Status = mCpuIo->Io.Write (mCpuIo, Width, Port, 1, &Data);
- }
+ Status = mCpuIo2->Io.Write (mCpuIo2, Width, Port, 1, &Data);
ASSERT_EFI_ERROR (Status);
return Data;
@@ -148,11 +133,7 @@ MmioReadWorker (
EFI_STATUS Status;
UINT64 Data;
- if (mPciRootBridgeIo != NULL) {
- Status = mPciRootBridgeIo->Mem.Read (mPciRootBridgeIo, (EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) Width, Address, 1, &Data);
- } else {
- Status = mCpuIo->Mem.Read (mCpuIo, Width, Address, 1, &Data);
- }
+ Status = mCpuIo2->Mem.Read (mCpuIo2, Width, Address, 1, &Data);
ASSERT_EFI_ERROR (Status);
return Data;
@@ -183,11 +164,7 @@ MmioWriteWorker (
{
EFI_STATUS Status;
- if (mPciRootBridgeIo != NULL) {
- Status = mPciRootBridgeIo->Mem.Write (mPciRootBridgeIo, (EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) Width, Address, 1, &Data);
- } else {
- Status = mCpuIo->Mem.Write (mCpuIo, Width, Address, 1, &Data);
- }
+ Status = mCpuIo2->Mem.Write (mCpuIo2, Width, Address, 1, &Data);
ASSERT_EFI_ERROR (Status);
return Data;
diff --git a/MdePkg/Library/SmmIoLibCpuIo/IoLibMmioBuffer.c b/MdePkg/Library/SmmIoLibSmmCpuIo2/IoLibMmioBuffer.c
index e4effa9602..35b6c0a8a7 100644
--- a/MdePkg/Library/SmmIoLibCpuIo/IoLibMmioBuffer.c
+++ b/MdePkg/Library/SmmIoLibSmmCpuIo2/IoLibMmioBuffer.c
@@ -1,7 +1,7 @@
/** @file
I/O Library MMIO Buffer Functions.
- Copyright (c) 2009, Intel Corporation<BR>
+ Copyright (c) 2009 - 2010, Intel Corporation<BR>
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
@@ -10,11 +10,8 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
- Module Name: IoLibMmioBuffer.c
-
**/
-
#include "SmmCpuIoLibInternal.h"
/**
diff --git a/MdePkg/Library/SmmIoLibCpuIo/SmmCpuIoLibInternal.h b/MdePkg/Library/SmmIoLibSmmCpuIo2/SmmCpuIoLibInternal.h
index e221bc8d9e..70295af4e1 100644
--- a/MdePkg/Library/SmmIoLibCpuIo/SmmCpuIoLibInternal.h
+++ b/MdePkg/Library/SmmIoLibSmmCpuIo2/SmmCpuIoLibInternal.h
@@ -4,7 +4,7 @@
for implementation of IoLib library instance. It is included
all source code of this library instance.
- Copyright (c) 2009, Intel Corporation
+ Copyright (c) 2009 - 2010, 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
@@ -13,16 +13,13 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
- Module Name: DxeCpuIoLibInternal.h
-
**/
#ifndef _SMM_CPUIO_LIB_INTERNAL_H_
#define _SMM_CPUIO_LIB_INTERNAL_H_
-
#include <PiSmm.h>
-#include <Protocol/SmmCpuIo.h>
+#include <Protocol/SmmCpuIo2.h>
#include <Protocol/SmmPciRootBridgeIo.h>
#include <Library/IoLib.h>
#include <Library/DebugLib.h>
diff --git a/MdePkg/Library/SmmIoLibCpuIo/SmmIoLibCpuIo.inf b/MdePkg/Library/SmmIoLibSmmCpuIo2/SmmIoLibSmmCpuIo2.inf
index 7be09dc878..b9a34a40ee 100644
--- a/MdePkg/Library/SmmIoLibCpuIo/SmmIoLibCpuIo.inf
+++ b/MdePkg/Library/SmmIoLibSmmCpuIo2/SmmIoLibSmmCpuIo2.inf
@@ -3,7 +3,7 @@
#
# I/O Library implementation that uses the CPU I/O Protocol for I/O
# and MMIO operations.
-# Copyright (c) 2009, Intel Corporation.
+# Copyright (c) 2009 - 2010, 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
@@ -12,19 +12,16 @@
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
-#
#**/
[Defines]
INF_VERSION = 0x00010005
- BASE_NAME = SmmIoLibCpuIo
+ BASE_NAME = SmmIoLibSmmCpuIo2
FILE_GUID = DEEEA15E-4A77-4513-BA75-71D26FEF78A1
MODULE_TYPE = DXE_SMM_DRIVER
VERSION_STRING = 1.0
LIBRARY_CLASS = IoLib|DXE_SMM_DRIVER SMM_CORE
- EFI_SPECIFICATION_VERSION = 0x00020000
PI_SPECIFICATION_VERSION = 0x0001000A
-
CONSTRUCTOR = IoLibConstructor
#
@@ -33,13 +30,12 @@
# VALID_ARCHITECTURES = IA32 X64
#
-[Sources.common]
+[Sources]
IoLibMmioBuffer.c
SmmCpuIoLibInternal.h
IoHighLevel.c
IoLib.c
-
[Packages]
MdePkg/MdePkg.dec
@@ -49,8 +45,7 @@
SmmServicesTableLib
[Protocols]
- gEfiSmmCpuIoProtocolGuid ## CONSUMES
- gEfiSmmPciRootBridgeIoProtocolGuid ## CONSUMES
+ gEfiSmmCpuIo2ProtocolGuid ## CONSUMES
[Depex]
- gEfiSmmCpuIoProtocolGuid OR gEfiSmmPciRootBridgeIoProtocolGuid \ No newline at end of file
+ gEfiSmmCpuIo2ProtocolGuid \ No newline at end of file