mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
46f8260048
commit
8be701c3ba
|
@ -14,11 +14,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
#include "8259.h"
|
#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
|
// Global for the Legacy 8259 Protocol that is prodiced by this driver
|
||||||
//
|
//
|
||||||
|
@ -50,52 +45,6 @@ UINT16 mLegacyModeEdgeLevel = 0x0000;
|
||||||
//
|
//
|
||||||
// Worker Functions
|
// 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
|
VOID
|
||||||
Interrupt8259WriteMask (
|
Interrupt8259WriteMask (
|
||||||
IN UINT16 Mask,
|
IN UINT16 Mask,
|
||||||
|
@ -620,12 +569,6 @@ Returns:
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_8259_IRQ Irq;
|
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
|
// Clear all pending interrupt
|
||||||
//
|
//
|
||||||
|
@ -652,7 +595,6 @@ Returns:
|
||||||
EFI_NATIVE_INTERFACE,
|
EFI_NATIVE_INTERFACE,
|
||||||
&m8259
|
&m8259
|
||||||
);
|
);
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
|
||||||
|
|
|
@ -23,11 +23,11 @@ Abstract:
|
||||||
|
|
||||||
#include <FrameworkDxe.h>
|
#include <FrameworkDxe.h>
|
||||||
|
|
||||||
#include <Protocol/CpuIo.h>
|
|
||||||
#include <Protocol/Legacy8259.h>
|
#include <Protocol/Legacy8259.h>
|
||||||
|
|
||||||
#include <Library/UefiBootServicesTableLib.h>
|
#include <Library/UefiBootServicesTableLib.h>
|
||||||
#include <Library/DebugLib.h>
|
#include <Library/DebugLib.h>
|
||||||
|
#include <Library/IoLib.h>
|
||||||
|
|
||||||
//
|
//
|
||||||
// 8259 Hardware definitions
|
// 8259 Hardware definitions
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
UefiBootServicesTableLib
|
UefiBootServicesTableLib
|
||||||
DebugLib
|
DebugLib
|
||||||
UefiDriverEntryPoint
|
UefiDriverEntryPoint
|
||||||
|
IoLib
|
||||||
|
|
||||||
[Sources.common]
|
[Sources.common]
|
||||||
8259.c
|
8259.c
|
||||||
|
@ -44,7 +45,6 @@
|
||||||
|
|
||||||
[Protocols]
|
[Protocols]
|
||||||
gEfiLegacy8259ProtocolGuid
|
gEfiLegacy8259ProtocolGuid
|
||||||
gEfiCpuIoProtocolGuid
|
|
||||||
|
|
||||||
[Depex]
|
[Depex]
|
||||||
gEfiCpuIoProtocolGuid
|
TRUE
|
Loading…
Reference in New Issue