]> git.proxmox.com Git - mirror_edk2.git/blob - EdkModulePkg/Library/EdkGenericPlatformBdsLib/BdsBoot.c
Rollback wrong commit in r2414
[mirror_edk2.git] / EdkModulePkg / Library / EdkGenericPlatformBdsLib / BdsBoot.c
1 /*++
2
3 Copyright (c) 2006, 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
8
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.
11
12 Module Name:
13
14 BdsPlatform.c
15
16 Abstract:
17
18 This file include all platform action which can be customized
19 by IBV/OEM.
20
21 --*/
22
23 #include "String.h"
24
25 VOID
26 PlatformBdsBootSuccess (
27 IN BDS_COMMON_OPTION *Option
28 )
29 /*++
30
31 Routine Description:
32
33 Hook point after a boot attempt succeeds. We don't expect a boot option to
34 return, so the EFI 1.0 specification defines that you will default to an
35 interactive mode and stop processing the BootOrder list in this case. This
36 is alos a platform implementation and can be customized by IBV/OEM.
37
38 Arguments:
39
40 Option - Pointer to Boot Option that succeeded to boot.
41
42 Returns:
43
44 None.
45
46 --*/
47 {
48 CHAR16 *TmpStr;
49
50 //
51 // If Boot returned with EFI_SUCCESS and there is not in the boot device
52 // select loop then we need to pop up a UI and wait for user input.
53 //
54 TmpStr = GetStringById (STRING_TOKEN (STR_BOOT_SUCCEEDED));
55 if (TmpStr != NULL) {
56 BdsLibOutputStrings (gST->ConOut, TmpStr, Option->Description, L"\n\r", NULL);
57 gBS->FreePool (TmpStr);
58 }
59 }
60
61 VOID
62 PlatformBdsBootFail (
63 IN BDS_COMMON_OPTION *Option,
64 IN EFI_STATUS Status,
65 IN CHAR16 *ExitData,
66 IN UINTN ExitDataSize
67 )
68 /*++
69
70 Routine Description:
71
72 Hook point after a boot attempt fails.
73
74 Arguments:
75
76 Option - Pointer to Boot Option that failed to boot.
77
78 Status - Status returned from failed boot.
79
80 ExitData - Exit data returned from failed boot.
81
82 ExitDataSize - Exit data size returned from failed boot.
83
84 Returns:
85
86 None.
87
88 --*/
89 {
90 CHAR16 *TmpStr;
91
92 //
93 // If Boot returned with failed status then we need to pop up a UI and wait
94 // for user input.
95 //
96 TmpStr = GetStringById (STRING_TOKEN (STR_BOOT_FAILED));
97 if (TmpStr != NULL) {
98 BdsLibOutputStrings (gST->ConOut, TmpStr, Option->Description, L"\n\r", NULL);
99 gBS->FreePool (TmpStr);
100 }
101
102 }
103