]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h
IntelFrameworkModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / BdsDxe / Bds.h
index 31d6df57058c7f164e9008046d0f4479203f271a..5239a661647f0fea7643197205065d416e416221 100644 (file)
@@ -1,14 +1,8 @@
 /** @file\r
   Head file for BDS Architectural Protocol implementation\r
 \r
-Copyright (c) 2004 - 2008, Intel Corporation. <BR>\r
-All rights reserved. This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -19,19 +13,24 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <IndustryStandard/PeImage.h>\r
 #include <Guid/MdeModuleHii.h>\r
 #include <Guid/FileSystemVolumeLabelInfo.h>\r
+#include <Guid/HiiPlatformSetupFormset.h>\r
+#include <Guid/StatusCodeDataTypeVariable.h>\r
 #include <Protocol/DevicePath.h>\r
-#include <Guid/DataHubRecords.h>\r
+#include <IndustryStandard/SmBios.h>\r
 #include <Protocol/LoadFile.h>\r
-#include <Protocol/CpuIo.h>\r
 #include <Guid/FileInfo.h>\r
 #include <Protocol/HiiConfigRouting.h>\r
 #include <Protocol/Bds.h>\r
-#include <Protocol/DataHub.h>\r
+#include <Protocol/Smbios.h>\r
 #include <Protocol/UgaDraw.h>\r
 #include <Protocol/BlockIo.h>\r
 #include <Guid/GlobalVariable.h>\r
 #include <Guid/CapsuleVendor.h>\r
 #include <Guid/StatusCodeDataTypeId.h>\r
+#include <Guid/LegacyDevOrder.h>\r
+#include <Guid/BdsHii.h>\r
+#include <Guid/ConnectConInEvent.h>\r
+#include <Guid/FmpCapsule.h>\r
 #include <Protocol/GenericMemoryTest.h>\r
 #include <Protocol/FormBrowser2.h>\r
 #include <Protocol/HiiConfigAccess.h>\r
@@ -42,6 +41,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/SerialIo.h>\r
 #include <Protocol/LegacyBios.h>\r
 #include <Protocol/SimpleTextInEx.h>\r
+#include <Protocol/DriverHealth.h>\r
+#include <Protocol/BootLogo.h>\r
+#include <Protocol/VariableLock.h>\r
 \r
 #include <Library/UefiDriverEntryPoint.h>\r
 #include <Library/PrintLib.h>\r
@@ -60,7 +62,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/CapsuleLib.h>\r
 #include <Library/HiiLib.h>\r
 #include <Library/DevicePathLib.h>\r
-#include <Library/PcdLib.h>\r
+#include <Library/UefiHiiServicesLib.h>\r
 \r
 #include <Library/GenericBdsLib.h>\r
 #include <Library/PlatformBdsLib.h>\r
@@ -138,4 +140,91 @@ BdsEntry (
   IN  EFI_BDS_ARCH_PROTOCOL *This\r
   );\r
 \r
+\r
+/**\r
+  Perform the memory test base on the memory test intensive level,\r
+  and update the memory resource.\r
+\r
+  @param  Level         The memory test intensive level.\r
+\r
+  @retval EFI_STATUS    Success test all the system memory and update\r
+                        the memory resource\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+BdsMemoryTest (\r
+  IN EXTENDMEM_COVERAGE_LEVEL Level\r
+  );\r
+\r
+/**\r
+\r
+  This routine is called to see if there are any capsules we need to process.\r
+  If the boot mode is not UPDATE, then we do nothing. Otherwise find the\r
+  capsule HOBS and produce firmware volumes for them via the DXE service.\r
+  Then call the dispatcher to dispatch drivers from them. Finally, check\r
+  the status of the updates.\r
+\r
+  This function should be called by BDS in case we need to do some\r
+  sort of processing even if there is no capsule to process. We\r
+  need to do this if an earlier update went away and we need to\r
+  clear the capsule variable so on the next reset PEI does not see it and\r
+  think there is a capsule available.\r
+\r
+  @param BootMode                 the current boot mode\r
+\r
+  @retval EFI_INVALID_PARAMETER   boot mode is not correct for an update\r
+  @retval EFI_SUCCESS             There is no error when processing capsule\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+BdsProcessCapsules (\r
+  EFI_BOOT_MODE BootMode\r
+  );\r
+\r
+/**\r
+  Set the variable and report the error through status code upon failure.\r
+\r
+  @param  VariableName           A Null-terminated string that is the name of the vendor's variable.\r
+                                 Each VariableName is unique for each VendorGuid. VariableName must\r
+                                 contain 1 or more characters. If VariableName is an empty string,\r
+                                 then EFI_INVALID_PARAMETER is returned.\r
+  @param  VendorGuid             A unique identifier for the vendor.\r
+  @param  Attributes             Attributes bitmask to set for the variable.\r
+  @param  DataSize               The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE,\r
+                                 EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS, or\r
+                                 EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS attribute is set, a size of zero\r
+                                 causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is\r
+                                 set, then a SetVariable() call with a DataSize of zero will not cause any change to\r
+                                 the variable value (the timestamp associated with the variable may be updated however\r
+                                 even if no new data value is provided,see the description of the\r
+                                 EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not\r
+                                 be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated).\r
+  @param  Data                   The contents for the variable.\r
+\r
+  @retval EFI_SUCCESS            The firmware has successfully stored the variable and its data as\r
+                                 defined by the Attributes.\r
+  @retval EFI_INVALID_PARAMETER  An invalid combination of attribute bits, name, and GUID was supplied, or the\r
+                                 DataSize exceeds the maximum allowed.\r
+  @retval EFI_INVALID_PARAMETER  VariableName is an empty string.\r
+  @retval EFI_OUT_OF_RESOURCES   Not enough storage is available to hold the variable and its data.\r
+  @retval EFI_DEVICE_ERROR       The variable could not be retrieved due to a hardware error.\r
+  @retval EFI_WRITE_PROTECTED    The variable in question is read-only.\r
+  @retval EFI_WRITE_PROTECTED    The variable in question cannot be deleted.\r
+  @retval EFI_SECURITY_VIOLATION The variable could not be written due to EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS\r
+                                 or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS being set, but the AuthInfo\r
+                                 does NOT pass the validation check carried out by the firmware.\r
+\r
+  @retval EFI_NOT_FOUND          The variable trying to be updated or deleted was not found.\r
+**/\r
+EFI_STATUS\r
+BdsDxeSetVariableAndReportStatusCodeOnError (\r
+  IN CHAR16     *VariableName,\r
+  IN EFI_GUID   *VendorGuid,\r
+  IN UINT32     Attributes,\r
+  IN UINTN      DataSize,\r
+  IN VOID       *Data\r
+  );\r
+\r
 #endif\r