lkml.org 
[lkml]   [2022]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v3] efi: Do not import certificates from UEFI Secure Boot for T2 Macs
Date

>
> The T2 is represented by a PCI device with ID 106B:1802. I think it
> would be more elegant to sense presence of that device instead of
> hardcoding a long dmi list, i.e.:
>
> static bool apple_t2_present(void)
> {
> struct pci_dev *pdev;
>
> if (!x86_apple_machine)
> return false;
>
> pdev = pci_get_device(PCI_VENDOR_ID_APPLE, 0x1802, NULL);
> if (pdev) {
> pci_put_dev(pdev);
> return true;
> }
>
> return false;
> }

I’d rather prefer DMI cause :-
1. There are chances that some non T2 Macs may require this quirk as well. (After all we are talking about Apple)
2. There are slight chances that some non Apple Machines may require this as well

I also am not used to pci based quirks, making it a bit difficult for me to make a patch based on that :(.
The code length is anyways short now.

\
 
 \ /
  Last update: 2022-02-13 09:37    [W:0.080 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site