public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Rebecca Cran" <rebecca@bsdio.com>
To: Ard Biesheuvel <ardb@kernel.org>,
	Leif Lindholm <quic_llindhol@quicinc.com>
Cc: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Subject: Re: [edk2-devel] Alignment fault in __memcpy when SbsaQemu is built uncompressed
Date: Sat, 29 Jun 2024 11:42:14 -0600	[thread overview]
Message-ID: <b3ab6d46-260b-4067-aa98-c27f75f18e82@bsdio.com> (raw)
In-Reply-To: <CAMj1kXEOEzhFcC1cji_Lnb9936uAzZCUgm592VvizzFya7bq8w@mail.gmail.com>

On 6/29/24 9:26 AM, Ard Biesheuvel wrote:

> It looks like the FvReadFile() call is doing a memory copy from the
> firmware volume (FV), which seems to be mapped with device attributes
> rather than normal memory. With a compressed image, the FV will be
> decompressed to normal RAM, so this can never happen at this stage in
> the boot (BDS phase)
>
> Looking at Platform/Qemu/SbsaQemu/SbsaQemu.fdf and
> Silicon/Qemu/SbsaQemu/Library/SbsaQemuLib/SbsaQemuMem.c, the entire
> flash device (FD) which should cover the uncompressed FV is mapped
> with cacheable attributes, but the address in question ^^^ is outside
> of the predefined window of
>
> BaseAddress   = 0x10000000|gArmTokenSpaceGuid.PcdFdBaseAddress
> Size          = 0x003C0000|gArmTokenSpaceGuid.PcdFdSize
>
> Did you update PcdFdSize to account for the larger footprint of the FV?


I updated the .fdf file to set the Size to 0x00EC0000 and updated the 
NumBlocks, offsets etc.


-- 
Rebecca Cran



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119729): https://edk2.groups.io/g/devel/message/119729
Mute This Topic: https://groups.io/mt/106820121/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



      reply	other threads:[~2024-06-29 17:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-22 18:04 [edk2-devel] Alignment fault in __memcpy when SbsaQemu is built uncompressed Rebecca Cran
2024-06-24 16:47 ` Marcin Juszkiewicz
2024-06-29 15:26 ` Ard Biesheuvel
2024-06-29 17:42   ` Rebecca Cran [this message]

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=b3ab6d46-260b-4067-aa98-c27f75f18e82@bsdio.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