]> git.proxmox.com Git - mirror_edk2.git/blob - PcAtChipsetPkg/KbcResetDxe/ResetEntry.c
Refine the file/function comments to follow doxygen format
[mirror_edk2.git] / PcAtChipsetPkg / KbcResetDxe / ResetEntry.c
1 /** @file
2 Driver entry for KbcReset driver.
3
4 Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved. <BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 **/
13
14 #include "Reset.h"
15
16 //
17 // The handle onto which the Reset Architectural Protocol is installed
18 //
19 EFI_HANDLE mResetHandle = NULL;
20
21
22 /**
23 Initialize the state information for the Reset Architectural Protocol
24
25 @param ImageHandle Handle of the loaded driver
26 @param SystemTable Pointer to the System Table
27
28 @retval EFI_SUCCESS Thread can be successfully created
29 @retval EFI_OUT_OF_RESOURCES Cannot allocate protocol data structure
30 @retval EFI_DEVICE_ERROR Cannot create the timer service
31
32 **/
33 EFI_STATUS
34 EFIAPI
35 InitializeReset (
36 IN EFI_HANDLE ImageHandle,
37 IN EFI_SYSTEM_TABLE *SystemTable
38 )
39 {
40 EFI_STATUS Status;
41
42 //
43 // Make sure the Reset Architectural Protocol is not already installed in the system
44 //
45 ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiResetArchProtocolGuid);
46
47 //
48 // Hook the runtime service table
49 //
50 SystemTable->RuntimeServices->ResetSystem = KbcResetSystem;
51
52 //
53 // Now install the Reset RT AP on a new handle
54 //
55 Status = gBS->InstallMultipleProtocolInterfaces (
56 &mResetHandle,
57 &gEfiResetArchProtocolGuid,
58 NULL,
59 NULL
60 );
61 ASSERT_EFI_ERROR (Status);
62
63 return Status;
64 }