]> git.proxmox.com Git - mirror_edk2.git/blame - EdkModulePkg/Library/EdkGenericPlatformBdsLib/BdsBoot.c
Rollback wrong commit in r2414
[mirror_edk2.git] / EdkModulePkg / Library / EdkGenericPlatformBdsLib / BdsBoot.c
CommitLineData
52657feb 1/*++\r
2\r
3Copyright (c) 2006, Intel Corporation \r
4All rights reserved. This program and the accompanying materials \r
5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 BdsPlatform.c\r
15\r
16Abstract:\r
17\r
18 This file include all platform action which can be customized\r
19 by IBV/OEM.\r
20\r
21--*/\r
22\r
23#include "String.h"
24\r
25VOID\r
26PlatformBdsBootSuccess (\r
27 IN BDS_COMMON_OPTION *Option\r
28 )\r
29/*++\r
30\r
31Routine Description:\r
32 \r
33 Hook point after a boot attempt succeeds. We don't expect a boot option to\r
34 return, so the EFI 1.0 specification defines that you will default to an\r
35 interactive mode and stop processing the BootOrder list in this case. This\r
36 is alos a platform implementation and can be customized by IBV/OEM.\r
37\r
38Arguments:\r
39\r
40 Option - Pointer to Boot Option that succeeded to boot.\r
41\r
42Returns:\r
43 \r
44 None.\r
45\r
46--*/\r
47{\r
48 CHAR16 *TmpStr;\r
49\r
50 //\r
51 // If Boot returned with EFI_SUCCESS and there is not in the boot device\r
52 // select loop then we need to pop up a UI and wait for user input.\r
53 //\r
54 TmpStr = GetStringById (STRING_TOKEN (STR_BOOT_SUCCEEDED));\r
55 if (TmpStr != NULL) {\r
56 BdsLibOutputStrings (gST->ConOut, TmpStr, Option->Description, L"\n\r", NULL);\r
57 gBS->FreePool (TmpStr);\r
58 }\r
59}\r
60\r
61VOID\r
62PlatformBdsBootFail (\r
63 IN BDS_COMMON_OPTION *Option,\r
64 IN EFI_STATUS Status,\r
65 IN CHAR16 *ExitData,\r
66 IN UINTN ExitDataSize\r
67 )\r
68/*++\r
69\r
70Routine Description:\r
71 \r
72 Hook point after a boot attempt fails.\r
73\r
74Arguments:\r
75 \r
76 Option - Pointer to Boot Option that failed to boot.\r
77\r
78 Status - Status returned from failed boot.\r
79\r
80 ExitData - Exit data returned from failed boot.\r
81\r
82 ExitDataSize - Exit data size returned from failed boot.\r
83\r
84Returns:\r
85 \r
86 None.\r
87\r
88--*/\r
89{\r
90 CHAR16 *TmpStr;\r
91\r
92 //\r
93 // If Boot returned with failed status then we need to pop up a UI and wait\r
94 // for user input.\r
95 //\r
96 TmpStr = GetStringById (STRING_TOKEN (STR_BOOT_FAILED));\r
97 if (TmpStr != NULL) {\r
98 BdsLibOutputStrings (gST->ConOut, TmpStr, Option->Description, L"\n\r", NULL);\r
99 gBS->FreePool (TmpStr);\r
100 }\r
101\r
102}\r
103\r