2 Entrypoint of AcpiResetDxe driver.
4 Copyright (c) 2010, Intel Corporation
5 All rights reserved. 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
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.
16 EFI_ACPI_DESCRIPTION mAcpiDescription
;
21 @param[in] ResetType Warm or cold
22 @param[in] ResetStatus Possible cause of reset
23 @param[in] DataSize Size of ResetData in bytes
24 @param[in] ResetData Optional Unicode string
30 IN EFI_RESET_TYPE ResetType
,
31 IN EFI_STATUS ResetStatus
,
33 IN CHAR16
*ResetData OPTIONAL
36 AcpiResetSystem (ResetType
, ResetStatus
, DataSize
, ResetData
, &mAcpiDescription
);
40 Initialize the state information for the Reset Architectural Protocol.
42 @param[in] ImageHandle Image handle of the loaded driver
43 @param[in] SystemTable Pointer to the System Table
45 @retval EFI_SUCCESS Thread can be successfully created
46 @retval EFI_UNSUPPORTED Cannot find the info to reset system
52 IN EFI_HANDLE ImageHandle
,
53 IN EFI_SYSTEM_TABLE
*SystemTable
59 // Initialize AcpiDescription
61 if (!GetAcpiDescription (&mAcpiDescription
)) {
62 return EFI_UNSUPPORTED
;
66 // Make sure the Reset Architectural Protocol is not already installed in the system
68 ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL
, &gEfiResetArchProtocolGuid
);
71 // Hook the runtime service table
73 SystemTable
->RuntimeServices
->ResetSystem
= EfiAcpiResetSystem
;
76 // Now install the Reset RT AP on a new handle
79 Status
= gBS
->InstallMultipleProtocolInterfaces (
81 &gEfiResetArchProtocolGuid
,
85 ASSERT_EFI_ERROR (Status
);