From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from hqnvemgate24.nvidia.com (hqnvemgate24.nvidia.com [216.228.121.143]) by mx.groups.io with SMTP id smtpd.web11.6686.1576642900276159809 for ; Tue, 17 Dec 2019 20:21:41 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@nvidia.com header.s=n1 header.b=GL+3m1Lm; spf=pass (domain: nvidia.com, ip: 216.228.121.143, mailfrom: ashishsingha@nvidia.com) Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Tue, 17 Dec 2019 20:21:11 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Tue, 17 Dec 2019 20:21:39 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Tue, 17 Dec 2019 20:21:39 -0800 Received: from HQMAIL111.nvidia.com (172.20.187.18) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 18 Dec 2019 04:21:39 +0000 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.171) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Wed, 18 Dec 2019 04:21:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Lvb6V7RYe+Vckh15RzBk6lWISuQ68vqdgwbYyG/+b2NawuExfTLC+ftyf+mYgBHOLvivnKtLAl2f41Z4Ka+lEs3P6s4IfRS1hxVxWLI6XDWTXTHFt+0cLdCGfUEljKL7wwQGyA/VJUUsfQzg1xuTAqbQixZgIBj7XI+2i+EFFjClnX+R6TGErijdrl+2FX6jwYoHeg/YutJxrxTbPjbpFQ8u7iSrS2QJ3KhrCXY3kbUzQBz4ygM7hgDQuI14wJkl2fvsxwwuY8N/6sok8Xr8aPObSIL+wrcLMSGnZDkagsIyAvhyd+DAVVRISnC52fMENCz+vEMuRbDfEM6plP4zjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KgOm5RwR5UzYQPedXPmHCrggxxfRQJCvoc3D/Ptkr5I=; b=AGPpgkHqq+m6iG+nrUAWiTqITXmW4L5ZclK8h6dfDm8lmiOpz/HUJk3tXKUdEJDGMux7d6Uz/Vy1m2fe//Dxgj75vX5y15hed03qQ1b21IUVEQxuew3EkRNvTX7FqAWZ8fmo7EInb3TfW2rD2zXwVE9hY39ET68IEiHFW+IG9M4Q7k6c4ESWMMPjOvVZ2gnFbuChnHPu0q3FEcUwE/3pOlqN0PzhMe92+6CusbOzdpCOKN3FlYutN4L7SWMcaa37YEbUJ6+VhAdP0J/l6p/bQSK4VrY0Uet3S6JeClXl0+vhnUjVPYDJ3DH2s8lprshWXHiBQkOcZoqGKkYX90V8oQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from DM6PR12MB3324.namprd12.prod.outlook.com (20.178.31.154) by DM6PR12MB2779.namprd12.prod.outlook.com (20.176.114.213) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2538.19; Wed, 18 Dec 2019 04:21:38 +0000 Received: from DM6PR12MB3324.namprd12.prod.outlook.com ([fe80::d59b:7923:689f:bdc0]) by DM6PR12MB3324.namprd12.prod.outlook.com ([fe80::d59b:7923:689f:bdc0%6]) with mapi id 15.20.2538.019; Wed, 18 Dec 2019 04:21:38 +0000 From: "Ashish Singhal" 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 Thread-Topic: [PATCH v3] MdeModulePkg: Add Platform Boot Options Protocol Thread-Index: AQHVtRm2c8A7z+5b7ESXp16ySc02Tae/EVyAgAA5HwA= Date: Wed, 18 Dec 2019 04:21:37 +0000 Message-ID: References: <6f24dc6e1495eded1c77fa35aff40b574a75d7be.1576614938.git.ashishsingha@nvidia.com> <734D49CCEBEEF84792F5B80ED585239D5C3A114B@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <734D49CCEBEEF84792F5B80ED585239D5C3A114B@SHSMSX104.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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 authentication-results: spf=none (sender IP is ) smtp.mailfrom=ashishsingha@nvidia.com; x-originating-ip: [8.46.90.104] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f2680672-ef81-476f-b2de-08d78371c694 x-ms-traffictypediagnostic: DM6PR12MB2779: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 0255DF69B9 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(396003)(376002)(136003)(346002)(39860400002)(189003)(199004)(13464003)(86362001)(53546011)(6506007)(186003)(2906002)(81166006)(81156014)(5660300002)(26005)(8936002)(33656002)(71200400001)(66476007)(66946007)(55016002)(7696005)(110136005)(316002)(76116006)(478600001)(9686003)(64756008)(8676002)(66446008)(52536014)(66556008)(44824005);DIR:OUT;SFP:1101;SCL:1;SRVR:DM6PR12MB2779;H:DM6PR12MB3324.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: nvidia.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 38IIJTNXEHbZgnXYQ/+1GRlXOkHTx4XFRJIqevceLPFPcaBretQj4q+vLR1AQsKiTh2YSW3h0+gJa5QBtN148xHnu3qfjwLx2ei1ySZrmA6QB/rBlvNVvS5fZo7hj7uDoV7Idrxncf6nyBbcrjA7R2+7eJI/RyPRcXZmE8GFjr0uXCtVx0ctmWNI9xIKJ0crplDa3EPxx25zWIHpABr/e+Kr2MsbG/Q+7PYpqHf7ClieEzdZG1WdMCd4J9Tfe8lJPFbyLr+NugrFQngzuSKcT3YYZ8O4tv3bNdgGGZPzS5tp2657NlnoqOOekpYELMZ/NVTTMikbNRjnIpgFKom8PvWcw/PLWp1yD35U2ZGQLOpsOqTNoxSQoV5eD9YymQKgL27e0VdVcX/nYsFVZijwqD3Jz9DOdAJTvdHEj43yxGGhMFLzPUUhUjlXb+g5/v5d0PmAiiljvEXCQSIJi+z8D9hXcAYAvXC2JfCbxUdxXonJ5NMYJMGthiC7YoxwDPR42nLDoIdw2ny6CKqWUQ3K7g== x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: f2680672-ef81-476f-b2de-08d78371c694 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Dec 2019 04:21:38.0322 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: hY1BJxq7NlGWTcpkgqfhK/HQyYj9U0PRVVisqTGfBjRAwUHe/5bOeOq2I0uGvpvarplxRcSZjmYWDKWlICMnxA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB2779 Return-Path: ashishsingha@nvidia.com X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1576642871; bh=n7XEX6crMIKw4CEChwu3kzAXwS1FIf6jcGPefpvkRR4=; h=X-PGP-Universal:ARC-Seal:ARC-Message-Signature: ARC-Authentication-Results:From:To:Subject:Thread-Topic: Thread-Index:Date:Message-ID:References:In-Reply-To: Accept-Language:X-MS-Has-Attach:X-MS-TNEF-Correlator:msip_labels: authentication-results:x-originating-ip:x-ms-publictraffictype: x-ms-office365-filtering-correlation-id:x-ms-traffictypediagnostic: x-microsoft-antispam-prvs:x-ms-oob-tlc-oobclassifiers: x-forefront-prvs:x-forefront-antispam-report:received-spf: x-ms-exchange-senderadcheck:x-microsoft-antispam: x-microsoft-antispam-message-info:x-ms-exchange-transport-forked: MIME-Version:X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg: Content-Language:Content-Type:Content-Transfer-Encoding; b=GL+3m1LmnKQdUI8mL6srLm6NGqpNwBXvPxQeIVpxHFGTsccu0k8woS5JVMmx2krgj HVvsJ9CL9SvarlaLhxTdFsFdaIxOZlquULJosLHd2v1Rrd52lFfCDuH8DKDCXnihhh nKgnDFrHzmu1PgLzHxgzpob37cNvfcn9rDfT36MENlqUFzuJnyS/+g6ib9NXkGE0q9 F/kQXM0M7iV+Ltj/X9U0XsbX7zeHgxPtBwwfz1UE3LclLaWj6xbc5LhGgLdWKZmIDB 4y44I/V1MwnvDCP+JzvlRPA7nuzWmrqMAryHJdP5G90Zfr/0bCgLhGQQ6RKGcIFMM/ xp+paGuOpt6jA== Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Ray, 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 new protocol named EDKII_PLATFORM= _BOOT_MANAGER_PROTOCOL, I can make the necessary changes. I agree with your suggestion about unifying both functions into a single = one as well. Thanks Ashish -----Original Message----- From: Ni, Ray =20 Sent: Tuesday, December 17, 2019 5:55 PM To: Ashish Singhal ; devel@edk2.groups.io; Wang,= =20Jian J ; Wu, Hao A ; Gao, Z= hichao Subject: RE: [PATCH v3] MdeModulePkg: Add Platform Boot Options Protocol External email: Use caution opening links or attachments 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. 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 platfor= m hook API in this protocol. The reason of combining two APIs to one RefreshAllBootOption() is when I = checked the code change below, I see no need to separate them. What do you think? Thanks, Ray > // > + // Locate Platform Boot Options Protocol // PlatformBootOptions =3D= =20 > + NULL; Status =3D gBS->LocateProtocol=20 > + (&gEdkiiPlatformBootOptionsProtocolGuid, > + NULL, > + (VOID **)&PlatformBootOptions); if=20 > + (!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= =20((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; > + } > + } > + -------------------------------------------------------------------------= ---------- 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= =20sender by reply email and destroy all copies of the original message. -------------------------------------------------------------------------= ----------