IsaAcpiDxe: DuetPkg => PcAtChipsetPkg
[edk2.git] / DuetPkg / KbcResetDxe / ResetEntry.c
blobbcef440fcf3ef083583f1d65d3e60522a9ffb7e7
1 /*++
3 Copyright (c) 2009, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 --*/
16 #include "Reset.h"
19 // The handle onto which the Reset Architectural Protocol is installed
21 EFI_HANDLE mResetHandle = NULL;
24 EFI_STATUS
25 EFIAPI
26 InitializeReset (
27 IN EFI_HANDLE ImageHandle,
28 IN EFI_SYSTEM_TABLE *SystemTable
30 /*++
32 Routine Description:
34 Initialize the state information for the Reset Architectural Protocol
36 Arguments:
38 ImageHandle of the loaded driver
39 Pointer to the System Table
41 Returns:
43 Status
45 EFI_SUCCESS - thread can be successfully created
46 EFI_OUT_OF_RESOURCES - cannot allocate protocol data structure
47 EFI_DEVICE_ERROR - cannot create the timer service
49 --*/
50 // TODO: SystemTable - add argument and description to function comment
52 EFI_STATUS Status;
55 // Make sure the Reset Architectural Protocol is not already installed in the system
57 ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiResetArchProtocolGuid);
60 // Hook the runtime service table
62 SystemTable->RuntimeServices->ResetSystem = KbcResetSystem;
65 // Now install the Reset RT AP on a new handle
67 Status = gBS->InstallMultipleProtocolInterfaces (
68 &mResetHandle,
69 &gEfiResetArchProtocolGuid,
70 NULL,
71 NULL
73 ASSERT_EFI_ERROR (Status);
75 return Status;