| From 576491b1497097f4d809ed951e936f39568a9019 Mon Sep 17 00:00:00 2001 |
| From: Rajat Jain <rajatja@google.com> |
| Date: Fri, 17 Sep 2021 15:17:19 -0700 |
| Subject: [PATCH] CHROMIUM: pci/quirks: Mark the 5G modem on Brya as untrusted |
| |
| Mark the 5G modem on Brya as untrusted. This results in it being treated |
| as untrusted: |
| - IOMMU shall be strict. |
| - DMA operations that are not page sized and page aligned will use |
| bounce buffers. |
| - No PCI ATS |
| |
| Signed-off-by: Rajat Jain <rajatja@google.com> |
| |
| BUG=b:195152713, b:201020414, b:196250702 |
| TEST=Check on Brya 5G SKU that the modem is marked as untrusted. |
| |
| Change-Id: I0edaddbf3c5de0e21ed0e2133ad20c624bafc7a8 |
| Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/3171209 |
| Reviewed-by: Daniel Winkler <danielwinkler@google.com> |
| Commit-Queue: Rajat Jain <rajatja@google.com> |
| Tested-by: Rajat Jain <rajatja@google.com> |
| --- |
| drivers/pci/quirks.c | 11 +++++++++++ |
| 1 file changed, 11 insertions(+) |
| |
| diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c |
| --- a/drivers/pci/quirks.c |
| +++ b/drivers/pci/quirks.c |
| @@ -5797,6 +5797,17 @@ static void apex_pci_fixup_class(struct pci_dev *pdev) |
| DECLARE_PCI_FIXUP_CLASS_HEADER(0x1ac1, 0x089a, |
| PCI_CLASS_NOT_DEFINED, 8, apex_pci_fixup_class); |
| |
| +static void chromeos_internal_but_untrusted_device(struct pci_dev *pdev) |
| +{ |
| + if (dmi_match(DMI_SYS_VENDOR, "Google")) { |
| + pci_info(pdev, "ChromeOS internal device marked untrusted\n"); |
| + pdev->untrusted = true; |
| + } |
| +} |
| +/* 5G Modem on x86 systems (Brya onwards) */ |
| +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_MEDIATEK, 0x4d75, |
| + chromeos_internal_but_untrusted_device); |
| + |
| /* |
| * Pericom PI7C9X2G404/PI7C9X2G304/PI7C9X2G303 switch erratum E5 - |
| * ACS P2P Request Redirect is not functional |
| -- |
| 2.34.0.rc2.393.gf8c9666880-goog |
| |