From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (NAM10-MW2-obe.outbound.protection.outlook.com [40.92.42.77]) by mx.groups.io with SMTP id smtpd.web10.15645.1586456206915296459 for ; Thu, 09 Apr 2020 11:16:47 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@outlook.com header.s=selector1 header.b=uRqJBKdR; spf=pass (domain: outlook.com, ip: 40.92.42.77, mailfrom: michael.kubacki@outlook.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iI0IO1hppuN7NWGBT8sSG7S/bmJh5Pi/vwHM/+GL6bqDmLbkuDA67z/xIixWZ3aqtHImQ/gGhM7tH1W8qbzjqxJbCcKCGsF/qvWnb3qdaUuf2kTJPJO7CxSbR5etbeXcC0d0bFRef8Vf+IhQTQ2Bz+sKju7xDtWBwHITgqq3IoZCid2H4EYnDzjM8K4Jj60A5wAODLVciHKati9/tl9qu/XLwgslRG9ZtIMozkkvTv7SSLagxE1cooEZex0bR3fVYHIHW2Fdzsnf2bH//DwiA1w5+wINrP7Qh8xp4HJtec38F3jRLaOZTgBda0nmCXBCeFMois0w9LBetkl2/QS/8w== 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=CeSOviYU1RMrKo5VANIKVY6YrwobqXzf/Q6bSPZic60=; b=Q9sDwb3iZyvFOdy4oQBswHOMBrAC85mSCT720Qm0nYutTwIW/vBPfL2RLnit5Nx0KpzGjcccIFcZ9FeXC1T0OLXNJpauTY4wxFCRs9tK+luiYMojRv7g4V9E37wRU8F/vuG8p7kAlklFwKVXpwbW+ycnQz96sPDw0TK5A3O/H12qwNujtKrJ5Fvl95MCWHl/mGMXDSMMXNaH4oeeruOcJ4ZX7+dnfqAOeKb8Y3vu7SjmJy39gctTV/8811t7PdONZaaWBUo2Qu70QPghCGNYJGgfYw8HK+lkZ/hj+ie2btJzTqO4qAt7xhJ1KJuquYCpxc+caqtDhcNUhzIjZc5MQA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=outlook.com; dmarc=pass action=none header.from=outlook.com; dkim=pass header.d=outlook.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CeSOviYU1RMrKo5VANIKVY6YrwobqXzf/Q6bSPZic60=; b=uRqJBKdRclynZ+Fe6bWPdDPBmu9hYLKpibu5TbYPHqcm6mmRdO2ctvBcQetP/B4k8aiJZOqQsWulvHuRIBeRqSGNFDsbiwPsZeMr3egQdAgHKSeCZe1RNIdjs5XN21RH0cJzYgXu3hBbS+QFcvDpkYq92ZSOlZ92w9lKBht8sqYRx7eK4eCCL82BE/W+MtBjf839tGmtpKKh+Kx81L7JPmonaknB1oA4ukEFIm3jwgW+umuqIki2njhvHE3f8B3CjOzESN7KuL13v4GXdr9oGA6+k1KG8qpoWEVRVYJWiXA8P6NmHfAexnjIogTDFb2SXa6HhvcJeVQFoOHamawAFQ== Received: from MW2NAM10FT061.eop-nam10.prod.protection.outlook.com (2a01:111:e400:7e87::4a) by MW2NAM10HT036.eop-nam10.prod.protection.outlook.com (2a01:111:e400:7e87::129) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.18; Thu, 9 Apr 2020 18:16:45 +0000 Received: from DM5PR07MB3435.namprd07.prod.outlook.com (2a01:111:e400:7e87::49) by MW2NAM10FT061.mail.protection.outlook.com (2a01:111:e400:7e87::266) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15 via Frontend Transport; Thu, 9 Apr 2020 18:16:44 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:DE0F62A69C93F18B5122D1485B3DFD09477E33C85B38FE5FFF0ECF65B5B2E3FC;UpperCasedChecksum:FD591377B219517FB2C12C5F7950E45A0E8F68A6BA7D49833E2B6E104652BE27;SizeAsReceived:7659;Count:47 Received: from DM5PR07MB3435.namprd07.prod.outlook.com ([fe80::801e:fde0:da7d:191f]) by DM5PR07MB3435.namprd07.prod.outlook.com ([fe80::801e:fde0:da7d:191f%6]) with mapi id 15.20.2900.015; Thu, 9 Apr 2020 18:16:45 +0000 From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Siyuan Fu , Maciej Rabeda , Jiaxin Wu Subject: [PATCH v1 1/1] NetworkPkg/SnpDxe: Register SnpNotifyExitBootServices at TPL_CALLBACK Date: Thu, 9 Apr 2020 11:16:20 -0700 Message-ID: X-Mailer: git-send-email 2.16.3.windows.1 X-ClientProxiedBy: MWHPR1601CA0019.namprd16.prod.outlook.com (2603:10b6:300:da::29) To DM5PR07MB3435.namprd07.prod.outlook.com (2603:10b6:4:67::14) Return-Path: michael.kubacki@outlook.com X-Microsoft-Original-Message-ID: <20200409181620.66528-1-michael.kubacki@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (2001:4898:80e8:8:8d89:fb63:eff8:db5d) by MWHPR1601CA0019.namprd16.prod.outlook.com (2603:10b6:300:da::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.19 via Frontend Transport; Thu, 9 Apr 2020 18:16:44 +0000 X-Mailer: git-send-email 2.16.3.windows.1 X-Microsoft-Original-Message-ID: <20200409181620.66528-1-michael.kubacki@outlook.com> X-TMN: [e6wZ25FG5EwrChQNKMB84R0/ZEC8C7OwxdwCrbSEmnNnpHhrtKSpqY9VO8JrukLr] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 47 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 5ce491f3-31ba-416f-5825-08d7dcb228fb X-MS-TrafficTypeDiagnostic: MW2NAM10HT036: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kJVd3ZA98ovCeLxpf6Zy8Q5X6Y8gGWZJUxlCKE/13+mMefbAjojhDIBzZVb1teHYRJP8yFsMdCjEOeeyzXNgwZtizAX6r04Hiltu8tf3cvU1QafB+exYz6Xcxl1kYuPbRc8dpzMzmGnf7zKaeJYEDdgKoQ97skMuoJNX5JAFry2PUoMYDgvMG5W3WJcZJSIofE1rmOIkZlNSDC0POYB38Zh3ce1pOnc4n7aXox0kwLY= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:DM5PR07MB3435.namprd07.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; X-MS-Exchange-AntiSpam-MessageData: nwu1QfRls6GhQFEQyxveZvtXdtYSxM0tlv2p8F20iAesn2A4G6uWQ39svGXeCpc9iaah8wLtoC7JHABU/egiHOW7wLvWVyNbKFLybD3M0Y4jg06tF1+r0VxoSZ8ywZtAKUbVxp/+GjQ0RmnGw7kvP6FhY9wpCQ8L6Gb923evfesC3mg2/2S+fW2wzQOTopUYy7NvFghaPLxzcX7aPofo5w== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5ce491f3-31ba-416f-5825-08d7dcb228fb X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2020 18:16:44.9012 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2NAM10HT036 Content-Type: text/plain From: Michael Kubacki REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1562 The current SnpDxe implementation registers its ExitBootServices event notification function (SnpNotifyExitBootServices ()) at TPL_NOTIFY. This function calls PxeShutdown() which issues an UNDI shutdown operation. Ultimately, this may invoke Shutdown() in EFI_SIMPLE_NETWORK_PROTOCOL. The UEFI specification 2.8A Table 27 "TPL Restrictions" restricts the TPL for Simple Network Protocol to <= TPL_CALLBACK. In addition, it has been observed in some 3rd party UNDI drivers to cause an issue further down the call stack if the TPL is higher than TPL_CALLBACK on invocation. Therefore, this commit changes the TPL of SnpNotifyExitBootServices() to TPL_CALLBACK. Cc: Siyuan Fu Cc: Maciej Rabeda Cc: Jiaxin Wu Signed-off-by: Michael Kubacki --- NetworkPkg/SnpDxe/Snp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NetworkPkg/SnpDxe/Snp.c b/NetworkPkg/SnpDxe/Snp.c index 078b27cf5edd..fe022e16eacc 100644 --- a/NetworkPkg/SnpDxe/Snp.c +++ b/NetworkPkg/SnpDxe/Snp.c @@ -2,6 +2,7 @@ Implementation of driver entry point and driver binding protocol. Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+Copyright (c) Microsoft Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -653,7 +654,7 @@ SimpleNetworkDriverStart ( // Status = gBS->CreateEventEx ( EVT_NOTIFY_SIGNAL, - TPL_NOTIFY, + TPL_CALLBACK, SnpNotifyExitBootServices, Snp, &gEfiEventExitBootServicesGuid, -- 2.16.3.windows.1