From nobody Mon Feb 9 17:36:13 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+64154+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1597309789722734.2022802134035; Thu, 13 Aug 2020 02:09:49 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id AAaDYY1788612x2QBT72GOVH; Thu, 13 Aug 2020 02:09:49 -0700 X-Received: from EUR04-HE1-obe.outbound.protection.outlook.com (EUR04-HE1-obe.outbound.protection.outlook.com [40.107.7.44]) by mx.groups.io with SMTP id smtpd.web11.6379.1597309787696783259 for ; Thu, 13 Aug 2020 02:09:48 -0700 X-Received: from AM5P194CA0018.EURP194.PROD.OUTLOOK.COM (2603:10a6:203:8f::28) by HE1PR0802MB2313.eurprd08.prod.outlook.com (2603:10a6:3:c5::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.16; Thu, 13 Aug 2020 09:09:44 +0000 X-Received: from AM5EUR03FT051.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:8f:cafe::ee) by AM5P194CA0018.outlook.office365.com (2603:10a6:203:8f::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.15 via Frontend Transport; Thu, 13 Aug 2020 09:09:44 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+64154+1787277+3901457@groups.io; helo=web01.groups.io; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT051.mail.protection.outlook.com (10.152.16.246) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.16 via Frontend Transport; Thu, 13 Aug 2020 09:09:44 +0000 X-Received: ("Tessian outbound 7fc8f57bdedc:v64"); Thu, 13 Aug 2020 09:09:44 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: a82bb2ab7e75687c X-CR-MTA-TID: 64aa7808 X-Received: from d166a7d3a04d.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id D868717B-BA25-4F34-8A97-7D8ACBDAF208.1; Thu, 13 Aug 2020 09:09:27 +0000 X-Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d166a7d3a04d.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 13 Aug 2020 09:09:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=giQSKZJH0rGELljbud+UUvw5pyyt4c+vSBac7MUv9A3WtIqMjO80NH7QaMPAlCag3KclIEUm76HTFgV2km/GSyYsZkbmWC0Xx6n6NGn6EUhP6WRVCkqTzPUSj+GHlY6HuLxtgWjTwPRK4e67y4QLIAy+1wPalEXo3mp/Tx843zwDGP7CujMK+qYheza4m0OBumla3HvTwAXg3ezUlNBP2xpNLKgyOO25SaMyXke9Wo2sORBHf/DL7clA5rO7B31kTK6R4T+6e1Rsh5rEyhqXPmMA9vgAjnm9ANz+pEDYMUDqVWR3LfzqOojU3m2BSDkAWerzfRVjMWEB6X4TLFc8Ag== 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=NxZScO86E13f4zc6KeRVskDOvpkjMMSFKjqOkbtsrbo=; b=iQzgHVrYnP6AUrhexPWRluOufYdPTz/OAqSwVR6MieYtf4hpFdCAlounwKa1vqjtS0FgmznmU4mj27IOCupBiNsfAMbzIUCcOidk0Vd+KNNV+d447sXzu/966JBAeqRRlGikJ7WdLXpzb2I9f1A2lqsuwBHMPNcS5pryGn1toKQ6s9kMulzI179FhgVVQh0mHApcActHXcRpTZJf0YEH7AGaQX1nfMFGrssepQIvX5OS3eDsRC2ocYiXYmOKrqksVT5ULmOasV7CtsAKE7gNDaS/eGiu4GpsjfYNS8Wbr3bU6tY9xpq8y6KBfCpH8qT9TyRYvkix8Rlc2eCklGh1qA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=bestguesspass action=none header.from=arm.com; dkim=none (message not signed); arc=none X-Received: from DB6PR1001CA0047.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:4:55::33) by HE1PR0801MB1996.eurprd08.prod.outlook.com (2603:10a6:3:54::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.22; Thu, 13 Aug 2020 09:09:25 +0000 X-Received: from DB5EUR03FT031.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:55:cafe::b8) by DB6PR1001CA0047.outlook.office365.com (2603:10a6:4:55::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.15 via Frontend Transport; Thu, 13 Aug 2020 09:09:25 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; 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; X-Received: from nebula.arm.com (40.67.248.234) by DB5EUR03FT031.mail.protection.outlook.com (10.152.20.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3283.16 via Frontend Transport; Thu, 13 Aug 2020 09:09:25 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2044.4; Thu, 13 Aug 2020 09:08:28 +0000 X-Received: from E107187.Arm.com (10.57.42.181) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2044.4 via Frontend Transport; Thu, 13 Aug 2020 09:08:28 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [edk2-devel] [PATCH edk2-platforms v1 5/7] Platform/ARM: FVP: Enable SSDT Serial generation Date: Thu, 13 Aug 2020 10:08:21 +0100 Message-ID: <20200813090823.69908-6-sami.mujawar@arm.com> In-Reply-To: <20200813090823.69908-1-sami.mujawar@arm.com> References: <20200813090823.69908-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0ca05af2-9ede-4661-2e27-08d83f689e88 X-MS-TrafficTypeDiagnostic: HE1PR0801MB1996:|HE1PR0802MB2313: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:7691;OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: QjOP95R6TegFYvtvGYRILUEZU4ukizZv6+XwVCik3vGS/ra9xHSOUa7F3cogsUFKkFpR0KxP4f4NDt6BjAFk8X1he8mmnjdnUd64wErt7RYH2/skTq6IoX681vwZlCGB0XpVYJiXNOGhZyuM7svJsWAUZiHripBvjd585JbCBi3pg8BBUjZxuvXx/RNvM9rS6pDg+o0FyRzp8jS83d/yTz/3Rk4+WoWXc3iJNVp6Byp4prrvIebk1p5IVCcGFETR4/wwf+N5u7zv19ZsTG5Nt8yLtai8bnOJ8na8RMpMbQBrXqmoxK1wMgy7qNDCPJeJhkRGxSqcaPnpldo+LcGMypVw8Sj3mQf6yGJZbUVJi/T1DhuJC3W+bALO5mTWcKaR+qJRq95JigO171prixcIAw== X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFTY:;SFS:(4636009)(39860400002)(376002)(346002)(136003)(396003)(46966005)(336012)(186003)(82310400002)(86362001)(7696005)(4326008)(36756003)(6666004)(2906002)(5660300002)(6916009)(2616005)(54906003)(8676002)(478600001)(1076003)(47076004)(70586007)(426003)(26005)(83380400001)(70206006)(316002)(8936002)(356005)(44832011)(82740400003)(81166007);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1996 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT051.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: a8db01c4-98df-4c4d-7267-08d83f689364 X-Microsoft-Antispam-Message-Info: wHPSjBFjm4ipv9g55MhLjEe5SXID4Zf+2OtojqsMis7p946d77uusNmek1ad1pI3eLc50dA7+FBdYYbLvKQV6hYBmSCzKLlP9XtCx2+83GBZHYzLRYoAoykCmSbyddJV1u5HGN7am8z5kDHLPt3Owrx6jkoL6NLYeNHZDHBZjq52vWmu/0Cl6uZJh8NO956fPl7PdHqSR/E/DMRa+FSgU1YX0dT7RTmsgO1XW9gc2GpY1GGClvUTM0DdMB0e31YxO6ORyp/wtWYzGliBHGG/uOlsLL8TDVLPAATzvLRYZ3j85cC8eAdSuhcw0JBK4nAha0JVbJPm8dxSJohMu+LNes9ROwjzii56KNjIPYOJ5581RZPDbGuJ+PbCeU9u87vyXzCPQK/s8wgV+HWzfw1uSA== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Aug 2020 09:09:44.1248 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0ca05af2-9ede-4661-2e27-08d83f689e88 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM5EUR03FT051.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0802MB2313 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sami.mujawar@arm.com X-Gm-Message-State: nBA9ihugn8baLd21M9QlH18Vx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1597309789; bh=YiJ5SnxLus50AhqM7bAEZ8qi2xxxs0O7pwOQqhjW7fk=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=frxYCh6XJtoef98S0n0vREnhGISzKczjlfvio/ra43MrQcn9I55yEnKu0sdCWwNEOKt Qom4KW+CJ5vQxMcbrLItA5rB1thcCSYj+2eCJ9hcV4MNJLnIFF1jPNeViZRftNDoUrf8H /6gSl9hD4iYzFJIZFD8TKWtjQLT44SMuG8o= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The SSDT Serial Port Generator queries the Configuration Manager for a list of serial port devices. It uses the SerialPortFixupLib to build SSDT AML tables describing the serial ports. The SerialPortFixupLib uses the AmlLib library interfaces to load a Serial Port AML template code and represents it as an AML tree. It then traverses the AML tree to locate and fixup the Base address and Interrupt information for the serial port devices. The AML tree is then serialized to a buffer representing the definition block which is returned as an ACPI SSDT table. The SSDT Serial Port Generator returns a list of SSDT AML tables representing the serial port devices to the Table Manager for installing. This patch enables dynamic SSDT Serial Port generation for FVP platform and adds support to the Configuration Manager to return the CM_ARM_SERIAL_PORT_INFO objects that represents the serial port devices on the platform. Change-Id: Icdae65887a7a53ac555dca964f9e1d3e43085517 Signed-off-by: Sami Mujawar --- Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/AslT= ables/Dsdt.asl | 25 ++------------ Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/Conf= igurationManager.c | 36 ++++++++++++++++++++ Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/Conf= igurationManager.h | 5 ++- 3 files changed, 43 insertions(+), 23 deletions(-) diff --git a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationMan= agerDxe/AslTables/Dsdt.asl b/Platform/ARM/VExpressPkg/ConfigurationManager/= ConfigurationManagerDxe/AslTables/Dsdt.asl index 9192a0070772209e5cec8d7d9a71ea7a9e10aa69..3475f976b59fc68384ed11f7de2= 3f552efe441e9 100644 --- a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe= /AslTables/Dsdt.asl +++ b/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe= /AslTables/Dsdt.asl @@ -1,8 +1,9 @@ /** @file Differentiated System Description Table Fields (DSDT) =20 - Copyright (c) 2014-2017, ARM Ltd. All rights reserved.
- SPDX-License-Identifier: BSD-2-Clause-Patent + Copyright (c) 2014-2020, Arm Ltd. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ =20 @@ -43,25 +44,5 @@ DefinitionBlock("DsdtTable.aml", "DSDT", 1, "ARMLTD", "A= RM-VEXP", 1) { Name(_HID, "ACPI0007") Name(_UID, 7) } - - // UART PL011 - Device(COM2) { - Name(_HID, "ARMH0011") - Name(_CID, "PL011") - Name(_UID, Zero) - - Method(_STA) { - Return(0xF) - } - - Method(_CRS, 0x0, NotSerialized) { - Name(RBUF, ResourceTemplate() { - Memory32Fixed(ReadWrite, 0x1c090000, 0x1000) - Interrupt(ResourceConsumer, Level, ActiveHigh, Exclusive) { 0x25= } - }) - Return (RBUF) - } - } - } // Scope(_SB) } diff --git a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationMan= agerDxe/ConfigurationManager.c b/Platform/ARM/VExpressPkg/ConfigurationMana= ger/ConfigurationManagerDxe/ConfigurationManager.c index 76ea46023250d244205a5d8bc715e6e49e37b673..d49da52634cf70228852e4351c5= 538b85aab60e0 100644 --- a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe= /ConfigurationManager.c +++ b/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe= /ConfigurationManager.c @@ -74,6 +74,13 @@ EDKII_PLATFORM_REPOSITORY_INFO VExpressPlatRepositoryInf= o =3D { EFI_ACPI_DBG2_DEBUG_DEVICE_INFORMATION_STRUCT_REVISION, CREATE_STD_ACPI_TABLE_GEN_ID (EStdAcpiTableIdDbg2), NULL + }, + // SSDT Serial Port Table + { + EFI_ACPI_6_3_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE, + 0, // Not used. + CREATE_STD_ACPI_TABLE_GEN_ID (EStdAcpiTableIdSsdtSerialPort), + NULL } }, =20 @@ -212,6 +219,28 @@ EDKII_PLATFORM_REPOSITORY_INFO VExpressPlatRepositoryI= nfo =3D { 0x1000 // BaseAddre= ssLen }, =20 + // Standard Serial Ports + { + // Serial Port - UART0 + { + 0x1C090000, // BaseAddre= ss + 37, // Interrupt + FixedPcdGet64 (PcdSerialDbgUartBaudRate), // BaudRate + FixedPcdGet32 (PcdSerialDbgUartClkInHz), // Clock + EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_ARM_PL011_UART, // Port subt= ype + 0x1000 // BaseAddre= ssLen + }, + // Serial Port - UART3 + { + 0x1C0C0000, // BaseAddre= ss + 40, // Interrupt + FixedPcdGet64 (PcdSerialDbgUartBaudRate), // BaudRate + FixedPcdGet32 (PcdSerialDbgUartClkInHz), // Clock + EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_ARM_PL011_UART, // Port subt= ype + 0x1000 // BaseAddre= ssLen + }, + }, + // GIC ITS { // The GIC ITS ID. @@ -457,6 +486,13 @@ GetArmNameSpaceObject ( 1 ); HANDLE_CM_OBJECT ( + EArmObjSerialPortInfo, + CmObjectId, + PlatformRepo->StdSerialPort, + (sizeof (PlatformRepo->StdSerialPort) / + sizeof (PlatformRepo->StdSerialPort[0])) + ); + HANDLE_CM_OBJECT ( EArmObjGicItsInfo, CmObjectId, PlatformRepo->GicItsInfo, diff --git a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationMan= agerDxe/ConfigurationManager.h b/Platform/ARM/VExpressPkg/ConfigurationMana= ger/ConfigurationManagerDxe/ConfigurationManager.h index 6fb959ab7ae2c77f750781d05660957488fae8cd..65561aa487dac95c1c870eb1092= 38cdc88213205 100644 --- a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe= /ConfigurationManager.h +++ b/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe= /ConfigurationManager.h @@ -114,7 +114,7 @@ extern CHAR8 dsdt_aml_code[]; =20 /** The number of ACPI tables to install */ -#define PLAT_ACPI_TABLE_COUNT 6 +#define PLAT_ACPI_TABLE_COUNT 7 =20 /** The number of platform generic timer blocks */ @@ -174,6 +174,9 @@ typedef struct PlatformRepositoryInfo { /// Serial port information for the DBG2 UART port CM_ARM_SERIAL_PORT_INFO DbgSerialPort; =20 + /// Standard Serial Ports + CM_ARM_SERIAL_PORT_INFO StdSerialPort[2]; + /// GIC ITS information CM_ARM_GIC_ITS_INFO GicItsInfo; } EDKII_PLATFORM_REPOSITORY_INFO; --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#64154): https://edk2.groups.io/g/devel/message/64154 Mute This Topic: https://groups.io/mt/76164193/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-