public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v2 edk2-platforms 0/4] Platform/Arm/Sgi: platform support updates
@ 2018-07-24  4:51 Thomas Abraham
  2018-07-24  4:51 ` [PATCH v2 edk2-platforms 1/4] Platform/ARM/Sgi: Increase the size of flash image Thomas Abraham
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Thomas Abraham @ 2018-07-24  4:51 UTC (permalink / raw)
  To: edk2-devel

Changes since v1:
- Removed 'Change-Id' from the patch description

This patch series includes few updates for Arm's SGI platform. The virtio
block device representation in the ACPI table, setting default fifo size
for the uart controller, handling the increase in code size and adding
support for the upper 6GB memory block are included in this update.

Daniil Egranov (2):
  Platform/ARM/Sgi: Add ACPI description of virtio block device
  Platform/ARM/Sgi: Allow use of default fifo size for PL011 controller

Thomas Abraham (2):
  Platform/ARM/Sgi: Increase the size of flash image
  Platform/ARM/Sgi: allow access the second DRAM block

 Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dsdt.asl     | 12 +++++++++++
 .../ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf |  4 ++++
 .../SgiPkg/Library/PlatformLib/PlatformLibMem.c    | 24 +++++++++++++++++++++-
 Platform/ARM/SgiPkg/SgiPlatform.dec                |  4 ++++
 Platform/ARM/SgiPkg/SgiPlatform.dsc                |  5 +++++
 Platform/ARM/SgiPkg/SgiPlatform.fdf                |  8 ++++----
 6 files changed, 52 insertions(+), 5 deletions(-)

-- 
2.7.4




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

* [PATCH v2 edk2-platforms 1/4] Platform/ARM/Sgi: Increase the size of flash image
  2018-07-24  4:51 [PATCH v2 edk2-platforms 0/4] Platform/Arm/Sgi: platform support updates Thomas Abraham
@ 2018-07-24  4:51 ` Thomas Abraham
  2018-07-24  4:51 ` [PATCH v2 edk2-platforms 2/4] Platform/ARM/Sgi: allow access the second DRAM block Thomas Abraham
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Thomas Abraham @ 2018-07-24  4:51 UTC (permalink / raw)
  To: edk2-devel

Increase the size of the flash image to accomdate a larger firmware
volume. This increase is required to add support for features such
as Secure Boot and SMM.

Contributed-under: TianoCore Contribution Agreement 1.1
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Thomas Abraham <thomas.abraham@arm.com>
---
 Platform/ARM/SgiPkg/SgiPlatform.fdf | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Platform/ARM/SgiPkg/SgiPlatform.fdf b/Platform/ARM/SgiPkg/SgiPlatform.fdf
index 0e5739e..161ff92 100644
--- a/Platform/ARM/SgiPkg/SgiPlatform.fdf
+++ b/Platform/ARM/SgiPkg/SgiPlatform.fdf
@@ -26,12 +26,12 @@
 
 [FD.BL33_AP_UEFI]
 BaseAddress   = 0xE0000000|gArmTokenSpaceGuid.PcdFdBaseAddress
-Size          = 0x000F0000|gArmTokenSpaceGuid.PcdFdSize
+Size          = 0x00200000|gArmTokenSpaceGuid.PcdFdSize
 ErasePolarity = 1
 
 # This one is tricky, it must be: BlockSize * NumBlocks = Size
 BlockSize     = 0x00001000
-NumBlocks     = 0xF0
+NumBlocks     = 0x200
 
 ################################################################################
 #
@@ -49,7 +49,7 @@ NumBlocks     = 0xF0
 #
 ################################################################################
 
-0x00000000|0x000F0000
+0x00000000|0x00200000
 gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
 FV = FVMAIN_COMPACT
 
@@ -194,7 +194,7 @@ READ_LOCK_STATUS   = TRUE
 [FV.FVMAIN_COMPACT]
 FvAlignment        = 16
 BlockSize          = 0x1000
-NumBlocks          = 0xf0
+NumBlocks          = 0x200
 ERASE_POLARITY     = 1
 MEMORY_MAPPED      = TRUE
 STICKY_WRITE       = TRUE
-- 
2.7.4



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

* [PATCH v2 edk2-platforms 2/4] Platform/ARM/Sgi: allow access the second DRAM block
  2018-07-24  4:51 [PATCH v2 edk2-platforms 0/4] Platform/Arm/Sgi: platform support updates Thomas Abraham
  2018-07-24  4:51 ` [PATCH v2 edk2-platforms 1/4] Platform/ARM/Sgi: Increase the size of flash image Thomas Abraham
@ 2018-07-24  4:51 ` Thomas Abraham
  2018-07-24  4:51 ` [PATCH v2 edk2-platforms 3/4] Platform/ARM/Sgi: Add ACPI description of virtio block device Thomas Abraham
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Thomas Abraham @ 2018-07-24  4:51 UTC (permalink / raw)
  To: edk2-devel

SGI platforms include a second DRAM block of 6GB starting at
0x8080000000. Add support to allow access to this block of DRAM.

Contributed-under: TianoCore Contribution Agreement 1.1
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Thomas Abraham <thomas.abraham@arm.com>
---
 .../ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf |  4 ++++
 .../SgiPkg/Library/PlatformLib/PlatformLibMem.c    | 24 +++++++++++++++++++++-
 Platform/ARM/SgiPkg/SgiPlatform.dec                |  4 ++++
 Platform/ARM/SgiPkg/SgiPlatform.dsc                |  4 ++++
 4 files changed, 35 insertions(+), 1 deletion(-)

diff --git a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf
index 5d4bf72..93377fa 100644
--- a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf
+++ b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf
@@ -44,6 +44,10 @@
 [FixedPcd]
   gArmPlatformTokenSpaceGuid.PcdClusterCount
   gArmPlatformTokenSpaceGuid.PcdCoreCount
+
+  gArmSgiTokenSpaceGuid.PcdDramBlock2Base
+  gArmSgiTokenSpaceGuid.PcdDramBlock2Size
+
   gArmTokenSpaceGuid.PcdSystemMemoryBase
   gArmTokenSpaceGuid.PcdSystemMemorySize
   gArmTokenSpaceGuid.PcdGicDistributorBase
diff --git a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c
index 03c206b..3314a26 100644
--- a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c
+++ b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c
@@ -22,7 +22,7 @@
 #include <SgiPlatform.h>
 
 // Total number of descriptors, including the final "end-of-table" descriptor.
-#define MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS  10
+#define MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS  11
 
 /**
   Returns the Virtual Memory Map of the platform.
@@ -41,6 +41,22 @@ ArmPlatformGetVirtualMemoryMap (
 {
   UINTN                         Index;
   ARM_MEMORY_REGION_DESCRIPTOR  *VirtualMemoryTable;
+  EFI_RESOURCE_ATTRIBUTE_TYPE   ResourceAttributes;
+
+  ResourceAttributes =
+    EFI_RESOURCE_ATTRIBUTE_PRESENT |
+    EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
+    EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
+    EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
+    EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |
+    EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE |
+    EFI_RESOURCE_ATTRIBUTE_TESTED;
+
+  BuildResourceDescriptorHob (
+    EFI_RESOURCE_SYSTEM_MEMORY,
+    ResourceAttributes,
+    FixedPcdGet64 (PcdDramBlock2Base),
+    FixedPcdGet64 (PcdDramBlock2Size));
 
   ASSERT (VirtualMemoryMap != NULL);
   Index = 0;
@@ -100,6 +116,12 @@ ArmPlatformGetVirtualMemoryMap (
   VirtualMemoryTable[Index].Length          = PcdGet64 (PcdSystemMemorySize);
   VirtualMemoryTable[Index].Attributes      = ARM_MEMORY_REGION_ATTRIBUTE_WRITE_BACK;
 
+  // DDR - Second Block
+  VirtualMemoryTable[++Index].PhysicalBase  = PcdGet64 (PcdDramBlock2Base);
+  VirtualMemoryTable[Index].VirtualBase     = PcdGet64 (PcdDramBlock2Base);
+  VirtualMemoryTable[Index].Length          = PcdGet64 (PcdDramBlock2Size);
+  VirtualMemoryTable[Index].Attributes      = ARM_MEMORY_REGION_ATTRIBUTE_WRITE_BACK;
+
   // PCI Configuration Space
   VirtualMemoryTable[++Index].PhysicalBase  = PcdGet64 (PcdPciExpressBaseAddress);
   VirtualMemoryTable[Index].VirtualBase     = PcdGet64 (PcdPciExpressBaseAddress);
diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dec b/Platform/ARM/SgiPkg/SgiPlatform.dec
index 2f6ebcc..2fcc13e 100644
--- a/Platform/ARM/SgiPkg/SgiPlatform.dec
+++ b/Platform/ARM/SgiPkg/SgiPlatform.dec
@@ -38,5 +38,9 @@
   # Set this PCD to TRUE to enable virtio support.
   gArmSgiTokenSpaceGuid.PcdVirtioSupported|TRUE|BOOLEAN|0x00000001
 
+[PcdsFixedAtBuild]
+  gArmSgiTokenSpaceGuid.PcdDramBlock2Base|0|UINT64|0x00000002
+  gArmSgiTokenSpaceGuid.PcdDramBlock2Size|0|UINT64|0x00000003
+
 [Ppis]
   gHwConfigDtInfoPpiGuid     = { 0x6f606eb3, 0x9123, 0x4e15, { 0xa8, 0x9b, 0x0f, 0xac, 0x66, 0xef, 0xd0, 0x17 } }
diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc b/Platform/ARM/SgiPkg/SgiPlatform.dsc
index 7b8e051..55fdbce 100644
--- a/Platform/ARM/SgiPkg/SgiPlatform.dsc
+++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc
@@ -103,6 +103,10 @@
 [PcdsFixedAtBuild.common]
   gArmTokenSpaceGuid.PcdVFPEnabled|1
 
+  # DRAM Block2 Base and Size
+  gArmSgiTokenSpaceGuid.PcdDramBlock2Base|0x8080000000
+  gArmSgiTokenSpaceGuid.PcdDramBlock2Size|0x180000000
+
   # NV Storage PCDs. Use base of 0x08000000 for NOR0, 0xC0000000 for NOR 1
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0x0C000000
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x01400000
-- 
2.7.4



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

* [PATCH v2 edk2-platforms 3/4] Platform/ARM/Sgi: Add ACPI description of virtio block device
  2018-07-24  4:51 [PATCH v2 edk2-platforms 0/4] Platform/Arm/Sgi: platform support updates Thomas Abraham
  2018-07-24  4:51 ` [PATCH v2 edk2-platforms 1/4] Platform/ARM/Sgi: Increase the size of flash image Thomas Abraham
  2018-07-24  4:51 ` [PATCH v2 edk2-platforms 2/4] Platform/ARM/Sgi: allow access the second DRAM block Thomas Abraham
@ 2018-07-24  4:51 ` Thomas Abraham
  2018-07-24  4:51 ` [PATCH v2 edk2-platforms 4/4] Platform/ARM/Sgi: Allow use of default fifo size for PL011 controller Thomas Abraham
  2018-07-25  9:36 ` [PATCH v2 edk2-platforms 0/4] Platform/Arm/Sgi: platform support updates Ard Biesheuvel
  4 siblings, 0 replies; 6+ messages in thread
From: Thomas Abraham @ 2018-07-24  4:51 UTC (permalink / raw)
  To: edk2-devel

From: Daniil Egranov <daniil.egranov@arm.com>

SGI platforms include an instance of the virtio block device. So add
a representation for it in the ACPI tables.

Contributed-under: TianoCore Contribution Agreement 1.1
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Daniil Egranov <daniil.egranov@arm.com>
---
 Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dsdt.asl | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dsdt.asl b/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dsdt.asl
index c5b662d..3e1068d 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dsdt.asl
+++ b/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dsdt.asl
@@ -96,4 +96,16 @@ DefinitionBlock("DsdtTable.aml", "DSDT", 1, "ARMLTD", "SGI575", EFI_ACPI_ARM_OEM
       })
     }
   } // Scope(_SB)
+
+  // VIRTIO DISK
+  Device (VR00) {
+    Name (_HID, "LNRO0005")
+    Name (_UID, 0)
+    Name (_CCA, 1)    // mark the device coherent
+
+    Name (_CRS, ResourceTemplate() {
+      Memory32Fixed (ReadWrite, 0x1c130000, 0x10000)
+      Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 202 }
+    })
+  }
 }
-- 
2.7.4



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

* [PATCH v2 edk2-platforms 4/4] Platform/ARM/Sgi: Allow use of default fifo size for PL011 controller
  2018-07-24  4:51 [PATCH v2 edk2-platforms 0/4] Platform/Arm/Sgi: platform support updates Thomas Abraham
                   ` (2 preceding siblings ...)
  2018-07-24  4:51 ` [PATCH v2 edk2-platforms 3/4] Platform/ARM/Sgi: Add ACPI description of virtio block device Thomas Abraham
@ 2018-07-24  4:51 ` Thomas Abraham
  2018-07-25  9:36 ` [PATCH v2 edk2-platforms 0/4] Platform/Arm/Sgi: platform support updates Ard Biesheuvel
  4 siblings, 0 replies; 6+ messages in thread
From: Thomas Abraham @ 2018-07-24  4:51 UTC (permalink / raw)
  To: edk2-devel

From: Daniil Egranov <daniil.egranov@arm.com>

Set the PcdUartDefaultReceiveFifoDepth to 0 which lets the PL011
controller FIFOs to be enabled.

Contributed-under: TianoCore Contribution Agreement 1.1
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Daniil Egranov <daniil.egranov@arm.com>
---
 Platform/ARM/SgiPkg/SgiPlatform.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc b/Platform/ARM/SgiPkg/SgiPlatform.dsc
index 55fdbce..2d8dcff 100644
--- a/Platform/ARM/SgiPkg/SgiPlatform.dsc
+++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc
@@ -149,6 +149,7 @@
   ## PL011 - Serial Terminal
   gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x7FF80000
   gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|115200
+  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultReceiveFifoDepth|0
   gArmPlatformTokenSpaceGuid.PL011UartInteger|4
   gArmPlatformTokenSpaceGuid.PL011UartFractional|0
 
-- 
2.7.4



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

* Re: [PATCH v2 edk2-platforms 0/4] Platform/Arm/Sgi: platform support updates
  2018-07-24  4:51 [PATCH v2 edk2-platforms 0/4] Platform/Arm/Sgi: platform support updates Thomas Abraham
                   ` (3 preceding siblings ...)
  2018-07-24  4:51 ` [PATCH v2 edk2-platforms 4/4] Platform/ARM/Sgi: Allow use of default fifo size for PL011 controller Thomas Abraham
@ 2018-07-25  9:36 ` Ard Biesheuvel
  4 siblings, 0 replies; 6+ messages in thread
From: Ard Biesheuvel @ 2018-07-25  9:36 UTC (permalink / raw)
  To: Thomas Abraham; +Cc: edk2-devel@lists.01.org, Leif Lindholm

On 24 July 2018 at 06:51, Thomas Abraham <thomas.abraham@arm.com> wrote:
> Changes since v1:
> - Removed 'Change-Id' from the patch description
>
> This patch series includes few updates for Arm's SGI platform. The virtio
> block device representation in the ACPI table, setting default fifo size
> for the uart controller, handling the increase in code size and adding
> support for the upper 6GB memory block are included in this update.
>
> Daniil Egranov (2):
>   Platform/ARM/Sgi: Add ACPI description of virtio block device
>   Platform/ARM/Sgi: Allow use of default fifo size for PL011 controller
>
> Thomas Abraham (2):
>   Platform/ARM/Sgi: Increase the size of flash image
>   Platform/ARM/Sgi: allow access the second DRAM block
>

Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

Pushed as bd325517ba42..2c4d662506bd

Thanks,

>  Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dsdt.asl     | 12 +++++++++++
>  .../ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf |  4 ++++
>  .../SgiPkg/Library/PlatformLib/PlatformLibMem.c    | 24 +++++++++++++++++++++-
>  Platform/ARM/SgiPkg/SgiPlatform.dec                |  4 ++++
>  Platform/ARM/SgiPkg/SgiPlatform.dsc                |  5 +++++
>  Platform/ARM/SgiPkg/SgiPlatform.fdf                |  8 ++++----
>  6 files changed, 52 insertions(+), 5 deletions(-)
>
> --
> 2.7.4
>
>


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

end of thread, other threads:[~2018-07-25  9:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-24  4:51 [PATCH v2 edk2-platforms 0/4] Platform/Arm/Sgi: platform support updates Thomas Abraham
2018-07-24  4:51 ` [PATCH v2 edk2-platforms 1/4] Platform/ARM/Sgi: Increase the size of flash image Thomas Abraham
2018-07-24  4:51 ` [PATCH v2 edk2-platforms 2/4] Platform/ARM/Sgi: allow access the second DRAM block Thomas Abraham
2018-07-24  4:51 ` [PATCH v2 edk2-platforms 3/4] Platform/ARM/Sgi: Add ACPI description of virtio block device Thomas Abraham
2018-07-24  4:51 ` [PATCH v2 edk2-platforms 4/4] Platform/ARM/Sgi: Allow use of default fifo size for PL011 controller Thomas Abraham
2018-07-25  9:36 ` [PATCH v2 edk2-platforms 0/4] Platform/Arm/Sgi: platform support updates Ard Biesheuvel

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