public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH edk2-platforms 0/3] DeveloperBox capsule update changes for progress reporting
@ 2018-06-07 11:32 Ard Biesheuvel
  2018-06-07 11:32 ` [PATCH edk2-platforms 1/3] Platform/Socionext/DeveloperBox: add support for persistent capsules Ard Biesheuvel
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Ard Biesheuvel @ 2018-06-07 11:32 UTC (permalink / raw)
  To: edk2-devel; +Cc: leif.lindholm, michael.d.kinney, Ard Biesheuvel

These patches reimplement graphical progress reporting during capsule update.
They depend on MdeModulePkg and ArmPkg changes currently under review.

Patch #1 adds support for dispatching PersistAcrossReset capsules. This
requires a warm reboot implementation which is being proposed for ArmPkg.

Patch #2 actually builds our firmware update capsule as one that is applied
after a reboot. Such a capsule can only be applied by running firmware that
has patch #1 applied.

Patch #3 replaces the home cooked bootlogolib based progress reporting with
the generic solution being proposed by Mike.

Ard Biesheuvel (3):
  Platform/Socionext/DeveloperBox: add support for persistent capsules
  Platform/Socionext/DeveloperBox: switch to PersistAcrossReset capsules
  Silicon/SynQuacerPlatformFlashAccessLib: replace progress indication

 .../Socionext/DeveloperBox/DeveloperBox.dsc   |  7 +--
 .../Socionext/DeveloperBox/DeveloperBox.fdf   |  1 +
 .../StyxPlatformFlashAccessLib.c              |  1 +
 .../SynQuacerPlatformFlashAccessLib.c         | 44 ++++++-------------
 .../SynQuacerPlatformFlashAccessLib.inf       |  1 -
 5 files changed, 17 insertions(+), 37 deletions(-)

-- 
2.17.0



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH edk2-platforms 1/3] Platform/Socionext/DeveloperBox: add support for persistent capsules
  2018-06-07 11:32 [PATCH edk2-platforms 0/3] DeveloperBox capsule update changes for progress reporting Ard Biesheuvel
@ 2018-06-07 11:32 ` Ard Biesheuvel
  2018-06-15 17:22   ` Leif Lindholm
  2018-06-07 11:32 ` [PATCH edk2-platforms 2/3] Platform/Socionext/DeveloperBox: switch to PersistAcrossReset capsules Ard Biesheuvel
  2018-06-07 11:32 ` [PATCH edk2-platforms 3/3] Silicon/SynQuacerPlatformFlashAccessLib: replace progress indication Ard Biesheuvel
  2 siblings, 1 reply; 8+ messages in thread
From: Ard Biesheuvel @ 2018-06-07 11:32 UTC (permalink / raw)
  To: edk2-devel; +Cc: leif.lindholm, michael.d.kinney, Ard Biesheuvel

Add support for PersistAcrossReset capsules, by setting the associated
PCD, and by enabling the warm reboot implementation that reenters PEI
with interrupts, caches and MMU disabled.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 Platform/Socionext/DeveloperBox/DeveloperBox.dsc | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
index 300e3fd656a5..1476257acce1 100644
--- a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
+++ b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
@@ -226,11 +226,8 @@ [PcdsFeatureFlag]
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
   gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport|FALSE
 
-  #
-  # This requires support in ARM Trusted Firmware and SCP for warm reset,
-  # so disable for now
-  #
-  gEfiMdeModulePkgTokenSpaceGuid.PcdSupportUpdateCapsuleReset|FALSE
+  gArmTokenSpaceGuid.PcdArmReenterPeiForCapsuleWarmReboot|TRUE
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSupportUpdateCapsuleReset|TRUE
 
   # needed for NFIT tables installed by RamDiskDxe
   gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE
-- 
2.17.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH edk2-platforms 2/3] Platform/Socionext/DeveloperBox: switch to PersistAcrossReset capsules
  2018-06-07 11:32 [PATCH edk2-platforms 0/3] DeveloperBox capsule update changes for progress reporting Ard Biesheuvel
  2018-06-07 11:32 ` [PATCH edk2-platforms 1/3] Platform/Socionext/DeveloperBox: add support for persistent capsules Ard Biesheuvel
@ 2018-06-07 11:32 ` Ard Biesheuvel
  2018-06-07 11:32 ` [PATCH edk2-platforms 3/3] Silicon/SynQuacerPlatformFlashAccessLib: replace progress indication Ard Biesheuvel
  2 siblings, 0 replies; 8+ messages in thread
From: Ard Biesheuvel @ 2018-06-07 11:32 UTC (permalink / raw)
  To: edk2-devel; +Cc: leif.lindholm, michael.d.kinney, Ard Biesheuvel

Switch to the more common flavor of firmware update capsules that are
only staged by the UpdateCapsule() service, and dispatched and processed
after a warm reboot.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 Platform/Socionext/DeveloperBox/DeveloperBox.fdf | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.fdf b/Platform/Socionext/DeveloperBox/DeveloperBox.fdf
index f3618fd1d50a..b3e0b4a9fe1b 100644
--- a/Platform/Socionext/DeveloperBox/DeveloperBox.fdf
+++ b/Platform/Socionext/DeveloperBox/DeveloperBox.fdf
@@ -381,6 +381,7 @@ [Capsule.SynQuacerFirmwareUpdateCapsuleFmpPkcs7]
 CAPSULE_GUID                = 6dcbd5ed-e82d-4c44-bda1-7194199ad92a # gEfiFmpCapsuleGuid
 CAPSULE_HEADER_SIZE         = 0x20
 CAPSULE_HEADER_INIT_VERSION = 0x1
+CAPSULE_FLAGS               = PersistAcrossReset,InitiateReset
 
   FMP_PAYLOAD = FmpPayloadSystemFirmwarePkcs7
 
-- 
2.17.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH edk2-platforms 3/3] Silicon/SynQuacerPlatformFlashAccessLib: replace progress indication
  2018-06-07 11:32 [PATCH edk2-platforms 0/3] DeveloperBox capsule update changes for progress reporting Ard Biesheuvel
  2018-06-07 11:32 ` [PATCH edk2-platforms 1/3] Platform/Socionext/DeveloperBox: add support for persistent capsules Ard Biesheuvel
  2018-06-07 11:32 ` [PATCH edk2-platforms 2/3] Platform/Socionext/DeveloperBox: switch to PersistAcrossReset capsules Ard Biesheuvel
@ 2018-06-07 11:32 ` Ard Biesheuvel
  2018-06-12 22:52   ` Leif Lindholm
  2 siblings, 1 reply; 8+ messages in thread
From: Ard Biesheuvel @ 2018-06-07 11:32 UTC (permalink / raw)
  To: edk2-devel; +Cc: leif.lindholm, michael.d.kinney, Ard Biesheuvel

Replace the home cooked progress indication with calls into the new
(*Progress)() argument to PerformFlashWriteWithProgress(), which
allows the flash access routine to report progress via a platform
provided callback.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c                        |  1 +
 Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c   | 44 ++++++--------------
 Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.inf |  1 -
 3 files changed, 14 insertions(+), 32 deletions(-)

diff --git a/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c b/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c
index 38f1830b5c2e..c5e46dcd4ddf 100644
--- a/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c
+++ b/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c
@@ -72,6 +72,7 @@ PerformFlashWriteWithProgress (
 {
   EFI_STATUS                      Status;
   AMD_ISCP_DXE_PROTOCOL           *IscpDxeProtocol;
+  UINTN                           Remaining;
 
   if (FlashAddressType != FlashAddressTypeRelativeAddress) {
     DEBUG ((DEBUG_ERROR, "%a: only FlashAddressTypeRelativeAddress supported\n",
diff --git a/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c b/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c
index 48d385993b38..ebb6ce189aa5 100644
--- a/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c
+++ b/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c
@@ -17,7 +17,6 @@
 #include <PiDxe.h>
 
 #include <Library/BaseMemoryLib.h>
-#include <Library/BootLogoLib.h>
 #include <Library/DebugLib.h>
 #include <Library/DxeServicesTableLib.h>
 #include <Library/MemoryAllocationLib.h>
@@ -195,17 +194,7 @@ PerformFlashWriteWithProgress (
   EFI_LBA                             Lba;
   EFI_PHYSICAL_ADDRESS                FvbBaseAddress;
   UINTN                               NumBytes;
-  EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION Black;
-  EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION White;
-  UINTN                               Resolution;
-  UINTN                               CurrentProgress;
-  BOOLEAN                             HaveBootGraphics;
-
-  Black.Raw = 0x00000000;
-  White.Raw = 0x00FFFFFF;
-
-  Status = BootLogoEnableLogo ();
-  HaveBootGraphics = !EFI_ERROR (Status);
+  UINTN                               Remaining;
 
   if (FlashAddressType != FlashAddressTypeAbsoluteAddress) {
     DEBUG ((DEBUG_ERROR, "%a: only FlashAddressTypeAbsoluteAddress supported\n",
@@ -274,14 +263,8 @@ PerformFlashWriteWithProgress (
     return Status;
   }
 
-  if (HaveBootGraphics) {
-    Resolution = (BlockSize * 100) / Length + 1;
-    CurrentProgress = 0;
-
-    Status = BootLogoUpdateProgress (White.Pixel, Black.Pixel,
-               L"Updating firmware - please wait", Black.Pixel, 100, 0);
-  } else {
-    Print (L"Updating firmware - please wait ");
+  if (Progress == NULL) {
+    Print (L"\n\nUpdating firmware - please wait ");
   }
 
   //
@@ -298,7 +281,8 @@ PerformFlashWriteWithProgress (
     return Status;
   }
 
-  while (Length > 0) {
+  Remaining = Length;
+  while (Remaining > 0) {
     //
     // Write the new data
     //
@@ -315,20 +299,18 @@ PerformFlashWriteWithProgress (
       }
     }
 
-    if (HaveBootGraphics) {
-      Status = BootLogoUpdateProgress (White.Pixel, Black.Pixel,
-                L"Updating firmware - please wait", White.Pixel,
-                CurrentProgress + Resolution, CurrentProgress);
-      CurrentProgress += Resolution;
+    Buffer += BlockSize;
+    Remaining -= BlockSize;
+    Lba++;
+
+    if (Progress != NULL) {
+      Progress (EndPercentage -
+                (Remaining * (EndPercentage - StartPercentage)) / Length);
     } else {
       Print (L".");
     }
-
-    Buffer += BlockSize;
-    Length -= BlockSize;
-    Lba++;
   }
-  if (!HaveBootGraphics) {
+  if (Progress == NULL) {
     Print (L"\n");
   }
 
diff --git a/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.inf b/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.inf
index 4dfa11372a38..6ca34ada1d03 100644
--- a/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.inf
+++ b/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.inf
@@ -33,7 +33,6 @@ [Protocols]
 
 [LibraryClasses]
   BaseMemoryLib
-  BootLogoLib
   DebugLib
   DxeServicesTableLib
   UefiBootServicesTableLib
-- 
2.17.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH edk2-platforms 3/3] Silicon/SynQuacerPlatformFlashAccessLib: replace progress indication
  2018-06-07 11:32 ` [PATCH edk2-platforms 3/3] Silicon/SynQuacerPlatformFlashAccessLib: replace progress indication Ard Biesheuvel
@ 2018-06-12 22:52   ` Leif Lindholm
  2018-06-13  7:16     ` Ard Biesheuvel
  0 siblings, 1 reply; 8+ messages in thread
From: Leif Lindholm @ 2018-06-12 22:52 UTC (permalink / raw)
  To: Ard Biesheuvel; +Cc: edk2-devel, michael.d.kinney

On Thu, Jun 07, 2018 at 01:32:03PM +0200, Ard Biesheuvel wrote:
> Replace the home cooked progress indication with calls into the new
> (*Progress)() argument to PerformFlashWriteWithProgress(), which
> allows the flash access routine to report progress via a platform
> provided callback.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

I think 1-2 depends on changes that aren't currently happening based
on discussions. If I'm wrong, set me straight.

However, does this one not make sense on its own?
If so, it has
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>

> ---
>  Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c                        |  1 +
>  Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c   | 44 ++++++--------------
>  Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.inf |  1 -
>  3 files changed, 14 insertions(+), 32 deletions(-)
> 
> diff --git a/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c b/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c
> index 38f1830b5c2e..c5e46dcd4ddf 100644
> --- a/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c
> +++ b/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c
> @@ -72,6 +72,7 @@ PerformFlashWriteWithProgress (
>  {
>    EFI_STATUS                      Status;
>    AMD_ISCP_DXE_PROTOCOL           *IscpDxeProtocol;
> +  UINTN                           Remaining;
>  
>    if (FlashAddressType != FlashAddressTypeRelativeAddress) {
>      DEBUG ((DEBUG_ERROR, "%a: only FlashAddressTypeRelativeAddress supported\n",
> diff --git a/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c b/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c
> index 48d385993b38..ebb6ce189aa5 100644
> --- a/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c
> +++ b/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c
> @@ -17,7 +17,6 @@
>  #include <PiDxe.h>
>  
>  #include <Library/BaseMemoryLib.h>
> -#include <Library/BootLogoLib.h>
>  #include <Library/DebugLib.h>
>  #include <Library/DxeServicesTableLib.h>
>  #include <Library/MemoryAllocationLib.h>
> @@ -195,17 +194,7 @@ PerformFlashWriteWithProgress (
>    EFI_LBA                             Lba;
>    EFI_PHYSICAL_ADDRESS                FvbBaseAddress;
>    UINTN                               NumBytes;
> -  EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION Black;
> -  EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION White;
> -  UINTN                               Resolution;
> -  UINTN                               CurrentProgress;
> -  BOOLEAN                             HaveBootGraphics;
> -
> -  Black.Raw = 0x00000000;
> -  White.Raw = 0x00FFFFFF;
> -
> -  Status = BootLogoEnableLogo ();
> -  HaveBootGraphics = !EFI_ERROR (Status);
> +  UINTN                               Remaining;
>  
>    if (FlashAddressType != FlashAddressTypeAbsoluteAddress) {
>      DEBUG ((DEBUG_ERROR, "%a: only FlashAddressTypeAbsoluteAddress supported\n",
> @@ -274,14 +263,8 @@ PerformFlashWriteWithProgress (
>      return Status;
>    }
>  
> -  if (HaveBootGraphics) {
> -    Resolution = (BlockSize * 100) / Length + 1;
> -    CurrentProgress = 0;
> -
> -    Status = BootLogoUpdateProgress (White.Pixel, Black.Pixel,
> -               L"Updating firmware - please wait", Black.Pixel, 100, 0);
> -  } else {
> -    Print (L"Updating firmware - please wait ");
> +  if (Progress == NULL) {
> +    Print (L"\n\nUpdating firmware - please wait ");
>    }
>  
>    //
> @@ -298,7 +281,8 @@ PerformFlashWriteWithProgress (
>      return Status;
>    }
>  
> -  while (Length > 0) {
> +  Remaining = Length;
> +  while (Remaining > 0) {
>      //
>      // Write the new data
>      //
> @@ -315,20 +299,18 @@ PerformFlashWriteWithProgress (
>        }
>      }
>  
> -    if (HaveBootGraphics) {
> -      Status = BootLogoUpdateProgress (White.Pixel, Black.Pixel,
> -                L"Updating firmware - please wait", White.Pixel,
> -                CurrentProgress + Resolution, CurrentProgress);
> -      CurrentProgress += Resolution;
> +    Buffer += BlockSize;
> +    Remaining -= BlockSize;
> +    Lba++;
> +
> +    if (Progress != NULL) {
> +      Progress (EndPercentage -
> +                (Remaining * (EndPercentage - StartPercentage)) / Length);
>      } else {
>        Print (L".");
>      }
> -
> -    Buffer += BlockSize;
> -    Length -= BlockSize;
> -    Lba++;
>    }
> -  if (!HaveBootGraphics) {
> +  if (Progress == NULL) {
>      Print (L"\n");
>    }
>  
> diff --git a/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.inf b/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.inf
> index 4dfa11372a38..6ca34ada1d03 100644
> --- a/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.inf
> +++ b/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.inf
> @@ -33,7 +33,6 @@ [Protocols]
>  
>  [LibraryClasses]
>    BaseMemoryLib
> -  BootLogoLib
>    DebugLib
>    DxeServicesTableLib
>    UefiBootServicesTableLib
> -- 
> 2.17.0
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH edk2-platforms 3/3] Silicon/SynQuacerPlatformFlashAccessLib: replace progress indication
  2018-06-12 22:52   ` Leif Lindholm
@ 2018-06-13  7:16     ` Ard Biesheuvel
  0 siblings, 0 replies; 8+ messages in thread
From: Ard Biesheuvel @ 2018-06-13  7:16 UTC (permalink / raw)
  To: Leif Lindholm; +Cc: edk2-devel@lists.01.org, Kinney, Michael D

On 13 June 2018 at 00:52, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> On Thu, Jun 07, 2018 at 01:32:03PM +0200, Ard Biesheuvel wrote:
>> Replace the home cooked progress indication with calls into the new
>> (*Progress)() argument to PerformFlashWriteWithProgress(), which
>> allows the flash access routine to report progress via a platform
>> provided callback.
>>
>> Contributed-under: TianoCore Contribution Agreement 1.1
>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>
> I think 1-2 depends on changes that aren't currently happening based
> on discussions. If I'm wrong, set me straight.
>
> However, does this one not make sense on its own?

Not really. The progress reporting only works for PersistAcrossReset
capsules to begin with. That is essentially what all the fuss is
about.

I don't necessarily agree with that, but given that Windows and
Linux/x86 only use that type of capsule, it made sense for our stuff
to get aligned with that.

> If so, it has
> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
>

Thanks.

>> ---
>>  Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c                        |  1 +
>>  Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c   | 44 ++++++--------------
>>  Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.inf |  1 -
>>  3 files changed, 14 insertions(+), 32 deletions(-)
>>
>> diff --git a/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c b/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c
>> index 38f1830b5c2e..c5e46dcd4ddf 100644
>> --- a/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c
>> +++ b/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c
>> @@ -72,6 +72,7 @@ PerformFlashWriteWithProgress (
>>  {
>>    EFI_STATUS                      Status;
>>    AMD_ISCP_DXE_PROTOCOL           *IscpDxeProtocol;
>> +  UINTN                           Remaining;
>>
>>    if (FlashAddressType != FlashAddressTypeRelativeAddress) {
>>      DEBUG ((DEBUG_ERROR, "%a: only FlashAddressTypeRelativeAddress supported\n",
>> diff --git a/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c b/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c
>> index 48d385993b38..ebb6ce189aa5 100644
>> --- a/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c
>> +++ b/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c
>> @@ -17,7 +17,6 @@
>>  #include <PiDxe.h>
>>
>>  #include <Library/BaseMemoryLib.h>
>> -#include <Library/BootLogoLib.h>
>>  #include <Library/DebugLib.h>
>>  #include <Library/DxeServicesTableLib.h>
>>  #include <Library/MemoryAllocationLib.h>
>> @@ -195,17 +194,7 @@ PerformFlashWriteWithProgress (
>>    EFI_LBA                             Lba;
>>    EFI_PHYSICAL_ADDRESS                FvbBaseAddress;
>>    UINTN                               NumBytes;
>> -  EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION Black;
>> -  EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION White;
>> -  UINTN                               Resolution;
>> -  UINTN                               CurrentProgress;
>> -  BOOLEAN                             HaveBootGraphics;
>> -
>> -  Black.Raw = 0x00000000;
>> -  White.Raw = 0x00FFFFFF;
>> -
>> -  Status = BootLogoEnableLogo ();
>> -  HaveBootGraphics = !EFI_ERROR (Status);
>> +  UINTN                               Remaining;
>>
>>    if (FlashAddressType != FlashAddressTypeAbsoluteAddress) {
>>      DEBUG ((DEBUG_ERROR, "%a: only FlashAddressTypeAbsoluteAddress supported\n",
>> @@ -274,14 +263,8 @@ PerformFlashWriteWithProgress (
>>      return Status;
>>    }
>>
>> -  if (HaveBootGraphics) {
>> -    Resolution = (BlockSize * 100) / Length + 1;
>> -    CurrentProgress = 0;
>> -
>> -    Status = BootLogoUpdateProgress (White.Pixel, Black.Pixel,
>> -               L"Updating firmware - please wait", Black.Pixel, 100, 0);
>> -  } else {
>> -    Print (L"Updating firmware - please wait ");
>> +  if (Progress == NULL) {
>> +    Print (L"\n\nUpdating firmware - please wait ");
>>    }
>>
>>    //
>> @@ -298,7 +281,8 @@ PerformFlashWriteWithProgress (
>>      return Status;
>>    }
>>
>> -  while (Length > 0) {
>> +  Remaining = Length;
>> +  while (Remaining > 0) {
>>      //
>>      // Write the new data
>>      //
>> @@ -315,20 +299,18 @@ PerformFlashWriteWithProgress (
>>        }
>>      }
>>
>> -    if (HaveBootGraphics) {
>> -      Status = BootLogoUpdateProgress (White.Pixel, Black.Pixel,
>> -                L"Updating firmware - please wait", White.Pixel,
>> -                CurrentProgress + Resolution, CurrentProgress);
>> -      CurrentProgress += Resolution;
>> +    Buffer += BlockSize;
>> +    Remaining -= BlockSize;
>> +    Lba++;
>> +
>> +    if (Progress != NULL) {
>> +      Progress (EndPercentage -
>> +                (Remaining * (EndPercentage - StartPercentage)) / Length);
>>      } else {
>>        Print (L".");
>>      }
>> -
>> -    Buffer += BlockSize;
>> -    Length -= BlockSize;
>> -    Lba++;
>>    }
>> -  if (!HaveBootGraphics) {
>> +  if (Progress == NULL) {
>>      Print (L"\n");
>>    }
>>
>> diff --git a/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.inf b/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.inf
>> index 4dfa11372a38..6ca34ada1d03 100644
>> --- a/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.inf
>> +++ b/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.inf
>> @@ -33,7 +33,6 @@ [Protocols]
>>
>>  [LibraryClasses]
>>    BaseMemoryLib
>> -  BootLogoLib
>>    DebugLib
>>    DxeServicesTableLib
>>    UefiBootServicesTableLib
>> --
>> 2.17.0
>>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH edk2-platforms 1/3] Platform/Socionext/DeveloperBox: add support for persistent capsules
  2018-06-07 11:32 ` [PATCH edk2-platforms 1/3] Platform/Socionext/DeveloperBox: add support for persistent capsules Ard Biesheuvel
@ 2018-06-15 17:22   ` Leif Lindholm
  2018-06-18  6:43     ` Ard Biesheuvel
  0 siblings, 1 reply; 8+ messages in thread
From: Leif Lindholm @ 2018-06-15 17:22 UTC (permalink / raw)
  To: Ard Biesheuvel; +Cc: edk2-devel, michael.d.kinney

On Thu, Jun 07, 2018 at 01:32:01PM +0200, Ard Biesheuvel wrote:
> Add support for PersistAcrossReset capsules, by setting the associated
> PCD, and by enabling the warm reboot implementation that reenters PEI
> with interrupts, caches and MMU disabled.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>

Feel free to push this one separately once everything is in place to
do so.

> ---
>  Platform/Socionext/DeveloperBox/DeveloperBox.dsc | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
> index 300e3fd656a5..1476257acce1 100644
> --- a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
> +++ b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
> @@ -226,11 +226,8 @@ [PcdsFeatureFlag]
>    gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
>    gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport|FALSE
>  
> -  #
> -  # This requires support in ARM Trusted Firmware and SCP for warm reset,
> -  # so disable for now
> -  #
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdSupportUpdateCapsuleReset|FALSE
> +  gArmTokenSpaceGuid.PcdArmReenterPeiForCapsuleWarmReboot|TRUE
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdSupportUpdateCapsuleReset|TRUE
>  
>    # needed for NFIT tables installed by RamDiskDxe
>    gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE
> -- 
> 2.17.0
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH edk2-platforms 1/3] Platform/Socionext/DeveloperBox: add support for persistent capsules
  2018-06-15 17:22   ` Leif Lindholm
@ 2018-06-18  6:43     ` Ard Biesheuvel
  0 siblings, 0 replies; 8+ messages in thread
From: Ard Biesheuvel @ 2018-06-18  6:43 UTC (permalink / raw)
  To: Leif Lindholm; +Cc: edk2-devel@lists.01.org, Kinney, Michael D

On 15 June 2018 at 19:22, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> On Thu, Jun 07, 2018 at 01:32:01PM +0200, Ard Biesheuvel wrote:
>> Add support for PersistAcrossReset capsules, by setting the associated
>> PCD, and by enabling the warm reboot implementation that reenters PEI
>> with interrupts, caches and MMU disabled.
>>
>> Contributed-under: TianoCore Contribution Agreement 1.1
>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>
> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
>

Thanks.

> Feel free to push this one separately once everything is in place to
> do so.
>

Pushed as f65939a9d98b283351fa5b9d62a8d49c42143b4f

>> ---
>>  Platform/Socionext/DeveloperBox/DeveloperBox.dsc | 7 ++-----
>>  1 file changed, 2 insertions(+), 5 deletions(-)
>>
>> diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
>> index 300e3fd656a5..1476257acce1 100644
>> --- a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
>> +++ b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
>> @@ -226,11 +226,8 @@ [PcdsFeatureFlag]
>>    gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
>>    gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport|FALSE
>>
>> -  #
>> -  # This requires support in ARM Trusted Firmware and SCP for warm reset,
>> -  # so disable for now
>> -  #
>> -  gEfiMdeModulePkgTokenSpaceGuid.PcdSupportUpdateCapsuleReset|FALSE
>> +  gArmTokenSpaceGuid.PcdArmReenterPeiForCapsuleWarmReboot|TRUE
>> +  gEfiMdeModulePkgTokenSpaceGuid.PcdSupportUpdateCapsuleReset|TRUE
>>
>>    # needed for NFIT tables installed by RamDiskDxe
>>    gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE
>> --
>> 2.17.0
>>


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-06-18  6:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-07 11:32 [PATCH edk2-platforms 0/3] DeveloperBox capsule update changes for progress reporting Ard Biesheuvel
2018-06-07 11:32 ` [PATCH edk2-platforms 1/3] Platform/Socionext/DeveloperBox: add support for persistent capsules Ard Biesheuvel
2018-06-15 17:22   ` Leif Lindholm
2018-06-18  6:43     ` Ard Biesheuvel
2018-06-07 11:32 ` [PATCH edk2-platforms 2/3] Platform/Socionext/DeveloperBox: switch to PersistAcrossReset capsules Ard Biesheuvel
2018-06-07 11:32 ` [PATCH edk2-platforms 3/3] Silicon/SynQuacerPlatformFlashAccessLib: replace progress indication Ard Biesheuvel
2018-06-12 22:52   ` Leif Lindholm
2018-06-13  7:16     ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox