Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Sven Peter" <sven@kernel.org>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH RFC 3/6] efi: Add EFI_MEMORY_ISA_{MASK,VALID}
Date: Wed, 08 Jul 2026 07:25:22 +0000	[thread overview]
Message-ID: <20260708072523.23F251F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260708-efi-psci-v1-3-9efb3abf0e4c@kernel.org>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The newly introduced EFI_MEMORY_ISA_MASK and EFI_MEMORY_ISA_VALID attributes are omitted from the known attributes mask in efi_md_typeattr_format(), breaking human-readable formatting for memory regions using these attributes.
--

--- Patch [3]: [PATCH RFC 3/6] efi: Add EFI_MEMORY_ISA_{MASK,VALID} ---
commit c6357eb92aeb854ab69dbec9ea5006a518bddfd0
Author: Sven Peter <sven@kernel.org>

efi: Add EFI_MEMORY_ISA_{MASK,VALID}

This commit introduces new memory region attributes defined in UEFI 2.10
that allow mapping with ISA-specific cacheability attributes.

Link: https://uefi.org/specs/UEFI/2.10/07_Services_Boot_Services.html#efi-boot-services-getmemorymap
Link: https://uefi.org/specs/UEFI/2.10/02_Overview.html#memory-types

> diff --git a/include/linux/efi.h b/include/linux/efi.h
> index f3db3a18b5404..882148114068f 100644
> --- a/include/linux/efi.h
> +++ b/include/linux/efi.h
> @@ -128,6 +128,8 @@ typedef	struct {
>  #define EFI_MEMORY_SP			BIT_ULL(18)	/* soft reserved */
>  #define EFI_MEMORY_CPU_CRYPTO		BIT_ULL(19)	/* supports encryption */
>  #define EFI_MEMORY_HOT_PLUGGABLE	BIT_ULL(20)	/* supports unplugging at runtime */
> +#define EFI_MEMORY_ISA_MASK		GENMASK_ULL(59, 44)	/* ISA-specific attributes */
> +#define EFI_MEMORY_ISA_VALID		BIT_ULL(62)	/* EFI_MEMORY_ISA_MASK bits are valid */

[Severity: Medium]
Should these new attributes be added to the known attributes whitelist in
efi_md_typeattr_format() over in drivers/firmware/efi/efi.c?

Because they are omitted from the inverted mask check there, if system
firmware provides a memory descriptor containing these new UEFI 2.10
attributes, won't the formatter fall back to printing a raw hexadecimal
string instead of human-readable attributes?

drivers/firmware/efi/efi.c:efi_md_typeattr_format() {
    ...
    if (attr & ~(EFI_MEMORY_UC | EFI_MEMORY_WC | EFI_MEMORY_WT |
                 EFI_MEMORY_WB | EFI_MEMORY_UCE | EFI_MEMORY_RO |
                 EFI_MEMORY_WP | EFI_MEMORY_RP | EFI_MEMORY_XP |
                 EFI_MEMORY_NV | EFI_MEMORY_SP | EFI_MEMORY_CPU_CRYPTO |
                 EFI_MEMORY_MORE_RELIABLE | EFI_MEMORY_HOT_PLUGGABLE |
                 EFI_MEMORY_RUNTIME))
        snprintf(pos, size, "|attr=0x%016llx]",
                 (unsigned long long)attr);
    ...
}

>  #define EFI_MEMORY_RUNTIME		BIT_ULL(63)	/* range requires runtime mapping */
>  
>  #define EFI_MEMORY_DESCRIPTOR_VERSION	1

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260708-efi-psci-v1-0-9efb3abf0e4c@kernel.org?part=3

  reply	other threads:[~2026-07-08  7:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-08  7:15 [PATCH RFC 0/6] PSCI-via-EFI to support firmware and kernel sharing EL2 for Apple Silicon Sven Peter
2026-07-08  7:15 ` [PATCH RFC 1/6] dt-bindings: arm: psci: Add EFI conduit Sven Peter
2026-07-08  7:15 ` [PATCH RFC 2/6] arm64/efi: Add and parse custom PSCI EFI configuration table Sven Peter
2026-07-08  7:39   ` sashiko-bot
2026-07-08  7:15 ` [PATCH RFC 3/6] efi: Add EFI_MEMORY_ISA_{MASK,VALID} Sven Peter
2026-07-08  7:25   ` sashiko-bot [this message]
2026-07-08  7:15 ` [PATCH RFC 4/6] arm64/efi: Honor EFI_MEMORY_ISA_MASK for Device-nGnRnE vs -nGnRE Sven Peter
2026-07-08  7:33   ` sashiko-bot
2026-07-08  7:15 ` [PATCH RFC 5/6] firmware/psci: Add EFI runtime conduit Sven Peter
2026-07-08  7:46   ` sashiko-bot
2026-07-08  7:15 ` [PATCH RFC 6/6] arm64: dts: apple: t8103: Add PSCI and CPU idle states Sven Peter
2026-07-08  7:48   ` sashiko-bot

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=20260708072523.23F251F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=sven@kernel.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