* [PATCH edk2-platforms 0/4] Platform/Arm/Sgi: minor platform support updates
@ 2018-07-23 15:48 Thomas Abraham
2018-07-23 15:48 ` [PATCH edk2-platforms 1/4] Platform/ARM/Sgi: Increase the size of flash image Thomas Abraham
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Thomas Abraham @ 2018-07-23 15:48 UTC (permalink / raw)
To: edk2-devel
This patch series includes few minor 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] 5+ messages in thread
* [PATCH edk2-platforms 1/4] Platform/ARM/Sgi: Increase the size of flash image
2018-07-23 15:48 [PATCH edk2-platforms 0/4] Platform/Arm/Sgi: minor platform support updates Thomas Abraham
@ 2018-07-23 15:48 ` Thomas Abraham
2018-07-23 15:48 ` [PATCH edk2-platforms 2/4] Platform/ARM/Sgi: allow access the second DRAM block Thomas Abraham
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Thomas Abraham @ 2018-07-23 15:48 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.
Change-Id: I897bf862e7a25967345949021ab601041536f5c5
Contributed-under: TianoCore Contribution Agreement 1.1
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] 5+ messages in thread
* [PATCH edk2-platforms 2/4] Platform/ARM/Sgi: allow access the second DRAM block
2018-07-23 15:48 [PATCH edk2-platforms 0/4] Platform/Arm/Sgi: minor platform support updates Thomas Abraham
2018-07-23 15:48 ` [PATCH edk2-platforms 1/4] Platform/ARM/Sgi: Increase the size of flash image Thomas Abraham
@ 2018-07-23 15:48 ` Thomas Abraham
2018-07-23 15:48 ` [PATCH edk2-platforms 3/4] Platform/ARM/Sgi: Add ACPI description of virtio block device Thomas Abraham
2018-07-23 15:48 ` [PATCH edk2-platforms 4/4] Platform/ARM/Sgi: Allow use of default fifo size for PL011 controller Thomas Abraham
3 siblings, 0 replies; 5+ messages in thread
From: Thomas Abraham @ 2018-07-23 15:48 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.
Change-Id: If1817fd20ce4ce12d3577f78b01c35b410c516a5
Contributed-under: TianoCore Contribution Agreement 1.1
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] 5+ messages in thread
* [PATCH edk2-platforms 3/4] Platform/ARM/Sgi: Add ACPI description of virtio block device
2018-07-23 15:48 [PATCH edk2-platforms 0/4] Platform/Arm/Sgi: minor platform support updates Thomas Abraham
2018-07-23 15:48 ` [PATCH edk2-platforms 1/4] Platform/ARM/Sgi: Increase the size of flash image Thomas Abraham
2018-07-23 15:48 ` [PATCH edk2-platforms 2/4] Platform/ARM/Sgi: allow access the second DRAM block Thomas Abraham
@ 2018-07-23 15:48 ` Thomas Abraham
2018-07-23 15:48 ` [PATCH edk2-platforms 4/4] Platform/ARM/Sgi: Allow use of default fifo size for PL011 controller Thomas Abraham
3 siblings, 0 replies; 5+ messages in thread
From: Thomas Abraham @ 2018-07-23 15:48 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.
Change-Id: I66cd70cd9ad0c7659e0e27335e99fd4544cecf12
Contributed-under: TianoCore Contribution Agreement 1.1
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] 5+ messages in thread
* [PATCH edk2-platforms 4/4] Platform/ARM/Sgi: Allow use of default fifo size for PL011 controller
2018-07-23 15:48 [PATCH edk2-platforms 0/4] Platform/Arm/Sgi: minor platform support updates Thomas Abraham
` (2 preceding siblings ...)
2018-07-23 15:48 ` [PATCH edk2-platforms 3/4] Platform/ARM/Sgi: Add ACPI description of virtio block device Thomas Abraham
@ 2018-07-23 15:48 ` Thomas Abraham
3 siblings, 0 replies; 5+ messages in thread
From: Thomas Abraham @ 2018-07-23 15:48 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.
Change-Id: Icb70447adfb3b89915d1aeee1a9db0d62c7f5e41
Contributed-under: TianoCore Contribution Agreement 1.1
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] 5+ messages in thread
end of thread, other threads:[~2018-07-23 15:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-23 15:48 [PATCH edk2-platforms 0/4] Platform/Arm/Sgi: minor platform support updates Thomas Abraham
2018-07-23 15:48 ` [PATCH edk2-platforms 1/4] Platform/ARM/Sgi: Increase the size of flash image Thomas Abraham
2018-07-23 15:48 ` [PATCH edk2-platforms 2/4] Platform/ARM/Sgi: allow access the second DRAM block Thomas Abraham
2018-07-23 15:48 ` [PATCH edk2-platforms 3/4] Platform/ARM/Sgi: Add ACPI description of virtio block device Thomas Abraham
2018-07-23 15:48 ` [PATCH edk2-platforms 4/4] Platform/ARM/Sgi: Allow use of default fifo size for PL011 controller Thomas Abraham
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox