From: Yicong Yang <yangyicong@huawei.com>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: <yangyicong@hisilicon.com>, <linux-efi@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>, <mark.rutland@arm.com>,
<probinson@gmail.com>, <andersson@kernel.org>,
<catalin.marinas@arm.com>, <will@kernel.org>,
Linuxarm <linuxarm@huawei.com>
Subject: Re: [PATCH] efi/libstub: arm64: avoid SetVirtualAddressMap() when possible
Date: Fri, 21 Oct 2022 09:59:56 +0800 [thread overview]
Message-ID: <66232ab0-d097-f7fd-4834-42a29a8f0cd8@huawei.com> (raw)
In-Reply-To: <CAMj1kXG=aE4yn-OvQdzRLE17BS=tGBySZ9DV0pHj9LN8onaerA@mail.gmail.com>
Hi Ard,
On 2022/10/20 21:04, Ard Biesheuvel wrote:
>> On 19.10.22 05:24, Yicong Yang wrote:
>>>
>>> After entering 6.1-rc1 the efi runtime services is not working on my platform:
>>>
>>> [ 0.054039] Remapping and enabling EFI services.
>>> [ 0.054043] UEFI virtual mapping missing or invalid -- runtime services will not be available
>>>
>>> Not sure this patch is the root cause since I see some refactor of efi codes in 6.1-rc1,
>>> but simply reverting this make EFI runtime services works again. Tested on HiSilicon's
>>> Kunpeng 920 arm64 server using 48 bit VA address:
>>>
>>> CONFIG_ARM64_VA_BITS_48=y
>>> CONFIG_ARM64_VA_BITS=48
>>>
>>> Thanks.
>
> Hi,
>
> Can you try the change below please?
>
> +++ b/drivers/firmware/efi/arm-runtime.c
> @@ -63,7 +63,7 @@ static bool __init efi_virtmap_init(void)
>
> if (!(md->attribute & EFI_MEMORY_RUNTIME))
> continue;
> - if (md->virt_addr == 0)
> + if (md->virt_addr == 0 && md->phys_addr != 0)
> return false;
>
> ret = efi_create_mapping(&efi_mm, md);
> .
>
Thanks for fixing this. This change works on my machine. I see you've already post a patch including
this [1]. Tested for both this change and that patch, the efi runtime services works again:
[root@localhost ~]# dmesg | grep -i efi
[...]
[ 0.015321] Remapping and enabling EFI services.
[ 3.821339] Registered efivars operations
[ 16.347372] CPU: 0 PID: 18 Comm: kworker/0:1 Not tainted 6.1.0-rc1-efi-fix-test+ #18
[ 16.674766] rtc-efi rtc-efi.0: registered as rtc0
[ 16.687659] rtc-efi rtc-efi.0: setting system clock to 2022-10-21T01:53:35 UTC (1666317215)
[ 16.733137] pstore: ignoring unexpected backend 'efi'
[ 18.411800] BOOT_IMAGE=/vmlinuz-6.1.0-rc1-efi-fix-test+
For arm64 part:
Tested-by: Yicong Yang <yangyicong@hisilicon.com>
[1] https://lore.kernel.org/linux-efi/20221020185416.1953242-1-ardb@kernel.org/T/#u
Thanks
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-10-21 2:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-16 10:18 [PATCH] efi/libstub: arm64: avoid SetVirtualAddressMap() when possible Ard Biesheuvel
2022-09-16 10:20 ` Ard Biesheuvel
2022-10-19 3:24 ` Yicong Yang
2022-10-20 12:39 ` Thorsten Leemhuis
2022-10-20 13:04 ` Ard Biesheuvel
2022-10-21 1:59 ` Yicong Yang [this message]
2022-10-23 14:58 ` [PATCH] efi/libstub: arm64: avoid SetVirtualAddressMap() when possible #forregzbot Thorsten Leemhuis
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=66232ab0-d097-f7fd-4834-42a29a8f0cd8@huawei.com \
--to=yangyicong@huawei.com \
--cc=andersson@kernel.org \
--cc=ardb@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-efi@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=mark.rutland@arm.com \
--cc=probinson@gmail.com \
--cc=will@kernel.org \
--cc=yangyicong@hisilicon.com \
/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;
as well as URLs for NNTP newsgroup(s).