From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com []) by mx.groups.io with SMTP id smtpd.web08.34931.1624204037148521455 for ; Sun, 20 Jun 2021 08:47:30 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: zhiguang.liu@intel.com) IronPort-SDR: OphBD84wxiF5Lkhk01BKp8jCZ5UA4QR0cbEGyo9o4DSiDjWcwi9ru4O//N2CEkK+I4OtIaDHpI nOlXaadrqTZQ== X-IronPort-AV: E=McAfee;i="6200,9189,10021"; a="194044465" X-IronPort-AV: E=Sophos;i="5.83,287,1616482800"; d="scan'208";a="194044465" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2021 08:47:30 -0700 IronPort-SDR: oCrk/AdUmuZxbS5DJOdUfp5P6dsq/7j77MNV/oazFKUjOjGRBI5EUWmQDjSwMNPzYOQgKqxaOO Vqm0/+WL3XvQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,287,1616482800"; d="scan'208";a="451932693" Received: from fieedk002.ccr.corp.intel.com ([10.239.158.144]) by orsmga008.jf.intel.com with ESMTP; 20 Jun 2021 08:47:29 -0700 From: "Zhiguang Liu" To: devel@edk2.groups.io Cc: Maurice Ma , Guo Dong , Benjamin You Subject: [PATCH 10/12] UefiPayloadPkg: Add macro to disable some drivers Date: Sun, 20 Jun 2021 23:47:00 +0800 Message-Id: <20210620154702.2681-11-zhiguang.liu@intel.com> X-Mailer: git-send-email 2.30.0.windows.2 In-Reply-To: <20210620154702.2681-1-zhiguang.liu@intel.com> References: <20210620154702.2681-1-zhiguang.liu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Cc: Maurice Ma Cc: Guo Dong Cc: Benjamin You Signed-off-by: Zhiguang Liu --- UefiPayloadPkg/UefiPayloadPkg.dsc | 11 ++++++++++- UefiPayloadPkg/UefiPayloadPkg.fdf | 7 +++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayload= Pkg.dsc index 155aea4bc4..99b0e49d46 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.dsc +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc @@ -87,6 +87,12 @@ #=0D DEFINE SHELL_TYPE =3D BUILD_SHELL=0D =0D + #=0D + # Disable features=0D + #=0D + DEFINE DISABLE_VARIABLE =3D FALSE=0D + DEFINE DISABLE_RESET_SYSTEM =3D FALSE=0D +=0D [BuildOptions]=0D *_*_*_CC_FLAGS =3D -D DISABLE_NEW_DEPRECATED_INTERFACES= =0D GCC:*_UNIXGCC_*_CC_FLAGS =3D -DMDEPKG_NDEBUG=0D @@ -431,10 +437,13 @@ MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf=0D MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf=0D MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntim= eDxe.inf=0D +!if $(DISABLE_RESET_SYSTEM) =3D=3D FALSE=0D MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf=0D +!endif=0D PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.i= nf=0D +!if $(DISABLE_VARIABLE) =3D=3D FALSE=0D MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf=0D -=0D +!endif=0D #=0D # Following are the DXE drivers=0D #=0D diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayload= Pkg.fdf index 6073f9c1b4..3b6adc2cfe 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.fdf +++ b/UefiPayloadPkg/UefiPayloadPkg.fdf @@ -105,9 +105,16 @@ INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTi= mer.inf INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf=0D INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf=0D INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRunt= imeDxe.inf=0D +=0D +!if $(DISABLE_RESET_SYSTEM) =3D=3D FALSE=0D INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf= =0D +!endif=0D +=0D INF PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe= .inf=0D +=0D +!if $(DISABLE_VARIABLE) =3D=3D FALSE=0D INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf=0D +!endif=0D =0D INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf=0D INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf=0D --=20 2.16.2.windows.1