From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.120; helo=mga04.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B447A210D83CE for ; Thu, 23 Aug 2018 20:29:08 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Aug 2018 20:29:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,280,1531810800"; d="scan'208";a="65629701" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga008.fm.intel.com with ESMTP; 23 Aug 2018 20:28:49 -0700 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 23 Aug 2018 20:28:49 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX154.amr.corp.intel.com (10.18.116.70) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 23 Aug 2018 20:28:48 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.143]) by shsmsx102.ccr.corp.intel.com ([169.254.2.226]) with mapi id 14.03.0319.002; Fri, 24 Aug 2018 11:28:46 +0800 From: "Ni, Ruiyu" To: "Zhang, Shenglei" CC: "edk2-devel@lists.01.org" Thread-Topic: [edk2] [PATCH 4/6] IntelFrameworkModulePkg Snp16Dxe: Remove redundant functions Thread-Index: AQHULsVhjM+ypN8YiE+EUBmJtpbHYKTNzHcAgACLOWA= Date: Fri, 24 Aug 2018 03:28:46 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5BDE36BA@SHSMSX104.ccr.corp.intel.com> References: <20180808030854.30124-1-shenglei.zhang@intel.com> <20180808030854.30124-5-shenglei.zhang@intel.com> In-Reply-To: Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH 4/6] IntelFrameworkModulePkg Snp16Dxe: Remove redundant functions X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Aug 2018 03:29:09 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ruiyu Ni Thanks/Ray=20 > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > shenglei > Sent: Wednesday, August 8, 2018 11:09 AM > To: edk2-devel@lists.01.org > Cc: Gao, Liming > Subject: [edk2] [PATCH 4/6] IntelFrameworkModulePkg Snp16Dxe: Remove > redundant functions >=20 > The redundant functions which are never called have been removed. > They are PxeUndiSetMcastAddr, PxeUndiInitiateDiags,PxeUndiGetState > PxeUndiForceInterrupt and PxeUndiSetPacketFilter. > https://bugzilla.tianocore.org/show_bug.cgi?id=3D1063 >=20 > Cc: Liming Gao > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: shenglei > --- > .../Csm/BiosThunk/Snp16Dxe/BiosSnp16.h | 180 ------------------ > .../Csm/BiosThunk/Snp16Dxe/PxeUndi.c | 91 --------- > 2 files changed, 271 deletions(-) >=20 > diff --git a/IntelFrameworkModulePkg/Csm/BiosThunk/Snp16Dxe/BiosSnp16.h > b/IntelFrameworkModulePkg/Csm/BiosThunk/Snp16Dxe/BiosSnp16.h > index 501e27b9c8..5dcbee68d4 100644 > --- a/IntelFrameworkModulePkg/Csm/BiosThunk/Snp16Dxe/BiosSnp16.h > +++ b/IntelFrameworkModulePkg/Csm/BiosThunk/Snp16Dxe/BiosSnp16.h > @@ -1019,39 +1019,6 @@ PxeUndiTransmit ( > ) > ; >=20 > -/** > - PXE > - UNDI SET MULTICAST ADDRESS > - Op-Code: PXENV_UNDI_SET_MCAST_ADDRESS (0009h) > - Input: Far pointer to a PXENV_TFTP_SET_MCAST_ADDRESS_t parameter > structure that has been > - initialized by the caller. > - Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in > AX. The status field in > - the parameter structure must be set to one of the values represented b= y the > PXENV_STATUS_xxx > - constants. > - Description: This call changes the current list of multicast addresses= to the > input list and resets the network > - adapter to accept it. If the number of multicast addresses is zero, mu= lticast is > disabled. > - typedef struct { > - PXENV_STATUS Status; > - PXENV_UNDI_MCAST_ADDRESS_t R_Mcast_Buf; > - } PXENV_UNDI_SET_MCAST_ADDR_T; > - Set before calling API service > - R_Mcast_Buf: See description in the UNDI RESET ADAPTER > - (0004h) API. > - Returned from API service > - Status: See the PXENV_STATUS_xxx constants > - > - @param SimpleNetworkDevice Device instance > - @param PxeUndiTable Point to structure which hold parameter = and > return value > - for option ROM call. > - > - @return Return value of PXE option ROM far call. > -**/ > -EFI_STATUS > -PxeUndiSetMcastAddr ( > - IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice, > - IN OUT PXENV_UNDI_SET_MCAST_ADDR_T *PxeUndiTable > - ) > -; >=20 > /** > PXE > @@ -1088,39 +1055,6 @@ PxeUndiSetStationAddr ( > ) > ; >=20 > -/** > - PXE > - UNDI SET PACKET FILTER > - Op-Code: PXENV_UNDI_SET_PACKET_FILTER (000Bh) > - Input: Far pointer to a PXENV_UNDI_SET_PACKET_FILTER_T parameter > structure that has been > - initialized by the caller. > - Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in > AX. The status field in > - the parameter structure must be set to one of the values represented b= y the > PXENV_STATUS_xxx > - constants. > - Description: This call resets the adapter's receive unit to accept a n= ew filter, > different from the one provided with > - the open call. > - typedef struct { > - PXENV_STATUS Status; > - UINT8 filter; > - } PXENV_UNDI_SET_PACKET_FILTER_T; > - Set before calling API service > - Filter: See the receive filter values in the UNDI OPEN > - (0006h) API description. > - Returned from API service > - Status: See the PXENV_STATUS_xxx constants. > - > - @param SimpleNetworkDevice Device instance > - @param PxeUndiTable Point to structure which hold parameter = and > return value > - for option ROM call. > - > - @return Return value of PXE option ROM far call. > -**/ > -EFI_STATUS > -PxeUndiSetPacketFilter ( > - IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice, > - IN OUT PXENV_UNDI_SET_PACKET_FILTER_T *PxeUndiTable > - ) > -; >=20 > /** > PXE > @@ -1252,73 +1186,6 @@ PxeUndiClearStatistics ( > ) > ; >=20 > -/** > - PXE > - UNDI INITIATE DIAGS > - Op-Code: PXENV_UNDI_INITIATE_DIAGS (000Fh) > - Input: Far pointer to a PXENV_UNDI_INITIATE_DIAGS_T parameter. > - Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in > AX. The status field in > - the parameter structure must be set to one of the values represented b= y the > - PXENV_STATUS_xxx constants. > - Description: This call can be used to initiate the run-time diagnostic= s. It causes > the network adapter to run > - hardware diagnostics and to update its status information. > - typedef struct { > - PXENV_STATUS Status; > - } PXENV_UNDI_INITIATE_DIAGS_T; > - Set before calling API service > - N/A > - Returned from API service > - Status: See the PXENV_STATUS_xxx constants. > - > - @param SimpleNetworkDevice Device instance > - @param PxeUndiTable Point to structure which hold parameter = and > return value > - for option ROM call. > - > - @return Return value of PXE option ROM far call. > -**/ > -EFI_STATUS > -PxeUndiInitiateDiags ( > - IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice, > - IN OUT PXENV_UNDI_INITIATE_DIAGS_T *PxeUndiTable > - ) > -; > - > -/** > - PXE > - UNDI FORCE INTERRUPT > - Op-Code: PXENV_UNDI_FORCE_INTERRUPT (0010h) > - Input: Far pointer to a PXENV_UNDI_FORCE_INTERRUPT_T parameter > structure that has been > - initialized by the caller. > - Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in > AX. The status field in > - the parameter structure must be set to one of the values represented b= y the > PXENV_STATUS_xxx > - constants. > - Description: This call forces the network adapter to generate an inter= rupt. > When a receive interrupt occurs, the > - network adapter driver usually queues the packet and calls the applica= tion's > callback receive > - routine with a pointer to the packet received. Then, the callback rout= ine either > can copy the packet > - to its buffer or can decide to delay the copy to a later time. If the = packet is not > immediately copied, > - the network adapter driver does not remove it from the input queue. Wh= en > the application wants to > - copy the packet, it can call the PXENV_UNDI_FORCE_INTERRUPT routine to > simulate the receive > - interrupt. > - typedef struct { > - PXENV_STATUS Status; > - } PXENV_UNDI_FORCE_INTERRUPT_T; > - Set before calling API service > - N/A > - Returned from API service > - Status: See the PXENV_STATUS_xxx constants. > - > - @param SimpleNetworkDevice Device instance > - @param PxeUndiTable Point to structure which hold parameter = and > return value > - for option ROM call. > - > - @return Return value of PXE option ROM far call. > -**/ > -EFI_STATUS > -PxeUndiForceInterrupt ( > - IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice, > - IN OUT PXENV_UNDI_FORCE_INTERRUPT_T *PxeUndiTable > - ) > -; >=20 > /** > PXE > @@ -1562,53 +1429,6 @@ PxeUndiStop ( > ) > ; >=20 > -/** > - PXE > - UNDI GET STATE > - Op-Code: PXENV_UNDI_GET_STATE (0015h) > - Input: Far pointer to a PXENV_UNDI_GET_STATE_T parameter. > - Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in > AX. The status field in > - the parameter structure must be set to one of the values represented b= y the > PXENV_STATUS_xxx > - constants. The UNDI_STATE field in the parameter structure must be set= to > one of the valid state > - constants > - Description: This call can be used to obtain state of the UNDI engine = in order > to avoid issuing adverse call > - sequences > - typedef struct { > - #define PXE_UNDI_GET_STATE_STARTED 1 > - #define PXE_UNDI_GET_STATE_INITIALIZED 2 > - #define PXE_UNDI_GET_STATE_OPENED 3 > - PXENV_STATUS Status; > - UINT8 UNDIstate; > - } PXENV_UNDI_GET_STATE_T; > - Set before calling API service > - N/A > - Returned from API service > - Status: See the PXENV_STATUS_xxx constants. > - State: See definitions of the state constants. > - Note. UNDI implementation is responsible for maintaining > - internal state machine. > - UNDI ISR > - Op-Code: PXENV_UNDI_ISR (0014h) > - Input: Far pointer to a t_PXENV_UNDI_ISR parameter structure that has = been > initialized by the caller. > - Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in > AX. The status field in > - the parameter structure must be set to one of the values represented b= y the > PXENV_STATUS_xxx > - constants. > - Description: This API function will be called at different levels of p= rocessing the > interrupt. The FuncFlag field in > - the parameter block indicates the operation to be performed for the ca= ll. This > field is filled with the > - status of that operation on return. > - > - @param SimpleNetworkDevice Device instance > - @param PxeUndiTable Point to structure which hold parameter = and > return value > - for option ROM call. > - > - @return Return value of PXE option ROM far call. > -**/ > -EFI_STATUS > -PxeUndiGetState ( > - IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice, > - IN OUT PXENV_UNDI_GET_STATE_T *PxeUndiTable > - ) > -; >=20 > /** > Effect the Far Call into the PXE Layer diff --git > a/IntelFrameworkModulePkg/Csm/BiosThunk/Snp16Dxe/PxeUndi.c > b/IntelFrameworkModulePkg/Csm/BiosThunk/Snp16Dxe/PxeUndi.c > index d1435798c0..ff070385a0 100644 > --- a/IntelFrameworkModulePkg/Csm/BiosThunk/Snp16Dxe/PxeUndi.c > +++ b/IntelFrameworkModulePkg/Csm/BiosThunk/Snp16Dxe/PxeUndi.c > @@ -564,46 +564,7 @@ PxeUndiTransmit ( > } > } >=20 > -/** > - PXE > - UNDI SET MULTICAST ADDRESS > - Op-Code: PXENV_UNDI_SET_MCAST_ADDRESS (0009h) > - Input: Far pointer to a PXENV_TFTP_SET_MCAST_ADDRESS_t parameter > structure that has been > - initialized by the caller. > - Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in > AX. The status field in > - the parameter structure must be set to one of the values represented b= y the > PXENV_STATUS_xxx > - constants. > - Description: This call changes the current list of multicast addresses= to the > input list and resets the network > - adapter to accept it. If the number of multicast addresses is zero, mu= lticast is > disabled. > - typedef struct { > - PXENV_STATUS Status; > - PXENV_UNDI_MCAST_ADDRESS_t R_Mcast_Buf; > - } PXENV_UNDI_SET_MCAST_ADDR_T; > - Set before calling API service > - R_Mcast_Buf: See description in the UNDI RESET ADAPTER > - (0004h) API. > - Returned from API service > - Status: See the PXENV_STATUS_xxx constants >=20 > - @param SimpleNetworkDevice Device instance > - @param PxeUndiTable Point to structure which hold parameter = and > return value > - for option ROM call. > - > - @return Return value of PXE option ROM far call. > -**/ > -EFI_STATUS > -PxeUndiSetMcastAddr ( > - IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice, > - IN OUT PXENV_UNDI_SET_MCAST_ADDR_T *PxeUndiTable > - ) > -{ > - return MakePxeCall ( > - SimpleNetworkDevice, > - PxeUndiTable, > - sizeof (PXENV_UNDI_SET_MCAST_ADDR_T), > - PXENV_UNDI_SET_MCAST_ADDR > - ); > -} >=20 > /** > PXE > @@ -674,19 +635,6 @@ PxeUndiSetStationAddr ( >=20 > @return Return value of PXE option ROM far call. > **/ > -EFI_STATUS > -PxeUndiSetPacketFilter ( > - IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice, > - IN OUT PXENV_UNDI_SET_PACKET_FILTER_T *PxeUndiTable > - ) > -{ > - return MakePxeCall ( > - SimpleNetworkDevice, > - PxeUndiTable, > - sizeof (PXENV_UNDI_SET_PACKET_FILTER_T), > - PXENV_UNDI_SET_PACKET_FILTER > - ); > -} >=20 > /** > PXE > @@ -863,19 +811,6 @@ PxeUndiClearStatistics ( >=20 > @return Return value of PXE option ROM far call. > **/ > -EFI_STATUS > -PxeUndiInitiateDiags ( > - IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice, > - IN OUT PXENV_UNDI_INITIATE_DIAGS_T *PxeUndiTable > - ) > -{ > - return MakePxeCall ( > - SimpleNetworkDevice, > - PxeUndiTable, > - sizeof (PXENV_UNDI_INITIATE_DIAGS_T), > - PXENV_UNDI_INITIATE_DIAGS > - ); > -} >=20 > /** > PXE > @@ -907,19 +842,6 @@ PxeUndiInitiateDiags ( >=20 > @return Return value of PXE option ROM far call. > **/ > -EFI_STATUS > -PxeUndiForceInterrupt ( > - IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice, > - IN OUT PXENV_UNDI_FORCE_INTERRUPT_T *PxeUndiTable > - ) > -{ > - return MakePxeCall ( > - SimpleNetworkDevice, > - PxeUndiTable, > - sizeof (PXENV_UNDI_FORCE_INTERRUPT_T), > - PXENV_UNDI_FORCE_INTERRUPT > - ); > -} >=20 > /** > PXE > @@ -1239,16 +1161,3 @@ PxeUndiStop ( >=20 > @return Return value of PXE option ROM far call. > **/ > -EFI_STATUS > -PxeUndiGetState ( > - IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice, > - IN OUT PXENV_UNDI_GET_STATE_T *PxeUndiTable > - ) > -{ > - return MakePxeCall ( > - SimpleNetworkDevice, > - PxeUndiTable, > - sizeof (PXENV_UNDI_GET_STATE_T), > - PXENV_UNDI_GET_STATE > - ); > -} > -- > 2.18.0.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel