]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - ArmEbPkg/Library/ResetSystemLib/ResetSystemLib.c
Update the copyright notice format
[mirror_edk2.git] / ArmEbPkg / Library / ResetSystemLib / ResetSystemLib.c
... / ...
CommitLineData
1/** @file\r
2 Template library implementation to support ResetSystem Runtime call.\r
3 \r
4 Fill in the templates with what ever makes you system reset.\r
5\r
6\r
7 Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
8 \r
9 This program and the accompanying materials\r
10 are licensed and made available under the terms and conditions of the BSD License\r
11 which accompanies this distribution. The full text of the license may be found at\r
12 http://opensource.org/licenses/bsd-license.php\r
13\r
14 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
15 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
16\r
17**/\r
18\r
19\r
20#include <PiDxe.h>\r
21\r
22#include <Library/PcdLib.h>\r
23#include <Library/ArmLib.h>\r
24#include <Library/CacheMaintenanceLib.h>\r
25#include <Library/DebugLib.h>\r
26#include <Library/EfiResetSystemLib.h>\r
27\r
28#include <ArmEbUart.h>\r
29\r
30/**\r
31 Resets the entire platform.\r
32\r
33 @param ResetType The type of reset to perform.\r
34 @param ResetStatus The status code for the reset.\r
35 @param DataSize The size, in bytes, of WatchdogData.\r
36 @param ResetData For a ResetType of EfiResetCold, EfiResetWarm, or\r
37 EfiResetShutdown the data buffer starts with a Null-terminated\r
38 Unicode string, optionally followed by additional binary data.\r
39\r
40**/\r
41EFI_STATUS\r
42EFIAPI\r
43LibResetSystem (\r
44 IN EFI_RESET_TYPE ResetType,\r
45 IN EFI_STATUS ResetStatus,\r
46 IN UINTN DataSize,\r
47 IN CHAR16 *ResetData OPTIONAL\r
48 )\r
49{\r
50 if (ResetData != NULL) {\r
51 DEBUG ((EFI_D_ERROR, "%s", ResetData));\r
52 }\r
53\r
54 switch (ResetType) {\r
55 case EfiResetWarm:\r
56 // Map a warm reset into a cold reset\r
57 case EfiResetCold:\r
58 case EfiResetShutdown:\r
59 default:\r
60 break;\r
61 }\r
62\r
63 // If the reset didn't work, return an error.\r
64 ASSERT (FALSE);\r
65 return EFI_DEVICE_ERROR;\r
66}\r
67 \r
68\r
69\r
70/**\r
71 Initialize any infrastructure required for LibResetSystem () to function.\r
72\r
73 @param ImageHandle The firmware allocated handle for the EFI image.\r
74 @param SystemTable A pointer to the EFI System Table.\r
75 \r
76 @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.\r
77\r
78**/\r
79EFI_STATUS\r
80EFIAPI\r
81LibInitializeResetSystem (\r
82 IN EFI_HANDLE ImageHandle,\r
83 IN EFI_SYSTEM_TABLE *SystemTable\r
84 )\r
85{\r
86 return EFI_SUCCESS;\r
87}\r
88\r