From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=40.92.67.79; helo=eur02-am5-obe.outbound.protection.outlook.com; envelope-from=marvin.haeuser@outlook.com; receiver=edk2-devel@lists.01.org Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-oln040092067079.outbound.protection.outlook.com [40.92.67.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E15882096106F for ; Mon, 7 May 2018 01:49:24 -0700 (PDT) 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; bh=NYMaekfkNO/DXZ01gxsXjQVuQok0y5sA3AuvDRwdl1k=; b=r0MahIRcEdm02ivnB1XKdttpQehQMcrmWjLU9duNVC9EIPrXT+M3uFt7m8kUsmwnfkbq2n325TpIGBUdU6iKleVu6v7oSMPLGsm7AdbppJohkipHNz93sYvlJaF5LezgHYQ6VoZ9VeYY/M2/v7JVDYek3AzqAghhEVULMrOL/VJik25ELJul9b/Om9GUA6ZGQb7SEoieFxMZztPq/mrnIwtLPZg+RNAfRHiW+TE+FK4a8ANotMv8PeeSpZpZSFWad6SJYuQCLFP8tOvSoCf+YLH3ZKvEcZdu8jzOQWY9VQuNJXllWYVnvIAeKbJn8mosV+djovvzYre7y72ykhq/FQ== Received: from AM5EUR02FT040.eop-EUR02.prod.protection.outlook.com (10.152.8.52) by AM5EUR02HT030.eop-EUR02.prod.protection.outlook.com (10.152.9.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.735.16; Mon, 7 May 2018 08:49:22 +0000 Received: from VI1PR0801MB1790.eurprd08.prod.outlook.com (10.152.8.53) by AM5EUR02FT040.mail.protection.outlook.com (10.152.9.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.20.735.16 via Frontend Transport; Mon, 7 May 2018 08:49:22 +0000 Received: from VI1PR0801MB1790.eurprd08.prod.outlook.com ([fe80::7c79:584b:2e12:783e]) by VI1PR0801MB1790.eurprd08.prod.outlook.com ([fe80::7c79:584b:2e12:783e%17]) with mapi id 15.20.0715.024; Mon, 7 May 2018 08:49:22 +0000 From: =?iso-8859-1?Q?Marvin_H=E4user?= To: "edk2-devel@lists.01.org" CC: "Zeng, Star" Thread-Topic: [PATCH] MdeModulePkg/AcpiPlatformDxe: Unload after execution. Thread-Index: AdPl4EaaNLFuMTjTROmvCkEZ5LJxsQ== Date: Mon, 7 May 2018 08:49:22 +0000 Message-ID: Accept-Language: de-DE, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:BE48E4F32A99350CA4220325AEA9712E340B8F8FEA104A4DF147290D0D7104F6; UpperCasedChecksum:DB13ED6B5B69854025DCD48A32CD4102F705417C1301204707904B846EA8867B; SizeAsReceived:6951; Count:44 x-tmn: [OuC2CfFbjP/e1yFBwC0IoUDbm7S6ycdL] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM5EUR02HT030; 7:2D1adMRLS6hBCMdC29lVYa09u6bvDdZlcWID5C0+cZ90nTFD7KgoZ6az/H+0wwA4yA4uWrFMmp5eBv38ugT/nLVMdM6M8ZYMvdyUU1efdf8rjJyTq/6TNGjNGHZATtQMOwkYZ2OzNjbkrD049jrSmbIFRP2ilYwgmnvnerog4nbMtiFFgyboLcRtn2wUzer8tv/7kN8L0IvGdkFjFZrLBVhbjjNmf+aF6g6+ZQUp/mShnR4pc1WSlYC7isVapqKV x-incomingheadercount: 44 x-eopattributedmessage: 0 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1603101448)(1601125374)(1701031045); SRVR:AM5EUR02HT030; x-ms-traffictypediagnostic: AM5EUR02HT030: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(444000031); SRVR:AM5EUR02HT030; BCL:0; PCL:0; RULEID:; SRVR:AM5EUR02HT030; x-forefront-prvs: 066517B35B x-forefront-antispam-report: SFV:NSPM; SFS:(7070007)(98901004); DIR:OUT; SFP:1901; SCL:1; SRVR:AM5EUR02HT030; H:VI1PR0801MB1790.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:; x-microsoft-antispam-message-info: se7Q+c6d2L67ne4EbW42IDKsi7l5j56NDtJ2xd77LqdrIwPPD/AiS93/L6+NKUj+rmBqGvD/zRlFwed9UZd62g6aPdDgY/C+W9xzldjLUYeuqLqqkC6isAxGLSsdOp0OXewk5UHmMV1ijJyXWBj1tgw7vRxvXf01hZXxG2GH/v+APQhoz5EqJRL+zFExlWXL MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 03d551e5-e224-4611-94fd-08d5b3f76dd6 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 7181d4b0-87d6-4f4e-ba33-0d3746212cec X-MS-Exchange-CrossTenant-Network-Message-Id: 03d551e5-e224-4611-94fd-08d5b3f76dd6 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 7181d4b0-87d6-4f4e-ba33-0d3746212cec X-MS-Exchange-CrossTenant-originalarrivaltime: 07 May 2018 08:49:22.3397 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5EUR02HT030 Subject: Re: [PATCH] MdeModulePkg/AcpiPlatformDxe: Unload after execution. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 May 2018 08:49:25 -0000 Content-Language: de-DE Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sorry, I did not realize that error code was a thing. Sure, I will submit a V2 soon, thanks! Best regards, Marvin > -----Urspr=FCngliche Nachricht----- > Von: Zeng, Star > Gesendet: Montag, 7. Mai 2018 03:52 > An: Marvin.Haeuser@outlook.com; edk2-devel@lists.01.org > Cc: Dong, Eric ; Ni, Ruiyu ; Zen= g, > Star > Betreff: RE: [PATCH] MdeModulePkg/AcpiPlatformDxe: Unload after > execution. >=20 > It is a good change. :) >=20 > Only one minor comment. How about using EFI_REQUEST_UNLOAD_IMAGE > instead? >=20 >=20 > /// > /// If this value is returned by an EFI image, then the image should be > unloaded. > /// > #define EFI_REQUEST_UNLOAD_IMAGE DXE_ERROR (1) >=20 >=20 > Thanks, > Star > -----Original Message----- > From: Marvin H=E4user [mailto:Marvin.Haeuser@outlook.com] > Sent: Saturday, May 5, 2018 10:26 PM > To: edk2-devel@lists.01.org > Cc: Zeng, Star ; Dong, Eric ; N= i, > Ruiyu > Subject: [PATCH] MdeModulePkg/AcpiPlatformDxe: Unload after execution. >=20 > AcpiPlatformDxe solely performs one-time tasks and does not expose any > services or create any events. Hence it can safely be unloaded after the = Entry > Point execution by returning an error code. >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Marvin Haeuser > --- > MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatform.c | 7 +++++- > - > 1 file changed, 5 insertions(+), 2 deletions(-) >=20 > diff --git a/MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatform.c > b/MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatform.c > index 44bdd94fa8db..8772961bfd31 100644 > --- a/MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatform.c > +++ b/MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatform.c > @@ -1,7 +1,7 @@ > /** @file > Sample ACPI Platform Driver >=20 > - Copyright (c) 2008 - 2011, Intel Corporation. All rights reserved.
> + Copyright (c) 2008 - 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 @@ -255,6 +255,9 @@ AcpiPlatformEntryPoint ( > } > } >=20 > - return EFI_SUCCESS; > + // > + // Return an error code so that the driver is unloaded. > + // > + return EFI_ALREADY_STARTED; > } >=20 > -- > 2.17.0.windows.1