[PATCH 1/1] efi/efi_test: read RuntimeServicesSupported
Ard Biesheuvel
ardb at kernel.org
Tue Dec 8 10:00:40 UTC 2020
On Tue, 8 Dec 2020 at 10:01, ivanhu <ivan.hu at canonical.com> wrote:
>
>
> On 12/8/20 4:46 PM, Ard Biesheuvel wrote:
> > On Thu, 3 Dec 2020 at 09:56, ivanhu <ivan.hu at canonical.com> wrote:
> >>
> >> On 12/3/20 2:48 PM, Heinrich Schuchardt wrote:
> >>
> >> On 12/3/20 2:20 AM, ivanhu wrote:
> >>
> >>
> >>
> >> On 12/2/20 7:38 PM, Heinrich Schuchardt wrote:
> >>
> >> On 11/30/20 11:38 AM, ivanhu wrote:
> >>
> >>
> >>
> >> On 11/30/20 5:17 PM, Heinrich Schuchardt wrote:
> >>
> >> On 11/30/20 9:16 AM, ivanhu wrote:
> >>
> >> Hi Heinrich,
> >>
> >> Thanks for the patch.
> >> It looks good to me, but I noticed that the runtime_supported_mask was
> >> introduced after 5.7-rc1.
> >> Maybe we should add the kernel version checking for the old kernels.
> >>
> >>
> >> This is a kernel patch. Why should we check the kernel version in the
> >> kernel code?
> >>
> >> As patches may be back-ported we should not make any assumptions in fwts
> >> based on the kernel version. If the ioctl() call fails with errno =
> >> ENOTTY, we know that the kernel does not implement the ioctl call and we
> >> have to assume that all runtime services are available.
> >>
> >>
> >> Sounds good to me,
> >> Acked-by: Ivan Hu <ivan.hu at canonical.com>
> >>
> >> And I will replace the reading RuntimeServicesSupported efi variable by
> >> using efi_test in fwts RuntimeServicesSupported tests.
> >>
> >> FWTS will still test those Unsupported Runtime services to check if it
> >> returns EFI_UNSUPPORTED correctly.
> >> Is that could solve your problem?
> >> If I remember correctly, the problem from you is not to test those
> >> marked Unsupported Runtime services. But from the Spec. 8.1 Runtime
> >> Services Rules and Restrictions,
> >>
> >>
> >> The problem I reported was that it is impossible to test UEFI runtime
> >> services on U-Boot because FWTS tries to read the non-existent
> >> RuntimeServicesSupported UEFI variable and mistakenly assumes that if
> >> the variable does not exist none of the runtime services is implemented.
> >>
> >>
> >> Could you provide the result log for me to check?
> >>
> >>
> >> https://github.com/U-Boot-EFI/u-boot-fwts-results/blob/master/fwts_20_11_fails.txt
> >>
> >> From the result log, they all skip from "Cannot open EFI test driver. Aborted." which seems fail on open the /dev/efi_test, not related to the RuntimeServicesSupported.
> >>
> >> I also tested with my X86 machine which hasn't supported the RuntimeServicesSupported variable as well, it won't meet the issue.
> >>
> >> FWTS currently will run all the UEFI tests and try to get RuntimeServicesSupported for testing in some runtime services support test, such as,
> >>
> >> Test 36 of 36: Test UEFI RT time services supported status.
> >> SKIPPED: Test 36, Cannot get the RuntimeServicesSupported variable, maybe the
> >> runtime service GetVariable is not supported or RuntimeServicesSupported not
> >> provided by firmware.
> >>
> >>
> > So should I merge this or not?
> >
> merge +1, after 2.8a, there is no variable RuntimeServicesSupported,
> FWTS still needs to find a way to get RuntimeServicesSupported by
> configuration table.
>
> This patch helps.
>
I will take that as an acked-by
Thanks,
Ard.
More information about the fwts-devel
mailing list