From 8be701c3baf0ad82c38879f281e73d8676f5819e Mon Sep 17 00:00:00 2001 From: mdkinney Date: Mon, 27 Oct 2008 02:16:38 +0000 Subject: [PATCH] Update 8259 driver to use IoLib instead of the CPU I/O Protocol Remove redundant .DXS file. The dependency expression is in the INF file. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6246 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Universal/Legacy8259Dxe/8259.c | 58 ------------------- .../Universal/Legacy8259Dxe/8259.dxs | 28 --------- .../Universal/Legacy8259Dxe/8259.h | 2 +- .../Universal/Legacy8259Dxe/8259.inf | 4 +- 4 files changed, 3 insertions(+), 89 deletions(-) delete mode 100644 IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.dxs diff --git a/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.c b/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.c index dc1c50ff8a..8a21cd6bf5 100644 --- a/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.c +++ b/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.c @@ -14,11 +14,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "8259.h" -// -// Global for the CPU I/O Protocol that is consumed by this driver -// -EFI_CPU_IO_PROTOCOL *mCpuIo; - // // Global for the Legacy 8259 Protocol that is prodiced by this driver // @@ -50,52 +45,6 @@ UINT16 mLegacyModeEdgeLevel = 0x0000; // // Worker Functions // -VOID -IoWrite8 ( - IN UINT16 Port, - IN UINT8 Value - ) -/** - - Routine Description: - Writes an I/O port using the CPU I/O Protocol - - Arguments: - Register - I/O Port to write - Value - The 8 bit value to write to Port - - Returns: - None - -**/ -{ - mCpuIo->Io.Write (mCpuIo, EfiCpuIoWidthUint8, Port, 1, &Value); -} - -UINT8 -IoRead8 ( - IN UINT16 Port - ) -/** - - Routine Description: - Writes an I/O port using the CPU I/O Protocol - - Arguments: - Register - I/O Port to write - Value - The 8 bit value to write to Port - - Returns: - None - -**/ -{ - UINT8 Value; - - mCpuIo->Io.Read (mCpuIo, EfiCpuIoWidthUint8, Port, 1, &Value); - return Value; -} - VOID Interrupt8259WriteMask ( IN UINT16 Mask, @@ -620,12 +569,6 @@ Returns: EFI_STATUS Status; EFI_8259_IRQ Irq; - // - // Find the CPU I/O Protocol - // - Status = gBS->LocateProtocol (&gEfiCpuIoProtocolGuid, NULL, (VOID **) &mCpuIo); - ASSERT_EFI_ERROR (Status); - // // Clear all pending interrupt // @@ -652,7 +595,6 @@ Returns: EFI_NATIVE_INTERFACE, &m8259 ); - return Status; } diff --git a/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.dxs b/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.dxs deleted file mode 100644 index e2c384524f..0000000000 --- a/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.dxs +++ /dev/null @@ -1,28 +0,0 @@ -/*++ - -Copyright (c) 2005, 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. - -Module Name: - - 8259.dxs - -Abstract: - Dependency expression source file. - ---*/ - -#include "EfiDepex.h" - -#include EFI_PROTOCOL_DEFINITION (CpuIo) - -DEPENDENCY_START - EFI_CPU_IO_PROTOCOL_GUID -DEPENDENCY_END - diff --git a/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.h b/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.h index 18bd37bddd..f77494c946 100644 --- a/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.h +++ b/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.h @@ -23,11 +23,11 @@ Abstract: #include -#include #include #include #include +#include // // 8259 Hardware definitions diff --git a/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.inf b/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.inf index 9887bbf10b..fbd1277095 100644 --- a/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.inf +++ b/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.inf @@ -37,6 +37,7 @@ UefiBootServicesTableLib DebugLib UefiDriverEntryPoint + IoLib [Sources.common] 8259.c @@ -44,7 +45,6 @@ [Protocols] gEfiLegacy8259ProtocolGuid - gEfiCpuIoProtocolGuid [Depex] - gEfiCpuIoProtocolGuid \ No newline at end of file + TRUE \ No newline at end of file -- 2.39.2