public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ard Biesheuvel" <ardb@kernel.org>
To: "Kinney, Michael D" <michael.d.kinney@intel.com>
Cc: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"Bi, Dandan" <dandan.bi@intel.com>,
	 "Gao, Liming" <gaoliming@byosoft.com.cn>,
	"Wang, Jian J" <jian.j.wang@intel.com>
Subject: Re: [edk2-devel] [PATCH] MdeModulePkg/DxeCore: Use correct type for alignment mask
Date: Wed, 7 Dec 2022 23:38:51 +0100	[thread overview]
Message-ID: <CAMj1kXH-y6T00OLxhDGRtXZzcozgRQZs-X+Jjy46g8O+Sqd0eQ@mail.gmail.com> (raw)
In-Reply-To: <CO1PR11MB49298583693421F404B3D79CD21A9@CO1PR11MB4929.namprd11.prod.outlook.com>

On Wed, 7 Dec 2022 at 19:54, Kinney, Michael D
<michael.d.kinney@intel.com> wrote:
>
> Hi Ard,
>
> Thank you.  This is a really good find.  How did you find it?
>

The 32-bit version of ArmVirtQemu got inadvertently broken by a change
that seemed unrelated, but resulted in the primary memory resource
descriptor hob to end exactly at 4 GB if the memory exceeds that
limit, with very confusing results (ASSERT()s on invalid magic numbers
in the MEMORY_MAP linked list)

> I am guessing this case may not have been noticed on IA32/X64 because
> those archs tend to have FLASH device mapped just below 4GB and as a
> result there is no system memory in the range just below 4GB. This
> means the case where a page allocation with an end descriptor at
> 4GB is not observed on IA32/X64.
>

Indeed. And it was not observed on ARM either, because we used to
place the PEI permanent memory (I think?) at the top of addressable
RAM, resulting in the region to be occupied by the time DXE core runs.
On 64-bit ARM, i changed that policy recently to use 128 MiB of system
memory that is described by initial page tables stored in flash, but
this move resulted in this weird behavior on 32-bit (which doesn't
have the initial page tables)

  reply	other threads:[~2022-12-07 22:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-07 18:00 [PATCH] MdeModulePkg/DxeCore: Use correct type for alignment mask Ard Biesheuvel
2022-12-07 18:54 ` [edk2-devel] " Michael D Kinney
2022-12-07 22:38   ` Ard Biesheuvel [this message]
2022-12-07 23:13 ` Michael D Kinney
2022-12-08 18:10   ` 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=CAMj1kXH-y6T00OLxhDGRtXZzcozgRQZs-X+Jjy46g8O+Sqd0eQ@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