* [platforms: PATCH v2 00/12] Armada 7k/8k - misc improvements
@ 2017-10-11 10:15 Marcin Wojtas
2017-10-11 10:15 ` [platforms: PATCH v2 01/12] Marvell/Armada: Introduce platform initialization driver Marcin Wojtas
` (12 more replies)
0 siblings, 13 replies; 15+ messages in thread
From: Marcin Wojtas @ 2017-10-11 10:15 UTC (permalink / raw)
To: edk2-devel
Cc: leif.lindholm, ard.biesheuvel, nadavh, neta, kostap, jinghua, mw,
jsd
Hi,
This is a second version of misc, general improvements patchset.
There are minor changes, comparing to v1 - please refer to the
changelog below.
The patches are available in the github:
https://github.com/MarvellEmbeddedProcessors/edk2-open-platform/commits/misc-upstream-r20171011
I'm looking forward to your comments or remarks.
Best regards,
Marcin
Changelog:
v1 -> v2
* Remove patch: "Marvell/Armada: Armada70x0Lib: Clean FV in the D-cache
before boot"
* 1/12
- Specify contribution in new way in the commit log
- Add Linaro copyrights to new files
* 8/13
- Improve commit log
* 11/13
- Fix indentation
* Others
- Add RB's
Ard Biesheuvel (10):
Marvell/Armada: Switch to dynamic PCDs
Marvell/Armada: Armada70x0Lib: Terminate call stack list at entry
Marvell/Armada: Use 4k/64k aligned sections for DXE/DXE-rt modules
Marvell/Armada: Switch to generic BDS
Marvell/Armada: Re-enable driver model diagnostics PCDs
Marvell/Armada: Ensure GICC frames adjacency
Marvell/Armada: Disable PerformanceLibrary
Marvell/Armada: Switch to unicore PrePi
Marvell/Armada: Remove outdated SEC alignment override
Marvell/Armada: Add the UefiPxeBcDxe driver
Marcin Wojtas (2):
Marvell/Armada: Introduce platform initialization driver
Marvell/Documentation: Follow EDK2 coding style in the PortingGuide
Platform/Marvell/Armada/Armada.dsc.inc | 55 +-
Platform/Marvell/Armada/Armada70x0.fdf | 23 +-
Platform/Marvell/Armada/Drivers/PlatInitDxe/PlatInitDxe.c | 45 ++
Platform/Marvell/Armada/Drivers/PlatInitDxe/PlatInitDxe.inf | 45 ++
Platform/Marvell/Armada/Library/Armada70x0Lib/AArch64/ArmPlatformHelper.S | 1 +
Platform/Marvell/Armada/Library/Armada70x0Lib/Armada70x0Lib.c | 11 -
Platform/Marvell/Marvell.dec | 5 +
Silicon/Marvell/Documentation/PortingGuide.txt | 800 ++++++++++----------
8 files changed, 550 insertions(+), 435 deletions(-)
create mode 100644 Platform/Marvell/Armada/Drivers/PlatInitDxe/PlatInitDxe.c
create mode 100644 Platform/Marvell/Armada/Drivers/PlatInitDxe/PlatInitDxe.inf
--
2.7.4
^ permalink raw reply [flat|nested] 15+ messages in thread
* [platforms: PATCH v2 01/12] Marvell/Armada: Introduce platform initialization driver
2017-10-11 10:15 [platforms: PATCH v2 00/12] Armada 7k/8k - misc improvements Marcin Wojtas
@ 2017-10-11 10:15 ` Marcin Wojtas
2017-10-11 10:15 ` [platforms: PATCH v2 02/12] Marvell/Armada: Switch to dynamic PCDs Marcin Wojtas
` (11 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Marcin Wojtas @ 2017-10-11 10:15 UTC (permalink / raw)
To: edk2-devel
Cc: leif.lindholm, ard.biesheuvel, nadavh, neta, kostap, jinghua, mw,
jsd
In order to enable modification of dynamic PCD's for the libraries
and DXE drivers, this patch introduces new driver. It is
executed prior to other drivers. Mpp, ComPhy and Utmi libraries
initialization were moved from PrePi stage to DXE.
To force the correct driver dispatch sequence, introduce a protocol GUID
and install the protocol as a NULL protocol when PlatInitDxe executes.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
[Introduce protocol GUID to force correct driver dispatch order]
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
Platform/Marvell/Armada/Armada.dsc.inc | 3 ++
Platform/Marvell/Armada/Armada70x0.fdf | 5 +++
Platform/Marvell/Armada/Drivers/PlatInitDxe/PlatInitDxe.c | 45 ++++++++++++++++++++
Platform/Marvell/Armada/Drivers/PlatInitDxe/PlatInitDxe.inf | 45 ++++++++++++++++++++
Platform/Marvell/Armada/Library/Armada70x0Lib/Armada70x0Lib.c | 11 -----
Platform/Marvell/Marvell.dec | 5 +++
6 files changed, 103 insertions(+), 11 deletions(-)
diff --git a/Platform/Marvell/Armada/Armada.dsc.inc b/Platform/Marvell/Armada/Armada.dsc.inc
index 89fb7e7..417bb0c 100644
--- a/Platform/Marvell/Armada/Armada.dsc.inc
+++ b/Platform/Marvell/Armada/Armada.dsc.inc
@@ -378,6 +378,9 @@
ArmPkg/Drivers/TimerDxe/TimerDxe.inf
ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.inf
+ # Platform Initialization
+ Platform/Marvell/Armada/Drivers/PlatInitDxe/PlatInitDxe.inf
+
# Platform drivers
Platform/Marvell/Drivers/I2c/MvI2cDxe/MvI2cDxe.inf
MdeModulePkg/Bus/I2c/I2cDxe/I2cDxe.inf
diff --git a/Platform/Marvell/Armada/Armada70x0.fdf b/Platform/Marvell/Armada/Armada70x0.fdf
index c861e78..763d76a 100644
--- a/Platform/Marvell/Armada/Armada70x0.fdf
+++ b/Platform/Marvell/Armada/Armada70x0.fdf
@@ -89,6 +89,11 @@ FvNameGuid = 5eda4200-2c5f-43cb-9da3-0baf74b1b30c
INF MdeModulePkg/Core/Dxe/DxeMain.inf
+ #
+ # Platform Initialization
+ #
+ INF Platform/Marvell/Armada/Drivers/PlatInitDxe/PlatInitDxe.inf
+
# PI DXE Drivers producing Architectural Protocols (EFI Services)
INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf
INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
diff --git a/Platform/Marvell/Armada/Drivers/PlatInitDxe/PlatInitDxe.c b/Platform/Marvell/Armada/Drivers/PlatInitDxe/PlatInitDxe.c
new file mode 100644
index 0000000..1efad77
--- /dev/null
+++ b/Platform/Marvell/Armada/Drivers/PlatInitDxe/PlatInitDxe.c
@@ -0,0 +1,45 @@
+/** @file
+ Copyright (c) 2017, Linaro Limited. All rights reserved.
+ Copyright (c) 2017, Marvell International Ltd. and its affiliates
+
+ This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#include <Library/DebugLib.h>
+#include <Library/MppLib.h>
+#include <Library/MvComPhyLib.h>
+#include <Library/PcdLib.h>
+#include <Library/UefiDriverEntryPoint.h>
+#include <Library/UefiBootServicesTableLib.h>
+#include <Library/UtmiPhyLib.h>
+
+EFI_STATUS
+EFIAPI
+ArmadaPlatInitDxeEntryPoint (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+ )
+{
+ EFI_STATUS Status;
+
+ DEBUG ((DEBUG_ERROR, "\nArmada Platform Init\n\n"));
+
+ Status = gBS->InstallProtocolInterface (&ImageHandle,
+ &gMarvellPlatformInitCompleteProtocolGuid,
+ EFI_NATIVE_INTERFACE,
+ NULL);
+ ASSERT_EFI_ERROR (Status);
+
+ MvComPhyInit ();
+ UtmiPhyInit ();
+ MppInitialize ();
+
+ return EFI_SUCCESS;
+}
diff --git a/Platform/Marvell/Armada/Drivers/PlatInitDxe/PlatInitDxe.inf b/Platform/Marvell/Armada/Drivers/PlatInitDxe/PlatInitDxe.inf
new file mode 100644
index 0000000..790b7e3
--- /dev/null
+++ b/Platform/Marvell/Armada/Drivers/PlatInitDxe/PlatInitDxe.inf
@@ -0,0 +1,45 @@
+#/* @file
+# Copyright (c) 2017, Linaro Limited. All rights reserved.
+# Copyright (c) 2017, Marvell International Ltd. and its affiliates
+#
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+#*/
+
+[Defines]
+ INF_VERSION = 0x00010019
+ BASE_NAME = PlatInitDxe
+ FILE_GUID = 8c66f65b-08a6-4c91-b993-ff81e0adf818
+ MODULE_TYPE = DXE_DRIVER
+ VERSION_STRING = 1.0
+
+ ENTRY_POINT = ArmadaPlatInitDxeEntryPoint
+
+[Sources]
+ PlatInitDxe.c
+
+[Packages]
+ MdeModulePkg/MdeModulePkg.dec
+ MdePkg/MdePkg.dec
+ Platform/Marvell/Marvell.dec
+
+[LibraryClasses]
+ ComPhyLib
+ DebugLib
+ MppLib
+ PcdLib
+ TimerLib
+ UefiDriverEntryPoint
+ UtmiPhyLib
+
+[Protocols]
+ gMarvellPlatformInitCompleteProtocolGuid ## PRODUCES
+
+[Depex]
+ TRUE
diff --git a/Platform/Marvell/Armada/Library/Armada70x0Lib/Armada70x0Lib.c b/Platform/Marvell/Armada/Library/Armada70x0Lib/Armada70x0Lib.c
index 0ed310f..968d28f 100644
--- a/Platform/Marvell/Armada/Library/Armada70x0Lib/Armada70x0Lib.c
+++ b/Platform/Marvell/Armada/Library/Armada70x0Lib/Armada70x0Lib.c
@@ -15,12 +15,8 @@
#include <Library/ArmLib.h>
#include <Library/ArmPlatformLib.h>
-#include <Library/MppLib.h>
-#include <Library/MvComPhyLib.h>
-#include <Library/UtmiPhyLib.h>
#include <Ppi/ArmMpCoreInfo.h>
-
ARM_CORE_INFO mArmada7040MpCoreInfoTable[] = {
{
// Cluster 0, Core 0
@@ -90,13 +86,6 @@ ArmPlatformInitialize (
IN UINTN MpId
)
{
- if (!ArmPlatformIsPrimaryCore (MpId)) {
- return RETURN_SUCCESS;
- }
-
- MvComPhyInit ();
- UtmiPhyInit ();
- MppInitialize ();
return RETURN_SUCCESS;
}
diff --git a/Platform/Marvell/Marvell.dec b/Platform/Marvell/Marvell.dec
index 0902086..e7d7c2c 100644
--- a/Platform/Marvell/Marvell.dec
+++ b/Platform/Marvell/Marvell.dec
@@ -56,6 +56,11 @@
gShellFUpdateHiiGuid = { 0x9b5d2176, 0x590a, 0x49db, { 0x89, 0x5d, 0x4a, 0x70, 0xfe, 0xad, 0xbe, 0x24 } }
gShellSfHiiGuid = { 0x03a67756, 0x8cde, 0x4638, { 0x82, 0x34, 0x4a, 0x0f, 0x6d, 0x58, 0x81, 0x39 } }
+[Protocols]
+ # installed as a protocol by PlatInitDxe to force ordering between DXE drivers
+ # that depend on the lowlevel platform initialization having been completed
+ gMarvellPlatformInitCompleteProtocolGuid = { 0x465b8cf7, 0x016f, 0x4ba6, { 0xbe, 0x6b, 0x28, 0x0e, 0x3a, 0x7d, 0x38, 0x6f } }
+
[PcdsFixedAtBuild.common]
#MPP
gMarvellTokenSpaceGuid.PcdMppChipCount|0|UINT32|0x30000001
--
2.7.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [platforms: PATCH v2 02/12] Marvell/Armada: Switch to dynamic PCDs
2017-10-11 10:15 [platforms: PATCH v2 00/12] Armada 7k/8k - misc improvements Marcin Wojtas
2017-10-11 10:15 ` [platforms: PATCH v2 01/12] Marvell/Armada: Introduce platform initialization driver Marcin Wojtas
@ 2017-10-11 10:15 ` Marcin Wojtas
2017-10-11 10:15 ` [platforms: PATCH v2 03/12] Marvell/Armada: Armada70x0Lib: Terminate call stack list at entry Marcin Wojtas
` (10 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Marcin Wojtas @ 2017-10-11 10:15 UTC (permalink / raw)
To: edk2-devel
Cc: leif.lindholm, ard.biesheuvel, nadavh, neta, kostap, jinghua, mw,
jsd
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
For full functionality, including HII forms wired to non-volatile UEFI
variables, we need dynamic PCDs as well. So let's enable those.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
---
Platform/Marvell/Armada/Armada.dsc.inc | 10 +++++++---
Platform/Marvell/Armada/Armada70x0.fdf | 1 +
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/Platform/Marvell/Armada/Armada.dsc.inc b/Platform/Marvell/Armada/Armada.dsc.inc
index 417bb0c..433892e 100644
--- a/Platform/Marvell/Armada/Armada.dsc.inc
+++ b/Platform/Marvell/Armada/Armada.dsc.inc
@@ -67,8 +67,7 @@
UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
- # Assume everything is fixed at build. do not use runtime PCD feature
- PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
+ PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
BaseMemoryLib|MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf
@@ -150,6 +149,7 @@
PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf
PlatformPeiLib|ArmPlatformPkg/PlatformPei/PlatformPeiLib.inf
ArmGicArchLib|ArmPkg/Library/ArmGicArchSecLib/ArmGicArchSecLib.inf
+ PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
[LibraryClasses.common.SEC, LibraryClasses.common.PEIM]
MemoryInitPeiLib|ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf
@@ -368,10 +368,14 @@
# DXE
MdeModulePkg/Core/Dxe/DxeMain.inf {
<LibraryClasses>
- PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
}
+ MdeModulePkg/Universal/PCD/Dxe/Pcd.inf {
+ <LibraryClasses>
+ PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
+ }
+
# Architectural Protocols DXE
ArmPkg/Drivers/CpuDxe/CpuDxe.inf
ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
diff --git a/Platform/Marvell/Armada/Armada70x0.fdf b/Platform/Marvell/Armada/Armada70x0.fdf
index 763d76a..b3d1c60 100644
--- a/Platform/Marvell/Armada/Armada70x0.fdf
+++ b/Platform/Marvell/Armada/Armada70x0.fdf
@@ -95,6 +95,7 @@ FvNameGuid = 5eda4200-2c5f-43cb-9da3-0baf74b1b30c
INF Platform/Marvell/Armada/Drivers/PlatInitDxe/PlatInitDxe.inf
# PI DXE Drivers producing Architectural Protocols (EFI Services)
+ INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf
INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
--
2.7.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [platforms: PATCH v2 03/12] Marvell/Armada: Armada70x0Lib: Terminate call stack list at entry
2017-10-11 10:15 [platforms: PATCH v2 00/12] Armada 7k/8k - misc improvements Marcin Wojtas
2017-10-11 10:15 ` [platforms: PATCH v2 01/12] Marvell/Armada: Introduce platform initialization driver Marcin Wojtas
2017-10-11 10:15 ` [platforms: PATCH v2 02/12] Marvell/Armada: Switch to dynamic PCDs Marcin Wojtas
@ 2017-10-11 10:15 ` Marcin Wojtas
2017-10-11 10:15 ` [platforms: PATCH v2 04/12] Marvell/Armada: Use 4k/64k aligned sections for DXE/DXE-rt modules Marcin Wojtas
` (9 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Marcin Wojtas @ 2017-10-11 10:15 UTC (permalink / raw)
To: edk2-devel
Cc: leif.lindholm, ard.biesheuvel, nadavh, neta, kostap, jinghua, mw,
jsd
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To avoid dereferencing junk when walking the call stack in exception
handlers (which may prevent us from getting a full backtrace), set
the frame pointer to 0x0 when first entering UEFI.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
---
Platform/Marvell/Armada/Library/Armada70x0Lib/AArch64/ArmPlatformHelper.S | 1 +
1 file changed, 1 insertion(+)
diff --git a/Platform/Marvell/Armada/Library/Armada70x0Lib/AArch64/ArmPlatformHelper.S b/Platform/Marvell/Armada/Library/Armada70x0Lib/AArch64/ArmPlatformHelper.S
index 9265636..72f8cfc 100644
--- a/Platform/Marvell/Armada/Library/Armada70x0Lib/AArch64/ArmPlatformHelper.S
+++ b/Platform/Marvell/Armada/Library/Armada70x0Lib/AArch64/ArmPlatformHelper.S
@@ -16,6 +16,7 @@
#include <Library/ArmLib.h>
ASM_FUNC(ArmPlatformPeiBootAction)
+ mov x29, xzr
ret
//UINTN
--
2.7.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [platforms: PATCH v2 04/12] Marvell/Armada: Use 4k/64k aligned sections for DXE/DXE-rt modules
2017-10-11 10:15 [platforms: PATCH v2 00/12] Armada 7k/8k - misc improvements Marcin Wojtas
` (2 preceding siblings ...)
2017-10-11 10:15 ` [platforms: PATCH v2 03/12] Marvell/Armada: Armada70x0Lib: Terminate call stack list at entry Marcin Wojtas
@ 2017-10-11 10:15 ` Marcin Wojtas
2017-10-11 10:15 ` [platforms: PATCH v2 05/12] Marvell/Armada: Switch to generic BDS Marcin Wojtas
` (8 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Marcin Wojtas @ 2017-10-11 10:15 UTC (permalink / raw)
To: edk2-devel
Cc: leif.lindholm, ard.biesheuvel, nadavh, neta, kostap, jinghua, mw,
jsd
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Enable strict memory protection at boot time and under the OS, by using
4 KB section alignment for DXE_DRIVER, UEFI_DRIVER and UEFI_APPLICATION
modules, and 64 KB alignment for DXE_RUNTIME_DRIVER modules. Note that
the latter is mandated by the UEFI spec.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
---
Platform/Marvell/Armada/Armada.dsc.inc | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Platform/Marvell/Armada/Armada.dsc.inc b/Platform/Marvell/Armada/Armada.dsc.inc
index 433892e..1b4e713 100644
--- a/Platform/Marvell/Armada/Armada.dsc.inc
+++ b/Platform/Marvell/Armada/Armada.dsc.inc
@@ -486,6 +486,12 @@
gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000
}
+[BuildOptions.common.EDKII.DXE_CORE,BuildOptions.common.EDKII.DXE_DRIVER,BuildOptions.common.EDKII.UEFI_DRIVER,BuildOptions.common.EDKII.UEFI_APPLICATION]
+ GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
+
+[BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
+ GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x10000
+
################################################################################
#
# Defines - platform description macros
--
2.7.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [platforms: PATCH v2 05/12] Marvell/Armada: Switch to generic BDS
2017-10-11 10:15 [platforms: PATCH v2 00/12] Armada 7k/8k - misc improvements Marcin Wojtas
` (3 preceding siblings ...)
2017-10-11 10:15 ` [platforms: PATCH v2 04/12] Marvell/Armada: Use 4k/64k aligned sections for DXE/DXE-rt modules Marcin Wojtas
@ 2017-10-11 10:15 ` Marcin Wojtas
2017-10-11 10:15 ` [platforms: PATCH v2 06/12] Marvell/Armada: Re-enable driver model diagnostics PCDs Marcin Wojtas
` (7 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Marcin Wojtas @ 2017-10-11 10:15 UTC (permalink / raw)
To: edk2-devel
Cc: leif.lindholm, ard.biesheuvel, nadavh, neta, kostap, jinghua, mw,
jsd
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Switch from the Intel BDS to the generic BDS, which is preferred for
ARM platforms given that it is completely legacy free.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
---
Platform/Marvell/Armada/Armada.dsc.inc | 19 ++++++++++++++++---
Platform/Marvell/Armada/Armada70x0.fdf | 3 ++-
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/Platform/Marvell/Armada/Armada.dsc.inc b/Platform/Marvell/Armada/Armada.dsc.inc
index 1b4e713..e920461 100644
--- a/Platform/Marvell/Armada/Armada.dsc.inc
+++ b/Platform/Marvell/Armada/Armada.dsc.inc
@@ -126,8 +126,9 @@
# BDS Libraries
CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
- GenericBdsLib|IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf
- PlatformBdsLib|ArmPlatformPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf
+ BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
+ FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
+ PlatformBootManagerLib|ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf
@@ -350,6 +351,12 @@
# Shell.
gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
+ # GUID of the generic BDS UiApp
+ gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
+
+ # use the 'TTYTERM' terminal type for optimal compatibility with Linux terminal emulators
+ gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|4
+
# ARM Pcds
gArmTokenSpaceGuid.PcdSystemMemoryBase|0
gArmTokenSpaceGuid.PcdSystemMemorySize|0x40000000
@@ -459,7 +466,13 @@
MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
- IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
+ MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
+ MdeModulePkg/Application/UiApp/UiApp.inf {
+ <LibraryClasses>
+ NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf
+ NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf
+ NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf
+ }
# UEFI application (Shell Embedded Boot Loader)
ShellPkg/Application/Shell/Shell.inf {
diff --git a/Platform/Marvell/Armada/Armada70x0.fdf b/Platform/Marvell/Armada/Armada70x0.fdf
index b3d1c60..999b968 100644
--- a/Platform/Marvell/Armada/Armada70x0.fdf
+++ b/Platform/Marvell/Armada/Armada70x0.fdf
@@ -175,7 +175,8 @@ FvNameGuid = 5eda4200-2c5f-43cb-9da3-0baf74b1b30c
INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
- INF IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
+ INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
+ INF MdeModulePkg/Application/UiApp/UiApp.inf
# PEI phase firmware volume
--
2.7.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [platforms: PATCH v2 06/12] Marvell/Armada: Re-enable driver model diagnostics PCDs
2017-10-11 10:15 [platforms: PATCH v2 00/12] Armada 7k/8k - misc improvements Marcin Wojtas
` (4 preceding siblings ...)
2017-10-11 10:15 ` [platforms: PATCH v2 05/12] Marvell/Armada: Switch to generic BDS Marcin Wojtas
@ 2017-10-11 10:15 ` Marcin Wojtas
2017-10-11 10:15 ` [platforms: PATCH v2 07/12] Marvell/Armada: Ensure GICC frames adjacency Marcin Wojtas
` (6 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Marcin Wojtas @ 2017-10-11 10:15 UTC (permalink / raw)
To: edk2-devel
Cc: leif.lindholm, ard.biesheuvel, nadavh, neta, kostap, jinghua, mw,
jsd
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
For some reason, one of the early ARM platforms disabled all the
diagnostics related to the UEFI driver model, resulting in the
output of UEFI shell utilities such as 'devices' or 'drivers' to
become completely useless. Armada's shared .DSC include file
inherited this for no good reason, so let's revert it.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
---
Platform/Marvell/Armada/Armada.dsc.inc | 4 ----
1 file changed, 4 deletions(-)
diff --git a/Platform/Marvell/Armada/Armada.dsc.inc b/Platform/Marvell/Armada/Armada.dsc.inc
index e920461..5071bd5 100644
--- a/Platform/Marvell/Armada/Armada.dsc.inc
+++ b/Platform/Marvell/Armada/Armada.dsc.inc
@@ -207,10 +207,6 @@
################################################################################
[PcdsFeatureFlag.common]
- gEfiMdePkgTokenSpaceGuid.PcdComponentNameDisable|TRUE
- gEfiMdePkgTokenSpaceGuid.PcdDriverDiagnosticsDisable|TRUE
- gEfiMdePkgTokenSpaceGuid.PcdComponentName2Disable|TRUE
- gEfiMdePkgTokenSpaceGuid.PcdDriverDiagnostics2Disable|TRUE
#
# Control what commands are supported from the UI
--
2.7.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [platforms: PATCH v2 07/12] Marvell/Armada: Ensure GICC frames adjacency
2017-10-11 10:15 [platforms: PATCH v2 00/12] Armada 7k/8k - misc improvements Marcin Wojtas
` (5 preceding siblings ...)
2017-10-11 10:15 ` [platforms: PATCH v2 06/12] Marvell/Armada: Re-enable driver model diagnostics PCDs Marcin Wojtas
@ 2017-10-11 10:15 ` Marcin Wojtas
2017-10-11 10:15 ` [platforms: PATCH v2 08/12] Marvell/Armada: Disable PerformanceLibrary Marcin Wojtas
` (5 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Marcin Wojtas @ 2017-10-11 10:15 UTC (permalink / raw)
To: edk2-devel
Cc: leif.lindholm, ard.biesheuvel, nadavh, neta, kostap, jinghua, mw,
jsd
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
The GIC architecture mandates that the CPU interface, which consists
of 2 consecutive 4 KB frames, can be mapped using separate mappings.
Since this is problematic on 64 KB pages, the MMU-400 aliases each
frame 16 times, and the two consecutive frames can be found at offset
0xf000.
Therefore use the last alias from the first series of aliases as the
base address, so that the first frame from the second series becomes
directly adjacent, whilst remaining covered by a separate 64KB page.
This patch is intended to expose correct GICC alias via
MADT, once ACPI support is added.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
Platform/Marvell/Armada/Armada.dsc.inc | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/Platform/Marvell/Armada/Armada.dsc.inc b/Platform/Marvell/Armada/Armada.dsc.inc
index 5071bd5..bd2336f 100644
--- a/Platform/Marvell/Armada/Armada.dsc.inc
+++ b/Platform/Marvell/Armada/Armada.dsc.inc
@@ -263,7 +263,14 @@
# ARM Generic Interrupt Controller
gArmTokenSpaceGuid.PcdGicDistributorBase|0xF0210000
- gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0xF0220000
+
+ #
+ # NOTE: the GIC architecture mandates that the CPU interface, which consists
+ # of 2 consecutive 4 KB frames, can be mapped using separate mappings.
+ # Since this is problematic on 64 KB pages, the MMU-400 aliases each frame
+ # 16 times, and the two consecutive frames can be found at offset 0xf000
+ #
+ gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0xF022F000
# ARM Architectural Timer Support
gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|25000000
--
2.7.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [platforms: PATCH v2 08/12] Marvell/Armada: Disable PerformanceLibrary
2017-10-11 10:15 [platforms: PATCH v2 00/12] Armada 7k/8k - misc improvements Marcin Wojtas
` (6 preceding siblings ...)
2017-10-11 10:15 ` [platforms: PATCH v2 07/12] Marvell/Armada: Ensure GICC frames adjacency Marcin Wojtas
@ 2017-10-11 10:15 ` Marcin Wojtas
2017-10-11 10:15 ` [platforms: PATCH v2 09/12] Marvell/Armada: Switch to unicore PrePi Marcin Wojtas
` (4 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Marcin Wojtas @ 2017-10-11 10:15 UTC (permalink / raw)
To: edk2-devel
Cc: leif.lindholm, ard.biesheuvel, nadavh, neta, kostap, jinghua, mw,
jsd
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Remove the gEfiMdePkgTokenSpaceGuid.PcdPerformanceLibraryPropertyMask
setting so it reverts to its default of 0, and disables performance
profiling.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
---
Platform/Marvell/Armada/Armada.dsc.inc | 1 -
1 file changed, 1 deletion(-)
diff --git a/Platform/Marvell/Armada/Armada.dsc.inc b/Platform/Marvell/Armada/Armada.dsc.inc
index bd2336f..b718c60 100644
--- a/Platform/Marvell/Armada/Armada.dsc.inc
+++ b/Platform/Marvell/Armada/Armada.dsc.inc
@@ -251,7 +251,6 @@
gEfiMdePkgTokenSpaceGuid.PcdMaximumLinkedListLength|1000000
gEfiMdePkgTokenSpaceGuid.PcdSpinLockTimeout|10000000
gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue|0xAF
- gEfiMdePkgTokenSpaceGuid.PcdPerformanceLibraryPropertyMask|1
gEfiMdePkgTokenSpaceGuid.PcdPostCodePropertyMask|0
gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|320
gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|1
--
2.7.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [platforms: PATCH v2 09/12] Marvell/Armada: Switch to unicore PrePi
2017-10-11 10:15 [platforms: PATCH v2 00/12] Armada 7k/8k - misc improvements Marcin Wojtas
` (7 preceding siblings ...)
2017-10-11 10:15 ` [platforms: PATCH v2 08/12] Marvell/Armada: Disable PerformanceLibrary Marcin Wojtas
@ 2017-10-11 10:15 ` Marcin Wojtas
2017-10-11 10:15 ` [platforms: PATCH v2 10/12] Marvell/Armada: Remove outdated SEC alignment override Marcin Wojtas
` (3 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Marcin Wojtas @ 2017-10-11 10:15 UTC (permalink / raw)
To: edk2-devel
Cc: leif.lindholm, ard.biesheuvel, nadavh, neta, kostap, jinghua, mw,
jsd
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
There is no point in using the MPCore PrePi, given that only the primary
core will enter UEFI at EL2, and the secondaries will be held in EL3
until summoned by the OS. So use the unicore flavour instead.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
---
Platform/Marvell/Armada/Armada.dsc.inc | 2 +-
Platform/Marvell/Armada/Armada70x0.fdf | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Platform/Marvell/Armada/Armada.dsc.inc b/Platform/Marvell/Armada/Armada.dsc.inc
index b718c60..5a5fde9 100644
--- a/Platform/Marvell/Armada/Armada.dsc.inc
+++ b/Platform/Marvell/Armada/Armada.dsc.inc
@@ -372,7 +372,7 @@
[Components.common]
# PEI Phase modules
- ArmPlatformPkg/PrePi/PeiMPCore.inf
+ ArmPlatformPkg/PrePi/PeiUniCore.inf
# DXE
MdeModulePkg/Core/Dxe/DxeMain.inf {
diff --git a/Platform/Marvell/Armada/Armada70x0.fdf b/Platform/Marvell/Armada/Armada70x0.fdf
index 999b968..2c3efe0 100644
--- a/Platform/Marvell/Armada/Armada70x0.fdf
+++ b/Platform/Marvell/Armada/Armada70x0.fdf
@@ -199,7 +199,7 @@ READ_STATUS = TRUE
READ_LOCK_CAP = TRUE
READ_LOCK_STATUS = TRUE
- INF ArmPlatformPkg/PrePi/PeiMPCore.inf
+ INF ArmPlatformPkg/PrePi/PeiUniCore.inf
FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE {
--
2.7.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [platforms: PATCH v2 10/12] Marvell/Armada: Remove outdated SEC alignment override
2017-10-11 10:15 [platforms: PATCH v2 00/12] Armada 7k/8k - misc improvements Marcin Wojtas
` (8 preceding siblings ...)
2017-10-11 10:15 ` [platforms: PATCH v2 09/12] Marvell/Armada: Switch to unicore PrePi Marcin Wojtas
@ 2017-10-11 10:15 ` Marcin Wojtas
2017-10-11 10:15 ` [platforms: PATCH v2 11/12] Marvell/Armada: Add the UefiPxeBcDxe driver Marcin Wojtas
` (2 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Marcin Wojtas @ 2017-10-11 10:15 UTC (permalink / raw)
To: edk2-devel
Cc: leif.lindholm, ard.biesheuvel, nadavh, neta, kostap, jinghua, mw,
jsd
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
The FDFs no longer require explicit alignment for sections containing
aligned objects, so change it to 'Auto' and FIXED (which allows some
padding to be removed), and remove some other cruft while at it.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
Platform/Marvell/Armada/Armada70x0.fdf | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/Platform/Marvell/Armada/Armada70x0.fdf b/Platform/Marvell/Armada/Armada70x0.fdf
index 2c3efe0..3f0471d 100644
--- a/Platform/Marvell/Armada/Armada70x0.fdf
+++ b/Platform/Marvell/Armada/Armada70x0.fdf
@@ -235,16 +235,9 @@ READ_LOCK_STATUS = TRUE
#
############################################################################
-[Rule.ARM.SEC]
- FILE SEC = $(NAMED_GUID) RELOCS_STRIPPED {
- TE TE Align = 32 $(INF_OUTPUT)/$(MODULE_NAME).efi
- }
-
-# The AArch64 Vector Table requires a 2K alignment that is not supported by the FDF specification.
-# It is the reason 4K is used instead of 2K for the module alignment.
[Rule.AARCH64.SEC]
- FILE SEC = $(NAMED_GUID) RELOCS_STRIPPED {
- TE TE Align = 4K $(INF_OUTPUT)/$(MODULE_NAME).efi
+ FILE SEC = $(NAMED_GUID) RELOCS_STRIPPED FIXED {
+ TE TE Align = Auto $(INF_OUTPUT)/$(MODULE_NAME).efi
}
[Rule.Common.PEI_CORE]
--
2.7.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [platforms: PATCH v2 11/12] Marvell/Armada: Add the UefiPxeBcDxe driver
2017-10-11 10:15 [platforms: PATCH v2 00/12] Armada 7k/8k - misc improvements Marcin Wojtas
` (9 preceding siblings ...)
2017-10-11 10:15 ` [platforms: PATCH v2 10/12] Marvell/Armada: Remove outdated SEC alignment override Marcin Wojtas
@ 2017-10-11 10:15 ` Marcin Wojtas
2017-10-11 10:15 ` [platforms: PATCH v2 12/12] Marvell/Documentation: Follow EDK2 coding style in the PortingGuide Marcin Wojtas
2017-10-11 11:38 ` [platforms: PATCH v2 00/12] Armada 7k/8k - misc improvements Leif Lindholm
12 siblings, 0 replies; 15+ messages in thread
From: Marcin Wojtas @ 2017-10-11 10:15 UTC (permalink / raw)
To: edk2-devel
Cc: leif.lindholm, ard.biesheuvel, nadavh, neta, kostap, jinghua, mw,
jsd
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
This driver allows automatic booting via the network.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
---
Platform/Marvell/Armada/Armada.dsc.inc | 1 +
Platform/Marvell/Armada/Armada70x0.fdf | 1 +
2 files changed, 2 insertions(+)
diff --git a/Platform/Marvell/Armada/Armada.dsc.inc b/Platform/Marvell/Armada/Armada.dsc.inc
index 5a5fde9..1aa485c 100644
--- a/Platform/Marvell/Armada/Armada.dsc.inc
+++ b/Platform/Marvell/Armada/Armada.dsc.inc
@@ -412,6 +412,7 @@
MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
+ MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
Platform/Marvell/Drivers/Net/MvMdioDxe/MvMdioDxe.inf
Platform/Marvell/Drivers/Net/Phy/MvPhyDxe/MvPhyDxe.inf
Platform/Marvell/Drivers/Net/Pp2Dxe/Pp2Dxe.inf
diff --git a/Platform/Marvell/Armada/Armada70x0.fdf b/Platform/Marvell/Armada/Armada70x0.fdf
index 3f0471d..933c3ed 100644
--- a/Platform/Marvell/Armada/Armada70x0.fdf
+++ b/Platform/Marvell/Armada/Armada70x0.fdf
@@ -125,6 +125,7 @@ FvNameGuid = 5eda4200-2c5f-43cb-9da3-0baf74b1b30c
INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
+ INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
INF Platform/Marvell/Drivers/Net/MvMdioDxe/MvMdioDxe.inf
INF Platform/Marvell/Drivers/Net/Phy/MvPhyDxe/MvPhyDxe.inf
INF Platform/Marvell/Drivers/Net/Pp2Dxe/Pp2Dxe.inf
--
2.7.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [platforms: PATCH v2 12/12] Marvell/Documentation: Follow EDK2 coding style in the PortingGuide
2017-10-11 10:15 [platforms: PATCH v2 00/12] Armada 7k/8k - misc improvements Marcin Wojtas
` (10 preceding siblings ...)
2017-10-11 10:15 ` [platforms: PATCH v2 11/12] Marvell/Armada: Add the UefiPxeBcDxe driver Marcin Wojtas
@ 2017-10-11 10:15 ` Marcin Wojtas
2017-10-11 11:38 ` [platforms: PATCH v2 00/12] Armada 7k/8k - misc improvements Leif Lindholm
12 siblings, 0 replies; 15+ messages in thread
From: Marcin Wojtas @ 2017-10-11 10:15 UTC (permalink / raw)
To: edk2-devel
Cc: leif.lindholm, ard.biesheuvel, nadavh, neta, kostap, jinghua, mw,
jsd
This patch removes tabs and wrong line endings in the file, maiking
it acceptable to the PatchCheck.py script.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
---
Silicon/Marvell/Documentation/PortingGuide.txt | 800 ++++++++++----------
1 file changed, 400 insertions(+), 400 deletions(-)
diff --git a/Silicon/Marvell/Documentation/PortingGuide.txt b/Silicon/Marvell/Documentation/PortingGuide.txt
index f0da515..66ec918 100644
--- a/Silicon/Marvell/Documentation/PortingGuide.txt
+++ b/Silicon/Marvell/Documentation/PortingGuide.txt
@@ -1,400 +1,400 @@
-UEFI Porting Guide
-==================
-
-This document provides instructions for adding support for new Marvell Armada
-board. For the sake of simplicity new Marvell board will be called "new_board".
-
-1. Create configuration files for new target
- 1.1 Create FDF file for new board
-
- - Copy and rename edk2-platforms/Platform/Marvell/Armada/Armada70x0.fdf to
- edk2-platforms/Platform/Marvell/Armada/new_board.fdf
- - Change the first no-comment line:
- [FD.Armada70x0_EFI] to [FD.{new_board}_EFI]
-
- 1.2 Create DSC file for new board
-
- - Add new_board.dsc file to edk2-platforms/Platform/Marvell/Armada directory
- - Insert following [Defines] section to new_board.dsc:
-
- [Defines]
- PLATFORM_NAME = {new_board}
- PLATFORM_GUID = {newly_generated_GUID}
- PLATFORM_VERSION = 0.1
- DSC_SPECIFICATION = 0x00010019
- OUTPUT_DIRECTORY = {output_directory}
- SUPPORTED_ARCHITECTURES = AARCH64
- BUILD_TARGETS = DEBUG|RELEASE
- SKUID_IDENTIFIER = DEFAULT
- FLASH_DEFINITION = {path_to_fdf_file}
-
- - Add "!include Armada.dsc.inc" entry to new_board.dsc
-
-2. Driver support
- - According to content of files from
- edk2-platforms/Silicon/Marvell/Documentation/PortingGuide.txt
- insert PCD entries into new_board.dsc for every needed interface (as listed below).
-
-3. Compilation
- - Refer to edk2-platforms/Platform/Marvell/Readme.md. Remember to change
- {platform} to new_board in order to point build system to newly created DSC file.
-
-4. Output file
- - Output files (and among others FD file, which may be used by ATF) are
- generated under directory pointed by "OUTPUT_DIRECTORY" entry (see point 1.2).
-
-
-COMPHY configuration
-====================
-In order to configure ComPhy library, following PCDs are available:
-
- - gMarvellTokenSpaceGuid.PcdComPhyDevices
-
-This array indicates, which ones of the ComPhy chips defined in
-MVHW_COMPHY_DESC template will be configured.
-
-Every ComPhy PCD has <Num> part where <Num> stands for chip ID (order is not
-important, but configuration will be set for first PcdComPhyChipCount chips).
-
-Every chip has 3 ComPhy PCDs and three of them comprise per-board lanes
-settings for this chip. Their format is array of up to 10 values reflecting
-defined numbers for SPEED/TYPE/INVERT, whose description can be found in:
-
- OpenPlatformPkg/Platforms/Marvell/Library/ComPhyLib/ComPhyLib.h
-
- - gMarvellTokenSpaceGuid.PcdChip0ComPhyTypes
- (Array of types - currently supported are:
-
- CP_UNCONNECTED 0x0
- CP_PCIE0 0x1
- CP_PCIE1 0x2
- CP_PCIE2 0x3
- CP_PCIE3 0x4
- CP_SATA0 0x5
- CP_SATA1 0x6
- CP_SATA2 0x7
- CP_SATA3 0x8
- CP_SGMII0 0x9
- CP_SGMII1 0xA
- CP_SGMII2 0xB
- CP_SGMII3 0xC
- CP_QSGMII 0xD
- CP_USB3_HOST0 0xE
- CP_USB3_HOST1 0xF
- CP_USB3_DEVICE 0x10
- CP_XAUI0 0x11
- CP_XAUI1 0x12
- CP_XAUI2 0x13
- CP_XAUI3 0x14
- CP_RXAUI0 0x15
- CP_RXAUI1 0x16
- CP_SFI 0x17 )
-
- - gMarvellTokenSpaceGuid.PcdChip0ComPhySpeeds
- (Array of speeds - currently supported are:
-
- CP_1_25G 0x1
- CP_1_5G 0x2
- CP_2_5G 0x3
- CP_3G 0x4
- CP_3_125G 0x5
- CP_5G 0x6
- CP_5_15625G 0x7
- CP_6G 0x8
- CP_6_25G 0x9
- CP_10_3125G 0xA )
-
- - gMarvellTokenSpaceGuid.PcdChip0ComPhyInvFlags
- (Array of lane inversion types - currently supported are:
-
- CP_NO_INVERT 0x0
- CP_TXD_INVERT 0x1
- CP_RXD_INVERT 0x2
- CP_ALL_INVERT 0x3 )
-
-Example
--------
-
- #ComPhy
- gMarvellTokenSpaceGuid.PcdComPhyDevices|{ 0x1 }
- gMarvellTokenSpaceGuid.PcdChip0ComPhyTypes|{ $(CP_SGMII1), $(CP_USB3_HOST0), $(CP_SFI), $(CP_SATA1), $(CP_USB3_HOST1), $(CP_PCIE2) }
- gMarvellTokenSpaceGuid.PcdChip0ComPhySpeeds|{ $(CP_1_25G), $(CP_5G), $(CP_10_3125G), $(CP_5G), $(CP_5G), $(CP_5G) }
-
-
-PHY Driver configuration
-========================
-MvPhyDxe provides basic initialization and status routines for Marvell PHYs.
-Currently only 1518 series PHYs are supported. Following PCDs are required:
-
- - gMarvellTokenSpaceGuid.PcdPhyStartupAutoneg
- (boolean - if true, driver waits for autonegotiation on startup)
- - gMarvellTokenSpaceGuid.PcdPhyDeviceIds
- (list of values corresponding to MV_PHY_DEVICE_ID enum)
- - gMarvellTokenSpaceGuid.PcdPhySmiAddresses
- (addresses of PHY devices)
- - gMarvellTokenSpaceGuid.PcdPhy2MdioController
- (Array specifying, which Mdio controller the PHY is attached to)
-
-
-MV_PHY_DEVICE_ID:
-
- typedef enum {
- 0 MV_PHY_DEVICE_1512,
- } MV_PHY_DEVICE_ID;
-
-It should be extended when adding support for other PHY models.
-
-Disable autonegotiation:
-
- gMarvellTokenSpaceGuid.PcdPhyStartupAutoneg|FALSE
-
-assuming, that PHY models are 1512:
-
- gMarvellTokenSpaceGuid.PcdPhyDeviceIds|{ 0x0, 0x0 }
-
-
-MDIO configuration
-==================
-MDIO driver provides access to network PHYs' registers via EFI_MDIO_READ and
-EFI_MDIO_WRITE functions (EFI_MDIO_PROTOCOL). Following PCD is required:
-
- - gMarvellTokenSpaceGuid.PcdMdioControllers
- (Array with used controllers
- Set to 0x1 for enabled, 0x0 for disabled)
-
-
-I2C configuration
-=================
-In order to enable driver on a new platform, following steps need to be taken:
- - add following line to .dsc file:
- edk2-platforms/Platform/Marvell/Drivers/I2c/MvI2cDxe/MvI2cDxe.inf
- - add following line to .fdf file:
- INF edk2-platforms/Platform/Marvell/Drivers/I2c/MvI2cDxe/MvI2cDxe.inf
- - add PCDs with relevant values to .dsc file:
- - gMarvellTokenSpaceGuid.PcdI2cSlaveAddresses|{ 0x50, 0x57 }
- (addresses of I2C slave devices on bus)
- - gMarvellTokenSpaceGuid.PcdI2cSlaveBuses|{ 0x0, 0x0 }
- (buses to which accoring slaves are attached)
- - gMarvellTokenSpaceGuid.PcdI2cBusCount|2
- (number of SoC's I2C buses)
- - gMarvellTokenSpaceGuid.PcdI2cControllersEnabled|{ 0x1, 0x1 }
- (array with used controllers)
- - gMarvellTokenSpaceGuid.PcdI2cClockFrequency|200000000
- (I2C host controller clock frequency)
- - gMarvellTokenSpaceGuid.PcdI2cBaudRate|100000
- (baud rate used in I2C transmission)
-
-
-PciEmulation configuration
-==========================
-Installation of various NonDiscoverable devices via PciEmulation driver is performed
-via set of PCDs. Following are available:
-
- - gMarvellTokenSpaceGuid.PcdPciEXhci
- (Indicates, which Xhci devices are used)
-
- - gMarvellTokenSpaceGuid.PcdPciEAhci
- (Indicates, which Ahci devices are used)
-
- - gMarvellTokenSpaceGuid.PcdPciESdhci
- (Indicates, which Sdhci devices are used)
-
-All above PCD's correspond to hardware description in a dedicated structure:
-
-STATIC PCI_E_PLATFORM_DESC A70x0PlatDescTemplate
-
-in Platform/Marvell/PciEmulation/PciEmulation.c file. It comprises device
-count, base addresses, register region size and DMA-coherency type.
-
-Example
--------
-
-Assuming we want to enable second XHCI port and one SDHCI port on Armada
-70x0 board, following needs to be declared:
-
- gMarvellTokenSpaceGuid.PcdPciEXhci|{ 0x0 0x1 }
- gMarvellTokenSpaceGuid.PcdPciESdhci|{ 0x1 }
-
-
-SATA configuration
-==================
-There is one additional PCD for AHCI:
-
- - gMarvellTokenSpaceGuid.PcdSataBaseAddress
- (Base address of SATA controller register space - used in SATA ComPhy init
- sequence)
-
-
-Pp2Dxe configuration
-====================
-Pp2Dxe is driver supporting PP2 NIC on Marvell platforms. Following PCDs
-are required to operate:
-
- - gMarvellTokenSpaceGuid.PcdPp2Controllers
- (Array with used controllers
- Set to 0x1 for enabled, 0x0 for disabled)
-
- - gMarvellTokenSpaceGuid.PcdPp2Port2Controller
- (Array specifying, to which controller the port belongs to)
-
- - gMarvellTokenSpaceGuid.PcdPp2PhyConnectionTypes
- (Indicates speed of the network interface:
-
- PHY_RGMII 0x0
- PHY_RGMII_ID 0x1
- PHY_RGMII_TXID 0x2
- PHY_RGMII_RXID 0x3
- PHY_SGMII 0x4
- PHY_RTBI 0x5
- PHY_XAUI 0x6
- PHY_RXAUI 0x7
- PHY_SFI 0x8 )
-
- - gMarvellTokenSpaceGuid.PcdPp2PhyIndexes
- (Array specifying, to which PHY from
- gMarvellTokenSpaceGuid.PcdPhyDeviceIds is used. If none,
- e.g. in 10G SFI in-band link detection, 0xFF value must
- be specified)
-
- - gMarvellTokenSpaceGuid.PcdPp2PortIds
- (Identificators of PP2 ports)
-
- - gMarvellTokenSpaceGuid.PcdPp2GopIndexes
- (Indexes used in GOP operation)
-
- - gMarvellTokenSpaceGuid.PcdPp2InterfaceAlwaysUp
- (Set to 0x1 for always-up interface, 0x0 otherwise)
-
- - gMarvellTokenSpaceGuid.PcdPp2InterfaceSpeed
- (Indicates speed of the network interface:
-
- PHY_SPEED_10 0x1
- PHY_SPEED_100 0x2
- PHY_SPEED_1000 0x3
- PHY_SPEED_2500 0x4
- PHY_SPEED_10000 0x5 )
-
-
-UTMI PHY configuration
-======================
-In order to configure UTMI, following PCDs are available:
-
- - gMarvellTokenSpaceGuid.PcdUtmiControllersEnabled
- (Array with used controllers
- Set to 0x1 for enabled, 0x0 for disabled)
-
- - gMarvellTokenSpaceGuid.PcdUtmiPortType
- (Indicates type of the connected USB port:
-
- UTMI_USB_HOST0 0x0
- UTMI_USB_HOST1 0x1
- UTMI_USB_DEVICE0 0x2 )
-
-Example
--------
-
- # UtmiPhy
- gMarvellTokenSpaceGuid.PcdUtmiControllersEnabled|{ 0x1, 0x1 }
- gMarvellTokenSpaceGuid.PcdUtmiPortType|{ $(UTMI_USB_HOST0), $(UTMI_USB_HOST1) }
-
-
-SPI driver configuration
-========================
-Following PCDs are available for configuration of spi driver:
-
- - gMarvellTokenSpaceGuid.PcdSpiClockFrequency
- (Frequency (in Hz) of SPI clock)
-
- - gMarvellTokenSpaceGuid.PcdSpiMaxFrequency
- (Max SCLK line frequency (in Hz) (max transfer frequency) )
-
-SpiFlash configuration
-======================
-Folowing PCDs for spi flash driver configuration must be set properly:
-
- - gMarvellTokenSpaceGuid.PcdSpiFlashAddressCycles
- (Size of SPI flash address in bytes (3 or 4) )
-
- - gMarvellTokenSpaceGuid.PcdSpiFlashEraseSize
- (Size of minimal erase block in bytes)
-
- - gMarvellTokenSpaceGuid.PcdSpiFlashPageSize
- (Size of SPI flash page)
-
- - gMarvellTokenSpaceGuid.PcdSpiFlashSectorSize
- (Size of SPI flash sector, 65536 bytes by default)
-
- - gMarvellTokenSpaceGuid.PcdSpiFlashId
- (Id of SPI flash)
-
- - gMarvellTokenSpaceGuid.PcdSpiFlashPollCmd
- (Spi flash polling flag)
-
- - gMarvellTokenSpaceGuid.PcdSpiFlashMode
- (Default SCLK mode (see SPI_MODE enum in file
- edk2-platforms/Platform/Marvell/Drivers/Spi/MvSpi.h))
-
- - gMarvellTokenSpaceGuid.PcdSpiFlashCs
- (Chip select used for communication with the Flash)
-
-MPP configuration
-=================
-Multi-Purpose Ports (MPP) are configurable through platform PCDs.
-In order to set desired pin multiplexing, .dsc file needs to be modified.
-(edk2-platforms/Platform/Marvell/Armada/{platform_name}.dsc - please refer to
-Documentation/Build.txt for currently supported {platftorm_name} )
-Following PCDs are available:
-
- - gMarvellTokenSpaceGuid.PcdMppChipCount
- (Indicates how many different chips are placed on board. So far up to 4 chips
- are supported)
-
-Every MPP PCD has <Num> part where
- <Num> stands for chip ID (order is not important, but configuration will be
- set for first PcdMppChipCount chips).
-
-Below is example for the first chip (Chip0).
-
- - gMarvellTokenSpaceGuid.PcdChip0MppReverseFlag
- (Indicates that register order is reversed. (Needs to be used only for AP806-Z1) )
-
- - gMarvellTokenSpaceGuid.PcdChip0MppBaseAddress
- (This is base address for MPP configuration register)
-
- - gMarvellTokenSpaceGuid.PcdChip0MppPinCount
- (Defines how many MPP pins are available)
-
- - gMarvellTokenSpaceGuid.PcdChip0MppSel0
- - gMarvellTokenSpaceGuid.PcdChip0MppSel1
- - gMarvellTokenSpaceGuid.PcdChip0MppSel2
- (This registers defines functions of 10 pins in ascending order)
-
-Examples
---------
-
- # APN806-A0 MPP SET
- gMarvellTokenSpaceGuid.PcdChip0MppReverseFlag|FALSE
- gMarvellTokenSpaceGuid.PcdChip0MppBaseAddress|0xF06F4000
- gMarvellTokenSpaceGuid.PcdChip0MppRegCount|3
- gMarvellTokenSpaceGuid.PcdChip0MppSel0|{ 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0 }
- gMarvellTokenSpaceGuid.PcdChip0MppSel1|{ 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 }
-
-Set pin 6 and 7 to 0xa function:
- gMarvellTokenSpaceGuid.PcdChip0MppSel0|{ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0xa, 0x0, 0x0 }
-
-
-MarvellResetSystemLib configuration
-===================================
-This simple library allows to mask given bits in given reg at UEFI 'reset'
-command call. These variables are configurable through PCDs:
-
- - gMarvellTokenSpaceGuid.PcdResetRegAddress
- - gMarvellTokenSpaceGuid.PcdResetRegMask
-
-
-Ramdisk configuration
-=====================
-There is one PCD available for Ramdisk configuration
-
- - gMarvellTokenSpaceGuid.PcdRamDiskSize
- (Defines size of Ramdisk)
+UEFI Porting Guide
+==================
+
+This document provides instructions for adding support for new Marvell Armada
+board. For the sake of simplicity new Marvell board will be called "new_board".
+
+1. Create configuration files for new target
+ 1.1 Create FDF file for new board
+
+ - Copy and rename edk2-platforms/Platform/Marvell/Armada/Armada70x0.fdf to
+ edk2-platforms/Platform/Marvell/Armada/new_board.fdf
+ - Change the first no-comment line:
+ [FD.Armada70x0_EFI] to [FD.{new_board}_EFI]
+
+ 1.2 Create DSC file for new board
+
+ - Add new_board.dsc file to edk2-platforms/Platform/Marvell/Armada directory
+ - Insert following [Defines] section to new_board.dsc:
+
+ [Defines]
+ PLATFORM_NAME = {new_board}
+ PLATFORM_GUID = {newly_generated_GUID}
+ PLATFORM_VERSION = 0.1
+ DSC_SPECIFICATION = 0x00010019
+ OUTPUT_DIRECTORY = {output_directory}
+ SUPPORTED_ARCHITECTURES = AARCH64
+ BUILD_TARGETS = DEBUG|RELEASE
+ SKUID_IDENTIFIER = DEFAULT
+ FLASH_DEFINITION = {path_to_fdf_file}
+
+ - Add "!include Armada.dsc.inc" entry to new_board.dsc
+
+2. Driver support
+ - According to content of files from
+ edk2-platforms/Silicon/Marvell/Documentation/PortingGuide.txt
+ insert PCD entries into new_board.dsc for every needed interface (as listed below).
+
+3. Compilation
+ - Refer to edk2-platforms/Platform/Marvell/Readme.md. Remember to change
+ {platform} to new_board in order to point build system to newly created DSC file.
+
+4. Output file
+ - Output files (and among others FD file, which may be used by ATF) are
+ generated under directory pointed by "OUTPUT_DIRECTORY" entry (see point 1.2).
+
+
+COMPHY configuration
+====================
+In order to configure ComPhy library, following PCDs are available:
+
+ - gMarvellTokenSpaceGuid.PcdComPhyDevices
+
+This array indicates, which ones of the ComPhy chips defined in
+MVHW_COMPHY_DESC template will be configured.
+
+Every ComPhy PCD has <Num> part where <Num> stands for chip ID (order is not
+important, but configuration will be set for first PcdComPhyChipCount chips).
+
+Every chip has 3 ComPhy PCDs and three of them comprise per-board lanes
+settings for this chip. Their format is array of up to 10 values reflecting
+defined numbers for SPEED/TYPE/INVERT, whose description can be found in:
+
+ OpenPlatformPkg/Platforms/Marvell/Library/ComPhyLib/ComPhyLib.h
+
+ - gMarvellTokenSpaceGuid.PcdChip0ComPhyTypes
+ (Array of types - currently supported are:
+
+ CP_UNCONNECTED 0x0
+ CP_PCIE0 0x1
+ CP_PCIE1 0x2
+ CP_PCIE2 0x3
+ CP_PCIE3 0x4
+ CP_SATA0 0x5
+ CP_SATA1 0x6
+ CP_SATA2 0x7
+ CP_SATA3 0x8
+ CP_SGMII0 0x9
+ CP_SGMII1 0xA
+ CP_SGMII2 0xB
+ CP_SGMII3 0xC
+ CP_QSGMII 0xD
+ CP_USB3_HOST0 0xE
+ CP_USB3_HOST1 0xF
+ CP_USB3_DEVICE 0x10
+ CP_XAUI0 0x11
+ CP_XAUI1 0x12
+ CP_XAUI2 0x13
+ CP_XAUI3 0x14
+ CP_RXAUI0 0x15
+ CP_RXAUI1 0x16
+ CP_SFI 0x17 )
+
+ - gMarvellTokenSpaceGuid.PcdChip0ComPhySpeeds
+ (Array of speeds - currently supported are:
+
+ CP_1_25G 0x1
+ CP_1_5G 0x2
+ CP_2_5G 0x3
+ CP_3G 0x4
+ CP_3_125G 0x5
+ CP_5G 0x6
+ CP_5_15625G 0x7
+ CP_6G 0x8
+ CP_6_25G 0x9
+ CP_10_3125G 0xA )
+
+ - gMarvellTokenSpaceGuid.PcdChip0ComPhyInvFlags
+ (Array of lane inversion types - currently supported are:
+
+ CP_NO_INVERT 0x0
+ CP_TXD_INVERT 0x1
+ CP_RXD_INVERT 0x2
+ CP_ALL_INVERT 0x3 )
+
+Example
+-------
+
+ #ComPhy
+ gMarvellTokenSpaceGuid.PcdComPhyDevices|{ 0x1 }
+ gMarvellTokenSpaceGuid.PcdChip0ComPhyTypes|{ $(CP_SGMII1), $(CP_USB3_HOST0), $(CP_SFI), $(CP_SATA1), $(CP_USB3_HOST1), $(CP_PCIE2) }
+ gMarvellTokenSpaceGuid.PcdChip0ComPhySpeeds|{ $(CP_1_25G), $(CP_5G), $(CP_10_3125G), $(CP_5G), $(CP_5G), $(CP_5G) }
+
+
+PHY Driver configuration
+========================
+MvPhyDxe provides basic initialization and status routines for Marvell PHYs.
+Currently only 1518 series PHYs are supported. Following PCDs are required:
+
+ - gMarvellTokenSpaceGuid.PcdPhyStartupAutoneg
+ (boolean - if true, driver waits for autonegotiation on startup)
+ - gMarvellTokenSpaceGuid.PcdPhyDeviceIds
+ (list of values corresponding to MV_PHY_DEVICE_ID enum)
+ - gMarvellTokenSpaceGuid.PcdPhySmiAddresses
+ (addresses of PHY devices)
+ - gMarvellTokenSpaceGuid.PcdPhy2MdioController
+ (Array specifying, which Mdio controller the PHY is attached to)
+
+
+MV_PHY_DEVICE_ID:
+
+ typedef enum {
+ 0 MV_PHY_DEVICE_1512,
+ } MV_PHY_DEVICE_ID;
+
+It should be extended when adding support for other PHY models.
+
+Disable autonegotiation:
+
+ gMarvellTokenSpaceGuid.PcdPhyStartupAutoneg|FALSE
+
+assuming, that PHY models are 1512:
+
+ gMarvellTokenSpaceGuid.PcdPhyDeviceIds|{ 0x0, 0x0 }
+
+
+MDIO configuration
+==================
+MDIO driver provides access to network PHYs' registers via EFI_MDIO_READ and
+EFI_MDIO_WRITE functions (EFI_MDIO_PROTOCOL). Following PCD is required:
+
+ - gMarvellTokenSpaceGuid.PcdMdioControllers
+ (Array with used controllers
+ Set to 0x1 for enabled, 0x0 for disabled)
+
+
+I2C configuration
+=================
+In order to enable driver on a new platform, following steps need to be taken:
+ - add following line to .dsc file:
+ edk2-platforms/Platform/Marvell/Drivers/I2c/MvI2cDxe/MvI2cDxe.inf
+ - add following line to .fdf file:
+ INF edk2-platforms/Platform/Marvell/Drivers/I2c/MvI2cDxe/MvI2cDxe.inf
+ - add PCDs with relevant values to .dsc file:
+ - gMarvellTokenSpaceGuid.PcdI2cSlaveAddresses|{ 0x50, 0x57 }
+ (addresses of I2C slave devices on bus)
+ - gMarvellTokenSpaceGuid.PcdI2cSlaveBuses|{ 0x0, 0x0 }
+ (buses to which accoring slaves are attached)
+ - gMarvellTokenSpaceGuid.PcdI2cBusCount|2
+ (number of SoC's I2C buses)
+ - gMarvellTokenSpaceGuid.PcdI2cControllersEnabled|{ 0x1, 0x1 }
+ (array with used controllers)
+ - gMarvellTokenSpaceGuid.PcdI2cClockFrequency|200000000
+ (I2C host controller clock frequency)
+ - gMarvellTokenSpaceGuid.PcdI2cBaudRate|100000
+ (baud rate used in I2C transmission)
+
+
+PciEmulation configuration
+==========================
+Installation of various NonDiscoverable devices via PciEmulation driver is performed
+via set of PCDs. Following are available:
+
+ - gMarvellTokenSpaceGuid.PcdPciEXhci
+ (Indicates, which Xhci devices are used)
+
+ - gMarvellTokenSpaceGuid.PcdPciEAhci
+ (Indicates, which Ahci devices are used)
+
+ - gMarvellTokenSpaceGuid.PcdPciESdhci
+ (Indicates, which Sdhci devices are used)
+
+All above PCD's correspond to hardware description in a dedicated structure:
+
+STATIC PCI_E_PLATFORM_DESC A70x0PlatDescTemplate
+
+in Platform/Marvell/PciEmulation/PciEmulation.c file. It comprises device
+count, base addresses, register region size and DMA-coherency type.
+
+Example
+-------
+
+Assuming we want to enable second XHCI port and one SDHCI port on Armada
+70x0 board, following needs to be declared:
+
+ gMarvellTokenSpaceGuid.PcdPciEXhci|{ 0x0 0x1 }
+ gMarvellTokenSpaceGuid.PcdPciESdhci|{ 0x1 }
+
+
+SATA configuration
+==================
+There is one additional PCD for AHCI:
+
+ - gMarvellTokenSpaceGuid.PcdSataBaseAddress
+ (Base address of SATA controller register space - used in SATA ComPhy init
+ sequence)
+
+
+Pp2Dxe configuration
+====================
+Pp2Dxe is driver supporting PP2 NIC on Marvell platforms. Following PCDs
+are required to operate:
+
+ - gMarvellTokenSpaceGuid.PcdPp2Controllers
+ (Array with used controllers
+ Set to 0x1 for enabled, 0x0 for disabled)
+
+ - gMarvellTokenSpaceGuid.PcdPp2Port2Controller
+ (Array specifying, to which controller the port belongs to)
+
+ - gMarvellTokenSpaceGuid.PcdPp2PhyConnectionTypes
+ (Indicates speed of the network interface:
+
+ PHY_RGMII 0x0
+ PHY_RGMII_ID 0x1
+ PHY_RGMII_TXID 0x2
+ PHY_RGMII_RXID 0x3
+ PHY_SGMII 0x4
+ PHY_RTBI 0x5
+ PHY_XAUI 0x6
+ PHY_RXAUI 0x7
+ PHY_SFI 0x8 )
+
+ - gMarvellTokenSpaceGuid.PcdPp2PhyIndexes
+ (Array specifying, to which PHY from
+ gMarvellTokenSpaceGuid.PcdPhyDeviceIds is used. If none,
+ e.g. in 10G SFI in-band link detection, 0xFF value must
+ be specified)
+
+ - gMarvellTokenSpaceGuid.PcdPp2PortIds
+ (Identificators of PP2 ports)
+
+ - gMarvellTokenSpaceGuid.PcdPp2GopIndexes
+ (Indexes used in GOP operation)
+
+ - gMarvellTokenSpaceGuid.PcdPp2InterfaceAlwaysUp
+ (Set to 0x1 for always-up interface, 0x0 otherwise)
+
+ - gMarvellTokenSpaceGuid.PcdPp2InterfaceSpeed
+ (Indicates speed of the network interface:
+
+ PHY_SPEED_10 0x1
+ PHY_SPEED_100 0x2
+ PHY_SPEED_1000 0x3
+ PHY_SPEED_2500 0x4
+ PHY_SPEED_10000 0x5 )
+
+
+UTMI PHY configuration
+======================
+In order to configure UTMI, following PCDs are available:
+
+ - gMarvellTokenSpaceGuid.PcdUtmiControllersEnabled
+ (Array with used controllers
+ Set to 0x1 for enabled, 0x0 for disabled)
+
+ - gMarvellTokenSpaceGuid.PcdUtmiPortType
+ (Indicates type of the connected USB port:
+
+ UTMI_USB_HOST0 0x0
+ UTMI_USB_HOST1 0x1
+ UTMI_USB_DEVICE0 0x2 )
+
+Example
+-------
+
+ # UtmiPhy
+ gMarvellTokenSpaceGuid.PcdUtmiControllersEnabled|{ 0x1, 0x1 }
+ gMarvellTokenSpaceGuid.PcdUtmiPortType|{ $(UTMI_USB_HOST0), $(UTMI_USB_HOST1) }
+
+
+SPI driver configuration
+========================
+Following PCDs are available for configuration of spi driver:
+
+ - gMarvellTokenSpaceGuid.PcdSpiClockFrequency
+ (Frequency (in Hz) of SPI clock)
+
+ - gMarvellTokenSpaceGuid.PcdSpiMaxFrequency
+ (Max SCLK line frequency (in Hz) (max transfer frequency) )
+
+SpiFlash configuration
+======================
+Folowing PCDs for spi flash driver configuration must be set properly:
+
+ - gMarvellTokenSpaceGuid.PcdSpiFlashAddressCycles
+ (Size of SPI flash address in bytes (3 or 4) )
+
+ - gMarvellTokenSpaceGuid.PcdSpiFlashEraseSize
+ (Size of minimal erase block in bytes)
+
+ - gMarvellTokenSpaceGuid.PcdSpiFlashPageSize
+ (Size of SPI flash page)
+
+ - gMarvellTokenSpaceGuid.PcdSpiFlashSectorSize
+ (Size of SPI flash sector, 65536 bytes by default)
+
+ - gMarvellTokenSpaceGuid.PcdSpiFlashId
+ (Id of SPI flash)
+
+ - gMarvellTokenSpaceGuid.PcdSpiFlashPollCmd
+ (Spi flash polling flag)
+
+ - gMarvellTokenSpaceGuid.PcdSpiFlashMode
+ (Default SCLK mode (see SPI_MODE enum in file
+ edk2-platforms/Platform/Marvell/Drivers/Spi/MvSpi.h))
+
+ - gMarvellTokenSpaceGuid.PcdSpiFlashCs
+ (Chip select used for communication with the Flash)
+
+MPP configuration
+=================
+Multi-Purpose Ports (MPP) are configurable through platform PCDs.
+In order to set desired pin multiplexing, .dsc file needs to be modified.
+(edk2-platforms/Platform/Marvell/Armada/{platform_name}.dsc - please refer to
+Documentation/Build.txt for currently supported {platftorm_name} )
+Following PCDs are available:
+
+ - gMarvellTokenSpaceGuid.PcdMppChipCount
+ (Indicates how many different chips are placed on board. So far up to 4 chips
+ are supported)
+
+Every MPP PCD has <Num> part where
+ <Num> stands for chip ID (order is not important, but configuration will be
+ set for first PcdMppChipCount chips).
+
+Below is example for the first chip (Chip0).
+
+ - gMarvellTokenSpaceGuid.PcdChip0MppReverseFlag
+ (Indicates that register order is reversed. (Needs to be used only for AP806-Z1) )
+
+ - gMarvellTokenSpaceGuid.PcdChip0MppBaseAddress
+ (This is base address for MPP configuration register)
+
+ - gMarvellTokenSpaceGuid.PcdChip0MppPinCount
+ (Defines how many MPP pins are available)
+
+ - gMarvellTokenSpaceGuid.PcdChip0MppSel0
+ - gMarvellTokenSpaceGuid.PcdChip0MppSel1
+ - gMarvellTokenSpaceGuid.PcdChip0MppSel2
+ (This registers defines functions of 10 pins in ascending order)
+
+Examples
+--------
+
+ # APN806-A0 MPP SET
+ gMarvellTokenSpaceGuid.PcdChip0MppReverseFlag|FALSE
+ gMarvellTokenSpaceGuid.PcdChip0MppBaseAddress|0xF06F4000
+ gMarvellTokenSpaceGuid.PcdChip0MppRegCount|3
+ gMarvellTokenSpaceGuid.PcdChip0MppSel0|{ 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0 }
+ gMarvellTokenSpaceGuid.PcdChip0MppSel1|{ 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 }
+
+Set pin 6 and 7 to 0xa function:
+ gMarvellTokenSpaceGuid.PcdChip0MppSel0|{ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0xa, 0x0, 0x0 }
+
+
+MarvellResetSystemLib configuration
+===================================
+This simple library allows to mask given bits in given reg at UEFI 'reset'
+command call. These variables are configurable through PCDs:
+
+ - gMarvellTokenSpaceGuid.PcdResetRegAddress
+ - gMarvellTokenSpaceGuid.PcdResetRegMask
+
+
+Ramdisk configuration
+=====================
+There is one PCD available for Ramdisk configuration
+
+ - gMarvellTokenSpaceGuid.PcdRamDiskSize
+ (Defines size of Ramdisk)
--
2.7.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [platforms: PATCH v2 00/12] Armada 7k/8k - misc improvements
2017-10-11 10:15 [platforms: PATCH v2 00/12] Armada 7k/8k - misc improvements Marcin Wojtas
` (11 preceding siblings ...)
2017-10-11 10:15 ` [platforms: PATCH v2 12/12] Marvell/Documentation: Follow EDK2 coding style in the PortingGuide Marcin Wojtas
@ 2017-10-11 11:38 ` Leif Lindholm
2017-10-11 11:46 ` Marcin Wojtas
12 siblings, 1 reply; 15+ messages in thread
From: Leif Lindholm @ 2017-10-11 11:38 UTC (permalink / raw)
To: Marcin Wojtas
Cc: edk2-devel, ard.biesheuvel, nadavh, neta, kostap, jinghua, jsd
On Wed, Oct 11, 2017 at 12:15:27PM +0200, Marcin Wojtas wrote:
> Hi,
>
> This is a second version of misc, general improvements patchset.
> There are minor changes, comparing to v1 - please refer to the
> changelog below.
>
> The patches are available in the github:
> https://github.com/MarvellEmbeddedProcessors/edk2-open-platform/commits/misc-upstream-r20171011
>
> I'm looking forward to your comments or remarks.
>
> Best regards,
> Marcin
>
> Changelog:
> v1 -> v2
> * Remove patch: "Marvell/Armada: Armada70x0Lib: Clean FV in the D-cache
> before boot"
>
> * 1/12
> - Specify contribution in new way in the commit log
> - Add Linaro copyrights to new files
>
> * 8/13
> - Improve commit log
>
> * 11/13
> - Fix indentation
>
> * Others
> - Add RB's
Thanks - for the series:
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Pushed as 5d6506e4e9..24404d5300.
> Ard Biesheuvel (10):
> Marvell/Armada: Switch to dynamic PCDs
> Marvell/Armada: Armada70x0Lib: Terminate call stack list at entry
> Marvell/Armada: Use 4k/64k aligned sections for DXE/DXE-rt modules
> Marvell/Armada: Switch to generic BDS
> Marvell/Armada: Re-enable driver model diagnostics PCDs
> Marvell/Armada: Ensure GICC frames adjacency
> Marvell/Armada: Disable PerformanceLibrary
> Marvell/Armada: Switch to unicore PrePi
> Marvell/Armada: Remove outdated SEC alignment override
> Marvell/Armada: Add the UefiPxeBcDxe driver
>
> Marcin Wojtas (2):
> Marvell/Armada: Introduce platform initialization driver
> Marvell/Documentation: Follow EDK2 coding style in the PortingGuide
>
> Platform/Marvell/Armada/Armada.dsc.inc | 55 +-
> Platform/Marvell/Armada/Armada70x0.fdf | 23 +-
> Platform/Marvell/Armada/Drivers/PlatInitDxe/PlatInitDxe.c | 45 ++
> Platform/Marvell/Armada/Drivers/PlatInitDxe/PlatInitDxe.inf | 45 ++
> Platform/Marvell/Armada/Library/Armada70x0Lib/AArch64/ArmPlatformHelper.S | 1 +
> Platform/Marvell/Armada/Library/Armada70x0Lib/Armada70x0Lib.c | 11 -
> Platform/Marvell/Marvell.dec | 5 +
> Silicon/Marvell/Documentation/PortingGuide.txt | 800 ++++++++++----------
> 8 files changed, 550 insertions(+), 435 deletions(-)
> create mode 100644 Platform/Marvell/Armada/Drivers/PlatInitDxe/PlatInitDxe.c
> create mode 100644 Platform/Marvell/Armada/Drivers/PlatInitDxe/PlatInitDxe.inf
>
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [platforms: PATCH v2 00/12] Armada 7k/8k - misc improvements
2017-10-11 11:38 ` [platforms: PATCH v2 00/12] Armada 7k/8k - misc improvements Leif Lindholm
@ 2017-10-11 11:46 ` Marcin Wojtas
0 siblings, 0 replies; 15+ messages in thread
From: Marcin Wojtas @ 2017-10-11 11:46 UTC (permalink / raw)
To: Leif Lindholm
Cc: edk2-devel-01, Ard Biesheuvel, nadavh, Neta Zur Hershkovits,
Kostya Porotchkin, Hua Jing, semihalf-dabros-jan
2017-10-11 13:38 GMT+02:00 Leif Lindholm <leif.lindholm@linaro.org>:
> On Wed, Oct 11, 2017 at 12:15:27PM +0200, Marcin Wojtas wrote:
>> Hi,
>>
>> This is a second version of misc, general improvements patchset.
>> There are minor changes, comparing to v1 - please refer to the
>> changelog below.
>>
>> The patches are available in the github:
>> https://github.com/MarvellEmbeddedProcessors/edk2-open-platform/commits/misc-upstream-r20171011
>>
>> I'm looking forward to your comments or remarks.
>>
>> Best regards,
>> Marcin
>>
>> Changelog:
>> v1 -> v2
>> * Remove patch: "Marvell/Armada: Armada70x0Lib: Clean FV in the D-cache
>> before boot"
>>
>> * 1/12
>> - Specify contribution in new way in the commit log
>> - Add Linaro copyrights to new files
>>
>> * 8/13
>> - Improve commit log
>>
>> * 11/13
>> - Fix indentation
>>
>> * Others
>> - Add RB's
>
> Thanks - for the series:
> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
>
> Pushed as 5d6506e4e9..24404d5300.
>
Thanks!
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2017-10-11 11:43 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-11 10:15 [platforms: PATCH v2 00/12] Armada 7k/8k - misc improvements Marcin Wojtas
2017-10-11 10:15 ` [platforms: PATCH v2 01/12] Marvell/Armada: Introduce platform initialization driver Marcin Wojtas
2017-10-11 10:15 ` [platforms: PATCH v2 02/12] Marvell/Armada: Switch to dynamic PCDs Marcin Wojtas
2017-10-11 10:15 ` [platforms: PATCH v2 03/12] Marvell/Armada: Armada70x0Lib: Terminate call stack list at entry Marcin Wojtas
2017-10-11 10:15 ` [platforms: PATCH v2 04/12] Marvell/Armada: Use 4k/64k aligned sections for DXE/DXE-rt modules Marcin Wojtas
2017-10-11 10:15 ` [platforms: PATCH v2 05/12] Marvell/Armada: Switch to generic BDS Marcin Wojtas
2017-10-11 10:15 ` [platforms: PATCH v2 06/12] Marvell/Armada: Re-enable driver model diagnostics PCDs Marcin Wojtas
2017-10-11 10:15 ` [platforms: PATCH v2 07/12] Marvell/Armada: Ensure GICC frames adjacency Marcin Wojtas
2017-10-11 10:15 ` [platforms: PATCH v2 08/12] Marvell/Armada: Disable PerformanceLibrary Marcin Wojtas
2017-10-11 10:15 ` [platforms: PATCH v2 09/12] Marvell/Armada: Switch to unicore PrePi Marcin Wojtas
2017-10-11 10:15 ` [platforms: PATCH v2 10/12] Marvell/Armada: Remove outdated SEC alignment override Marcin Wojtas
2017-10-11 10:15 ` [platforms: PATCH v2 11/12] Marvell/Armada: Add the UefiPxeBcDxe driver Marcin Wojtas
2017-10-11 10:15 ` [platforms: PATCH v2 12/12] Marvell/Documentation: Follow EDK2 coding style in the PortingGuide Marcin Wojtas
2017-10-11 11:38 ` [platforms: PATCH v2 00/12] Armada 7k/8k - misc improvements Leif Lindholm
2017-10-11 11:46 ` Marcin Wojtas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox