Files
system76-edk2/NetworkPkg/SnpDxe/SnpDxe.inf
Rabeda, Maciej 61bb6eeb4d NetworkPkg/SnpDxe: Add PCD to remove ExitBootServices event from SNP driver.
Patch addresses Bugzilla #1974.

During ExitBootServices stage, drivers should not call any
functions known to use Memory Allocation Services. One of such
functions (as per UEFI spec) is UNDI->Shutdown().

Since UNDI drivers during ExitBootServices phase are expected
to put the adapter to such a state that it will not perform any DMA
operations, there is no need to interface UNDI by SNP driver during
that phase.

Finally, since ExitBootServices event notification function in SNP
only calls UNDI->Shutdown() and Stop() functions, there is no need
to create this event at all. Adding PCD to control creation of event
reacting to ExitBootServices() call so that systems with UNDIs relying
on SNP to call their Shutdown() and Stop() can still work.

Change-Id: Idd76f26d2e8ff7cf88b2d75e2d524c74211f2e89
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
Signed-off-by: Maciej Rabeda <maciej.rabeda@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
2019-10-21 14:50:51 +08:00

81 lines
2.1 KiB
INI

## @file
# This module produces EFI SNP Protocol.
#
# This module produces Simple Network Protocol upon EFI Network Interface
# Identifier Protocol, to provide a packet level interface to a network adapter.
#
# Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = SnpDxe
MODULE_UNI_FILE = SnpDxe.uni
FILE_GUID = A2f436EA-A127-4EF8-957C-8048606FF670
MODULE_TYPE = UEFI_DRIVER
VERSION_STRING = 1.0
ENTRY_POINT = InitializeSnpNiiDriver
UNLOAD_IMAGE = NetLibDefaultUnload
#
# The following information is for reference only and not required by the build tools.
#
# VALID_ARCHITECTURES = IA32 X64 EBC
#
# DRIVER_BINDING = mSimpleNetworkDriverBinding
# COMPONENT_NAME = gSimpleNetworkComponentName
# COMPONENT_NAME2 = gSimpleNetworkComponentName2
#
[Sources]
Receive.c
Snp.h
Nvdata.c
Get_status.c
Start.c
Snp.c
Stop.c
Statistics.c
Reset.c
Shutdown.c
Mcast_ip_to_mac.c
Transmit.c
WaitForPacket.c
Receive_filters.c
Initialize.c
ComponentName.c
Callback.c
Station_address.c
[Packages]
MdePkg/MdePkg.dec
NetworkPkg/NetworkPkg.dec
[LibraryClasses]
UefiLib
BaseLib
UefiBootServicesTableLib
UefiDriverEntryPoint
BaseMemoryLib
DebugLib
NetLib
[Guids]
gEfiEventExitBootServicesGuid ## SOMETIMES_CONSUMES ## Event
[Protocols]
gEfiSimpleNetworkProtocolGuid ## BY_START
gEfiDevicePathProtocolGuid ## TO_START
gEfiNetworkInterfaceIdentifierProtocolGuid_31 ## TO_START
gEfiPciIoProtocolGuid ## TO_START
[Pcd]
gEfiNetworkPkgTokenSpaceGuid.PcdSnpCreateExitBootServicesEvent ## CONSUMES
[UserExtensions.TianoCore."ExtraFiles"]
SnpDxeExtra.uni