From: Heinrich Schuchardt <xypron.glpk@gmx.de>
To: Ard Biesheuvel <ardb@kernel.org>,
Colin Ian King <colin.king@canonical.com>
Cc: Ivan Hu <ivan.hu@canonical.com>,
linux-efi <linux-efi@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
fwts-devel@lists.ubuntu.com
Subject: Re: ACK: [PATCH 1/1] efi/efi_test: read RuntimeServicesSupported
Date: Fri, 27 Nov 2020 20:39:31 +0100 [thread overview]
Message-ID: <fac1a832-b5ce-8eea-d1aa-81a0f429d772@gmx.de> (raw)
In-Reply-To: <CAMj1kXFNtCJEvbhZpO9p96UNGuo-r2dXQPm0TRjmQuF4TLBUcg@mail.gmail.com>
On 11/27/20 8:29 PM, Ard Biesheuvel wrote:
> On Fri, 27 Nov 2020 at 20:28, Colin Ian King <colin.king@canonical.com> wrote:
>>
>> On 27/11/2020 19:20, Heinrich Schuchardt wrote:
>>> Since the UEFI 2.8A specification the UEFI enabled firmware provides a
>>> configuration table EFI_RT_PROPERTIES_TABLE which indicates which runtime
>>> services are enabled. The EFI stub reads this table and saves the value of
>>> the field RuntimeServicesSupported internally.
>>>
>>> The Firmware Test Suite requires the value to determine if UEFI runtime
>>> services are correctly implemented.
>>>
<snip />
>> Looks good to me. Thanks Heinrich.
>>
>> The EFI driver needs to be also updated in the linux kernel - has that
>> fix been submitted or do you require the fwts team to do that?
>>
>
> This /is/ the EFI driver.
>
> I'll take this as an acked-by but I'd like Ivan to chime in as well.
>
Hello Ard, hello Colin,
I have tested the patch with Linux 5.8.9.
Somehow Linux managed to break the kernel for my board between Linux
5.8.9 and 5.8.18. It does not boot form iSCSI with a newer kernel.
You probably want to run a user program against your latest kernel. This
is what I used:
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/types.h>
#define EFI_RUNTIME_GET_SUPPORTED_MASK \
_IOR('p', 0x0C, unsigned int)
int main()
{
unsigned int i, flag;
int fd, ret;
unsigned int mask;
fd = open("/dev/efi_test", O_RDWR);
if (fd == -1) {
perror("open");
return 1;
}
ret = ioctl(fd, EFI_RUNTIME_GET_SUPPORTED_MASK, &mask);
if (ret == -1) {
perror("ioctl");
return 1;
}
printf("mask 0x%08x\n", mask);
flag = 1;
for (i = 0x80000000; i; i >>= 1) {
if (i & mask) {
printf("%4s 0x%08x\n", flag ? "=" : "|", i);
flag = 0;
}
}
close(fd);
return 0;
}
Best regards
Heinrich
next prev parent reply other threads:[~2020-11-28 22:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-27 19:20 [PATCH 1/1] efi/efi_test: read RuntimeServicesSupported Heinrich Schuchardt
2020-11-27 19:28 ` ACK: " Colin Ian King
2020-11-27 19:29 ` Ard Biesheuvel
2020-11-27 19:38 ` Colin Ian King
2020-11-27 19:39 ` Heinrich Schuchardt [this message]
2020-11-30 8:16 ` ivanhu
2020-11-30 9:17 ` Heinrich Schuchardt
2020-11-30 10:38 ` ivanhu
2020-12-02 11:38 ` Heinrich Schuchardt
2020-12-03 1:20 ` ivanhu
2020-12-03 6:48 ` Heinrich Schuchardt
2020-12-10 11:49 ` [tip: efi/core] " tip-bot2 for Heinrich Schuchardt
2020-12-26 10:16 ` [PATCH 1/1] " Heinrich Schuchardt
2020-12-29 13:01 ` 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-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=fac1a832-b5ce-8eea-d1aa-81a0f429d772@gmx.de \
--to=xypron.glpk@gmx.de \
--cc=ardb@kernel.org \
--cc=colin.king@canonical.com \
--cc=fwts-devel@lists.ubuntu.com \
--cc=ivan.hu@canonical.com \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.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;
as well as URLs for NNTP newsgroup(s).