]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.h
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Universal / CapsuleRuntimeDxe / CapsuleService.h
index 91fdbb307072c6e3a3bedc3e4a23f51873eaf811..069df3c750808d83e42a7a5b534b93e1a9c10b4f 100644 (file)
@@ -1,56 +1,70 @@
-/*++\r
+/** @file\r
+  Capsule Runtime Driver produces two UEFI capsule runtime services.\r
+  (UpdateCapsule, QueryCapsuleCapabilities)\r
+  It installs the Capsule Architectural Protocol defined in PI1.0a to signify\r
+  the capsule runtime services are ready.\r
 \r
-Copyright (c) 2006, Intel Corporation\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
+  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2018, Linaro, Ltd. All rights reserved.<BR>\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
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
-Module Name:\r
+**/\r
 \r
-  CapsuleService.h\r
+#ifndef _CAPSULE_SERVICE_H_\r
+#define _CAPSULE_SERVICE_H_\r
 \r
-Abstract:\r
-\r
-  Capsule Runtime Service\r
-\r
---*/\r
-\r
-#ifndef  _CAPSULE_RUNTIME_H_\r
-#define  _CAPSULE_RUNTIME_H_\r
-\r
-\r
-#include <PiDxe.h>\r
+#include <Uefi.h>\r
 \r
 #include <Protocol/Capsule.h>\r
 #include <Guid/CapsuleVendor.h>\r
+#include <Guid/FmpCapsule.h>\r
 \r
-#include <Library/UefiDriverEntryPoint.h>\r
-#include <Library/UefiRuntimeLib.h>\r
 #include <Library/DebugLib.h>\r
 #include <Library/PcdLib.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
 #include <Library/CapsuleLib.h>\r
+#include <Library/UefiDriverEntryPoint.h>\r
+#include <Library/UefiBootServicesTableLib.h>\r
+#include <Library/UefiRuntimeServicesTableLib.h>\r
+#include <Library/UefiRuntimeLib.h>\r
+#include <Library/BaseLib.h>\r
+#include <Library/PrintLib.h>\r
+#include <Library/BaseMemoryLib.h>\r
+\r
+/**\r
+  Create the variable to save the base address of page table and stack\r
+  for transferring into long mode in IA32 PEI.\r
+**/\r
+VOID\r
+SaveLongModeContext (\r
+  VOID\r
+  );\r
 \r
-EFI_STATUS\r
-EFIAPI\r
-UpdateCapsule(\r
-  IN EFI_CAPSULE_HEADER      **CapsuleHeaderArray,\r
-  IN UINTN                   CapsuleCount,\r
-  IN EFI_PHYSICAL_ADDRESS    ScatterGatherList OPTIONAL\r
+/**\r
+  Whether the platform supports capsules that persist across reset. Note that\r
+  some platforms only support such capsules at boot time.\r
+\r
+  @return TRUE  if a PersistAcrossReset capsule may be passed to UpdateCapsule()\r
+                at this time\r
+          FALSE otherwise\r
+**/\r
+BOOLEAN\r
+IsPersistAcrossResetCapsuleSupported (\r
+  VOID\r
   );\r
 \r
-EFI_STATUS\r
-EFIAPI\r
-QueryCapsuleCapabilities(\r
-  IN  EFI_CAPSULE_HEADER   **CapsuleHeaderArray,\r
-  IN  UINTN                CapsuleCount,\r
-  OUT UINT64               *MaxiumCapsuleSize,\r
-  OUT EFI_RESET_TYPE       *ResetType\r
+/**\r
+  Writes Back a range of data cache lines covering a set of capsules in memory.\r
+\r
+  Writes Back the data cache lines specified by ScatterGatherList.\r
+\r
+  @param  ScatterGatherList Physical address of the data structure that\r
+                            describes a set of capsules in memory\r
+\r
+**/\r
+VOID\r
+CapsuleCacheWriteBack (\r
+  IN  EFI_PHYSICAL_ADDRESS    ScatterGatherList\r
   );\r
 \r
 #endif\r
-\r