From: yshang1 Date: Thu, 19 Jul 2007 07:57:59 +0000 (+0000) Subject: Clean up the Isa related DXE in IntelFrameworkMoudlePkg. X-Git-Tag: edk2-stable201903~22602 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=c21fc3e8ae6032b59091a92f6ba504d1c73fcd7e Clean up the Isa related DXE in IntelFrameworkMoudlePkg. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3359 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/InternalIsaBus.h b/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/InternalIsaBus.h index 1921d4c7d2..352aca9e8d 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/InternalIsaBus.h +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/InternalIsaBus.h @@ -55,6 +55,73 @@ Revision History: #include "ComponentName.h" +// +// 8237 DMA registers +// +#define R_8237_DMA_BASE_CA_CH0 0x00 +#define R_8237_DMA_BASE_CA_CH1 0x02 +#define R_8237_DMA_BASE_CA_CH2 0x04 +#define R_8237_DMA_BASE_CA_CH3 0xd6 +#define R_8237_DMA_BASE_CA_CH5 0xc4 +#define R_8237_DMA_BASE_CA_CH6 0xc8 +#define R_8237_DMA_BASE_CA_CH7 0xcc + +#define R_8237_DMA_BASE_CC_CH0 0x01 +#define R_8237_DMA_BASE_CC_CH1 0x03 +#define R_8237_DMA_BASE_CC_CH2 0x05 +#define R_8237_DMA_BASE_CC_CH3 0xd7 +#define R_8237_DMA_BASE_CC_CH5 0xc6 +#define R_8237_DMA_BASE_CC_CH6 0xca +#define R_8237_DMA_BASE_CC_CH7 0xce + +#define R_8237_DMA_MEM_LP_CH0 0x87 +#define R_8237_DMA_MEM_LP_CH1 0x83 +#define R_8237_DMA_MEM_LP_CH2 0x81 +#define R_8237_DMA_MEM_LP_CH3 0x82 +#define R_8237_DMA_MEM_LP_CH5 0x8B +#define R_8237_DMA_MEM_LP_CH6 0x89 +#define R_8237_DMA_MEM_LP_CH7 0x8A + + +#define R_8237_DMA_COMMAND_CH0_3 0x08 +#define R_8237_DMA_COMMAND_CH4_7 0xd0 +#define B_8237_DMA_COMMAND_GAP 0x10 +#define B_8237_DMA_COMMAND_CGE 0x04 + + +#define R_8237_DMA_STA_CH0_3 0xd8 +#define R_8237_DMA_STA_CH4_7 0xd0 + +#define R_8237_DMA_WRSMSK_CH0_3 0x0a +#define R_8237_DMA_WRSMSK_CH4_7 0xd4 +#define B_8237_DMA_WRSMSK_CMS 0x04 + + +#define R_8237_DMA_CHMODE_CH0_3 0x0b +#define R_8237_DMA_CHMODE_CH4_7 0xd6 +#define V_8237_DMA_CHMODE_DEMAND 0x00 +#define V_8237_DMA_CHMODE_SINGLE 0x40 +#define V_8237_DMA_CHMODE_CASCADE 0xc0 +#define B_8237_DMA_CHMODE_DECREMENT 0x20 +#define B_8237_DMA_CHMODE_INCREMENT 0x00 +#define B_8237_DMA_CHMODE_AE 0x10 +#define V_8237_DMA_CHMODE_VERIFY 0 +#define V_8237_DMA_CHMODE_IO2MEM 0x04 +#define V_8237_DMA_CHMODE_MEM2IO 0x08 + +#define R_8237_DMA_CBPR_CH0_3 0x0c +#define R_8237_DMA_CBPR_CH4_7 0xd8 + +#define R_8237_DMA_MCR_CH0_3 0x0d +#define R_8237_DMA_MCR_CH4_7 0xda + +#define R_8237_DMA_CLMSK_CH0_3 0x0e +#define R_8237_DMA_CLMSK_CH4_7 0xdc + +#define R_8237_DMA_WRMSK_CH0_3 0x0f +#define R_8237_DMA_WRMSK_CH4_7 0xde + + extern EFI_ISA_IO_PROTOCOL IsaIoInterface; typedef enum { diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBus.inf b/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBus.inf deleted file mode 100644 index 26a1527afc..0000000000 --- a/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBus.inf +++ /dev/null @@ -1,130 +0,0 @@ -#/** @file -# Component description file for IsaBus module. -# -# Discovers all the ISA Controllers and their resources by using the ISA PnP -# Protocol, produces an instance of the ISA I/O Protocol for every ISA -# Controller found, loads and initializes all ISA Device Drivers, matches ISA -# Device Drivers with their respective ISA Controllers in a deterministic -# manner, and informs a ISA Device Driver when it is to start managing an ISA -# Controller. -# -# Copyright (c) 2006 - 2007, 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 -# -# -#**/ - -################################################################################ -# -# Defines Section - statements that will be processed to create a Makefile. -# -################################################################################ -[Defines] - INF_VERSION = 0x00010005 - BASE_NAME = IsaBus - FILE_GUID = 240612B5-A063-11d4-9A3A-0090273FC14D - MODULE_TYPE = DXE_DRIVER - VERSION_STRING = 1.0 - EDK_RELEASE_VERSION = 0x00020000 - EFI_SPECIFICATION_VERSION = 0x00020000 - - ENTRY_POINT = InitializeIsaBus - -# -# The following information is for reference only and not required by the build tools. -# -# VALID_ARCHITECTURES = IA32 X64 IPF EBC -# -# DRIVER_BINDING = gIsaBusControllerDriver -# COMPONENT_NAME = gIsaBusComponentName -# - -################################################################################ -# -# Sources Section - list of files that are required for the build to succeed. -# -################################################################################ - -[Sources.common] - ComponentName.c - IsaIo.c - IsaBus.c - IsaIo.h - IsaBus.h - IsaAcpi.h - ComponentName.h - - -################################################################################ -# -# Package Dependency Section - list of Package files that are required for -# this module. -# -################################################################################ - -[Packages] - MdePkg/MdePkg.dec - MdeModulePkg/MdeModulePkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec - IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec - - -################################################################################ -# -# Library Class Section - list of Library Classes that are required for -# this module. -# -################################################################################ - -[LibraryClasses] - PcdLib - BootScriptLib - ReportStatusCodeLib - UefiBootServicesTableLib - MemoryAllocationLib - BaseMemoryLib - DevicePathLib - UefiLib - UefiDriverEntryPoint - DebugLib - - -################################################################################ -# -# Guid C Name Section - list of Guids that this module uses or produces. -# -################################################################################ - -[Guids] - gEfiStatusCodeSpecificDataGuid # ALWAYS_CONSUMED - - -################################################################################ -# -# Protocol C Name Section - list of Protocol and Protocol Notify C Names -# that this module uses or produces. -# -################################################################################ - -[Protocols] - gEfiIsaIoProtocolGuid # PROTOCOL BY_START - gEfiIsaAcpiProtocolGuid # PROTOCOL TO_START - gEfiPciIoProtocolGuid # PROTOCOL TO_START - gEfiDevicePathProtocolGuid # PROTOCOL TO_START - gEfiGenericMemTestProtocolGuid # PROTOCOL TO_START - - -################################################################################ -# -# Pcd FEATURE_FLAG - list of PCDs that this module is coded for. -# -################################################################################ - -[PcdsFeatureFlag.common] - PcdIsaBusOnlySupportSlaveDma|gEfiIntelFrameworkModulePkgTokenSpaceGuid - PcdIsaBusSupportDma|gEfiIntelFrameworkModulePkgTokenSpaceGuid - PcdIsaBusSupportIsaMemory|gEfiIntelFrameworkModulePkgTokenSpaceGuid - diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf b/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf new file mode 100644 index 0000000000..65e5686be5 --- /dev/null +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf @@ -0,0 +1,73 @@ +#/** @file +# Component description file for IsaBus module. +# +# Discovers all the ISA Controllers and their resources by using the ISA PnP +# Protocol, produces an instance of the ISA I/O Protocol for every ISA +# Controller found, loads and initializes all ISA Device Drivers, matches ISA +# Device Drivers with their respective ISA Controllers in a deterministic +# manner, and informs a ISA Device Driver when it is to start managing an ISA +# Controller. +# +# Copyright (c) 2006 - 2007, 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 +# +# +#**/ + +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = IsaBusDxe + FILE_GUID = 240612B5-A063-11d4-9A3A-0090273FC14D + MODULE_TYPE = DXE_DRIVER + VERSION_STRING = 1.0 + EDK_RELEASE_VERSION = 0x00020000 + EFI_SPECIFICATION_VERSION = 0x00020000 + + ENTRY_POINT = InitializeIsaBus + +# VALID_ARCHITECTURES = IA32 X64 IPF EBC + +[Sources.common] + ComponentName.c + IsaIo.c + IsaBus.c + IsaIo.h + IsaBus.h + IsaAcpi.h + ComponentName.h + +[Packages] + MdePkg/MdePkg.dec + IntelFrameworkPkg/IntelFrameworkPkg.dec + MdeModulePkg/MdeModulePkg.dec + +[LibraryClasses] + PcdLib + BootScriptLib + ReportStatusCodeLib + UefiBootServicesTableLib + MemoryAllocationLib + BaseMemoryLib + DevicePathLib + UefiLib + UefiDriverEntryPoint + DebugLib + +[Guids] + gEfiStatusCodeSpecificDataGuid # ALWAYS_CONSUMED + +[Protocols] + gEfiIsaIoProtocolGuid # PROTOCOL BY_START + gEfiIsaAcpiProtocolGuid # PROTOCOL TO_START + gEfiPciIoProtocolGuid # PROTOCOL TO_START + gEfiDevicePathProtocolGuid # PROTOCOL TO_START + gEfiGenericMemTestProtocolGuid # PROTOCOL TO_START + +[PcdsFeatureFlag.common] + PcdIsaBusOnlySupportSlaveDma|gEfiIntelFrameworkModulePkgTokenSpaceGuid + PcdIsaBusSupportDma|gEfiIntelFrameworkModulePkgTokenSpaceGuid + PcdIsaBusSupportIsaMemory|gEfiIntelFrameworkModulePkgTokenSpaceGuid + diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaIo.c b/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaIo.c index a9503f9529..09f13f3b8f 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaIo.c +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaIo.c @@ -24,8 +24,6 @@ Abstract: // #include "InternalIsaIo.h" -#include - // // Driver Support Global Variables // diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppy.inf b/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppy.inf deleted file mode 100644 index 1351b0e237..0000000000 --- a/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppy.inf +++ /dev/null @@ -1,104 +0,0 @@ -#/** @file -# Component description file for IsaFloppy module. -# -# ISA Floppy Driver -# 1. Support two types diskette drive -# 1.44M drive and 2.88M drive (and now only support 1.44M) -# 2. Support two diskette drives -# 3. Use DMA channel 2 to transfer data -# 4. Do not use interrupt -# 5. Support diskette change line signal and write protect -# -# Conforming to EFI driver model -# -# Copyright (c) 2006 - 2007, 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 -# -# -#**/ - -################################################################################ -# -# Defines Section - statements that will be processed to create a Makefile. -# -################################################################################ -[Defines] - INF_VERSION = 0x00010005 - BASE_NAME = IsaFloppy - FILE_GUID = 0abd8284-6da3-4616-971a-83a5148067ba - MODULE_TYPE = DXE_DRIVER - VERSION_STRING = 1.0 - EDK_RELEASE_VERSION = 0x00020000 - EFI_SPECIFICATION_VERSION = 0x00020000 - - ENTRY_POINT = InitializeIsaFloppy - -# -# The following information is for reference only and not required by the build tools. -# -# VALID_ARCHITECTURES = IA32 X64 IPF EBC -# -# DRIVER_BINDING = gFdcControllerDriver -# COMPONENT_NAME = gIsaFloppyComponentName -# Create Event Guid C Name: Event Type: EVENT_TYPE_PERIODIC_TIMER -# -# - -################################################################################ -# -# Sources Section - list of files that are required for the build to succeed. -# -################################################################################ - -[Sources.common] - ComponentName.c - ComponentName.h - IsaFloppyCtrl.c - IsaFloppyBlock.c - IsaFloppy.c - IsaFloppy.h - -################################################################################ -# -# Package Dependency Section - list of Package files that are required for -# this module. -# -################################################################################ -[Packages] - MdePkg/MdePkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec - -################################################################################ -# -# Library Class Section - list of Library Classes that are required for -# this module. -# -################################################################################ - -[LibraryClasses] - ReportStatusCodeLib - UefiBootServicesTableLib - MemoryAllocationLib - BaseMemoryLib - UefiLib - BaseLib - UefiDriverEntryPoint - DebugLib - TimerLib - - -################################################################################ -# -# Protocol C Name Section - list of Protocol and Protocol Notify C Names -# that this module uses or produces. -# -################################################################################ - -[Protocols] - gEfiIsaIoProtocolGuid # PROTOCOL TO_START - gEfiBlockIoProtocolGuid # PROTOCOL BY_START - gEfiDevicePathProtocolGuid # PROTOCOL TO_START - diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppyDxe.inf b/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppyDxe.inf new file mode 100644 index 0000000000..58de16a5fe --- /dev/null +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppyDxe.inf @@ -0,0 +1,63 @@ +#/** @file +# Component description file for IsaFloppy module. +# +# ISA Floppy Driver +# 1. Support two types diskette drive +# 1.44M drive and 2.88M drive (and now only support 1.44M) +# 2. Support two diskette drives +# 3. Use DMA channel 2 to transfer data +# 4. Do not use interrupt +# 5. Support diskette change line signal and write protect +# +# Conforming to EFI driver model +# +# Copyright (c) 2006 - 2007, 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 +# +# +#**/ + +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = IsaFloppyDxe + FILE_GUID = 0abd8284-6da3-4616-971a-83a5148067ba + MODULE_TYPE = DXE_DRIVER + VERSION_STRING = 1.0 + EDK_RELEASE_VERSION = 0x00020000 + EFI_SPECIFICATION_VERSION = 0x00020000 + + ENTRY_POINT = InitializeIsaFloppy + +# VALID_ARCHITECTURES = IA32 X64 IPF EBC + +[Sources.common] + ComponentName.c + ComponentName.h + IsaFloppyCtrl.c + IsaFloppyBlock.c + IsaFloppy.c + IsaFloppy.h + +[Packages] + MdePkg/MdePkg.dec + IntelFrameworkPkg/IntelFrameworkPkg.dec + +[LibraryClasses] + ReportStatusCodeLib + UefiBootServicesTableLib + MemoryAllocationLib + BaseMemoryLib + UefiLib + BaseLib + UefiDriverEntryPoint + DebugLib + TimerLib + +[Protocols] + gEfiIsaIoProtocolGuid # PROTOCOL TO_START + gEfiBlockIoProtocolGuid # PROTOCOL BY_START + gEfiDevicePathProtocolGuid # PROTOCOL TO_START + diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerial.inf b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerial.inf deleted file mode 100644 index 7e0d0abc68..0000000000 --- a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerial.inf +++ /dev/null @@ -1,108 +0,0 @@ -#/** @file -# Component description file for IsaSerial module. -# -# Serial driver for standard UARTS on an ISA bus. -# Copyright (c) 2006 - 2007, Intel Corporation. -# -# Copyright (c) 2006 - 2007, 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 -# -# -#**/ - -################################################################################ -# -# Defines Section - statements that will be processed to create a Makefile. -# -################################################################################ -[Defines] - INF_VERSION = 0x00010005 - BASE_NAME = IsaSerial - FILE_GUID = 93B80003-9FB3-11d4-9A3A-0090273FC14D - MODULE_TYPE = DXE_DRIVER - VERSION_STRING = 1.0 - EDK_RELEASE_VERSION = 0x00020000 - EFI_SPECIFICATION_VERSION = 0x00020000 - - ENTRY_POINT = InitializeIsaSerial - -# -# The following information is for reference only and not required by the build tools. -# -# VALID_ARCHITECTURES = IA32 X64 IPF EBC -# -# DRIVER_BINDING = gSerialControllerDriver -# COMPONENT_NAME = gIsaSerialComponentName -# - -################################################################################ -# -# Sources Section - list of files that are required for the build to succeed. -# -################################################################################ - -[Sources.common] - ComponentName.c - ComponentName.h - serial.h - serial.c - - -################################################################################ -# -# Package Dependency Section - list of Package files that are required for -# this module. -# -################################################################################ - -[Packages] - MdePkg/MdePkg.dec - MdeModulePkg/MdeModulePkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec - - -################################################################################ -# -# Library Class Section - list of Library Classes that are required for -# this module. -# -################################################################################ - -[LibraryClasses] - PcdLib - ReportStatusCodeLib - UefiBootServicesTableLib - MemoryAllocationLib - BaseMemoryLib - DevicePathLib - UefiLib - BaseLib - UefiDriverEntryPoint - DebugLib - - -################################################################################ -# -# Protocol C Name Section - list of Protocol and Protocol Notify C Names -# that this module uses or produces. -# -################################################################################ - -[Protocols] - gEfiIsaIoProtocolGuid # PROTOCOL TO_START - gEfiSerialIoProtocolGuid # PROTOCOL BY_START - gEfiDevicePathProtocolGuid # PROTOCOL TO_START - - -################################################################################ -# -# Pcd FEATURE_FLAG - list of PCDs that this module is coded for. -# -################################################################################ - -[PcdsFeatureFlag.common] - PcdNtEmulatorEnable|gEfiMdeModulePkgTokenSpaceGuid - diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf new file mode 100644 index 0000000000..96c67085ce --- /dev/null +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf @@ -0,0 +1,108 @@ +#/** @file +# Component description file for IsaSerial module. +# +# Serial driver for standard UARTS on an ISA bus. +# Copyright (c) 2006 - 2007, Intel Corporation. +# +# Copyright (c) 2006 - 2007, 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 +# +# +#**/ + +################################################################################ +# +# Defines Section - statements that will be processed to create a Makefile. +# +################################################################################ +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = IsaSerialDxe + FILE_GUID = 93B80003-9FB3-11d4-9A3A-0090273FC14D + MODULE_TYPE = DXE_DRIVER + VERSION_STRING = 1.0 + EDK_RELEASE_VERSION = 0x00020000 + EFI_SPECIFICATION_VERSION = 0x00020000 + + ENTRY_POINT = InitializeIsaSerial + +# +# The following information is for reference only and not required by the build tools. +# +# VALID_ARCHITECTURES = IA32 X64 IPF EBC +# +# DRIVER_BINDING = gSerialControllerDriver +# COMPONENT_NAME = gIsaSerialComponentName +# + +################################################################################ +# +# Sources Section - list of files that are required for the build to succeed. +# +################################################################################ + +[Sources.common] + ComponentName.c + ComponentName.h + serial.h + serial.c + + +################################################################################ +# +# Package Dependency Section - list of Package files that are required for +# this module. +# +################################################################################ + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + IntelFrameworkPkg/IntelFrameworkPkg.dec + + +################################################################################ +# +# Library Class Section - list of Library Classes that are required for +# this module. +# +################################################################################ + +[LibraryClasses] + PcdLib + ReportStatusCodeLib + UefiBootServicesTableLib + MemoryAllocationLib + BaseMemoryLib + DevicePathLib + UefiLib + BaseLib + UefiDriverEntryPoint + DebugLib + + +################################################################################ +# +# Protocol C Name Section - list of Protocol and Protocol Notify C Names +# that this module uses or produces. +# +################################################################################ + +[Protocols] + gEfiIsaIoProtocolGuid # PROTOCOL TO_START + gEfiSerialIoProtocolGuid # PROTOCOL BY_START + gEfiDevicePathProtocolGuid # PROTOCOL TO_START + + +################################################################################ +# +# Pcd FEATURE_FLAG - list of PCDs that this module is coded for. +# +################################################################################ + +[PcdsFeatureFlag.common] + PcdNtEmulatorEnable|gEfiMdeModulePkgTokenSpaceGuid + diff --git a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/ComponentName.c b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/ComponentName.c index bcf7f7bf3f..7f8b911b00 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/ComponentName.c +++ b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/ComponentName.c @@ -184,6 +184,7 @@ Ps2KeyboardComponentNameGetControllerName ( ControllerHandle, EFI_OPEN_PROTOCOL_BY_DRIVER ); + if (!EFI_ERROR (Status)) { gBS->CloseProtocol ( ControllerHandle, diff --git a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/EntryPoint.c b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/EntryPoint.c deleted file mode 100644 index 71e53ec9f7..0000000000 --- a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/EntryPoint.c +++ /dev/null @@ -1,58 +0,0 @@ -/**@file - Entry Point Source file. - - This file contains the user entry point - -Copyright (c) 2006 - 2007, 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. - -**/ - - -// -// Include common header file for this module. -// -#include "Ps2Keyboard.h" - -/** - The user Entry Point for module Ps2Keyboard. The user code starts with this function. - - @param[in] ImageHandle The firmware allocated handle for the EFI image. - @param[in] SystemTable A pointer to the EFI System Table. - - @retval EFI_SUCCESS The entry point is executed successfully. - @retval other Some error occurs when executing this entry point. - -**/ -EFI_STATUS -EFIAPI -InitializePs2Keyboard( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable - ) -{ - EFI_STATUS Status; - - // - // Install driver model protocol(s). - // - Status = EfiLibInstallAllDriverProtocols ( - ImageHandle, - SystemTable, - &gKeyboardControllerDriver, - ImageHandle, - &gPs2KeyboardComponentName, - NULL, - NULL - ); - ASSERT_EFI_ERROR (Status); - - - return Status; -} diff --git a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.c b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.c index c0763633d0..91c8b879b1 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.c +++ b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.c @@ -466,3 +466,41 @@ KbdControllerDriverStop ( return EFI_SUCCESS; } + + +/** + The user Entry Point for module Ps2Keyboard. The user code starts with this function. + + @param[in] ImageHandle The firmware allocated handle for the EFI image. + @param[in] SystemTable A pointer to the EFI System Table. + + @retval EFI_SUCCESS The entry point is executed successfully. + @retval other Some error occurs when executing this entry point. + +**/ +EFI_STATUS +EFIAPI +InitializePs2Keyboard( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + EFI_STATUS Status; + + // + // Install driver model protocol(s). + // + Status = EfiLibInstallAllDriverProtocols ( + ImageHandle, + SystemTable, + &gKeyboardControllerDriver, + ImageHandle, + &gPs2KeyboardComponentName, + NULL, + NULL + ); + ASSERT_EFI_ERROR (Status); + + + return Status; +} diff --git a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf index b5f018639e..6a8890613f 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf +++ b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf @@ -16,14 +16,9 @@ # #**/ -################################################################################ -# -# Defines Section - statements that will be processed to create a Makefile. -# -################################################################################ [Defines] INF_VERSION = 0x00010005 - BASE_NAME = Ps2Keyboard + BASE_NAME = Ps2KeyboardDxe FILE_GUID = 3DC82376-637B-40a6-A8FC-A565417F2C38 MODULE_TYPE = DXE_DRIVER VERSION_STRING = 1.0 @@ -32,25 +27,7 @@ ENTRY_POINT = InitializePs2Keyboard -# -# The following information is for reference only and not required by the build tools. -# # VALID_ARCHITECTURES = IA32 X64 IPF EBC -# -# DRIVER_BINDING = gKeyboardControllerDriver -# COMPONENT_NAME = gPs2KeyboardComponentName -# Create Event Guid C Name: Event Type: EVENT_TYPE_RELATIVE_TIMER -# Create Event Guid C Name: Event Type: EVENT_TYPE_PERIODIC_TIMER -# -# Signal Event Guid C Name: Event Type: EVENT_TYPE_PERIODIC_TIMER -# -# - -################################################################################ -# -# Sources Section - list of files that are required for the build to succeed. -# -################################################################################ [Sources.common] ComponentName.c @@ -58,30 +35,14 @@ Ps2KbdCtrller.c Ps2KbdTextIn.c Ps2Keyboard.c - EntryPoint.c -################################################################################ -# -# Package Dependency Section - list of Package files that are required for -# this module. -# -################################################################################ - [Packages] MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec IntelFrameworkPkg/IntelFrameworkPkg.dec IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec - -################################################################################ -# -# Library Class Section - list of Library Classes that are required for -# this module. -# -################################################################################ - [LibraryClasses] MemoryAllocationLib UefiRuntimeServicesTableLib @@ -91,14 +52,6 @@ UefiLib UefiDriverEntryPoint - -################################################################################ -# -# Protocol C Name Section - list of Protocol and Protocol Notify C Names -# that this module uses or produces. -# -################################################################################ - [Protocols] gEfiPs2PolicyProtocolGuid # PROTOCOL TO_START gEfiIsaIoProtocolGuid # PROTOCOL TO_START diff --git a/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/EntryPoint.c b/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/EntryPoint.c deleted file mode 100644 index ffd8281cb5..0000000000 --- a/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/EntryPoint.c +++ /dev/null @@ -1,55 +0,0 @@ -/**@file - Entry Point Source file. - - This file contains the user entry point - -Copyright (c) 2006 - 2007, 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. - -**/ - - -#include "Ps2Mouse.h" - -/** - The user Entry Point for module Ps2Mouse. The user code starts with this function. - - @param[in] ImageHandle The firmware allocated handle for the EFI image. - @param[in] SystemTable A pointer to the EFI System Table. - - @retval EFI_SUCCESS The entry point is executed successfully. - @retval other Some error occurs when executing this entry point. - -**/ -EFI_STATUS -EFIAPI -InitializePs2Mouse( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable - ) -{ - EFI_STATUS Status; - - // - // Install driver model protocol(s). - // - Status = EfiLibInstallAllDriverProtocols ( - ImageHandle, - SystemTable, - &gPS2MouseDriver, - ImageHandle, - &gPs2MouseComponentName, - NULL, - NULL - ); - ASSERT_EFI_ERROR (Status); - - - return Status; -} diff --git a/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/Ps2Mouse.c b/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/Ps2Mouse.c index cc01a5c165..7f2fbc99b9 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/Ps2Mouse.c +++ b/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/Ps2Mouse.c @@ -755,3 +755,40 @@ Returns: // PS2MouseGetPacket (MouseDev); } + +/** + The user Entry Point for module Ps2Mouse. The user code starts with this function. + + @param[in] ImageHandle The firmware allocated handle for the EFI image. + @param[in] SystemTable A pointer to the EFI System Table. + + @retval EFI_SUCCESS The entry point is executed successfully. + @retval other Some error occurs when executing this entry point. + +**/ +EFI_STATUS +EFIAPI +InitializePs2Mouse( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + EFI_STATUS Status; + + // + // Install driver model protocol(s). + // + Status = EfiLibInstallAllDriverProtocols ( + ImageHandle, + SystemTable, + &gPS2MouseDriver, + ImageHandle, + &gPs2MouseComponentName, + NULL, + NULL + ); + ASSERT_EFI_ERROR (Status); + + + return Status; +} diff --git a/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/Ps2MouseDxe.inf b/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/Ps2MouseDxe.inf index 60a1fcf0af..77f97e351a 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/Ps2MouseDxe.inf +++ b/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/Ps2MouseDxe.inf @@ -16,14 +16,9 @@ # #**/ -################################################################################ -# -# Defines Section - statements that will be processed to create a Makefile. -# -################################################################################ [Defines] INF_VERSION = 0x00010005 - BASE_NAME = Ps2Mouse + BASE_NAME = Ps2MouseDxe FILE_GUID = 202A2B0E-9A31-4812-B291-8747DF152439 MODULE_TYPE = DXE_DRIVER VERSION_STRING = 1.0 @@ -32,25 +27,7 @@ ENTRY_POINT = InitializePs2Mouse -# -# The following information is for reference only and not required by the build tools. -# # VALID_ARCHITECTURES = IA32 X64 IPF EBC -# -# DRIVER_BINDING = gPS2MouseDriver -# COMPONENT_NAME = gPs2MouseComponentName -# Create Event Guid C Name: Event Type: EVENT_TYPE_RELATIVE_TIMER -# Create Event Guid C Name: Event Type: EVENT_TYPE_PERIODIC_TIMER -# -# Signal Event Guid C Name: Event Type: EVENT_TYPE_RELATIVE_TIMER -# -# - -################################################################################ -# -# Sources Section - list of files that are required for the build to succeed. -# -################################################################################ [Sources.common] ComponentName.c @@ -58,16 +35,6 @@ CommPs2.c Ps2Mouse.h Ps2Mouse.c - CommonHeader.h - EntryPoint.c - - -################################################################################ -# -# Package Dependency Section - list of Package files that are required for -# this module. -# -################################################################################ [Packages] MdePkg/MdePkg.dec @@ -75,14 +42,6 @@ IntelFrameworkPkg/IntelFrameworkPkg.dec IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec - -################################################################################ -# -# Library Class Section - list of Library Classes that are required for -# this module. -# -################################################################################ - [LibraryClasses] ReportStatusCodeLib UefiBootServicesTableLib @@ -92,14 +51,6 @@ UefiDriverEntryPoint DebugLib - -################################################################################ -# -# Protocol C Name Section - list of Protocol and Protocol Notify C Names -# that this module uses or produces. -# -################################################################################ - [Protocols] gEfiIsaIoProtocolGuid # PROTOCOL TO_START gEfiSimplePointerProtocolGuid # PROTOCOL BY_START diff --git a/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc b/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc index 38556dcca8..cc43a674cd 100644 --- a/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc +++ b/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc @@ -177,9 +177,9 @@ $(WORKSPACE)/IntelFrameworkModulePkg/Library/GraphicsLib/GraphicsLib.inf $(WORKSPACE)/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf $(WORKSPACE)/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBusDxe.inf - $(WORKSPACE)/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBus.inf - $(WORKSPACE)/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppy.inf - $(WORKSPACE)/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerial.inf + $(WORKSPACE)/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf + $(WORKSPACE)/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppyDxe.inf + $(WORKSPACE)/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf $(WORKSPACE)/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf $(WORKSPACE)/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/Ps2MouseDxe.inf $(WORKSPACE)/IntelFrameworkModulePkg/Universal/DataHubDxe/DataHubDxe.inf diff --git a/MdeModulePkg/Core/Dxe/DxeMain.inf b/MdeModulePkg/Core/Dxe/DxeMain.inf index c88ff0317d..be3b6d8f1d 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain.inf +++ b/MdeModulePkg/Core/Dxe/DxeMain.inf @@ -4,7 +4,13 @@ # This module provide an DXE CIS compliant implementation of DXE Core. # Copyright (c) 2006 - 2007, 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. +# 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. # # #**/ @@ -25,17 +31,7 @@ ENTRY_POINT = DxeMain -# -# The following information is for reference only and not required by the build tools. -# # VALID_ARCHITECTURES = IA32 X64 IPF EBC -# - -################################################################################ -# -# Sources Section - list of files that are required for the build to succeed. -# -################################################################################ [Sources.common] Library.h @@ -78,28 +74,11 @@ Dispatcher/Dispatcher.c DxeMain/DxeProtocolNotify.c DxeMain/DxeMain.c - CommonHeader.h - - -################################################################################ -# -# Package Dependency Section - list of Package files that are required for -# this module. -# -################################################################################ [Packages] MdePkg/MdePkg.dec IntelFrameworkPkg/IntelFrameworkPkg.dec - -################################################################################ -# -# Library Class Section - list of Library Classes that are required for -# this module. -# -################################################################################ - [LibraryClasses] BaseMemoryLib CacheMaintenanceLib @@ -112,13 +91,6 @@ DebugLib DxeCoreEntryPoint - -################################################################################ -# -# Guid C Name Section - list of Guids that this module uses or produces. -# -################################################################################ - [Guids] gEfiEventLegacyBootGuid # ALWAYS_CONSUMED gEfiEventReadyToBootGuid # ALWAYS_CONSUMED @@ -134,14 +106,6 @@ gEfiDxeServicesTableGuid # ALWAYS_CONSUMED gEfiMemoryTypeInformationGuid # ALWAYS_CONSUMED - -################################################################################ -# -# Protocol C Name Section - list of Protocol and Protocol Notify C Names -# that this module uses or produces. -# -################################################################################ - [Protocols] gEfiStatusCodeRuntimeProtocolGuid # PROTOCOL SOMETIMES_CONSUMED gEfiCapsuleArchProtocolGuid # PROTOCOL ALWAYS_CONSUMED