From 6583c3582fc6f36131a9516ed3027122f19a842e Mon Sep 17 00:00:00 2001 From: qhuang8 Date: Tue, 3 Feb 2009 00:55:00 +0000 Subject: [PATCH] Clean up KbcRestDxe: 1. Remove the architecture subdirectory (IPF architecture is not supported any more 2. Merge IA32 source with x64 source to ResetEntry.c in the upper level directory) 3. Remove the used DXS file git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7409 6f19259b-4bc3-4df7-8a09-765794883524 --- DuetPkg/KbcResetDxe/Ia32/Ia32Reset.c | 79 ------------ DuetPkg/KbcResetDxe/Ia32Reset.dxs | 27 ---- DuetPkg/KbcResetDxe/Ipf/IpfReset.c | 117 ------------------ DuetPkg/KbcResetDxe/IpfReset.dxs | 27 ---- DuetPkg/KbcResetDxe/Reset.inf | 10 +- .../{X64/X64Reset.c => ResetEntry.c} | 5 +- DuetPkg/KbcResetDxe/X64Reset.dxs | 27 ---- 7 files changed, 2 insertions(+), 290 deletions(-) delete mode 100644 DuetPkg/KbcResetDxe/Ia32/Ia32Reset.c delete mode 100644 DuetPkg/KbcResetDxe/Ia32Reset.dxs delete mode 100644 DuetPkg/KbcResetDxe/Ipf/IpfReset.c delete mode 100644 DuetPkg/KbcResetDxe/IpfReset.dxs rename DuetPkg/KbcResetDxe/{X64/X64Reset.c => ResetEntry.c} (91%) delete mode 100644 DuetPkg/KbcResetDxe/X64Reset.dxs diff --git a/DuetPkg/KbcResetDxe/Ia32/Ia32Reset.c b/DuetPkg/KbcResetDxe/Ia32/Ia32Reset.c deleted file mode 100644 index 00c5223a14..0000000000 --- a/DuetPkg/KbcResetDxe/Ia32/Ia32Reset.c +++ /dev/null @@ -1,79 +0,0 @@ -/*++ - -Copyright (c) 2006, 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: - Ia32Reset.c - -Abstract: - ---*/ - -#include "Reset.h" - -// -// The handle onto which the Reset Architectural Protocol is installed -// -EFI_HANDLE mResetHandle = NULL; - - -EFI_STATUS -EFIAPI -InitializeReset ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable - ) -/*++ - -Routine Description: - - Initialize the state information for the Reset Architectural Protocol - -Arguments: - - ImageHandle of the loaded driver - Pointer to the System Table - -Returns: - - Status - - EFI_SUCCESS - thread can be successfully created - EFI_OUT_OF_RESOURCES - cannot allocate protocol data structure - EFI_DEVICE_ERROR - cannot create the timer service - ---*/ -// TODO: SystemTable - add argument and description to function comment -{ - EFI_STATUS Status; - - // - // Make sure the Reset Architectural Protocol is not already installed in the system - // - ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiResetArchProtocolGuid); - - // - // Hook the runtime service table - // - SystemTable->RuntimeServices->ResetSystem = KbcResetSystem; - - // - // Now install the Reset RT AP on a new handle - // - Status = gBS->InstallMultipleProtocolInterfaces ( - &mResetHandle, - &gEfiResetArchProtocolGuid, - NULL, - NULL - ); - ASSERT_EFI_ERROR (Status); - - return Status; -} diff --git a/DuetPkg/KbcResetDxe/Ia32Reset.dxs b/DuetPkg/KbcResetDxe/Ia32Reset.dxs deleted file mode 100644 index ae2b86de40..0000000000 --- a/DuetPkg/KbcResetDxe/Ia32Reset.dxs +++ /dev/null @@ -1,27 +0,0 @@ -/*++ - -Copyright (c) 2006, 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: - Ia32Reset.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/DuetPkg/KbcResetDxe/Ipf/IpfReset.c b/DuetPkg/KbcResetDxe/Ipf/IpfReset.c deleted file mode 100644 index 028fd13876..0000000000 --- a/DuetPkg/KbcResetDxe/Ipf/IpfReset.c +++ /dev/null @@ -1,117 +0,0 @@ -/*++ - -Copyright (c) 2006, 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: - IpfReset.c - -Abstract: - ---*/ - -#include "Cf9Reset.h" - -SAL_RETURN_REGS -ResetEsalServicesClassCommonEntry ( - IN UINT64 FunctionId, - IN UINT64 Arg2, - IN UINT64 Arg3, - IN UINT64 Arg4, - IN UINT64 Arg5, - IN UINT64 Arg6, - IN UINT64 Arg7, - IN UINT64 Arg8, - IN SAL_EXTENDED_SAL_PROC ExtendedSalProc, - IN BOOLEAN VirtualMode, - IN VOID *Global - ) -/*++ - -Routine Description: - - Main entry for Extended SAL Reset Services - -Arguments: - - FunctionId Function Id which needed to be called. - Arg2 EFI_RESET_TYPE, whether WARM of COLD reset - Arg3 Last EFI_STATUS - Arg4 Data Size of UNICODE STRING passed in ARG5 - Arg5 Unicode String which CHAR16* - -Returns: - - SAL_RETURN_REGS - ---*/ -// TODO: Arg6 - add argument and description to function comment -// TODO: Arg7 - add argument and description to function comment -// TODO: Arg8 - add argument and description to function comment -// TODO: ExtendedSalProc - add argument and description to function comment -// TODO: VirtualMode - add argument and description to function comment -// TODO: Global - add argument and description to function comment -{ - SAL_RETURN_REGS ReturnVal; - - switch (FunctionId) { - case ResetSystem: - KbcResetSystem (Arg2, Arg3, (UINTN) Arg4, (VOID *) Arg5); - ReturnVal.Status = EFI_SUCCESS; - break; - - default: - ReturnVal.Status = EFI_SAL_INVALID_ARGUMENT; - break; - } - - return ReturnVal; -} - -EFI_STATUS -EFIAPI -InitializeReset ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable - ) -/*++ - -Routine Description: - - Initialize the state information for the Reset Architectural Protocol - -Arguments: - - ImageHandle of the loaded driver - Pointer to the System Table - -Returns: - - Status - - EFI_SUCCESS - thread can be successfully created - EFI_OUT_OF_RESOURCES - cannot allocate protocol data structure - EFI_DEVICE_ERROR - cannot create the timer service - ---*/ -// TODO: SystemTable - add argument and description to function comment -{ - EfiInitializeRuntimeDriverLib (ImageHandle, SystemTable, NULL); - - RegisterEsalClass ( - &gEfiExtendedSalResetServicesProtocolGuid, - NULL, - ResetEsalServicesClassCommonEntry, - ResetSystem, - NULL - ); - - return EFI_SUCCESS; -} - diff --git a/DuetPkg/KbcResetDxe/IpfReset.dxs b/DuetPkg/KbcResetDxe/IpfReset.dxs deleted file mode 100644 index 6bb389199d..0000000000 --- a/DuetPkg/KbcResetDxe/IpfReset.dxs +++ /dev/null @@ -1,27 +0,0 @@ -/*++ - -Copyright (c) 2006, 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: - IpfReset.dxs - -Abstract: - Dependency expression source file. - ---*/ - - -#include "EfiDepex.h" - -#include EFI_PROTOCOL_DEFINITION (ExtendedSalGuid) - -DEPENDENCY_START - EFI_EXTENDED_SAL_BASE_IO_SERVICES_PROTOCOL_GUID -DEPENDENCY_END diff --git a/DuetPkg/KbcResetDxe/Reset.inf b/DuetPkg/KbcResetDxe/Reset.inf index 38ad0140c7..a1bcaebcef 100644 --- a/DuetPkg/KbcResetDxe/Reset.inf +++ b/DuetPkg/KbcResetDxe/Reset.inf @@ -40,15 +40,7 @@ [Sources.common] Reset.c Reset.h - -[Sources.ipf] - Ipf/IpfReset.c - -[Sources.ia32] - Ia32/Ia32Reset.c - -[Sources.x64] - X64/X64Reset.c + ResetEntry.c [Protocols] gEfiResetArchProtocolGuid diff --git a/DuetPkg/KbcResetDxe/X64/X64Reset.c b/DuetPkg/KbcResetDxe/ResetEntry.c similarity index 91% rename from DuetPkg/KbcResetDxe/X64/X64Reset.c rename to DuetPkg/KbcResetDxe/ResetEntry.c index 1fd79bf0fe..bcef440fcf 100644 --- a/DuetPkg/KbcResetDxe/X64/X64Reset.c +++ b/DuetPkg/KbcResetDxe/ResetEntry.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2006, Intel Corporation +Copyright (c) 2009, 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 @@ -9,10 +9,7 @@ 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: - x64Reset.c -Abstract: --*/ diff --git a/DuetPkg/KbcResetDxe/X64Reset.dxs b/DuetPkg/KbcResetDxe/X64Reset.dxs deleted file mode 100644 index a2b1498f6c..0000000000 --- a/DuetPkg/KbcResetDxe/X64Reset.dxs +++ /dev/null @@ -1,27 +0,0 @@ -/*++ - -Copyright (c) 2006, 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: - x64Reset.dxs - -Abstract: - Dependency expression source file. - ---*/ - - -#include "EfiDepex.h" - -#include EFI_PROTOCOL_DEFINITION (CpuIO) - -DEPENDENCY_START - EFI_CPU_IO_PROTOCOL_GUID -DEPENDENCY_END -- 2.39.2