From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web09.2045.1610069202838580442 for ; Thu, 07 Jan 2021 17:26:42 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: w.sheng@intel.com) IronPort-SDR: XyRuGURvhTHvbVhKuRw3mTZ6UcBybcm7EA2GTBmJjy1s36Pp6/yGjOXnEGTGNCY5lCDIRQiaMT Kso2/C3NAf9w== X-IronPort-AV: E=McAfee;i="6000,8403,9857"; a="196087214" X-IronPort-AV: E=Sophos;i="5.79,330,1602572400"; d="scan'208";a="196087214" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jan 2021 17:26:40 -0800 IronPort-SDR: zOT4bMKP3eW0kCRDRwJSkCFRZByRqp9h26flRbnH60hR76kEGN7SrJPCMJZ4duN9TgIs1JnUwn gbDddsUeoRFA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,330,1602572400"; d="scan'208";a="351498821" Received: from shwdesssddpdwei.ccr.corp.intel.com ([10.239.157.46]) by fmsmga008.fm.intel.com with ESMTP; 07 Jan 2021 17:26:37 -0800 From: "Sheng Wei" To: devel@edk2.groups.io Cc: Ray Ni , Rangasai V Chaganty , Jiewen Yao , Jenny Huang , Feng Roger Subject: [PATCH v6 0/2] Add IntelVTdDmarPei Driver Date: Fri, 8 Jan 2021 09:26:32 +0800 Message-Id: <20210108012634.10264-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