public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ard Biesheuvel via groups.io" <ardb+git=google.com@groups.io>
To: devel@edk2.groups.io
Cc: Ard Biesheuvel <ardb@kernel.org>,
	Leif Lindholm <quic_llindhol@quicinc.com>,
	 Jeremy Linton <jeremy.linton@arm.com>
Subject: [edk2-devel] [PATCH edk2-platforms v2 1/8] Platform/RaspberryPi: Mark RAM regions as write/execute protectable
Date: Sun, 28 Jul 2024 22:44:28 +0200	[thread overview]
Message-ID: <20240728204437.4064847-2-ardb+git@google.com> (raw)
In-Reply-To: <20240728204437.4064847-1-ardb+git@google.com>

From: Ard Biesheuvel <ardb@kernel.org>

Mark RAM ranges as write/execute protectable in the GCD memory map. This
is needed to avoid issues with NonCoherentDmaLib in EmbeddedPkg, which
will fail if it does not manage to set the EFI_MEMORY_XP attribute on
the allocated DMA buffers.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
 Platform/RaspberryPi/Library/MemoryInitPeiLib/MemoryInitPeiLib.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Platform/RaspberryPi/Library/MemoryInitPeiLib/MemoryInitPeiLib.c b/Platform/RaspberryPi/Library/MemoryInitPeiLib/MemoryInitPeiLib.c
index 7ba1cc5602d2..cf9eca2ffe9a 100644
--- a/Platform/RaspberryPi/Library/MemoryInitPeiLib/MemoryInitPeiLib.c
+++ b/Platform/RaspberryPi/Library/MemoryInitPeiLib/MemoryInitPeiLib.c
@@ -51,6 +51,8 @@ AddBasicMemoryRegion (
     EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
     EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |
     EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE |
+    EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTABLE |
+    EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTABLE |
     EFI_RESOURCE_ATTRIBUTE_TESTED,
     Desc->PhysicalBase,
     Desc->Length
-- 
2.46.0.rc1.232.g9752f9e123-goog



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



  reply	other threads:[~2024-07-30 15:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-28 20:44 [edk2-devel] [PATCH edk2-platforms v2 0/8] RPi: Drop EmbeddedPkg reset runtime Ard Biesheuvel via groups.io
2024-07-28 20:44 ` Ard Biesheuvel via groups.io [this message]
2024-07-28 20:44 ` [edk2-devel] [PATCH edk2-platforms v2 2/8] Platform/RaspberryPi: Fix line endings in DSCs Ard Biesheuvel via groups.io
2024-07-28 20:44 ` [edk2-devel] [PATCH edk2-platforms v2 3/8] Platform/RaspberryPi: Use depex based dispatch order for varstore Ard Biesheuvel via groups.io
2024-07-28 20:44 ` [edk2-devel] [PATCH edk2-platforms v2 4/8] Platform/RaspberryPi/VarBlockServiceDxe: Refactor DumpVars event handler Ard Biesheuvel via groups.io
2024-07-28 20:44 ` [edk2-devel] [PATCH edk2-platforms v2 5/8] Platform/RaspberryPi/VarBlockServiceDxe: Register for reset notification Ard Biesheuvel via groups.io
2024-07-28 20:44 ` [edk2-devel] [PATCH edk2-platforms v2 6/8] Platform/RaspberryPi/PlatformBootManagerLib: Reimplement reset hook Ard Biesheuvel via groups.io
2024-07-28 20:44 ` [edk2-devel] [PATCH edk2-platforms v2 7/8] Platform/RaspberryPi: Switch to generic reset runtime Ard Biesheuvel via groups.io
2024-07-28 20:44 ` [edk2-devel] [PATCH edk2-platforms v2 8/8] Platform/RaspberryPi: Drop platform specific EfiResetSystemLib Ard Biesheuvel via groups.io
2024-07-30 12:40 ` [edk2-devel] [PATCH edk2-platforms v2 0/8] RPi: Drop EmbeddedPkg reset runtime Leif Lindholm
2024-07-30 15:43   ` 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=20240728204437.4064847-2-ardb+git@google.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