From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web10.2851.1610074163100934881 for ; Thu, 07 Jan 2021 18:49:23 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: w.sheng@intel.com) IronPort-SDR: jeVmocrSll7L7C+XvX+dH9lisXUS8phmDr9gV9VOyyAoh+KXO6VWM6W/reANqF/lS5xObn6LTu 0JdBMK8wcwIw== X-IronPort-AV: E=McAfee;i="6000,8403,9857"; a="174952193" X-IronPort-AV: E=Sophos;i="5.79,330,1602572400"; d="scan'208";a="174952193" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jan 2021 18:49:22 -0800 IronPort-SDR: RU8xPPGn6xzY59wX+Bz31y/OWC4H5i5V38kEsICtflIwwbGHr5sCJMI2rOGQugHtTQci8MiNp0 zOS7SRcWk9kQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,330,1602572400"; d="scan'208";a="379961006" Received: from shwdesssddpdwei.ccr.corp.intel.com ([10.239.157.46]) by orsmga008.jf.intel.com with ESMTP; 07 Jan 2021 18:49:20 -0800 From: "Sheng Wei" To: devel@edk2.groups.io Cc: Ray Ni , Rangasai V Chaganty , Jiewen Yao , Jenny Huang , Feng Roger Subject: [PATCH v7 0/2] Add IntelVTdDmarPei Driver Date: Fri, 8 Jan 2021 10:49:16 +0800 Message-Id: <20210108024918.25204-1-w.sheng@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 IntelVTdDmarPei Driver is used for DMA protection in PEI phase. In pre-memory phase, All the DMA access is blocked. In post memory phase, it will set some memory in iommu DMA remapping tranlation table for DMA access, and only the memory allocated by EdkiiIoMmuPpi has the DMA access. For rest of the memory, DMA access will be blocked. Add IntelVTdDmarPei to IntelSiliconPkg. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3095 Signed-off-by: Sheng Wei Cc: Ray Ni Cc: Rangasai V Chaganty Cc: Jiewen Yao Cc: Jenny Huang Cc: Feng Roger Reviewed-by: Jenny Huang Sheng Wei (2): IntelSiliconPkg/VTd: Add IntelVTdDmarPei Driver IntelSiliconPkg/VTd: Add IntelVTdDmarPei to IntelSiliconPkg .../Feature/VTd/IntelVTdDmarPei/DmarTable.c | 818 +++++++++++++++ .../Feature/VTd/IntelVTdDmarPei/IntelVTdDmar.c | 466 +++++++++ .../Feature/VTd/IntelVTdDmarPei/IntelVTdDmarPei.c | 814 +++++++++++++++ .../Feature/VTd/IntelVTdDmarPei/IntelVTdDmarPei.h | 224 +++++ .../VTd/IntelVTdDmarPei/IntelVTdDmarPei.inf | 65 ++ .../VTd/IntelVTdDmarPei/IntelVTdDmarPei.uni | 14 + .../VTd/IntelVTdDmarPei/IntelVTdDmarPeiExtra.uni | 14 + .../Feature/VTd/IntelVTdDmarPei/TranslationTable.c | 1045 ++++++++++++++++++++ Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dsc | 1 + 9 files changed, 3461 insertions(+) create mode 100644 Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/DmarTable.c create mode 100644 Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/IntelVTdDmar.c create mode 100644 Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/IntelVTdDmarPei.c create mode 100644 Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/IntelVTdDmarPei.h create mode 100644 Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/IntelVTdDmarPei.inf create mode 100644 Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/IntelVTdDmarPei.uni create mode 100644 Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/IntelVTdDmarPeiExtra.uni create mode 100644 Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/TranslationTable.c -- 2.16.2.windows.1