From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=mang.guo@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B8E9C210EFB11 for ; Tue, 21 Aug 2018 19:57:24 -0700 (PDT) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Aug 2018 19:57:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,272,1531810800"; d="dat'59?scan'59,208,59";a="83410529" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga001.fm.intel.com with ESMTP; 21 Aug 2018 19:57:16 -0700 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 21 Aug 2018 19:57:15 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 21 Aug 2018 19:57:15 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.240]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.143]) with mapi id 14.03.0319.002; Wed, 22 Aug 2018 10:57:07 +0800 From: "Guo, Mang" To: "edk2-devel@lists.01.org" CC: "Wei, David" Thread-Topic: [Patch][edk2-platforms/devel-IntelAtomProcessorE3900] MinnowBoard3 Module UART Thread-Index: AdQ5w89pHmQ+FHQVSzyJJLuzuLvLug== Date: Wed, 22 Aug 2018 02:57:06 +0000 Message-ID: <22D2C85ED001C54AA20BFE3B0E4751D1526D22B9@SHSMSX103.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: <22D2C85ED001C54AA20BFE3B0E4751D1526D22B9@SHSMSX103.ccr.corp.intel.com> x-originating-ip: [10.239.127.40] MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [Patch][edk2-platforms/devel-IntelAtomProcessorE3900] MinnowBoard3 Module UART X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2018 02:57:24 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 1. Change MinnowBoard3 Module UART number from 0 to 2. 2. Add zero checking before SetVariable to avoid seting variable each time = boot. Cc: David Wei Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Guo Mang --- .../Board/UP2/BoardInitDxe/BoardInitDxe.c | 20 +++++++++++-----= ---- .../PlatformDsc/PcdsFixedAtBuild.dsc | 2 +- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Platform/BroxtonPlatformPkg/Board/UP2/BoardInitDxe/BoardInitDx= e.c b/Platform/BroxtonPlatformPkg/Board/UP2/BoardInitDxe/BoardInitDxe.c index 662d8f1..e0e2d93 100644 --- a/Platform/BroxtonPlatformPkg/Board/UP2/BoardInitDxe/BoardInitDxe.c +++ b/Platform/BroxtonPlatformPkg/Board/UP2/BoardInitDxe/BoardInitDxe.c @@ -63,15 +63,17 @@ UpdateSetupVariable ( ASSERT_EFI_ERROR (Status); =20 if (Status =3D=3D EFI_SUCCESS) { - mSystemConfiguration.PcieRootPortEn[3]=3D (UINT8) 0; - Status =3D gRT->SetVariable ( - L"Setup", - &gEfiSetupVariableGuid, - VariableAttributes, - VarSize, - &mSystemConfiguration - ); - ASSERT_EFI_ERROR (Status); + if (mSystemConfiguration.PcieRootPortEn[3] !=3D 0) { + mSystemConfiguration.PcieRootPortEn[3]=3D (UINT8) 0; + Status =3D gRT->SetVariable ( + L"Setup", + &gEfiSetupVariableGuid, + VariableAttributes, + VarSize, + &mSystemConfiguration + ); + ASSERT_EFI_ERROR (Status); + } } =20 return Status; diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/PcdsFixedAtBuild.dsc b= /Platform/BroxtonPlatformPkg/PlatformDsc/PcdsFixedAtBuild.dsc index db9b2e6..db7cba5 100644 --- a/Platform/BroxtonPlatformPkg/PlatformDsc/PcdsFixedAtBuild.dsc +++ b/Platform/BroxtonPlatformPkg/PlatformDsc/PcdsFixedAtBuild.dsc @@ -86,7 +86,7 @@ =20 gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmStackSize|0x3000 =20 - !if $(UP2_BOARD) =3D=3D TRUE || $(MINNOW3_MODULE_BOARD) =3D=3D TRUE + !if $(UP2_BOARD) =3D=3D TRUE gPlatformModuleTokenSpaceGuid.PcdSerialIoUartNumber|0 !else=20 gPlatformModuleTokenSpaceGuid.PcdSerialIoUartNumber|2 --=20 2.10.1.windows.1