From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web11.8229.1576658554094307967 for ; Wed, 18 Dec 2019 00:42:34 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: ray.ni@intel.com) X-Amp-Result: SKIPPED(no attachment in message) 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; 18 Dec 2019 00:42:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,328,1571727600"; d="scan'208";a="221954913" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga001.fm.intel.com with ESMTP; 18 Dec 2019 00:42:33 -0800 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 18 Dec 2019 00:42:33 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx156.amr.corp.intel.com (10.18.116.74) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 18 Dec 2019 00:42:33 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.90]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.214]) with mapi id 14.03.0439.000; Wed, 18 Dec 2019 16:42:31 +0800 From: "Ni, Ray" To: Ashish Singhal , "devel@edk2.groups.io" , "Wang, Jian J" , "Wu, Hao A" , "Gao, Zhichao" Subject: Re: [PATCH v3] MdeModulePkg: Add Platform Boot Options Protocol Thread-Topic: [PATCH v3] MdeModulePkg: Add Platform Boot Options Protocol Thread-Index: AQHVtRmuGeyhmgP4/EyI0qINRGSpRqe/Ct1A//+6GoCAAM7hUA== Date: Wed, 18 Dec 2019 08:42:30 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5C3A190C@SHSMSX104.ccr.corp.intel.com> References: <6f24dc6e1495eded1c77fa35aff40b574a75d7be.1576614938.git.ashishsingha@nvidia.com> <734D49CCEBEEF84792F5B80ED585239D5C3A114B@SHSMSX104.ccr.corp.intel.com> In-Reply-To: Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiY2M2Zjg0OGQtZmQ5Ni00ZmY4LWE2NDAtZDE0ODE1OTA1N2VmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoidHl5TnFFOU5qRXVrTHRid1I4Z01UTUlSRjczejVDdFdUa0FFdFRUYjlRQmVneG1ia0VFK1lZSkpaME1HaHo2QSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action msip_labels: MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Enabled=True; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_SiteId=43083d15-7273-40c1-b7db-39efd9ccc17a; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Owner=ashishsingha@nvidia.com; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_SetDate=2019-12-18T04:21:35.7910000Z; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Name=Unrestricted; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Application=Microsoft Azure Information Protection; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_ActionId=2066a8af-feac-44b9-a680-3363eddd4d47; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Extended_MSFT_Method=Automatic x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: ray.ni@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I am ok with adding EDKII_PLATFORM_BOOT_MANAGER_PROTOCOL. > -----Original Message----- > From: Ashish Singhal > Sent: Wednesday, December 18, 2019 12:22 PM > To: Ni, Ray ; devel@edk2.groups.io; Wang, Jian J ; Wu, Hao A > ; Gao, Zhichao > Subject: RE: [PATCH v3] MdeModulePkg: Add Platform Boot Options Protocol >=20 > Ray, >=20 > I did not name the protocol this way because EmbeddedPkg already describe= s a protocol with a similar name that is > PLATFORM_BOOT_MANAGER_PROTOCOL. If you think we can still go ahead with n= ew protocol named > EDKII_PLATFORM_BOOT_MANAGER_PROTOCOL, I can make the necessary changes. >=20 > I agree with your suggestion about unifying both functions into a single = one as well. >=20 > Thanks > Ashish >=20 > -----Original Message----- > From: Ni, Ray > Sent: Tuesday, December 17, 2019 5:55 PM > To: Ashish Singhal ; devel@edk2.groups.io; Wang,= Jian J ; Wu, Hao A > ; Gao, Zhichao > Subject: RE: [PATCH v3] MdeModulePkg: Add Platform Boot Options Protocol >=20 > External email: Use caution opening links or attachments >=20 >=20 > Ashish, > I prefer EDKII_PLATFORM_BOOT_MANAGER_PROTOCOL and could have two fields f= or this protocol for now: > Revision and RefreshAllBootOption (IN Options, IN OptionCount, OUT Update= dOptions, OUT UpdatedOptionCount) > Usually EDKII puts Count in second and buffer in first. >=20 > The reason of using EDKII_PLATFORM_BOOT_MANAGER_PROTOCOL as the new proto= col name is in future we could > increase the revision and put more platform hook API in this protocol. >=20 > The reason of combining two APIs to one RefreshAllBootOption() is when I = checked the code change below, I see no need > to separate them. >=20 > What do you think? >=20 > Thanks, > Ray >=20 > > // > > + // Locate Platform Boot Options Protocol // PlatformBootOptions = =3D > > + NULL; Status =3D gBS->LocateProtocol > > + (&gEdkiiPlatformBootOptionsProtocolGuid, > > + NULL, > > + (VOID **)&PlatformBootOptions); if > > + (!EFI_ERROR (Status)) { > > + // > > + // If found, call platform specific overrides to auto enumerated > > + // boot options. > > + // > > + Status =3D PlatformBootOptions->OverridePlatformBootOptions ((CONS= T UINTN)BootOptionCount, > > + (CONST = EFI_BOOT_MANAGER_LOAD_OPTION *)BootOptions, > > + &Update= dBootOptionCount, > > + &Update= dBootOptions); > > + if (!EFI_ERROR (Status)) { > > + EfiBootManagerFreeLoadOptions (BootOptions, BootOptionCount); > > + BootOptions =3D UpdatedBootOptions; > > + BootOptionCount =3D UpdatedBootOptionCount; > > + } > > + > > + // > > + // Call platform specific override to remove invalid boot options = from NV > > + // > > + Status =3D PlatformBootOptions->RemoveInvalidPlatformNvBootOptions= ((CONST UINTN)NvBootOptionCount, > > + = (CONST EFI_BOOT_MANAGER_LOAD_OPTION *)NvBootOptions, > > + = &UpdatedBootOptionCount, > > + = &UpdatedBootOptions); > > + if (!EFI_ERROR (Status)) { > > + EfiBootManagerFreeLoadOptions (NvBootOptions, NvBootOptionCount)= ; > > + NvBootOptions =3D UpdatedBootOptions; > > + NvBootOptionCount =3D UpdatedBootOptionCount; > > + } > > + } > > + >=20 > -------------------------------------------------------------------------= ---------- > This email message is for the sole use of the intended recipient(s) and m= ay contain > confidential information. Any unauthorized review, use, disclosure or di= stribution > is prohibited. If you are not the intended recipient, please contact the= sender by > reply email and destroy all copies of the original message. > -------------------------------------------------------------------------= ----------