+**/\r
+\r
+#include <Uefi.h>\r
+\r
+#include <Protocol/Capsule.h>\r
+#include <Guid/CapsuleVendor.h>\r
+\r
+#include <Library/DebugLib.h>\r
+#include <Library/PcdLib.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
+\r
+/**\r
+ Passes capsules to the firmware with both virtual and physical mapping. Depending on the intended\r
+ consumption, the firmware may process the capsule immediately. If the payload should persist\r
+ across a system reset, the reset value returned from EFI_QueryCapsuleCapabilities must\r
+ be passed into ResetSystem() and will cause the capsule to be processed by the firmware as\r
+ part of the reset process.\r
+\r
+ @param CapsuleHeaderArray Virtual pointer to an array of virtual pointers to the capsules\r
+ being passed into update capsule.\r
+ @param CapsuleCount Number of pointers to EFI_CAPSULE_HEADER in\r
+ CaspuleHeaderArray.\r
+ @param ScatterGatherList Physical pointer to a set of\r
+ EFI_CAPSULE_BLOCK_DESCRIPTOR that describes the\r
+ location in physical memory of a set of capsules.\r
+\r
+ @retval EFI_SUCCESS Valid capsule was passed. If\r
+ CAPSULE_FLAGS_PERSIT_ACROSS_RESET is not set, the\r
+ capsule has been successfully processed by the firmware.\r
+ @retval EFI_DEVICE_ERROR The capsule update was started, but failed due to a device error.\r
+ @retval EFI_INVALID_PARAMETER CapsuleCount is Zero, or CapsuleImage is not valid.\r
+ For across reset capsule image, ScatterGatherList is NULL.\r
+ @retval EFI_UNSUPPORTED CapsuleImage is not recognized by the firmware.\r
+\r
+**/\r