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.22; 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-oln040092067022.outbound.protection.outlook.com [40.92.67.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 40E8820945D88 for ; Tue, 8 May 2018 16:25:49 -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=UBdWajencUXr44whfzRO0UqibVgYWt1nCRtMlrxvICU=; b=iqQY8ZX1CR9TRTJ15G5VodCse0bF30GQ0/ooHkrzeAa2GsNekXbC+6IVcfLmMSS5R6Ch7Bzh0uwXHpaqZoRiidqfIHrp4uxAdRD225yGQDCC0xBeqfC1Iiq0VwSZbZVU/GBeIejklA4MQYc1RW6vmtS9NskK420JbVGOWSHwtT5LRlZ9hmMEur7Q/W7sh7mFSOHIWDIxw0WyGS4owER574zx4QbF6V8xdOmUWDAm5JNnW/aSsAa3lD+OvdwTJFjL3LMa9fXDmPului6ZTeBIEIAcqfMRNSGO8YgDIbmK8xvFRR1/F940y+Rd7Sp4+pUHgMiIgKzU2yu37HEV6Xhwug== Received: from HE1EUR02FT024.eop-EUR02.prod.protection.outlook.com (10.152.10.58) by HE1EUR02HT242.eop-EUR02.prod.protection.outlook.com (10.152.11.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.735.16; Tue, 8 May 2018 23:25:47 +0000 Received: from VI1PR0801MB1790.eurprd08.prod.outlook.com (10.152.10.56) by HE1EUR02FT024.mail.protection.outlook.com (10.152.10.181) 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; Tue, 8 May 2018 23:25:47 +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.0755.012; Tue, 8 May 2018 23:25:46 +0000 From: =?iso-8859-1?Q?Marvin_H=E4user?= To: "edk2-devel@lists.01.org" CC: "star.zeng@intel.com" , "eric.dong@intel.com" , "ruiyu.ni@intel.com" Thread-Topic: [PATCH 1/2] MdeModulePkg: Add PlatformAcpiLib LibraryClass. Thread-Index: AQHT5yPk+OtHJaVgR0WrYxIFBUV3Iw== Date: Tue, 8 May 2018 23:25:46 +0000 Message-ID: Accept-Language: de-DE, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM0PR02CA0006.eurprd02.prod.outlook.com (2603:10a6:208:3e::19) To VI1PR0801MB1790.eurprd08.prod.outlook.com (2603:10a6:800:5b::15) x-incomingtopheadermarker: OriginalChecksum:633D6EBB2B06B40D3C55CDA6E0A90818606227A5F2CCB0D168A81D0B91D1AC15; UpperCasedChecksum:62F9D59BD412AA816FCD7D337C6AD43D1F9E2FD417E1395E2776AF20A7110133; SizeAsReceived:7497; Count:48 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [Rv+Xg4VtucP5OfjRq6AIjXtn0pTAy/4T] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; HE1EUR02HT242; 7:cd6nJ2THcorZNUUWOQ317LP53KtSiylfbcd6I+D2dMMgUEkGjt4fIzXZQkTXdHBVXLlvAWzWUsGXKYuJZORd680EEOxbA6Ix6qjwdGsHgX+jmJGMJPqIspAFwxHKqkvoroHTyMAxZfqjzFDSx44E/Ecp9av6HfNnYM3a1YGYEzMGogWr8j8pcV6HGq5TLqiIPKtJAKAznXip3cOe4EzFrQi+Xljn90Aen+8Kl9sI8GvPesoRUogTDQPB8RurLKOR x-incomingheadercount: 48 x-eopattributedmessage: 0 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1603101448)(1601125420)(1701031045); SRVR:HE1EUR02HT242; x-ms-traffictypediagnostic: HE1EUR02HT242: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(444000031); SRVR:HE1EUR02HT242; BCL:0; PCL:0; RULEID:; SRVR:HE1EUR02HT242; x-forefront-prvs: 0666E15D35 x-forefront-antispam-report: SFV:NSPM; SFS:(7070007)(199004)(189003)(386003)(53376002)(6436002)(6346003)(25786009)(5640700003)(82202002)(102836004)(4326008)(87572001)(2900100001)(55016002)(6306002)(476003)(7696005)(486006)(59450400001)(6916009)(20460500001)(81156014)(8676002)(15188155005)(74316002)(16799955002)(426003)(105586002)(8936002)(5660300001)(305945005)(106356001)(104016004)(86362001)(54906003)(14454004)(3280700002)(68736007)(2351001)(33656002)(99286004)(97736004)(72206003)(575784001)(26005)(2501003)(966005)(3660700001)(5250100002); DIR:OUT; SFP:1901; SCL:1; SRVR:HE1EUR02HT242; H:VI1PR0801MB1790.eurprd08.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:; received-spf: None (protection.outlook.com: outlook.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Marvin.Haeuser@outlook.com; x-microsoft-antispam-message-info: 6Roc54MSk5uAoY870fnjgl2Zek1ybGodKtaaItGc6jIUyTVRXshl92UtnXMJ8qVrvjzN4T7PMIvpiApRtua9+l/NRNB7nZ34XIzLCa9G6euK7NPqe9k6DYpdu3PZHUNxeXpztYuaUblGcTo4Hqg/ZYQlNoBG9E6dgCAJUqi3twFrLR3/ODe/d25L4QTKUiy0 MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 9ad9dba2-2d8e-4423-25fe-08d5b53b0683 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 7181d4b0-87d6-4f4e-ba33-0d3746212cec X-MS-Exchange-CrossTenant-Network-Message-Id: 9ad9dba2-2d8e-4423-25fe-08d5b53b0683 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 7181d4b0-87d6-4f4e-ba33-0d3746212cec X-MS-Exchange-CrossTenant-originalarrivaltime: 08 May 2018 23:25:46.8968 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR02HT242 Subject: [PATCH 1/2] MdeModulePkg: Add PlatformAcpiLib LibraryClass. 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: Tue, 08 May 2018 23:25:50 -0000 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable PlatformAcpiLib can be consumed by the generic ACPI Platform driver to allow platform specific updates to the ACPI tables loaded from the configured Firmware Volume. This allows for more platforms to incorporate the generic ACPI Platform driver. This commit also provides a NULL implementation of PlatformAcpiLib. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marvin Haeuser --- MdeModulePkg/Library/BasePlatformAcpiLibNull/BasePlatformAcpiLibNull.c |= 36 ++++++++++++++++++++ MdeModulePkg/Include/Library/PlatformAcpiLib.h |= 36 ++++++++++++++++++++ MdeModulePkg/Library/BasePlatformAcpiLibNull/BasePlatformAcpiLibNull.inf |= 35 +++++++++++++++++++ MdeModulePkg/Library/BasePlatformAcpiLibNull/BasePlatformAcpiLibNull.uni |= 18 ++++++++++ MdeModulePkg/MdeModulePkg.dec |= 4 +++ MdeModulePkg/MdeModulePkg.dsc |= 2 ++ 6 files changed, 131 insertions(+) diff --git a/MdeModulePkg/Library/BasePlatformAcpiLibNull/BasePlatformAcpiL= ibNull.c b/MdeModulePkg/Library/BasePlatformAcpiLibNull/BasePlatformAcpiLib= Null.c new file mode 100644 index 000000000000..5d5d0d051e1b --- /dev/null +++ b/MdeModulePkg/Library/BasePlatformAcpiLibNull/BasePlatformAcpiLibNull.= c @@ -0,0 +1,36 @@ +/** @file + Null Platform ACPI Library instance. + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made availabl= e under=20 +the terms and conditions of the BSD License that accompanies this distribu= tion. =20 +The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php. = =20 + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, = =20 +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLI= ED. + +**/ + +#include + +#include + +/** + Performs platform specific updates to CurrentTable. + + @param[in,out] CurrentTable The table to perform updates on. + + @retval RETURN_SUCCESS The platform specific ACPI table updates were ap= plied + successfully. + @retval other The platform specific ACPI table updates could n= ot be + applied. + =20 +**/ +RETURN_STATUS +PlatformAcpiUpdateTable ( + IN OUT EFI_ACPI_COMMON_HEADER *CurrentTable + ) +{ + return RETURN_SUCCESS; +} diff --git a/MdeModulePkg/Include/Library/PlatformAcpiLib.h b/MdeModulePkg/= Include/Library/PlatformAcpiLib.h new file mode 100644 index 000000000000..a3e367f3ab61 --- /dev/null +++ b/MdeModulePkg/Include/Library/PlatformAcpiLib.h @@ -0,0 +1,36 @@ +/** @file + Platform ACPI library. Platform can provide an implementation of this + library class to provide an ACPI table update routine that may be requir= ed + for some type of platform initialization. + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made availabl= e under=20 +the terms and conditions of the BSD License that accompanies this distribu= tion. =20 +The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php. = =20 + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, = =20 +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLI= ED. + +**/ + +#ifndef __PLATFORM_ACPI_LIB__ +#define __PLATFORM_ACPI_LIB__ + +/** + Performs platform specific updates to CurrentTable. + + @param[in,out] CurrentTable The table to perform updates on. + + @retval RETURN_SUCCESS The platform specific ACPI table updates were ap= plied + successfully. + @retval other The platform specific ACPI table updates could n= ot be + applied. + =20 +**/ +RETURN_STATUS +PlatformAcpiUpdateTable ( + IN OUT EFI_ACPI_COMMON_HEADER *CurrentTable + ); + +#endif // __PLATFORM_ACPI_LIB__ diff --git a/MdeModulePkg/Library/BasePlatformAcpiLibNull/BasePlatformAcpiL= ibNull.inf b/MdeModulePkg/Library/BasePlatformAcpiLibNull/BasePlatformAcpiL= ibNull.inf new file mode 100644 index 000000000000..a548ecdd91a7 --- /dev/null +++ b/MdeModulePkg/Library/BasePlatformAcpiLibNull/BasePlatformAcpiLibNull.= inf @@ -0,0 +1,35 @@ +## @file +# Null Platform ACPI Library instance. +# +# Copyright (c) 2018, Intel Corporation. All rights reserved.
+# +# This program and the accompanying materials +# are licensed and made available under the terms and conditions of the B= SD License +# which accompanies this distribution. The full text of the license may b= e found at +# http://opensource.org/licenses/bsd-license.php +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IM= PLIED. +# +## + +[Defines] + INF_VERSION =3D 0x00010005 + BASE_NAME =3D BasePlatformAcpiLibNull + MODULE_UNI_FILE =3D BasePlatformAcpiLibNull.uni + FILE_GUID =3D 0957C6BA-0559-46E8-8180-CD0317F0AEE7 + MODULE_TYPE =3D BASE + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D PlatformAcpiLib + +# +# The following information is for reference only and not required by the = build tools. +# +# VALID_ARCHITECTURES =3D IA32 X64 IPF EBC +# + +[Sources] + BasePlatformAcpiLibNull.c + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec diff --git a/MdeModulePkg/Library/BasePlatformAcpiLibNull/BasePlatformAcpiL= ibNull.uni b/MdeModulePkg/Library/BasePlatformAcpiLibNull/BasePlatformAcpiL= ibNull.uni new file mode 100644 index 000000000000..d709a3cad8b5 --- /dev/null +++ b/MdeModulePkg/Library/BasePlatformAcpiLibNull/BasePlatformAcpiLibNull.= uni @@ -0,0 +1,18 @@ +// /** @file +// Null Platform ACPI Library instance. +// +// Null Platform ACPI Library instance. +// +// Copyright (c) 2018, Intel Corporation. All rights reserved.
+// +// This program and the accompanying materials +// are licensed and made available under the terms and conditions of the B= SD License +// which accompanies this distribution. The full text of the license may b= e found at +// http://opensource.org/licenses/bsd-license.php +// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IM= PLIED. +// +// **/ + +#string STR_MODULE_ABSTRACT #language en-US "Null Platform ACPI Librar= y instance" +#string STR_MODULE_DESCRIPTION #language en-US "Null Platform ACPI Librar= y instance." diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index cc397185f7b9..8e3d392b3314 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -93,6 +93,10 @@ [LibraryClasses] # DebugAgentLib|Include/Library/DebugAgentLib.h =20 + ## @libraryclass Provide platform specific ACPI Table update functions= . + # + PlatformAcpiLib|Include/Library/PlatformAcpiLib.h + ## @libraryclass Provide platform specific hooks. # PlatformHookLib|Include/Library/PlatformHookLib.h diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc index ec24a50c7d0a..b18506a9af9c 100644 --- a/MdeModulePkg/MdeModulePkg.dsc +++ b/MdeModulePkg/MdeModulePkg.dsc @@ -91,6 +91,7 @@ [LibraryClasses] PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeC= offExtraActionLibNull.inf PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibN= ull.inf DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.i= nf + PlatformAcpiLib|MdeModulePkg/Library/BasePlatformAcpiLibNull/BasePlatfor= mAcpiLibNull.inf PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatfor= mHookLibNull.inf ResetSystemLib|MdeModulePkg/Library/BaseResetSystemLibNull/BaseResetSyst= emLibNull.inf SmbusLib|MdePkg/Library/DxeSmbusLib/DxeSmbusLib.inf @@ -300,6 +301,7 @@ [Components] MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/RuntimeDxeReportStatu= sCodeLib.inf MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf + MdeModulePkg/Library/BasePlatformAcpiLibNull/BasePlatformAcpiLibNull.inf MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatformHookLibNull.inf MdeModulePkg/Library/DxeDebugPrintErrorLevelLib/DxeDebugPrintErrorLevelL= ib.inf MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf --=20 2.17.0.windows.1