public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Michael Zimmermann <sigmaepsilon92@gmail.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@ml01.01.org>,
	Leif Lindholm <leif.lindholm@linaro.org>
Subject: Re: System hang when using SetMemoryAttributes
Date: Sun, 25 Sep 2016 23:35:55 -0700	[thread overview]
Message-ID: <CAKv+Gu-XPW8=tz65n1HEt0TL_SWKGauRgSwxTYd332+dGGfUrQ@mail.gmail.com> (raw)
In-Reply-To: <CAN9vWDJYp6MKuri+pOsUoxpdZZfC6Yuj52L6OzVtjXA9w7uSsg@mail.gmail.com>

On 25 September 2016 at 20:01, Michael Zimmermann
<sigmaepsilon92@gmail.com> wrote:
> Hi,
>
> which side effects can SetMemoryAttributes have?
> I have a device where setting the framebuffer(which is part of DRAM) to
> EFI_MEMORY_UC makes UEFI hang later on(when already outside the lcd driver).
>
> If I do the same on a memory range allocated with AllocateAnyPages instead
> of AllocateAddress UEFI boots just fine(but ofc, the screen doesn't work).
>
> Unfortunately I don't have UART on that device but I'm sure there's no
> assert because I configured DebugLib to reboot the device in that case -
> which never happens, it's just stuck when the console drivers(TerminalDxe
> etc) initialize later on.
>

Hello Michael,

EFI_MEMORY_WC is more suitable for a framebuffer than EFI_MEMORY_UC,
since the latter does not allow unaligned accesses, so any unaligned
store will crash the system.

Since the framebuffer is in DRAM, I assume the reason for setting the
memory attributes is that the device is not DMA coherent? Could you
perhaps describe the hardware in more detail?

-- 
Ard.


  reply	other threads:[~2016-09-26  6:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-25 19:01 System hang when using SetMemoryAttributes Michael Zimmermann
2016-09-26  6:35 ` Ard Biesheuvel [this message]
2016-09-26  7:13   ` Michael Zimmermann
2016-09-26  7:44     ` Michael Zimmermann
2016-09-26 10:23       ` Ard Biesheuvel
2016-09-26 12:44         ` Michael Zimmermann
2016-09-26 12:47           ` Ard Biesheuvel
2016-09-26 12:52             ` Michael Zimmermann
2016-09-26 17:00               ` Ard Biesheuvel
2016-09-26 20:25                 ` Michael Zimmermann

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='CAKv+Gu-XPW8=tz65n1HEt0TL_SWKGauRgSwxTYd332+dGGfUrQ@mail.gmail.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