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.88; helo=mga01.intel.com; envelope-from=jiewen.yao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 6DE60222D1543 for ; Wed, 3 Jan 2018 22:36:56 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jan 2018 22:41:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,506,1508828400"; d="scan'208";a="18872336" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga001.fm.intel.com with ESMTP; 03 Jan 2018 22:41:58 -0800 Received: from fmsmsx122.amr.corp.intel.com (10.18.125.37) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 3 Jan 2018 22:41:58 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx122.amr.corp.intel.com (10.18.125.37) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 3 Jan 2018 22:41:57 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.189]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.93]) with mapi id 14.03.0319.002; Thu, 4 Jan 2018 14:41:55 +0800 From: "Yao, Jiewen" To: "Zeng, Star" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH] IntelSiliconPkg IntelVTdDxe: Signal AcpiNotificationFunc() initially Thread-Index: AQHThQx7IHZH5vbhCUOSn2sfOxuedaNjRBSg Date: Thu, 4 Jan 2018 06:41:54 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503AA6FE3E@shsmsx102.ccr.corp.intel.com> References: <1515036670-18616-1-git-send-email-star.zeng@intel.com> In-Reply-To: <1515036670-18616-1-git-send-email-star.zeng@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZmYzYTk2MmItMDM1OS00ZWQ5LWEyODgtMjNhMGYyNzUzMzZjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJ4enV0Skd0c3oycTBnSVV6R2dSREZJR3hjZ2R3MCt1YTZxOTh2YXFPVzRLWW9Fa0lEWkg2cHNvQWoxZ2FhQ0RHIn0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] IntelSiliconPkg IntelVTdDxe: Signal AcpiNotificationFunc() initially X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 06:36:56 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jiewen.yao@intel.com > -----Original Message----- > From: Zeng, Star > Sent: Thursday, January 4, 2018 11:31 AM > To: edk2-devel@lists.01.org > Cc: Zeng, Star ; Yao, Jiewen > Subject: [PATCH] IntelSiliconPkg IntelVTdDxe: Signal AcpiNotificationFunc= () > initially >=20 > Signal AcpiNotificationFunc() initially for the case that > DMAR table has been installed when creating event. >=20 > Cc: Jiewen Yao > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Star Zeng > --- > IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.c | 16 > ++++++++++++---- > IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c | 3 +++ > 2 files changed, 15 insertions(+), 4 deletions(-) >=20 > diff --git a/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.c > b/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.c > index 37b3b19bce90..648f64c20b77 100644 > --- a/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.c > +++ b/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.c > @@ -1,6 +1,6 @@ > /** @file >=20 > - Copyright (c) 2017, Intel Corporation. All rights reserved.
> + Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.
> This program and the accompanying materials > are licensed and made available under the terms and conditions of the = BSD > License > which accompanies this distribution. The full text of the license may= be > found at > @@ -473,7 +473,8 @@ InitializeDmaProtection ( > EFI_STATUS Status; > EFI_EVENT ExitBootServicesEvent; > EFI_EVENT LegacyBootEvent; > - EFI_EVENT Event; > + EFI_EVENT EventAcpi10; > + EFI_EVENT EventAcpi20; >=20 > Status =3D gBS->CreateEventEx ( > EVT_NOTIFY_SIGNAL, > @@ -481,7 +482,7 @@ InitializeDmaProtection ( > AcpiNotificationFunc, > NULL, > &gEfiAcpi10TableGuid, > - &Event > + &EventAcpi10 > ); > ASSERT_EFI_ERROR (Status); >=20 > @@ -491,10 +492,17 @@ InitializeDmaProtection ( > AcpiNotificationFunc, > NULL, > &gEfiAcpi20TableGuid, > - &Event > + &EventAcpi20 > ); > ASSERT_EFI_ERROR (Status); >=20 > + // > + // Signal the events initially for the case > + // that DMAR table has been installed. > + // > + gBS->SignalEvent (EventAcpi20); > + gBS->SignalEvent (EventAcpi10); > + > Status =3D gBS->CreateEventEx ( > EVT_NOTIFY_SIGNAL, > TPL_CALLBACK, > diff --git a/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c > b/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c > index ce350bafbe3f..b16bd93d53f1 100644 > --- a/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c > +++ b/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c > @@ -1005,6 +1005,9 @@ GetDmarAcpiTable ( > &AcpiTable > ); > } > + if (EFI_ERROR (Status)) { > + return EFI_NOT_FOUND; > + } > ASSERT (AcpiTable !=3D NULL); >=20 > mAcpiDmarTable =3D FindAcpiPtr ( > -- > 2.7.0.windows.1