From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: siyuan.fu@intel.com) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by groups.io with SMTP; Mon, 15 Apr 2019 01:35:58 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Apr 2019 01:35:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,353,1549958400"; d="scan'208";a="150934370" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga002.jf.intel.com with ESMTP; 15 Apr 2019 01:35:57 -0700 Received: from fmsmsx162.amr.corp.intel.com (10.18.125.71) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 15 Apr 2019 01:35:56 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx162.amr.corp.intel.com (10.18.125.71) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 15 Apr 2019 01:35:56 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.93]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.164]) with mapi id 14.03.0415.000; Mon, 15 Apr 2019 16:35:54 +0800 From: "Siyuan, Fu" To: "devel@edk2.groups.io" , "Xue, ShengfengX" Subject: Re: [edk2-devel] [PATCH] Edk2\NetworkPkg\UefiPxeBcDxe : Open a method to Enabled/Disabled IPV6/IPV6 PXE Support. Thread-Topic: [edk2-devel] [PATCH] Edk2\NetworkPkg\UefiPxeBcDxe : Open a method to Enabled/Disabled IPV6/IPV6 PXE Support. Thread-Index: AQHU82M1K1vKfb1WkkGumiAQbBWqZaY840ag Date: Mon, 15 Apr 2019 08:35:54 +0000 Message-ID: References: <687dbf72e55cd6c9f170b73d948de5cdf06da9a0.1555315940.git.shengfengx.xue@intel.com> In-Reply-To: <687dbf72e55cd6c9f170b73d948de5cdf06da9a0.1555315940.git.shengfengx.xue@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZGE0MzViNDktOTRiNi00MDE4LWIyMDktOTg1Mjk3NzhmZGNlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiUVZ0ZFRzTitXcW1qdlF0UXdzdG9NbHFhS0lkNU93NHNadFdoYVwvVGZ2aSswRDBPZjhkM0xYcUpZbXNUMXZMVlgifQ== dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: siyuan.fu@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, Shengfeng > -----Original Message----- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Xu= e, > ShengfengX > Sent: Monday, April 15, 2019 4:14 PM > To: devel@edk2.groups.io > Cc: Xue; Xue, ShengfengX > Subject: [edk2-devel] [PATCH] Edk2\NetworkPkg\UefiPxeBcDxe : Open a meth= od to > Enabled/Disabled IPV6/IPV6 PXE Support. >=20 > Please refer this link for defail. > https://bugzilla.tianocore.org/show_bug.cgi?id=3D1695 > Some Platform Developer want IPv4 and IPv6 PXE support separately. So it= need > open a method Enabled/Disabled IPV6/IPV6 PXE Support in PxeBcSupported()= . I'm OK with a new PCD to enable/disable the PXE support, please describe t= his change clearly in the patch description, and also in the Bugzilla. >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Xue, ShengfengX > Reviewed-by: Reviewer Name You should add the package maintainer to the Cc list, or add "Cc: xxx" her= e so git send-mail could help you to do that.=20 > --- > NetworkPkg/NetworkPkg.dec | 12 +++++++++++- > NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c | 12 +++++++++++- > NetworkPkg/UefiPxeBcDxe/PxeBcImpl.h | 5 ++++- > NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf | 4 +++- > 4 files changed, 29 insertions(+), 4 deletions(-) >=20 > diff --git a/NetworkPkg/NetworkPkg.dec b/NetworkPkg/NetworkPkg.dec > index 9b8ece4837..1a7b634631 100644 > --- a/NetworkPkg/NetworkPkg.dec > +++ b/NetworkPkg/NetworkPkg.dec > @@ -3,7 +3,7 @@ > # > # This package provides network modules that conform to UEFI 2.4 > specification. > # > -# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved. > +# Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved. > # (C) Copyright 2015-2017 Hewlett Packard Enterprise Development LP
> # > # SPDX-License-Identifier: BSD-2-Clause-Patent > @@ -117,5 +117,15 @@ > # @Prompt Type Value of network boot policy used in iSCSI. >=20 > gEfiNetworkPkgTokenSpaceGuid.PcdIScsiAIPNetworkBootPolicy|0x08|UINT8|0x1= 000000 > 7 >=20 > + ## IPv4 PXE support > + # 0x00 =3D PXE Enabled > + # 0x01 =3D PXE Disabled > + gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0x00|UINT8|0x10000008 Normally people will use 0x01 to indicate an Enabled status, not zero. > + > + ## IPv6 PXE support > + # 0x00 =3D PXE Enabled > + # 0x01 =3D PXE Disabled > + gEfiNetworkPkgTokenSpaceGuid.PcdIPv6PXESupport|0x00|UINT8|0x10000009 > + > [UserExtensions.TianoCore."ExtraFiles"] > NetworkPkgExtra.uni > diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c > b/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c > index 3c1d400d50..cac19242aa 100644 > --- a/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c > +++ b/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c > @@ -2,7 +2,7 @@ > Driver Binding functions implementationfor for UefiPxeBc Driver. >=20 > (C) Copyright 2014 Hewlett-Packard Development Company, L.P.
> - Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved. > + Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved. >=20 > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > @@ -1242,6 +1242,10 @@ PxeBcDriverEntryPoint ( > { > EFI_STATUS Status; >=20 > + if ((PcdGet8(PcdIPv4PXESupport) =3D=3D PXEDISABLED) && > (PcdGet8(PcdIPv6PXESupport) =3D=3D PXEDISABLED)) { > + return EFI_UNSUPPORTED; > + } > + > Status =3D EfiLibInstallDriverBindingComponentName2 ( > ImageHandle, > SystemTable, > @@ -1301,9 +1305,15 @@ PxeBcSupported ( > EFI_GUID *MtftpServiceBindingGuid; >=20 > if (IpVersion =3D=3D IP_VERSION_4) { > + if (PcdGet8(PcdIPv4PXESupport) =3D=3D PXEDISABLED) { > + return EFI_UNSUPPORTED; > + } > DhcpServiceBindingGuid =3D &gEfiDhcp4ServiceBindingProtocolGuid; > MtftpServiceBindingGuid =3D &gEfiMtftp4ServiceBindingProtocolGuid; > } else { > + if (PcdGet8(PcdIPv6PXESupport) =3D=3D PXEDISABLED) { > + return EFI_UNSUPPORTED; > + } > DhcpServiceBindingGuid =3D &gEfiDhcp6ServiceBindingProtocolGuid; > MtftpServiceBindingGuid =3D &gEfiMtftp6ServiceBindingProtocolGuid; > } > diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.h > b/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.h > index f0db4a0c1a..ba870ddf5a 100644 > --- a/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.h > +++ b/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.h > @@ -2,7 +2,7 @@ > This EFI_PXE_BASE_CODE_PROTOCOL and EFI_LOAD_FILE_PROTOCOL. > interfaces declaration. >=20 > - Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved. > + Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved. >=20 > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > @@ -78,6 +78,9 @@ typedef struct _PXEBC_VIRTUAL_NIC PXEBC_VIRTUAL_NIC; > #define PXEBC_PRIVATE_DATA_FROM_ID(a) CR (a, PXEBC_PRIVATE_DATA= , Id, > PXEBC_PRIVATE_DATA_SIGNATURE) > #define PXEBC_VIRTUAL_NIC_FROM_LOADFILE(a) CR (a, PXEBC_VIRTUAL_NIC, > LoadFile, PXEBC_VIRTUAL_NIC_SIGNATURE) >=20 > +#define PXEENABLED 0x00 > +#define PXEDISABLED 0x01 This doesn't follow EDKII coding style, there should be an underline betwe= en each word. > + > typedef union { > PXEBC_DHCP4_PACKET_CACHE Dhcp4; > PXEBC_DHCP6_PACKET_CACHE Dhcp6; > diff --git a/NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf > b/NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf > index fc31250dea..0341f1052a 100644 > --- a/NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf > +++ b/NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf > @@ -5,7 +5,7 @@ > # PXE-compatible device for network access or booting. This driver sup= ports > # both IPv4 and IPv6 network stack. > # > -# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved. > +# Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved. > # > # SPDX-License-Identifier: BSD-2-Clause-Patent > # > @@ -102,6 +102,8 @@ > [Pcd] > gEfiMdeModulePkgTokenSpaceGuid.PcdTftpBlockSize ## SOMETIMES_CON= SUMES > gEfiNetworkPkgTokenSpaceGuid.PcdPxeTftpWindowSize ## SOMETIMES_CON= SUMES > + gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport ## CONSUMES > + gEfiNetworkPkgTokenSpaceGuid.PcdIPv6PXESupport ## CONSUMES >=20 > [UserExtensions.TianoCore."ExtraFiles"] > UefiPxeBcDxeExtra.uni > -- > 2.16.2.windows.1 >=20 >=20 >=20