From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (EUR04-DB3-obe.outbound.protection.outlook.com [40.107.6.60]) by mx.groups.io with SMTP id smtpd.web12.9372.1597324089408454843 for ; Thu, 13 Aug 2020 06:08:09 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=xuGCp0Rv; spf=pass (domain: arm.com, ip: 40.107.6.60, mailfrom: sami.mujawar@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M8kZ8SK/Urz6wcbs8YWVm4jtjPXQtN7znAKeGu8WfqI=; b=xuGCp0RvNkXIPMfdNpW//g2Vb95q0JdMoSHnEycLfNzjZ5NUSgk43Pfx5+X2/cry6YWxZj1NfNWv1tSZGXt1dmmmH5kiOrVuFsEaewWj5rb0os/EUIn7kXNR3AmA8Hj53S5/YIveEWm4ovrvVP/MRlTjHWUP0p8zEJsgOHjQPbw= Received: from MRXP264CA0014.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:15::26) by AM6PR08MB3496.eurprd08.prod.outlook.com (2603:10a6:20b:4e::31) 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 13:08:06 +0000 Received: from VE1EUR03FT018.eop-EUR03.prod.protection.outlook.com (2603:10a6:500:15:cafe::ef) by MRXP264CA0014.outlook.office365.com (2603:10a6:500:15::26) 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 13:08:06 +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 (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; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT018.mail.protection.outlook.com (10.152.18.135) 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 13:08:06 +0000 Received: ("Tessian outbound e8cdb8c6f386:v64"); Thu, 13 Aug 2020 13:08:06 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: c9ce218d9134a953 X-CR-MTA-TID: 64aa7808 Received: from d5b3f43bd298.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id DB66BC25-1653-4176-AE99-C4F86C12C6AD.1; Thu, 13 Aug 2020 13:07:29 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d5b3f43bd298.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 13 Aug 2020 13:07:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VxLrxScVbYJG8lKkt3XJ62T7lxInDfwS9aMFPuZEOs9LYRd7GMgxpEOBtVw7ySf4kSX8qI1/vY+dbI3KZBdGufZjyJKxQOi6uFuXnXqwjzzJcqSrzaYV+8Gx9TQRwLiQPliTxxeCyp7FoS2itMPzRCyhi5II8Z3pN0KJHoDLBl3NeuuMLX+CGcxKiwNOQQtgmWt8MQezELo62mrKE6WYs3o5f3kGdPnvK2HR6PQn8IJWZEVWFm7oMxHjJXbCE/W6c8A6AmkyGmmGY7pOnEy/DrdQP3ldT+/Z+/IMS9NuYWBF2fEtrkcmtNYfJEpkA5hxa+YflL3pBzHoBov8XFnnfg== 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=M8kZ8SK/Urz6wcbs8YWVm4jtjPXQtN7znAKeGu8WfqI=; b=MAb0Ic8g63a4X4Te597SLSGI3dbFixKuCRh5jHfFq/v2+c/73S2hT5u4yeEJQtECs2uW1XGU1T2ezyHbvjaoJ1TJRieV8yhvZtJTxK4YXJBdKhbx4z1jk6FIV3+j0Y6uvkM4w0IHfMgoda60WikSiXR3Or2uBHN070moqn4/Om+DSmk9vis1FUJ5UnuwNPyI2eTPQ+vIiOeg3KNDroDVrTahdN94XarN3AUtjVX0/GJelMxr8rMM/MACljcPZCYxbK6e9bkdcpk/JJGfjpmgaKRtxnxueLVtWHU+evge8x8aOrSrWb+V4jwt46jZA94ZgbJA1YXpnUo2K7jIbwzuwQ== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M8kZ8SK/Urz6wcbs8YWVm4jtjPXQtN7znAKeGu8WfqI=; b=xuGCp0RvNkXIPMfdNpW//g2Vb95q0JdMoSHnEycLfNzjZ5NUSgk43Pfx5+X2/cry6YWxZj1NfNWv1tSZGXt1dmmmH5kiOrVuFsEaewWj5rb0os/EUIn7kXNR3AmA8Hj53S5/YIveEWm4ovrvVP/MRlTjHWUP0p8zEJsgOHjQPbw= Received: from AM0PR02CA0091.eurprd02.prod.outlook.com (2603:10a6:208:154::32) by AM0PR08MB3266.eurprd08.prod.outlook.com (2603:10a6:208:66::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.18; Thu, 13 Aug 2020 13:07:26 +0000 Received: from AM5EUR03FT004.eop-EUR03.prod.protection.outlook.com (2603:10a6:208:154:cafe::af) by AM0PR02CA0091.outlook.office365.com (2603:10a6:208:154::32) 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 13:07:26 +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; Received: from nebula.arm.com (40.67.248.234) by AM5EUR03FT004.mail.protection.outlook.com (10.152.16.163) 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 13:07:26 +0000 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 13:06:57 +0000 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 13:06:56 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [PATCH edk2-platforms v1-resend 5/7] Platform/ARM: FVP: Enable SSDT Serial generation Date: Thu, 13 Aug 2020 14:06:50 +0100 Message-ID: <20200813130652.43144-6-sami.mujawar@arm.com> X-Mailer: git-send-email 2.11.0.windows.3 In-Reply-To: <20200813130652.43144-1-sami.mujawar@arm.com> References: <20200813130652.43144-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: 8d8c81ed-40c6-4247-5a23-08d83f89eb66 X-MS-TrafficTypeDiagnostic: AM0PR08MB3266:|AM6PR08MB3496: 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: QyudYaPmV2qR/YOEvErk/DdgYRyD6euvdZEuRagrOahgyLlk1VexKK1fXC+ZG625s5gT2L43uSjfUPSKoaZL38k9sQAI7npxSrJ9YEpPsGcOvB5XRFsE8zsIZ7HtrVXxKUydjSwheWwN4u8bwaPjz4jl1UmS2mn7kF7cRKaCGT2B4ONZIdJOhrINtgmlPiCnJu6Yz666/tdSU141pXeUM1mkyTONA3YANU5iUk3CNJJq0huRkc65H9adz9ewwEQiGMMGvXkUtS4Fvxnb2M0ecj+drMlKj/oTr8IfcgUgfmMRVFQcp/VC7ELI26RKv2ONCVLHlkgBEpQbnY7AugeQXoSYLFFgKaIKZ1RYwKz2Q6FB4l0/TO6BjpSzHQ4lmBceb03xuWDWP/e/2oY2cS+ytw== 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;SFS:(4636009)(136003)(396003)(39860400002)(376002)(346002)(46966005)(186003)(4326008)(316002)(54906003)(81166007)(70206006)(70586007)(7696005)(8676002)(5660300002)(83380400001)(6916009)(82310400002)(2906002)(47076004)(26005)(356005)(82740400003)(1076003)(86362001)(426003)(478600001)(8936002)(2616005)(336012)(44832011)(36756003)(6666004);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3266 Return-Path: Sami.Mujawar@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT018.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: d99ab43d-8b02-4b8e-dea7-08d83f89d362 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wJVIKmNYAWafUl95kEH8cwPzglVOXvAwiEOqjdJt5L5mkhgVATEtFIzx8dMcjT3dhmElWah0yc9mbjzevyWoYnPADXgeoy0TA0QhX34GeDdUi3eoB5DmnPzBXrQmrLyoQpaPfOr00T+N3X5pw1Gk12OcmYegVcuiNRyrbKihlbCfe5+Uujcto0osEhwXzIz/VmhksCb/4tdNggRngm92xChS2C3WeyujOjar91SS1os6ZQ840O4Gt99Oeo/dUMVozGhT8PuV+98fpN5uwccafpz8u1rA2BHepd4DBlzrjaIygaP0QFTrqhV+2orKU5eCQ4C5cmJTc+RtgL8FReq6+VGwPOIKU5MIiJ4oxZ6mX7uqMdqOEQu9LozQ7kRuw5ybe0s726+SXkBKhX5TeX73hw== X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFTY:;SFS:(4636009)(346002)(136003)(39860400002)(376002)(396003)(46966005)(5660300002)(2616005)(70586007)(4326008)(44832011)(8936002)(8676002)(2906002)(70206006)(1076003)(86362001)(426003)(81166007)(82740400003)(316002)(336012)(26005)(6916009)(478600001)(6666004)(36906005)(36756003)(7696005)(186003)(54906003)(83380400001)(47076004)(82310400002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Aug 2020 13:08:06.4215 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8d8c81ed-40c6-4247-5a23-08d83f89eb66 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: VE1EUR03FT018.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3496 Content-Type: text/plain 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. Signed-off-by: Pierre Gondois Signed-off-by: Sami Mujawar Acked-by: Ard Biesheuvel --- Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/AslTables/Dsdt.asl | 25 ++------------ Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c | 36 ++++++++++++++++++++ Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h | 5 ++- 3 files changed, 43 insertions(+), 23 deletions(-) diff --git a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/AslTables/Dsdt.asl b/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/AslTables/Dsdt.asl index 9192a0070772209e5cec8d7d9a71ea7a9e10aa69..3475f976b59fc68384ed11f7de23f552efe441e9 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) - 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 **/ @@ -43,25 +44,5 @@ DefinitionBlock("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARM-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/ConfigurationManagerDxe/ConfigurationManager.c b/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c index 76ea46023250d244205a5d8bc715e6e49e37b673..d49da52634cf70228852e4351c5538b85aab60e0 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 VExpressPlatRepositoryInfo = { 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 } }, @@ -212,6 +219,28 @@ EDKII_PLATFORM_REPOSITORY_INFO VExpressPlatRepositoryInfo = { 0x1000 // BaseAddressLen }, + // Standard Serial Ports + { + // Serial Port - UART0 + { + 0x1C090000, // BaseAddress + 37, // Interrupt + FixedPcdGet64 (PcdSerialDbgUartBaudRate), // BaudRate + FixedPcdGet32 (PcdSerialDbgUartClkInHz), // Clock + EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_ARM_PL011_UART, // Port subtype + 0x1000 // BaseAddressLen + }, + // Serial Port - UART3 + { + 0x1C0C0000, // BaseAddress + 40, // Interrupt + FixedPcdGet64 (PcdSerialDbgUartBaudRate), // BaudRate + FixedPcdGet32 (PcdSerialDbgUartClkInHz), // Clock + EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_ARM_PL011_UART, // Port subtype + 0x1000 // BaseAddressLen + }, + }, + // 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/ConfigurationManagerDxe/ConfigurationManager.h b/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h index 6fb959ab7ae2c77f750781d05660957488fae8cd..65561aa487dac95c1c870eb109238cdc88213205 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[]; /** The number of ACPI tables to install */ -#define PLAT_ACPI_TABLE_COUNT 6 +#define PLAT_ACPI_TABLE_COUNT 7 /** 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; + /// Standard Serial Ports + CM_ARM_SERIAL_PORT_INFO StdSerialPort[2]; + /// GIC ITS information CM_ARM_GIC_ITS_INFO GicItsInfo; } EDKII_PLATFORM_REPOSITORY_INFO; -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'