* [PATCH edk2-platforms 1/4] Platform/SynQuacerEvalBoard: add RamDiskDxe driver to build
2018-01-29 15:44 [PATCH edk2-platforms 0/4] SynQuacer: assorted updates Ard Biesheuvel
@ 2018-01-29 15:44 ` Ard Biesheuvel
2018-01-29 15:44 ` [PATCH edk2-platforms 2/4] Platform/SynQuacerEvalBoard: add BGRT and ConsolePrefDxe drivers Ard Biesheuvel
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Ard Biesheuvel @ 2018-01-29 15:44 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, Ard Biesheuvel
Add the RamDiskDxe driver, which is required for HTTP booting .iso
images.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc | 2 ++
Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.fdf | 1 +
2 files changed, 3 insertions(+)
diff --git a/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc b/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc
index 70ec7d7baeec..28a48f4607a8 100644
--- a/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc
+++ b/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc
@@ -108,6 +108,7 @@ [LibraryClasses.common]
PlatformBootManagerLib|ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
+ FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
PeCoffExtraActionLib|ArmPkg/Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.inf
DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
@@ -580,6 +581,7 @@ [Components.common]
MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
FatPkg/EnhancedFatDxe/Fat.inf
+ MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.inf
#
# RNG
diff --git a/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.fdf b/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.fdf
index 1599f8953008..1ebc55ddc84d 100644
--- a/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.fdf
+++ b/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.fdf
@@ -181,6 +181,7 @@ [FV.FvMain]
INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
INF FatPkg/EnhancedFatDxe/Fat.inf
+ INF MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.inf
#
# RNG
--
2.11.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH edk2-platforms 2/4] Platform/SynQuacerEvalBoard: add BGRT and ConsolePrefDxe drivers
2018-01-29 15:44 [PATCH edk2-platforms 0/4] SynQuacer: assorted updates Ard Biesheuvel
2018-01-29 15:44 ` [PATCH edk2-platforms 1/4] Platform/SynQuacerEvalBoard: add RamDiskDxe driver to build Ard Biesheuvel
@ 2018-01-29 15:44 ` Ard Biesheuvel
2018-01-29 15:44 ` [PATCH edk2-platforms 3/4] Silicon/SynQuacer: set CNTFRQ field of MMIO timer frame Ard Biesheuvel
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Ard Biesheuvel @ 2018-01-29 15:44 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, Ard Biesheuvel
Add the drivers that make the serial and graphical console behave more
intuitively.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc | 6 ++++++
Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.fdf | 6 ++++++
2 files changed, 12 insertions(+)
diff --git a/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc b/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc
index 28a48f4607a8..e35c17f0bcb7 100644
--- a/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc
+++ b/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc
@@ -547,6 +547,7 @@ [Components.common]
MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf
MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
+ MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
#
# eMMC support
@@ -616,6 +617,11 @@ [Components.common]
}
#
+ # Console preference selection
+ #
+ EmbeddedPkg/Drivers/ConsolePrefDxe/ConsolePrefDxe.inf
+
+ #
# DT support
#
Silicon/Socionext/SynQuacer/DeviceTree/SynQuacerEvalBoard.inf
diff --git a/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.fdf b/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.fdf
index 1ebc55ddc84d..ba2f32328c2b 100644
--- a/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.fdf
+++ b/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.fdf
@@ -147,6 +147,7 @@ [FV.FvMain]
INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
INF MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf
INF MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
+ INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
#
# eMMC support
@@ -213,6 +214,11 @@ [FV.FvMain]
INF Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/NetsecDxe.inf
#
+ # Console preference selection
+ #
+ INF EmbeddedPkg/Drivers/ConsolePrefDxe/ConsolePrefDxe.inf
+
+ #
# DT support
#
INF RuleOverride = DTB Silicon/Socionext/SynQuacer/DeviceTree/SynQuacerEvalBoard.inf
--
2.11.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH edk2-platforms 3/4] Silicon/SynQuacer: set CNTFRQ field of MMIO timer frame
2018-01-29 15:44 [PATCH edk2-platforms 0/4] SynQuacer: assorted updates Ard Biesheuvel
2018-01-29 15:44 ` [PATCH edk2-platforms 1/4] Platform/SynQuacerEvalBoard: add RamDiskDxe driver to build Ard Biesheuvel
2018-01-29 15:44 ` [PATCH edk2-platforms 2/4] Platform/SynQuacerEvalBoard: add BGRT and ConsolePrefDxe drivers Ard Biesheuvel
@ 2018-01-29 15:44 ` Ard Biesheuvel
2018-01-29 15:44 ` [PATCH edk2-platforms 4/4] Silicon/SynQuacerPlatformFlashAccessLib: add capsule update progress bar Ard Biesheuvel
2018-01-29 15:50 ` [PATCH edk2-platforms 0/4] SynQuacer: assorted updates Leif Lindholm
4 siblings, 0 replies; 6+ messages in thread
From: Ard Biesheuvel @ 2018-01-29 15:44 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, Ard Biesheuvel
Even though the ARM ARM quite clearly states that the CNTFRQ field of
each MMIO timer frame should be a read-only alias of the CNTFRQ field
of the base frame, the SynQuacer SoC implements it as a register that
is programmable separately.
So let's program it from the hardware rather than overriding the
frequency using a DT property.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi | 1 -
Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c | 18 ++++++++++++++++++
Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.h | 1 +
Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf | 2 ++
Silicon/Socionext/SynQuacer/Include/Platform/MemoryMap.h | 3 +++
5 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi b/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi
index 12b90a64da8b..3db3c5ed1c50 100644
--- a/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi
+++ b/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi
@@ -368,7 +368,6 @@
mmio-timer@2a810000 {
compatible = "arm,armv7-timer-mem";
reg = <0x0 0x2a810000 0x0 0x10000>;
- clock-frequency = <100000000>;
#address-cells = <2>;
#size-cells = <2>;
ranges;
diff --git a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c
index 7d7d2ec80e8e..aab830dc3a5a 100644
--- a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c
+++ b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c
@@ -174,6 +174,23 @@ SmmuEnableCoherentDma (
SMMU_SCR0_SHCFG_INNER | SMMU_SCR0_MTCFG | SMMU_SCR0_MEMATTR_INNER_OUTER_WB);
}
+#define MMIO_TIMER_CNTFRQ_OFFSET 0x10
+
+STATIC
+VOID
+SetMmioTimerFrequency (
+ VOID
+ )
+{
+ //
+ // Initialize the CNTFRQ field of the first non-secure MMIO timer frame.
+ // This field should be a read-only alias of the global frequency register
+ // but in reality, it is a separate field that needs to be set explicitly.
+ //
+ MmioWrite32 (SYNQUACER_MMIO_TIMER_CNT_BASE0 + MMIO_TIMER_CNTFRQ_OFFSET,
+ ArmGenericTimerGetTimerFreq ());
+}
+
STATIC
EFI_STATUS
InstallHiiPages (
@@ -297,6 +314,7 @@ PlatformDxeEntryPoint (
ASSERT_EFI_ERROR (Status);
SmmuEnableCoherentDma ();
+ SetMmioTimerFrequency ();
Status = RegisterPcieNotifier ();
ASSERT_EFI_ERROR (Status);
diff --git a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.h b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.h
index b109bd359e13..a391d2f67c29 100644
--- a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.h
+++ b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.h
@@ -18,6 +18,7 @@
#include <PiDxe.h>
#include <Guid/SynQuacerPlatformFormSet.h>
#include <IndustryStandard/Pci.h>
+#include <Library/ArmGenericTimerCounterLib.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
diff --git a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf
index e13e16f3da6b..49d9deee57ea 100644
--- a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf
+++ b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf
@@ -30,6 +30,7 @@ [Sources]
PlatformDxeHii.vfr
[Packages]
+ ArmPkg/ArmPkg.dec
EmbeddedPkg/EmbeddedPkg.dec
MdeModulePkg/MdeModulePkg.dec
MdePkg/MdePkg.dec
@@ -38,6 +39,7 @@ [Packages]
Silicon/Socionext/SynQuacer/SynQuacer.dec
[LibraryClasses]
+ ArmGenericTimerCounterLib
BaseLib
BaseMemoryLib
DebugLib
diff --git a/Silicon/Socionext/SynQuacer/Include/Platform/MemoryMap.h b/Silicon/Socionext/SynQuacer/Include/Platform/MemoryMap.h
index f43adcc8607f..fff760477488 100644
--- a/Silicon/Socionext/SynQuacer/Include/Platform/MemoryMap.h
+++ b/Silicon/Socionext/SynQuacer/Include/Platform/MemoryMap.h
@@ -69,4 +69,7 @@
#define SYNQUACER_SCB_SMMU_BASE 0x52E00000
#define SYNQUACER_SCB_SMMU_SIZE SIZE_64KB
+#define SYNQUACER_MMIO_TIMER_CTL_BASE 0x2A810000
+#define SYNQUACER_MMIO_TIMER_CNT_BASE0 0x2A830000
+
#endif
--
2.11.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH edk2-platforms 4/4] Silicon/SynQuacerPlatformFlashAccessLib: add capsule update progress bar
2018-01-29 15:44 [PATCH edk2-platforms 0/4] SynQuacer: assorted updates Ard Biesheuvel
` (2 preceding siblings ...)
2018-01-29 15:44 ` [PATCH edk2-platforms 3/4] Silicon/SynQuacer: set CNTFRQ field of MMIO timer frame Ard Biesheuvel
@ 2018-01-29 15:44 ` Ard Biesheuvel
2018-01-29 15:50 ` [PATCH edk2-platforms 0/4] SynQuacer: assorted updates Leif Lindholm
4 siblings, 0 replies; 6+ messages in thread
From: Ard Biesheuvel @ 2018-01-29 15:44 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, Ard Biesheuvel
Reuse the BootLogoLib graphical progress bar to show the progress of a
capsule update, and in absence of a graphical console, write a period
to the text console for each block updated.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c | 35 ++++++++++++++++++++
Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.inf | 3 ++
2 files changed, 38 insertions(+)
diff --git a/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c b/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c
index 5a67f8c00995..fbb8f1f9e48c 100644
--- a/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c
+++ b/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c
@@ -16,11 +16,13 @@
#include <PiDxe.h>
#include <Library/BaseMemoryLib.h>
+#include <Library/BootLogoLib.h>
#include <Library/DebugLib.h>
#include <Library/DxeServicesTableLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/PlatformFlashAccessLib.h>
#include <Library/UefiBootServicesTableLib.h>
+#include <Library/UefiLib.h>
#include <Protocol/FirmwareVolumeBlock.h>
@@ -145,6 +147,17 @@ PerformFlashWrite (
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 Progress;
+ BOOLEAN HaveBootGraphics;
+
+ Black.Raw = 0x00000000;
+ White.Raw = 0x00FFFFFF;
+
+ Status = BootLogoEnableLogo ();
+ HaveBootGraphics = !EFI_ERROR (Status);
if (FlashAddressType != FlashAddressTypeAbsoluteAddress) {
DEBUG ((DEBUG_ERROR, "%a: only FlashAddressTypeAbsoluteAddress supported\n",
@@ -213,6 +226,16 @@ PerformFlashWrite (
return Status;
}
+ if (HaveBootGraphics) {
+ Resolution = (BlockSize * 100) / Length + 1;
+ Progress = 0;
+
+ Status = BootLogoUpdateProgress (White.Pixel, Black.Pixel,
+ L"Updating firmware - please wait", Black.Pixel, 100, 0);
+ } else {
+ Print (L"Updating firmware - please wait ");
+ }
+
//
// Erase the region
//
@@ -242,10 +265,22 @@ PerformFlashWrite (
__FUNCTION__, Lba, Status, NumBytes));
}
+ if (HaveBootGraphics) {
+ Status = BootLogoUpdateProgress (White.Pixel, Black.Pixel,
+ L"Updating firmware - please wait", White.Pixel,
+ Progress + Resolution, Progress);
+ Progress += Resolution;
+ } else {
+ Print (L".");
+ }
+
Buffer += BlockSize;
Length -= BlockSize;
Lba++;
}
+ if (!HaveBootGraphics) {
+ Print (L"\n");
+ }
return EFI_SUCCESS;
}
diff --git a/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.inf b/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.inf
index 33f4795ddcf9..4dfa11372a38 100644
--- a/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.inf
+++ b/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.inf
@@ -24,6 +24,7 @@ [Sources]
SynQuacerPlatformFlashAccessLib.c
[Packages]
+ MdeModulePkg/MdeModulePkg.dec
MdePkg/MdePkg.dec
SignedCapsulePkg/SignedCapsulePkg.dec
@@ -32,7 +33,9 @@ [Protocols]
[LibraryClasses]
BaseMemoryLib
+ BootLogoLib
DebugLib
DxeServicesTableLib
UefiBootServicesTableLib
+ UefiLib
--
2.11.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH edk2-platforms 0/4] SynQuacer: assorted updates
2018-01-29 15:44 [PATCH edk2-platforms 0/4] SynQuacer: assorted updates Ard Biesheuvel
` (3 preceding siblings ...)
2018-01-29 15:44 ` [PATCH edk2-platforms 4/4] Silicon/SynQuacerPlatformFlashAccessLib: add capsule update progress bar Ard Biesheuvel
@ 2018-01-29 15:50 ` Leif Lindholm
4 siblings, 0 replies; 6+ messages in thread
From: Leif Lindholm @ 2018-01-29 15:50 UTC (permalink / raw)
To: Ard Biesheuvel; +Cc: edk2-devel
On Mon, Jan 29, 2018 at 03:44:12PM +0000, Ard Biesheuvel wrote:
> Various updates for SynQuacer:
> - make the eval board more like the developerbox (graphical console,
> .iso boot)
> - set the CNTFRQ field of the MMIO timer
> - add a progress bar to the capsule update so people aren't left wondering
> whether their system hangs
>
> Ard Biesheuvel (4):
> Platform/SynQuacerEvalBoard: add RamDiskDxe driver to build
> Platform/SynQuacerEvalBoard: add BGRT and ConsolePrefDxe drivers
> Silicon/SynQuacer: set CNTFRQ field of MMIO timer frame
> Silicon/SynQuacerPlatformFlashAccessLib: add capsule update progress
> bar
For the series:
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
> Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc | 8 +++++
> Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.fdf | 7 ++++
> Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi | 1 -
> Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c | 18 ++++++++++
> Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.h | 1 +
> Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf | 2 ++
> Silicon/Socionext/SynQuacer/Include/Platform/MemoryMap.h | 3 ++
> Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c | 35 ++++++++++++++++++++
> Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.inf | 3 ++
> 9 files changed, 77 insertions(+), 1 deletion(-)
>
> --
> 2.11.0
>
^ permalink raw reply [flat|nested] 6+ messages in thread