All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Temerkhanov <s.temerkhanov@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: Sergey Temerkhanov <s.temerkhanov@gmail.com>,
	Jan Beulich <jbeulich@suse.com>
Subject: [PATCH] efi: Always map EfiRuntimeServicesCode and EfiRuntimeServicesData
Date: Fri,  4 Sep 2020 02:24:58 +0300	[thread overview]
Message-ID: <20200903232458.16551-1-s.temerkhanov@gmail.com> (raw)

This helps overcome problems observed with some UEFI implementations
which don't set the Attributes field in memery descriptors properly

Signed-off-by: Sergey Temerkhanov <s.temerkhanov@gmail.com>
---
 xen/common/efi/boot.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c
index 5a520bf21d..4644ce2525 100644
--- a/xen/common/efi/boot.c
+++ b/xen/common/efi/boot.c
@@ -1521,7 +1521,9 @@ void __init efi_init_memory(void)
         }
 
         if ( !efi_enabled(EFI_RS) ||
-             (!(desc->Attribute & EFI_MEMORY_RUNTIME) &&
+             ((!(desc->Attribute & EFI_MEMORY_RUNTIME) &&
+                (desc->Type != EfiRuntimeServicesCode &&
+                 desc->Type != EfiRuntimeServicesData)) &&
               (!map_bs ||
                (desc->Type != EfiBootServicesCode &&
                 desc->Type != EfiBootServicesData))) )
-- 
2.26.2



             reply	other threads:[~2020-09-03 23:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-03 23:24 Sergey Temerkhanov [this message]
2020-09-04  9:47 ` [PATCH] efi: Always map EfiRuntimeServicesCode and EfiRuntimeServicesData Jan Beulich
2020-09-04 21:03   ` Sergei Temerkhanov
2020-09-07  6:16     ` Jan Beulich

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=20200903232458.16551-1-s.temerkhanov@gmail.com \
    --to=s.temerkhanov@gmail.com \
    --cc=jbeulich@suse.com \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.