]>
Commit | Line | Data |
---|---|---|
f4cd24da RN |
1 | /** @file\r |
2 | Head file for BDS Architectural Protocol implementation\r | |
3 | \r | |
4 | Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>\r | |
5 | This program and the accompanying materials\r | |
6 | are licensed and made available under the terms and conditions of the BSD License\r | |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | **/\r | |
14 | \r | |
15 | #ifndef _BDS_MODULE_H_\r | |
16 | #define _BDS_MODULE_H_\r | |
17 | \r | |
18 | #include <Uefi.h>\r | |
19 | #include <Guid/GlobalVariable.h>\r | |
20 | #include <Guid/ConnectConInEvent.h>\r | |
21 | #include <Guid/Performance.h>\r | |
22 | #include <Guid/StatusCodeDataTypeVariable.h>\r | |
23 | \r | |
24 | #include <Protocol/Bds.h>\r | |
25 | #include <Protocol/LoadedImage.h>\r | |
26 | #include <Protocol/VariableLock.h>\r | |
f4cd24da RN |
27 | \r |
28 | #include <Library/UefiDriverEntryPoint.h>\r | |
29 | #include <Library/DebugLib.h>\r | |
30 | #include <Library/BaseMemoryLib.h>\r | |
31 | #include <Library/UefiBootServicesTableLib.h>\r | |
32 | #include <Library/UefiRuntimeServicesTableLib.h>\r | |
33 | #include <Library/UefiLib.h>\r | |
34 | #include <Library/MemoryAllocationLib.h>\r | |
35 | #include <Library/ReportStatusCodeLib.h>\r | |
36 | #include <Library/BaseLib.h>\r | |
37 | #include <Library/PcdLib.h>\r | |
38 | #include <Library/PerformanceLib.h>\r | |
39 | #include <Library/DevicePathLib.h>\r | |
40 | #include <Library/PrintLib.h>\r | |
41 | \r | |
42 | #include <Library/UefiBootManagerLib.h>\r | |
43 | #include <Library/PlatformBootManagerLib.h>\r | |
44 | \r | |
67b1c254 RN |
45 | #if !defined (EFI_REMOVABLE_MEDIA_FILE_NAME)\r |
46 | #if defined (MDE_CPU_EBC)\r | |
47 | //\r | |
48 | // Uefi specification only defines the default boot file name for IA32, X64\r | |
49 | // and IPF processor, so need define boot file name for EBC architecture here.\r | |
50 | //\r | |
51 | #define EFI_REMOVABLE_MEDIA_FILE_NAME L"\\EFI\\BOOT\\BOOTEBC.EFI"\r | |
52 | #else\r | |
53 | #error "Can not determine the default boot file name for unknown processor type!"\r | |
54 | #endif\r | |
55 | #endif\r | |
56 | \r | |
f4cd24da RN |
57 | /**\r |
58 | \r | |
59 | Service routine for BdsInstance->Entry(). Devices are connected, the\r | |
60 | consoles are initialized, and the boot options are tried.\r | |
61 | \r | |
62 | @param This Protocol Instance structure.\r | |
63 | \r | |
64 | **/\r | |
65 | VOID\r | |
66 | EFIAPI\r | |
67 | BdsEntry (\r | |
68 | IN EFI_BDS_ARCH_PROTOCOL *This\r | |
69 | );\r | |
70 | \r | |
71 | /**\r | |
72 | Set the variable and report the error through status code upon failure.\r | |
73 | \r | |
74 | @param VariableName A Null-terminated string that is the name of the vendor's variable.\r | |
75 | Each VariableName is unique for each VendorGuid. VariableName must\r | |
76 | contain 1 or more characters. If VariableName is an empty string,\r | |
77 | then EFI_INVALID_PARAMETER is returned.\r | |
78 | @param VendorGuid A unique identifier for the vendor.\r | |
79 | @param Attributes Attributes bitmask to set for the variable.\r | |
80 | @param DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE, \r | |
81 | EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS, or \r | |
82 | EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS attribute is set, a size of zero \r | |
83 | causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is \r | |
84 | set, then a SetVariable() call with a DataSize of zero will not cause any change to \r | |
85 | the variable value (the timestamp associated with the variable may be updated however \r | |
86 | even if no new data value is provided,see the description of the \r | |
87 | EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not \r | |
88 | be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated). \r | |
89 | @param Data The contents for the variable.\r | |
90 | \r | |
91 | @retval EFI_SUCCESS The firmware has successfully stored the variable and its data as\r | |
92 | defined by the Attributes.\r | |
93 | @retval EFI_INVALID_PARAMETER An invalid combination of attribute bits, name, and GUID was supplied, or the\r | |
94 | DataSize exceeds the maximum allowed.\r | |
95 | @retval EFI_INVALID_PARAMETER VariableName is an empty string.\r | |
96 | @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the variable and its data.\r | |
97 | @retval EFI_DEVICE_ERROR The variable could not be retrieved due to a hardware error.\r | |
98 | @retval EFI_WRITE_PROTECTED The variable in question is read-only.\r | |
99 | @retval EFI_WRITE_PROTECTED The variable in question cannot be deleted.\r | |
100 | @retval EFI_SECURITY_VIOLATION The variable could not be written due to EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS \r | |
101 | or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS being set, but the AuthInfo \r | |
102 | does NOT pass the validation check carried out by the firmware.\r | |
103 | \r | |
104 | @retval EFI_NOT_FOUND The variable trying to be updated or deleted was not found.\r | |
105 | **/\r | |
106 | EFI_STATUS\r | |
107 | BdsDxeSetVariableAndReportStatusCodeOnError (\r | |
108 | IN CHAR16 *VariableName,\r | |
109 | IN EFI_GUID *VendorGuid,\r | |
110 | IN UINT32 Attributes,\r | |
111 | IN UINTN DataSize,\r | |
112 | IN VOID *Data\r | |
113 | );\r | |
114 | \r | |
115 | #endif\r |