From: Tzung-Bi Shih <tzungbi@kernel.org>
To: Hsin-Te Yuan <yuanhsinte@chromium.org>
Cc: Brian Norris <briannorris@chromium.org>,
Julius Werner <jwerner@chromium.org>,
chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org,
Yidi Lin <yidilin@google.com>
Subject: Re: [PATCH] firmware: google: coreboot_table: skip no-map CBMEM entries
Date: Thu, 16 Jul 2026 07:44:09 +0000 [thread overview]
Message-ID: <aliLyZOubSa6ARfS@google.com> (raw)
In-Reply-To: <20260714-coreboot-v1-1-f59754d71b55@chromium.org>
On Tue, Jul 14, 2026 at 09:19:18AM +0000, Hsin-Te Yuan wrote:
> @@ -147,6 +149,23 @@ static int coreboot_table_populate(struct device *dev, void *ptr, resource_size_
>
> switch (device->entry.tag) {
> case LB_TAG_CBMEM_ENTRY:
> + /*
> + * Skip entries that are not exclusively System RAM or
> + * Reserved memory.
> + * On ARM, no-map reserved regions are not System RAM.
> + * On x86, CBMEM often resides in IORES_DESC_RESERVED regions.
> + */
> + if (region_intersects(device->cbmem_entry.address,
> + device->cbmem_entry.entry_size,
> + IORESOURCE_SYSTEM_RAM,
> + IORES_DESC_NONE) != REGION_INTERSECTS &&
> + region_intersects(device->cbmem_entry.address,
> + device->cbmem_entry.entry_size,
> + IORESOURCE_MEM,
> + IORES_DESC_RESERVED) != REGION_INTERSECTS) {
Per comments of region_intersects():
Note that REGION_INTERSECTS is also returned in the case when the
specified region overlaps RAM and undefined memory holes.
Won't the check falsely be bypassed if the region overlaps SYSTEM_RAM
and `no-map` memory?
prev parent reply other threads:[~2026-07-16 7:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 9:19 [PATCH] firmware: google: coreboot_table: skip no-map CBMEM entries Hsin-Te Yuan
2026-07-16 7:44 ` Tzung-Bi Shih [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-all 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=aliLyZOubSa6ARfS@google.com \
--to=tzungbi@kernel.org \
--cc=briannorris@chromium.org \
--cc=chrome-platform@lists.linux.dev \
--cc=jwerner@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yidilin@google.com \
--cc=yuanhsinte@chromium.org \
/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