This moves all platforms in OpenPlatformPkg to ArmBaseLib, which replaces
all previously existing variants of ArmLib.
I have build tested each of them, and boot tested the ones I can test
(FVP and Overdrive).
I picked up some fixes for D02/D03 along the way. These are listed first
(#1 - #4), #1 is required to fix the build, #5 is required since ArmBaseLib
no longer pulls in MemoryAllocationLib. #2 and #3 are optional, but useful
improvements nonetheless. #5 does the ArmBaseLib switch itself for D02/D03
Patches #6 to #9 replace all ArmLib references to ArmBaseLib in the remaining
platforms.
NOTE: This series combines with my armlib-cleanup branch [0], which deviates
from the v1 I sent out today. When testing these patches, please use
this branch; it will be the basis of my v2 submission once we have
confirmed that everything works as expected. This series can be found
here [1]
[0] https://git.linaro.org/people/ard.biesheuvel/uefi-next.git/shortlog/refs/he…
[1] https://git.linaro.org/uefi/OpenPlatformPkg.git/shortlog/refs/heads/armlib-…
Ard Biesheuvel (9):
Hisilicon/D0x: remove UEFI_APPLICATION BuildOptions override
Hisilicon/D0x: get rid of EDK2_SKIP_PEICORE
Hisilicon/D0x: get rid of APRIORI declarations
Hisilicon/IoInitDxe: add hidden dependency on MemoryAllocationLib to
.inf
Hisilicon/D0x: switch to ArmBaseLib
BeagleBoardPkg Omap35xxPkg: switch to ArmBaseLib
AMD/Styx: switch to ArmBaseLib
Platforms/ARM: switch to ArmBaseLib
Marvell/Armada: switch to ArmBaseLib
Chips/Hisilicon/Pv660/Drivers/IoInitDxe/IoInitDxe.inf | 1 +
Chips/Hisilicon/Pv660/Pv660.dsc.inc | 12 ------
Chips/TexasInstruments/Omap35xx/Omap35xxPkg.dsc | 2 +-
Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc | 3 +-
Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc | 3 +-
Platforms/ARM/Juno/ArmJuno.dsc | 7 +---
Platforms/ARM/VExpress/ArmVExpress-CTA15-A7.dsc | 3 +-
Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc | 4 +-
Platforms/Hisilicon/D02/Pv660D02.dsc | 34 +++++------------
Platforms/Hisilicon/D02/Pv660D02.fdf | 11 ------
Platforms/Hisilicon/D03/D03.dsc | 39 +++++---------------
Platforms/Hisilicon/D03/D03.fdf | 11 ------
Platforms/Marvell/Armada/Armada.dsc.inc | 4 +-
Platforms/TexasInstruments/BeagleBoard/BeagleBoardPkg.dsc | 4 +-
14 files changed, 27 insertions(+), 111 deletions(-)
--
2.7.4
On ARM systems, mapping normal memory as device memory may have unintended
side effects, given that unaligned accesses or loads and stores with special
semantics (e.g., load/store exclusive) may fault or may not work as expected.
Similarly, DC ZVA instructions are only supported on normal memory, not
device memory.
So remove the EFI_MEMORY_UC attribute that we set by default on system RAM.
If any region requires this attribute, it is up to the driver to set this
attribute, and to ensure that no offending operations are performed on it.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel(a)linaro.org>
---
Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.c b/Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.c
index 5fb63349864e..70821d1b120b 100644
--- a/Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.c
+++ b/Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.c
@@ -143,7 +143,6 @@ MemoryPeim (
EFI_RESOURCE_SYSTEM_MEMORY,
( 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 |
@@ -164,7 +163,6 @@ MemoryPeim (
EFI_RESOURCE_SYSTEM_MEMORY,
( 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 |
--
2.7.4
Hi folks,
I have some questions about ARM SBSA v3.0 and SBBR v1.0. Could anyone
please provide the answers or some ideas?
1. In SBSA it says that I/O virtualization property should be expressed
by system firmware data. Then how to express this information by ACPI?
Is only IORT table related? Or is there any examples?
2. In SBSA Section 4.1.3, page 14 as below, does the term "memory" here
also include peripheral memory mapped IO spaces? Does the term "access"
include both "read" and "write"? If write is also included, I'm afraid
there might be some critical configuration registers which will cause
unpredicted behavior or even system hang due to unintended random write.
3. In SBBR, EFI_LOAD_FILE2_PROTOCOL is a required protocol. However,it
is not used for boot in UEFI, and is mainly used for loading PCIe option
ROM in EDK2 implementation. So why is this protocol required while PCIe
is not mandatory for ARM server?
4. In SBBR, for IPv6 related protocols, it is said that they are
optional on platforms that do not support networking. The question is,
on platforms that *do* support networking, do IPv6 protocols become
mandatory? Or is it allowed for only supporting IPv4 protocols?
Thanks and regards.
Heyi
This is a completely untested but complete implementation of a firmware
uploader for the Renesas PD720202 PCIe XHCI controller. It is enabled for
Cello in patch #2 if '-D RENESAS_XHCI_FW_DIR=<dir>' is passed on the
build command line, where it expects to find the firmware image, in a
file called K2013080.mem
Ard Biesheuvel (2):
Drivers/Xhci: implement firmware download driver for Renesas PD720202
Platforms/AMD/CelloBoard: add Renesas PD720202 firmware downloader
Drivers/Xhci/RenesasFirmwarePD720202/RenesasFirmwarePD720202.c | 365 ++++++++++++++++++++
Drivers/Xhci/RenesasFirmwarePD720202/RenesasFirmwarePD720202.inf | 43 +++
OpenPlatformPkg.dec | 3 +
Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc | 4 +
Platforms/AMD/Styx/CelloBoard/CelloBoard.fdf | 10 +
5 files changed, 425 insertions(+)
create mode 100644 Drivers/Xhci/RenesasFirmwarePD720202/RenesasFirmwarePD720202.c
create mode 100644 Drivers/Xhci/RenesasFirmwarePD720202/RenesasFirmwarePD720202.inf
--
2.7.4
The ACPI spec predates the AARCH64 architecture by 5 versions, so there
is no point in supporting anything below v5.0. So set the PCD that
controls the ACPI table generation to the appropriate value.
Based on the commit e0692789058e ("ArmVirtPkg/ArmVirtQemu: limit ACPI
support to v5.0 and higher") in the upstream TianoCore by Ard Biesheuvel
Contributed-under: TianoCore Contribution Agreement 1.0
Cc: Ard Biesheuvel <ard.biesheuvel(a)linaro.org>
Cc: Leif Lindholm <leif.lindholm(a)linaro.org>
Cc: Evan Lloyd <Evan.Lloyd(a)arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla(a)arm.com>
---
Platforms/ARM/Juno/ArmJuno.dsc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Platforms/ARM/Juno/ArmJuno.dsc b/Platforms/ARM/Juno/ArmJuno.dsc
index c51d8f2e21ab..3029999bc66f 100644
--- a/Platforms/ARM/Juno/ArmJuno.dsc
+++ b/Platforms/ARM/Juno/ArmJuno.dsc
@@ -183,6 +183,10 @@
#
gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion|0x0300
gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0
+ #
+ # ACPI Table Version
+ #
+ gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiExposedTableVersions|0x20
[PcdsPatchableInModule]
# Console Resolution (Full HD)
--
2.7.4
These patches are for v4 of the MarvellYukon driver posted by Daniil Egranov
on June 16 to this mailing list.
The impetus was to get this driver to work on a SoftIron Overdrive 1000
board using the AMD Opteron-A (Seattle/Styx) SoC. On this platform, in my
testing, edk2 allocates DMA buffers with 64-bit addresses. The Marvell
Yukon driver as posted did not support 64-bit addresses, and simply
truncated any DMA address to 32-bits. After consulting with Ard Biesheuvel
and Leif Lindholm on IRC, it seemed the proper fix was to add support for
64-bit DMA. For this I went back to the original source of this driver
(FreeBSD), and brought over the appropriate code.
A couple of patches are basic fixes, but the one titled "Don't re-use DMA
buffers" changes how handling of DMA buffers works. This patch makes it
work closer to how the FreeBSD implementation works and also adds some
required DMA function calls. Its commit message is worth a read.
I don't have a Juno board to test this on, so while this does work on my
Overdrive 1000, there's a chance I broke something for other users.
Let me know!
Alan.
Alan Ott (7):
Drivers/Net/MarvellYukon: Remove ARM-specific include
Drivers/Net/MarvellYukon: Set Dual Address Cycle Attribute
Drivers/Net/MarvellYukon: Put model_name under MDEPKG_NDEBUG ifndef
Drivers/Net/MarvellYukon: Use EFI_SIZE_TO_PAGES()
Drivers/Net/MarvellYukon: Don't re-use DMA buffers
Drivers/Net/MarvellYukon: Zero allocated memory for DMA receive
buffers
Drivers/Net/MarvellYukon: Add 64-bit DMA support
Drivers/Net/MarvellYukonDxe/DeviceConfig.c | 4 +-
Drivers/Net/MarvellYukonDxe/if_msk.c | 95 +++++++++++++++++++++++-------
Drivers/Net/MarvellYukonDxe/if_mskreg.h | 17 +++++-
3 files changed, 91 insertions(+), 25 deletions(-)
--
2.5.0
The PCD PcdArmPrimaryCoreMask is of dubious value, not only because it is
unclear what the point is of masking out bits before comparing a given
MPIDR_EL1 value with a known value belonging to the primary core, but also
because the default value of 0xF03 masks out bits that belong to the actual
affinity levels.
For Styx, simply ignore the mask altogether. Since its version of
ArmPlatformPeiBootAction () records the primary MPIDR_EL1 value upon
first entry, we know its exact value, and no masking is necessary.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel(a)linaro.org>
---
Hello Alan,
Any chance you could try this patch, and check whether it solves the
regression you have been experiencing? I'd try it myself it it weren't
for the fact that my SPI flash programmer is broken atm.
Thanks,
Ard.
Platforms/AMD/Styx/Library/AmdStyxLib/AArch64/Helper.S | 3 ---
Platforms/AMD/Styx/Library/AmdStyxLib/AmdStyxLib.inf | 1 -
Platforms/AMD/Styx/Library/AmdStyxLib/AmdStyxLibSec.inf | 1 -
3 files changed, 5 deletions(-)
diff --git a/Platforms/AMD/Styx/Library/AmdStyxLib/AArch64/Helper.S b/Platforms/AMD/Styx/Library/AmdStyxLib/AArch64/Helper.S
index a3ac60282706..b7ec02f0e69f 100644
--- a/Platforms/AMD/Styx/Library/AmdStyxLib/AArch64/Helper.S
+++ b/Platforms/AMD/Styx/Library/AmdStyxLib/AArch64/Helper.S
@@ -58,9 +58,6 @@ ASM_FUNC(ArmGetCpuCountPerCluster)
// IN UINTN MpId
// );
ASM_FUNC(ArmPlatformIsPrimaryCore)
- MOV32 (w1, FixedPcdGet32 (PcdArmPrimaryCoreMask))
- and x0, x0, x1
-
ldr w1, PrimaryCoreMpid
cmp w0, w1
diff --git a/Platforms/AMD/Styx/Library/AmdStyxLib/AmdStyxLib.inf b/Platforms/AMD/Styx/Library/AmdStyxLib/AmdStyxLib.inf
index 4a6469ee016c..8e9169161d16 100644
--- a/Platforms/AMD/Styx/Library/AmdStyxLib/AmdStyxLib.inf
+++ b/Platforms/AMD/Styx/Library/AmdStyxLib/AmdStyxLib.inf
@@ -67,7 +67,6 @@
gAmdStyxTokenSpaceGuid.PcdTrustedFWMemorySize
[FixedPcd]
- gArmTokenSpaceGuid.PcdArmPrimaryCoreMask
gArmTokenSpaceGuid.PcdArmPrimaryCore
gArmPlatformTokenSpaceGuid.PcdCoreCount
diff --git a/Platforms/AMD/Styx/Library/AmdStyxLib/AmdStyxLibSec.inf b/Platforms/AMD/Styx/Library/AmdStyxLib/AmdStyxLibSec.inf
index 0b9b6287168d..2a2d6ffb8c64 100644
--- a/Platforms/AMD/Styx/Library/AmdStyxLib/AmdStyxLibSec.inf
+++ b/Platforms/AMD/Styx/Library/AmdStyxLib/AmdStyxLibSec.inf
@@ -62,7 +62,6 @@
gArmTokenSpaceGuid.PcdFvBaseAddress
[FixedPcd]
- gArmTokenSpaceGuid.PcdArmPrimaryCoreMask
gArmTokenSpaceGuid.PcdArmPrimaryCore
gArmPlatformTokenSpaceGuid.PcdCoreCount
--
2.7.4