From: Marcin Wojtas <mw@semihalf.com>
To: edk2-devel@lists.01.org
Cc: leif.lindholm@linaro.org, ard.biesheuvel@linaro.org,
mw@semihalf.com, jsd@semihalf.com, jinghua@marvell.com,
jaz@semihalf.com, davidsn@marvell.com
Subject: [platforms PATCH 1/4] Marvell/Armada70x0Db: Shift main FV from 0x0 address
Date: Fri, 1 Jun 2018 16:32:03 +0200 [thread overview]
Message-ID: <1527863526-5494-2-git-send-email-mw@semihalf.com> (raw)
In-Reply-To: <1527863526-5494-1-git-send-email-mw@semihalf.com>
When using PEI phase, UEFI interprets 0x0 address
of boot FV as an error. In order to avoid it, shift
it to 0x1000 and put a hardcoded 'jump to 0x1000' at
offset 0x0. This patch is a preparation for using PEI
by Armada platforms.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
Platform/Marvell/Armada70x0Db/Armada70x0Db.fdf | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/Platform/Marvell/Armada70x0Db/Armada70x0Db.fdf b/Platform/Marvell/Armada70x0Db/Armada70x0Db.fdf
index befb107..69cb4cd 100644
--- a/Platform/Marvell/Armada70x0Db/Armada70x0Db.fdf
+++ b/Platform/Marvell/Armada70x0Db/Armada70x0Db.fdf
@@ -49,7 +49,21 @@ NumBlocks = 0x400
#
################################################################################
-0x00000000|0x00100000
+#
+# UEFI has trouble dealing with FVs that reside at physical address 0x0.
+# So instead, put a hardcoded 'jump to 0x1000' at offset 0x0, and put the
+# real FV at offset 0x1000
+#
+0x00000000|0x00001000
+DATA = {
+!if $(ARCH) == AARCH64
+ 0x00, 0x04, 0x00, 0x14 # 'b 0x1000' in AArch64 ASM
+!else
+ 0xfe, 0x03, 0x00, 0xea # 'b 0x1000' in AArch32 ASM
+!endif
+}
+
+0x00001000|0x000ff000
gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
FV = FVMAIN_COMPACT
@@ -191,7 +205,6 @@ FvNameGuid = 5eda4200-2c5f-43cb-9da3-0baf74b1b30c
# PEI phase firmware volume
[FV.FVMAIN_COMPACT]
FvAlignment = 8
-FvForceRebase = TRUE
ERASE_POLARITY = 1
MEMORY_MAPPED = TRUE
STICKY_WRITE = TRUE
--
2.7.4
next prev parent reply other threads:[~2018-06-01 14:32 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-01 14:32 [platforms PATCH 0/4] Armada capsule support Marcin Wojtas
2018-06-01 14:32 ` Marcin Wojtas [this message]
2018-06-01 15:26 ` [platforms PATCH 1/4] Marvell/Armada70x0Db: Shift main FV from 0x0 address Ard Biesheuvel
2018-06-01 14:32 ` [platforms PATCH 2/4] Marvell/Aramda7k8k: Enable PEI booting stage Marcin Wojtas
2018-06-01 15:30 ` Ard Biesheuvel
2018-06-01 16:43 ` Marcin Wojtas
2018-06-01 16:57 ` Ard Biesheuvel
2018-06-01 17:18 ` Marcin Wojtas
2018-06-01 14:32 ` [platforms PATCH 3/4] Marvell/Armada7k8k: Introduce capsule FW update implementation Marcin Wojtas
2018-06-01 15:32 ` Ard Biesheuvel
2018-06-01 16:02 ` Marcin Wojtas
2018-06-01 16:08 ` Ard Biesheuvel
2018-06-01 16:20 ` Marcin Wojtas
2018-06-01 14:32 ` [platforms PATCH 4/4] Marvell/Armada7k8k: Wire up capsule support Marcin Wojtas
2018-06-01 15:34 ` [platforms PATCH 0/4] Armada " Ard Biesheuvel
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=1527863526-5494-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