summaryrefslogtreecommitdiff
path: root/DuetPkg/KbcResetDxe/Ipf
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-04-17 05:48:13 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-04-17 05:48:13 +0000
commitc69dd9dfad3eb97d5e21f520f3ba35d102ec4cfa (patch)
treee6065a748931519b3cf11d9811c0beef9c80d58e /DuetPkg/KbcResetDxe/Ipf
parentfcf03596d10de53e45292bd9eb4767a8ddc344ed (diff)
downloadedk2-c69dd9dfad3eb97d5e21f520f3ba35d102ec4cfa.zip
edk2-c69dd9dfad3eb97d5e21f520f3ba35d102ec4cfa.tar.gz
edk2-c69dd9dfad3eb97d5e21f520f3ba35d102ec4cfa.tar.bz2
Porting Duet module from EDKI to EDKII
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5076 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'DuetPkg/KbcResetDxe/Ipf')
-rw-r--r--DuetPkg/KbcResetDxe/Ipf/IpfReset.c117
1 files changed, 117 insertions, 0 deletions
diff --git a/DuetPkg/KbcResetDxe/Ipf/IpfReset.c b/DuetPkg/KbcResetDxe/Ipf/IpfReset.c
new file mode 100644
index 0000000..028fd13
--- /dev/null
+++ b/DuetPkg/KbcResetDxe/Ipf/IpfReset.c
@@ -0,0 +1,117 @@
+/*++
+
+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;
+}
+