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
This commit is contained in:
qhuang8 2009-02-03 00:55:00 +00:00
parent 4b869fed0d
commit 6583c3582f
7 changed files with 2 additions and 290 deletions

View File

@ -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;
}

View File

@ -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

View File

@ -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;
}

View File

@ -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

View File

@ -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

View File

@ -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:
--*/

View File

@ -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