From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=40.107.15.44; helo=eur01-db5-obe.outbound.protection.outlook.com; envelope-from=sami.mujawar@arm.com; receiver=edk2-devel@lists.01.org Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150044.outbound.protection.outlook.com [40.107.15.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id ACF8D2194EB7D for ; Tue, 26 Mar 2019 08:23:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MKlpLB5/RRWHJm4ggF5C8BigEbiT6hvsy1qP1rwwapM=; b=EHSZf3zq9vcH8dSbvXULIacP1wJOYGUWPmdpRtb5x2iLiY9l0IUP8DFzkfvEwLStM8JJNpfeNKd0fgU7x4hm69mvCIPibX79KUkN9xSiIjvcrTj0fvMQIwX7zvRvSsO+DmFNgZhwXfILy2onROGt8CRf6nBaf5sUl7T7kYdLIac= Received: from DB7PR08CA0022.eurprd08.prod.outlook.com (2603:10a6:5:16::35) by AM0PR08MB4449.eurprd08.prod.outlook.com (2603:10a6:208:143::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1730.18; Tue, 26 Mar 2019 15:23:50 +0000 Received: from AM5EUR03FT025.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::209) by DB7PR08CA0022.outlook.office365.com (2603:10a6:5:16::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1750.15 via Frontend Transport; Tue, 26 Mar 2019 15:23:49 +0000 Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; lists.01.org; dkim=none (message not signed) header.d=none;lists.01.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; Received: from nebula.arm.com (40.67.248.234) by AM5EUR03FT025.mail.protection.outlook.com (10.152.16.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.1730.9 via Frontend Transport; Tue, 26 Mar 2019 15:23:49 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1415.2; Tue, 26 Mar 2019 15:23:33 +0000 Received: from E107187.Arm.com (10.1.195.55) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Tue, 26 Mar 2019 15:23:32 +0000 From: Sami Mujawar To: CC: Sami Mujawar , , , , , , , Date: Tue, 26 Mar 2019 15:23:17 +0000 Message-ID: <20190326152319.15036-3-sami.mujawar@arm.com> X-Mailer: git-send-email 2.11.0.windows.3 In-Reply-To: <20190326152319.15036-1-sami.mujawar@arm.com> References: <20190326152319.15036-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:40.67.248.234; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(396003)(346002)(39860400002)(376002)(136003)(2980300002)(189003)(199004)(8936002)(478600001)(486006)(50466002)(77096007)(44832011)(36756003)(126002)(72206003)(26005)(6916009)(86362001)(2906002)(356004)(11346002)(6666004)(47776003)(53936002)(186003)(48376002)(5660300002)(14444005)(1076003)(68736007)(81156014)(81166006)(8676002)(2351001)(106466001)(53416004)(426003)(50226002)(76176011)(305945005)(106002)(476003)(446003)(316002)(54906003)(51416003)(2616005)(16586007)(7696005)(97736004)(4326008)(336012); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR08MB4449; H:nebula.arm.com; FPR:; SPF:Pass; LANG:en; PTR:InfoDomainNonexistent; MX:1; A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6943c0a4-41a8-4088-2995-08d6b1ff0c32 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600127)(711020)(4605104)(4709054)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060); SRVR:AM0PR08MB4449; X-MS-TrafficTypeDiagnostic: AM0PR08MB4449: NoDisclaimer: True X-Microsoft-Antispam-PRVS: X-Forefront-PRVS: 09888BC01D X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: Xm2AWs72dWbUzoNVwYgJMuAa8KgrI/EY/gJdqSZBvftGRWU6jJtm3cqlAvRU1ONB+0mxdHlNYMFIQxHgGkqNQj0raepf3NsGc+L2DYgxJjZwkCDM8FjLabWNZFV3JJVBOL5yEaHjHlJYRAnHHxpsGc0y72+36AL/kaz5/WduBM2linMb3yMK0Ux3PNt0ukzEsvnni7i/um4a1RdCxP2OfIDBeml1snudovT2TqQcwGs3sHDjflb46D+oXRUpFVVIIQaonKNOEIz24VHRo6m+yBG9D0c9nNYlWrpxMvOoWE3rkzTNJ772Rr2iykqOzfSMPB3Kq9XgmSM687AnoPy5nwJIoKc5qTpSz1kmXMw8WZlWenpc7vW0Se2TLjsROJjDsSnMlzoXTWFeC82hhqu/c1CLRuzvjgiITTdw58JsmJo= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Mar 2019 15:23:49.7873 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6943c0a4-41a8-4088-2995-08d6b1ff0c32 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[40.67.248.234]; Helo=[nebula.arm.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4449 Subject: [PATCH edk2-platforms v4 2/4] Platform/ARM: Dynamic Tables support for Juno X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 15:23:53 -0000 X-List-Received-Date: Tue, 26 Mar 2019 15:23:53 -0000 X-List-Received-Date: Tue, 26 Mar 2019 15:23:53 -0000 X-List-Received-Date: Tue, 26 Mar 2019 15:23:53 -0000 X-List-Received-Date: Tue, 26 Mar 2019 15:23:53 -0000 X-List-Received-Date: Tue, 26 Mar 2019 15:23:53 -0000 X-List-Received-Date: Tue, 26 Mar 2019 15:23:53 -0000 X-List-Received-Date: Tue, 26 Mar 2019 15:23:53 -0000 X-List-Received-Date: Tue, 26 Mar 2019 15:23:53 -0000 X-List-Received-Date: Tue, 26 Mar 2019 15:23:53 -0000 X-List-Received-Date: Tue, 26 Mar 2019 15:23:53 -0000 X-List-Received-Date: Tue, 26 Mar 2019 15:23:53 -0000 Content-Type: text/plain The dynamic tables framework uses the platform hardware information described by the configuration manager to generate ACPI tables. This support is configurable and can be enabled using the DYNAMIC_TABLES_FRAMEWORK build option. When DYNAMIC_TABLES_FRAMEWORK is defined, ACPI tables are generated and installed by the dynamic table framework. Therefore, installation of ACPI tables from the Firmware Volume (FV) is disabled by this option. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar --- Platform/ARM/JunoPkg/ArmJuno.dsc | 12 +++++++++++- Platform/ARM/JunoPkg/ArmJuno.fdf | 12 ++++++++++++ Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c | 9 +++++++-- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/Platform/ARM/JunoPkg/ArmJuno.dsc b/Platform/ARM/JunoPkg/ArmJuno.dsc index 3edde5b65be47fe14988940ce2ef31a60f38dd31..a355c1e1d983339b3b461eddbf60e4a31888a361 100644 --- a/Platform/ARM/JunoPkg/ArmJuno.dsc +++ b/Platform/ARM/JunoPkg/ArmJuno.dsc @@ -33,6 +33,11 @@ [Defines] # On RTSM, most peripherals are VExpress Motherboard peripherals !include Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc +!ifdef DYNAMIC_TABLES_FRAMEWORK +!include DynamicTablesPkg/DynamicTables.dsc.inc +!include Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManager.dsc.inc +!endif + [LibraryClasses.common] ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf @@ -79,6 +84,10 @@ [LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.UEFI_APPLICATION, Libr [BuildOptions] GCC:*_*_ARM_PLATFORM_FLAGS = -march=armv8-a +!ifdef DYNAMIC_TABLES_FRAMEWORK + *_*_*_PLATFORM_FLAGS = -DDYNAMIC_TABLES_FRAMEWORK +!endif + ################################################################################ # # Pcd Section - list of all EDK II PCD Entries defined by this Platform @@ -266,8 +275,9 @@ [Components.common] # ACPI Support # MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf +!ifndef DYNAMIC_TABLES_FRAMEWORK Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf - +!endif MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf ArmPkg/Drivers/ArmGic/ArmGicDxe.inf diff --git a/Platform/ARM/JunoPkg/ArmJuno.fdf b/Platform/ARM/JunoPkg/ArmJuno.fdf index 0a8b636d0ebd10a7bceb3cbe6ca1bed8688da1a6..b1295a579b094db1433898589a282702ec854bfb 100644 --- a/Platform/ARM/JunoPkg/ArmJuno.fdf +++ b/Platform/ARM/JunoPkg/ArmJuno.fdf @@ -114,7 +114,17 @@ [FV.FvMain] # ACPI Support # INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf +!ifndef DYNAMIC_TABLES_FRAMEWORK INF RuleOverride=ACPITABLE Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf +!else + # Configuration Manager + INF Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerDxe.inf + + # + # Dynamic Table fdf + # + !include DynamicTablesPkg/DynamicTables.fdf.inc +!endif INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf @@ -378,8 +388,10 @@ [Rule.Common.UEFI_APPLICATION.BINARY] VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) } +!ifndef DYNAMIC_TABLES_FRAMEWORK [Rule.Common.USER_DEFINED.ACPITABLE] FILE FREEFORM = $(NAMED_GUID) { RAW ACPI |.acpi RAW ASL |.aml } +!endif diff --git a/Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c b/Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c index 18491c7378523f365644658c270de95e711c5ac1..0a42d21d4e9b60824f1d313a4d5ad9e4bc6db3aa 100644 --- a/Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c +++ b/Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c @@ -1,6 +1,6 @@ /** @file * -* Copyright (c) 2013-2015, ARM Limited. All rights reserved. +* Copyright (c) 2013-2017, ARM Limited. All rights reserved. * * This program and the accompanying materials * are licensed and made available under the terms and conditions of the BSD License @@ -33,9 +33,10 @@ #include #include - +#ifndef DYNAMIC_TABLES_FRAMEWORK // This GUID must match the FILE_GUID in ArmPlatformPkg/ArmJunoPkg/AcpiTables/AcpiTables.inf STATIC CONST EFI_GUID mJunoAcpiTableFile = { 0xa1dd808e, 0x1e95, 0x4399, { 0xab, 0xc0, 0x65, 0x3c, 0x82, 0xe8, 0x53, 0x0c } }; +#endif typedef struct { ACPI_HID_DEVICE_PATH AcpiDevicePath; @@ -487,11 +488,13 @@ ArmJunoEntryPoint ( GetJunoRevision(JunoRevision); +#ifndef DYNAMIC_TABLES_FRAMEWORK // // Try to install the ACPI Tables // Status = LocateAndInstallAcpiFromFv (&mJunoAcpiTableFile); ASSERT_EFI_ERROR (Status); +#endif // // Setup R1/R2 options if not already done. @@ -516,6 +519,7 @@ ArmJunoEntryPoint ( &EndOfDxeEvent ); +#ifndef DYNAMIC_TABLES_FRAMEWORK // Declare the related ACPI Tables EfiCreateProtocolNotifyEvent ( &gEfiAcpiTableProtocolGuid, @@ -524,6 +528,7 @@ ArmJunoEntryPoint ( NULL, &mAcpiRegistration ); +#endif } // -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'