From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: nathaniel.l.desimone@intel.com) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by groups.io with SMTP; Mon, 23 Sep 2019 01:24:37 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Sep 2019 01:24:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,539,1559545200"; d="scan'208";a="190594492" Received: from orsmsx109.amr.corp.intel.com ([10.22.240.7]) by orsmga003.jf.intel.com with ESMTP; 23 Sep 2019 01:24:36 -0700 Received: from orsmsx151.amr.corp.intel.com (10.22.226.38) by ORSMSX109.amr.corp.intel.com (10.22.240.7) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 23 Sep 2019 01:24:36 -0700 Received: from orsmsx114.amr.corp.intel.com ([169.254.8.55]) by ORSMSX151.amr.corp.intel.com ([169.254.7.201]) with mapi id 14.03.0439.000; Mon, 23 Sep 2019 01:24:35 -0700 From: "Nate DeSimone" To: "Wei, David Y" , "devel@edk2.groups.io" CC: "Wu, Hao A" , "Gao, Liming" , "Sinha, Ankit" , "Agyeman, Prince" , "Kubacki, Michael A" , "Kinney, Michael D" Subject: Re: [edk2-platforms PATCH v2] SimicsOpenBoardPkg: Always set the boot priority by default Thread-Topic: [edk2-platforms PATCH v2] SimicsOpenBoardPkg: Always set the boot priority by default Thread-Index: AQHVbN+V50I4RFtJukmnr1XzECL+Q6c49s6w Date: Mon, 23 Sep 2019 08:24:35 +0000 Message-ID: <02A34F284D1DA44BB705E61F7180EF0AAEF0A7B6@ORSMSX114.amr.corp.intel.com> References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZjQ2MzdiOWEtOTg0NS00NmZjLTljZTktMDdjMDc4NTQyNjRjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiQzA3VVV6amRablpYTnRDbWRkRlBRMVY2VUFNMnVtc2E3ZGFTZW9LMHRnWEcwM1JTTkNTRkZSUnRqREhWcWhjUiJ9 x-ctpclassification: CTP_NT x-originating-ip: [10.22.254.140] MIME-Version: 1.0 Return-Path: nathaniel.l.desimone@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable With the minor style changes noted by Michael fixed... Reviewed-by: Nate DeSimone -----Original Message----- From: Wei, David Y =20 Sent: Monday, September 16, 2019 3:39 PM To: devel@edk2.groups.io Cc: Wu, Hao A ; Gao, Liming ; Sin= ha, Ankit ; Agyeman, Prince ; Kubacki, Michael A ; Desimone, Nathaniel L= ; Kinney, Michael D Subject: [edk2-platforms PATCH v2] SimicsOpenBoardPkg: Always set the boot = priority by default When running networks of multiple machines, Simics assigns different disk I= Ds to each disk created.this change the boot priority and can't boot from S= ATA HDD directly. Clear boot priority in NVRAM can fix this issue. Cc: Hao Wu Cc: Liming Gao Cc: Ankit Sinha Cc: Agyeman Prince Cc: Kubacki Michael A Cc: Nate DeSimone Cc: Michael D Kinney Signed-off-by: David Wei --- .../Library/PlatformBootManagerLib/BdsPlatform.c | 14 ++++++++++= +--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerL= ib/BdsPlatform.c b/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootMa= nagerLib/BdsPlatform.c index 953a4a6c15..6644ce124e 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerLib/BdsP= latform.c +++ b/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerLib/B +++ dsPlatform.c @@ -338,10 +338,18 @@ PlatformBootManagerBeforeConsole ( VOID ) { -// EFI_HANDLE Handle; -// EFI_STATUS Status; + EFI_BOOT_MANAGER_LOAD_OPTION *NvBootOptions; + UINTN NvBootOptionCount; + UINTN Index; + EFI_STATUS Status; + + DEBUG((DEBUG_INFO, "PlatformBootManagerBeforeConsole\n")); + + NvBootOptions =3D EfiBootManagerGetLoadOptions(&NvBootOptionCount,=20 + LoadOptionTypeBoot); for (Index =3D 0; Index < NvBootOptionCount; Index+= +) { + Status =3D=20 + EfiBootManagerDeleteLoadOptionVariable(NvBootOptions[Index].OptionNumb + er, LoadOptionTypeBoot); } =20 - DEBUG ((EFI_D_INFO, "PlatformBootManagerBeforeConsole\n")); InstallDevicePathCallback (); =20 VisitAllInstancesOfProtocol (&gEfiPciRootBridgeIoProtocolGuid, -- 2.16.2.windows.1