From: "Marcin Wojtas" <mw@semihalf.com>
To: devel@edk2.groups.io
Cc: leif.lindholm@linaro.org, ard.biesheuvel@linaro.org,
mw@semihalf.com, jsd@semihalf.com, jaz@semihalf.com,
kostap@marvell.com
Subject: [edk2-platforms: PATCH v2 01/10] Marvell/Armada7k8k: Fix 32-bit compilation
Date: Thu, 15 Aug 2019 04:54:05 +0200 [thread overview]
Message-ID: <1565837654-13258-2-git-send-email-mw@semihalf.com> (raw)
In-Reply-To: <1565837654-13258-1-git-send-email-mw@semihalf.com>
It turned out, that the recently added features broke
ARM compilation. Fix all issues:
* Use SIGNATURE_32 only
* Do not shift address by 32-bit in ICU
* Limit memory for ARM build to 1GB and stop using non-existent PCD
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
Silicon/Marvell/Drivers/BoardDesc/MvBoardDescDxe.h | 2 +-
Silicon/Marvell/Drivers/Gpio/MvGpioDxe/MvGpioDxe.h | 2 +-
Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/Armada7k8kLibMem.c | 4 ++++
Silicon/Marvell/Library/IcuLib/IcuLib.c | 7 ++++++-
Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/ARM/ArmPlatformHelper.S | 11 -----------
5 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/Silicon/Marvell/Drivers/BoardDesc/MvBoardDescDxe.h b/Silicon/Marvell/Drivers/BoardDesc/MvBoardDescDxe.h
index a6f551b..7ecb4e1 100644
--- a/Silicon/Marvell/Drivers/BoardDesc/MvBoardDescDxe.h
+++ b/Silicon/Marvell/Drivers/BoardDesc/MvBoardDescDxe.h
@@ -18,7 +18,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <Uefi/UefiBaseType.h>
-#define MV_BOARD_DESC_SIGNATURE SIGNATURE_64 ('M', 'V', 'B', 'R', 'D', 'D', 'S', 'C')
+#define MV_BOARD_DESC_SIGNATURE SIGNATURE_32 ('B', 'D', 'S', 'C')
typedef struct {
MARVELL_BOARD_DESC_PROTOCOL BoardDescProtocol;
diff --git a/Silicon/Marvell/Drivers/Gpio/MvGpioDxe/MvGpioDxe.h b/Silicon/Marvell/Drivers/Gpio/MvGpioDxe/MvGpioDxe.h
index 1cb006a..600d5db 100644
--- a/Silicon/Marvell/Drivers/Gpio/MvGpioDxe/MvGpioDxe.h
+++ b/Silicon/Marvell/Drivers/Gpio/MvGpioDxe/MvGpioDxe.h
@@ -23,7 +23,7 @@
#include <Uefi/UefiBaseType.h>
-#define MV_GPIO_SIGNATURE SIGNATURE_64 ('M', 'V','_','G', 'P', 'I','O',' ')
+#define MV_GPIO_SIGNATURE SIGNATURE_32 ('G', 'P', 'I', 'O')
// Marvell MV_GPIO Controller Registers
#define MV_GPIO_DATA_OUT_REG (0x0)
diff --git a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/Armada7k8kLibMem.c b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/Armada7k8kLibMem.c
index a735fe5..5ff6bb1 100644
--- a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/Armada7k8kLibMem.c
+++ b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/Armada7k8kLibMem.c
@@ -36,6 +36,7 @@ GetDramSize (
IN OUT UINT64 *MemSize
)
{
+#if defined(MDE_CPU_AARCH64)
ARM_SMC_ARGS SmcRegs = {0};
EFI_STATUS Status;
@@ -48,6 +49,9 @@ GetDramSize (
ArmCallSmc (&SmcRegs);
*MemSize = SmcRegs.Arg0;
+#else
+ *MemSize = FixedPcdGet64 (PcdSystemMemorySize);
+#endif
return EFI_SUCCESS;
}
diff --git a/Silicon/Marvell/Library/IcuLib/IcuLib.c b/Silicon/Marvell/Library/IcuLib/IcuLib.c
index 343c21b..422388c 100644
--- a/Silicon/Marvell/Library/IcuLib/IcuLib.c
+++ b/Silicon/Marvell/Library/IcuLib/IcuLib.c
@@ -185,10 +185,15 @@ IcuConfigure (
for (Index = 0; Index < IcuGroupMax; Index++, Msi++) {
MmioWrite32 (IcuBase + ICU_SET_SPI_AL (Msi->Group),
Msi->SetSpiAddr & 0xFFFFFFFF);
- MmioWrite32 (IcuBase + ICU_SET_SPI_AH (Msi->Group), Msi->SetSpiAddr >> 32);
MmioWrite32 (IcuBase + ICU_CLR_SPI_AL (Msi->Group),
Msi->ClrSpiAddr & 0xFFFFFFFF);
+#if defined(MDE_CPU_AARCH64)
+ MmioWrite32 (IcuBase + ICU_SET_SPI_AH (Msi->Group), Msi->SetSpiAddr >> 32);
MmioWrite32 (IcuBase + ICU_CLR_SPI_AH (Msi->Group), Msi->ClrSpiAddr >> 32);
+#else
+ MmioWrite32 (IcuBase + ICU_SET_SPI_AH (Msi->Group), 0);
+ MmioWrite32 (IcuBase + ICU_CLR_SPI_AH (Msi->Group), 0);
+#endif
}
/* Mask all ICU interrupts */
diff --git a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/ARM/ArmPlatformHelper.S b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/ARM/ArmPlatformHelper.S
index 4416163..db43b0f 100644
--- a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/ARM/ArmPlatformHelper.S
+++ b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/ARM/ArmPlatformHelper.S
@@ -28,17 +28,6 @@ ASM_FUNC(ArmPlatformPeiBootAction)
.err PcdSystemMemoryBase should be 0x0 on this platform!
.endif
- .if FixedPcdGet64 (PcdSystemMemorySize) > FixedPcdGet32 (PcdDramRemapTarget)
- //
- // Use the low range for UEFI itself. The remaining memory will be mapped
- // and added to the GCD map later.
- //
- ADRL (r0, mSystemMemoryEnd)
- MOV32 (r2, FixedPcdGet32 (PcdDramRemapTarget) - 1)
- mov r3, #0
- strd r2, r3, [r0]
- .endif
-
bx lr
//UINTN
--
2.7.4
next prev parent reply other threads:[~2019-08-15 2:54 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-15 2:54 [edk2-platforms: PATCH v2 00/10] Marvell Octeon CN913X SoC family support Marcin Wojtas
2019-08-15 2:54 ` Marcin Wojtas [this message]
2019-08-16 17:03 ` [edk2-platforms: PATCH v2 01/10] Marvell/Armada7k8k: Fix 32-bit compilation Leif Lindholm
2019-08-15 2:54 ` [edk2-platforms: PATCH v2 02/10] Marvell/Cn9130Db: Add ACPI tables Marcin Wojtas
2019-08-16 17:06 ` Leif Lindholm
2019-08-15 2:54 ` [edk2-platforms: PATCH v2 03/10] Marvell/Cn9130Db: Add DeviceTree Marcin Wojtas
2019-08-16 17:10 ` Leif Lindholm
2019-08-16 21:03 ` Marcin Wojtas
2019-08-19 17:14 ` Leif Lindholm
2019-08-21 9:11 ` Laszlo Ersek
2019-08-21 11:04 ` Marcin Wojtas
2019-08-15 2:54 ` [edk2-platforms: PATCH v2 04/10] Marvell/Cn9130Db: Introduce board support Marcin Wojtas
2019-08-16 17:31 ` Leif Lindholm
2019-08-15 2:54 ` [edk2-platforms: PATCH v2 05/10] Marvell/Library: ArmadaSoCDescLib: Extend Xenon information Marcin Wojtas
2019-08-16 17:34 ` Leif Lindholm
2019-08-15 2:54 ` [edk2-platforms: PATCH v2 06/10] Marvell/Library: MppLib: Allow to configure more Xenon PHYs Marcin Wojtas
2019-08-16 17:36 ` [edk2-devel] " Leif Lindholm
2019-08-16 21:04 ` Marcin Wojtas
2019-08-15 2:54 ` [edk2-platforms: PATCH v2 07/10] Marvell/Library: IcuLib: Fix debug information Marcin Wojtas
2019-08-16 17:37 ` Leif Lindholm
2019-08-15 2:54 ` [edk2-platforms: PATCH v2 08/10] Marvell/Cn9131Db: Introduce board support Marcin Wojtas
2019-08-16 17:39 ` Leif Lindholm
2019-08-15 2:54 ` [edk2-platforms: PATCH v2 09/10] Marvell/Cn9132Db: " Marcin Wojtas
2019-08-16 17:40 ` Leif Lindholm
2019-08-15 2:54 ` [edk2-platforms: PATCH v2 10/10] Marvell/Drivers: SmbiosPlatformDxe: Use more generic board name Marcin Wojtas
2019-08-16 17:41 ` [edk2-devel] " Leif Lindholm
2019-08-16 20:57 ` Marcin Wojtas
2019-08-19 17:00 ` Leif Lindholm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1565837654-13258-2-git-send-email-mw@semihalf.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox