From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from hqnvemgate25.nvidia.com (hqnvemgate25.nvidia.com [216.228.121.64]) by mx.groups.io with SMTP id smtpd.web11.1142.1576696502375960030 for ; Wed, 18 Dec 2019 11:15:02 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@nvidia.com header.s=n1 header.b=e/lrUWM/; spf=pass (domain: nvidia.com, ip: 216.228.121.64, mailfrom: ashishsingha@nvidia.com) Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Wed, 18 Dec 2019 11:14:52 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Wed, 18 Dec 2019 11:15:01 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Wed, 18 Dec 2019 11:15:01 -0800 Received: from HQMAIL111.nvidia.com (172.20.187.18) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 18 Dec 2019 19:15:00 +0000 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.108) 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 19:15:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AR1vV1hCB+pyRARhe0WjLLNUqqn7GgEt9djCQr6uN1C8N/X6LpKbc0RiLC8dzg9iVKt4QorHIQ88uESU1SsOsoww9xe0M0VGCOCW3mrxYl3oFv+zNjHLgqyS9wX/frb3doEFRad2srJBedVIY0TKDhaH18SzM7ySAAhwojwgv70KEh8MAEQzC5pjdFe1ZaIcHGCR0qV2MPo8EJwMm0YiQ+4E7onwiv1zAv3YCGktRDUmobiuUj7LOVm1KBS+5MZKnHmG1zgVtPlEy39E1WDcFJeCBo04IGJT1hKeH5eXT21gOd+xHYu6Sd5QaJRZUt3k1RJmUAJuapFjiLT+pHOgRQ== 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=Bh9kzYO9MVap0pVm9PbGZmuPmfCSuaASCDi0yKDvCrw=; b=eOkoOW4Bwiw/EnSpyG7d3gIJouOPcqyMkS2HVEQEbrSQOuM9lbbfngjzs+tStH9cbTGpQ0E/zkQfPSkhduny7vIDYfr/W8h6eaDwG5aSEzZF1Cuaew+bGbYWIzZ1rJJ+Df4aJ4ceRkNsQqi6ZRG/xfSjal89vjINWcq9dUR21UnwcX/LTbw08jmjafWdxZFbF1tPXpfPhUoCWF0To01Le3N64xcd8cA4l06hpLT7umBay4jZGN/d2alMWxuhxB56rTkl4zztAZ+5hX/ummK02+iXUTC/+4d1vHwn8Qj8vZY74wBReLHz18zR0agFvYqGC34bzxGQrHUE1Hbm6Z/qXQ== 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 DM6PR12MB3899.namprd12.prod.outlook.com (10.255.76.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2538.16; Wed, 18 Dec 2019 19:14:59 +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 19:14:58 +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/EVyAgAA5HwCAAEl8AIAAsKFA Date: Wed, 18 Dec 2019 19:14:58 +0000 Message-ID: References: <6f24dc6e1495eded1c77fa35aff40b574a75d7be.1576614938.git.ashishsingha@nvidia.com> <734D49CCEBEEF84792F5B80ED585239D5C3A114B@SHSMSX104.ccr.corp.intel.com> <734D49CCEBEEF84792F5B80ED585239D5C3A190C@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <734D49CCEBEEF84792F5B80ED585239D5C3A190C@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: 52bbc8ec-be36-4655-919e-08d783ee931a x-ms-traffictypediagnostic: DM6PR12MB3899: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-forefront-prvs: 0255DF69B9 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(376002)(136003)(39860400002)(366004)(346002)(13464003)(189003)(199004)(52536014)(9686003)(26005)(478600001)(110136005)(81156014)(55016002)(33656002)(8676002)(81166006)(86362001)(76116006)(5660300002)(186003)(2906002)(66446008)(64756008)(7696005)(66556008)(8936002)(66946007)(6506007)(53546011)(71200400001)(316002)(66476007)(44824005);DIR:OUT;SFP:1101;SCL:1;SRVR:DM6PR12MB3899;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: oBz2MRwgSeCjaBJjeqWWNsV0dd0VYBjYRS1O9PIpsQGawoPPNvoavroRtxnJ42Ox28nI8yk7gKPTeaXcjuMTFnei3nhdbJ8f+QiflhUaZeOtQia0Q+DKf1t9kvYom+tAP8SbaPD4rv/EUvENM1clCEPh9VfUE10x+zFjvEu8OS+Lqs1c2pv5RBGTN4LxmBv67mtm7nzTVTaZWkonIrcZ56ETWB6sTvr2G2ONVCpTcUzrqhcsz2eICOWcjELrx0PMncdr2khyvfqciunxYMjWsNNsZbawMzgZyANk8mMYxWqu/n2/9cP1E9E1B27+hyo9QUnBFGXrt9abaaeDaO1aukLC7giONsWo167HJtKrW0/nMaJPlAdBDHRPgnC/iKw+HN5qkqDRzX9SfhcBS8Om3Jt2wcJrbO2ejb3UEbyt0RDyxxESgxGporO8/cFvVDeJYdWuGGOeFimVcVYvBy/irmiARDZubdAnbbY73M0qki1JrAK4OblI8zilfIWnqlJvvKbqGGdXOXOHNr6lphHO0Q== x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 52bbc8ec-be36-4655-919e-08d783ee931a X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Dec 2019 19:14:58.9001 (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: PCEU/mbnoBZ2uX8Q2JKEC29whaMJUm8Vir7xVXCyj0FJD7DdpJ5A/g7bE9an38Zf0+Ef51UX3EiQSCQSPbYyHQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3899 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=1576696492; bh=Bh9kzYO9MVap0pVm9PbGZmuPmfCSuaASCDi0yKDvCrw=; 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=e/lrUWM/tPEcSMf8QiUa2teEynKyKLLURfAibuaLpuOsea8BmmIib9CYGVh4PcJVf y/Dn/+B1QcadtwwrrtnUOTCScWerG+t+R8SUj8S2avVyun1v2OkJlWfPNTiePgeLrg 0hHem59U/U+GKuCrsDn6buDREYyz537Hio5hzMqhw223OOJnduWOJud8n21SpQfCt7 /QTANhPHok52TY/xdpsQfaoJNdGhsdiuvIW9/u/Hfa4wWEU1DdTbBXEVGWAzdtHTHm TXrjugz6tJ2ZNlHI4j8s4m/diD3M0/mA8gXW0TUFPQ/siIiLX6i/Zi7XobrA7UryF4 bPivsrFfluICg== Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I have submitted a patch version 4. Thanks Ashish -----Original Message----- From: Ni, Ray =20 Sent: Wednesday, December 18, 2019 1:43 AM To: Ashish Singhal ; devel@edk2.groups.io; Wang, J= ian J ; Wu, Hao A ; Gao, Zhichao= Subject: RE: [PATCH v3] MdeModulePkg: Add Platform Boot Options Protocol External email: Use caution opening links or attachments 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=20 > ; Wu, Hao A ; Gao, Zhichao=20 > > Subject: RE: [PATCH v3] MdeModulePkg: Add Platform Boot Options=20 > Protocol > > Ray, > > I did not name the protocol this way because EmbeddedPkg already=20 > describes a protocol with a similar name that is=20 > 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 nece= ssary changes. > > I agree with your suggestion about unifying both functions into a single = one as well. > > Thanks > Ashish > > -----Original Message----- > From: Ni, Ray > Sent: Tuesday, December 17, 2019 5:55 PM > To: Ashish Singhal ; devel@edk2.groups.io;=20 > Wang, Jian J ; Wu, Hao A ;=20 > Gao, Zhichao > Subject: RE: [PATCH v3] MdeModulePkg: Add Platform Boot Options=20 > 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=20 > UpdatedOptions, OUT UpdatedOptionCount) Usually EDKII puts Count in secon= d and buffer in first. > > The reason of using EDKII_PLATFORM_BOOT_MANAGER_PROTOCOL as the new=20 > protocol name is in future we could increase the revision and put more pl= atform hook API in this protocol. > > The reason of combining two APIs to one RefreshAllBootOption() is when=20 > 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=20 > > + =3D 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= ((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=20 > recipient(s) and may contain confidential information. Any=20 > unauthorized review, use, disclosure or distribution is prohibited. =20 > If you are not the intended recipient, please contact the sender by=20 > reply email and destroy all copies of the original message. > ---------------------------------------------------------------------- > -------------