]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.h
Code scrub for the Capsule, SecurityStub, and Crc32 library instance.
[mirror_edk2.git] / MdeModulePkg / Universal / CapsuleRuntimeDxe / CapsuleService.h
CommitLineData
13d40edd 1/** @file\r
5d69642d 2 Include the required header files for Capsule Runtime Service drivers.\r
74fea867 3\r
13d40edd 4Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
74fea867 5All rights reserved. This program and the accompanying materials\r
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13d40edd 13**/\r
74fea867 14\r
15#ifndef _CAPSULE_RUNTIME_H_\r
16#define _CAPSULE_RUNTIME_H_\r
17\r
ed7748fe 18\r
74fea867 19#include <PiDxe.h>\r
ed7748fe 20\r
74fea867 21#include <Protocol/Capsule.h>\r
22#include <Guid/CapsuleVendor.h>\r
ed7748fe 23\r
74fea867 24#include <Library/UefiDriverEntryPoint.h>\r
74fea867 25#include <Library/UefiRuntimeLib.h>\r
26#include <Library/DebugLib.h>\r
27#include <Library/PcdLib.h>\r
74fea867 28#include <Library/UefiBootServicesTableLib.h>\r
6ee65722 29#include <Library/CapsuleLib.h>\r
74fea867 30\r
5d69642d
LG
31/**\r
32 Passes capsules to the firmware with both virtual and physical mapping. Depending on the intended\r
33 consumption, the firmware may process the capsule immediately. If the payload should persist\r
34 across a system reset, the reset value returned from EFI_QueryCapsuleCapabilities must\r
35 be passed into ResetSystem() and will cause the capsule to be processed by the firmware as\r
36 part of the reset process.\r
37\r
38 @param CapsuleHeaderArray Virtual pointer to an array of virtual pointers to the capsules\r
39 being passed into update capsule.\r
40 @param CapsuleCount Number of pointers to EFI_CAPSULE_HEADER in\r
41 CaspuleHeaderArray.\r
42 @param ScatterGatherList Physical pointer to a set of\r
43 EFI_CAPSULE_BLOCK_DESCRIPTOR that describes the\r
44 location in physical memory of a set of capsules.\r
45\r
46 @retval EFI_SUCCESS Valid capsule was passed. If\r
47 CAPSULE_FLAGS_PERSIT_ACROSS_RESET is not set, the\r
48 capsule has been successfully processed by the firmware.\r
49 @retval EFI_DEVICE_ERROR The capsule update was started, but failed due to a device error.\r
50 @retval EFI_INVALID_PARAMETER CapsuleCount is Zero, or CapsuleImage is not valid.\r
51 For across reset capsule image, ScatterGatherList is NULL.\r
52 @retval EFI_UNSUPPORTED CapsuleImage is not recognized by the firmware.\r
53\r
54**/\r
74fea867 55EFI_STATUS\r
56EFIAPI\r
57UpdateCapsule(\r
58 IN EFI_CAPSULE_HEADER **CapsuleHeaderArray,\r
59 IN UINTN CapsuleCount,\r
60 IN EFI_PHYSICAL_ADDRESS ScatterGatherList OPTIONAL\r
61 );\r
62\r
5d69642d
LG
63/**\r
64 Returns if the capsule can be supported via UpdateCapsule().\r
65\r
66 @param CapsuleHeaderArray Virtual pointer to an array of virtual pointers to the capsules\r
67 being passed into update capsule.\r
68 @param CapsuleCount Number of pointers to EFI_CAPSULE_HEADER in\r
69 CaspuleHeaderArray.\r
70 @param MaxiumCapsuleSize On output the maximum size that UpdateCapsule() can\r
71 support as an argument to UpdateCapsule() via\r
72 CapsuleHeaderArray and ScatterGatherList.\r
73 @param ResetType Returns the type of reset required for the capsule update.\r
74\r
75 @retval EFI_SUCCESS Valid answer returned.\r
76 @retval EFI_UNSUPPORTED The capsule image is not supported on this platform, and\r
77 MaximumCapsuleSize and ResetType are undefined.\r
78 @retval EFI_INVALID_PARAMETER MaximumCapsuleSize is NULL, or ResetTyep is NULL,\r
79 Or CapsuleCount is Zero, or CapsuleImage is not valid.\r
80\r
81**/\r
74fea867 82EFI_STATUS\r
83EFIAPI\r
84QueryCapsuleCapabilities(\r
85 IN EFI_CAPSULE_HEADER **CapsuleHeaderArray,\r
86 IN UINTN CapsuleCount,\r
87 OUT UINT64 *MaxiumCapsuleSize,\r
88 OUT EFI_RESET_TYPE *ResetType\r
89 );\r
90\r
91#endif\r
92\r