From nobody Sun Feb 8 19:59:33 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+65857+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=arm.com Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1601673275029279.3958424387454; Fri, 2 Oct 2020 14:14:35 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id hPQMYY1788612x8SvdMITXt6; Fri, 02 Oct 2020 14:14:34 -0700 X-Received: from EUR05-VI1-obe.outbound.protection.outlook.com (EUR05-VI1-obe.outbound.protection.outlook.com [40.107.21.79]) by mx.groups.io with SMTP id smtpd.web12.5581.1601673272804650587 for ; Fri, 02 Oct 2020 14:14:33 -0700 X-Received: from AM6PR08CA0017.eurprd08.prod.outlook.com (2603:10a6:20b:b2::29) by VI1PR0801MB1935.eurprd08.prod.outlook.com (2603:10a6:800:87::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.32; Fri, 2 Oct 2020 21:14:27 +0000 X-Received: from VE1EUR03FT030.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:b2:cafe::1) by AM6PR08CA0017.outlook.office365.com (2603:10a6:20b:b2::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.36 via Frontend Transport; Fri, 2 Oct 2020 21:14:27 +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=pass 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+65857+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 VE1EUR03FT030.mail.protection.outlook.com (10.152.18.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:27 +0000 X-Received: ("Tessian outbound a0bffebca527:v64"); Fri, 02 Oct 2020 21:14:27 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: a30b65e8c64cf590 X-CR-MTA-TID: 64aa7808 X-Received: from e032ac99c5fa.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 5DA91D3D-6CEE-498A-9AB0-91BB1D1248FE.1; Fri, 02 Oct 2020 21:14:21 +0000 X-Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e032ac99c5fa.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 02 Oct 2020 21:14:21 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JpvqPOy1Sro/kY85yKvmTPT79Urkxjm/poLldF1N3Ocq2yb0/mQnqhdV7pGU43BG618C5v+Mj/7Q2P7TirfAiRXCcRgFfOUZUU0fqekJ+J61T9CZ/CIDJHMTgulqLzZpY7a5nE1c2Xqqn6s7B6IkcdLI8zJJ2D74pzdewExd7wa14jfR9ggrMnWEp96eC1byBfRJWkxQfPmF7TIt4MPPKsJ1mxiVwBM+CAOPEar8KYJqFhtwexfouvpJ2i+kgRqtKm4j3kFA/BRGYQRpXn1FRxdYj2lsjBejnMdpL1bhneIKAO6sJxJapRuLiuFq7rX3OJglPy4nE6OV9cm05q4I7w== 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=RdWWG2WYj3y2Ie6qVuYl2rdrZvGGAkfaKh4o65VLJjw=; b=gxZ57kGsRXnvKg1E3eZCaDP2R3v0o97TieV4NRGPc4+t6rmFAqvQ3DNwUyDa6CavwMGlE9hiJOqqJAL4u5IzeY4mNIrW6R9WtZa0QrZLkwv/84b6MStJ57s6nrFDC4kGIe3GvDZ8LcfVma0QUSbRDM1TA+1I+AgvV02evFNQ8R1PSzL3bkRAa3bfgqzx6iL2lw3OCsC+D8TAMBIH0OTCebyhzK4d9UBSsvIGoy/1WN+V6Y057X2RLV0U3Q+w4QQurtoiGXdUNaS9zLFukWA5Ebknt6s0FllvrLlRZYoSV6JrzOtHsFn8jiX0gBat8YvWL2LE1zMSJaJ6qznQCynCCA== 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=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none X-Received: from AM3PR05CA0118.eurprd05.prod.outlook.com (2603:10a6:207:2::20) by DB6PR0801MB2086.eurprd08.prod.outlook.com (2603:10a6:4:7a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.32; Fri, 2 Oct 2020 21:14:20 +0000 X-Received: from AM5EUR03FT049.eop-EUR03.prod.protection.outlook.com (2603:10a6:207:2:cafe::4c) by AM3PR05CA0118.outlook.office365.com (2603:10a6:207:2::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.36 via Frontend Transport; Fri, 2 Oct 2020 21:14:20 +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=pass 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 AM5EUR03FT049.mail.protection.outlook.com (10.152.17.130) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 21:14:20 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) 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.2044.4; Fri, 2 Oct 2020 21:14:17 +0000 X-Received: from E107187.Arm.com (10.57.53.44) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2044.4 via Frontend Transport; Fri, 2 Oct 2020 21:14:17 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , , , Subject: [edk2-devel] [PATCH v5 07/15] MdeModulePkg: Fix constructor invocation ordering Date: Fri, 2 Oct 2020 22:14:01 +0100 Message-ID: <20201002211409.43888-8-sami.mujawar@arm.com> In-Reply-To: <20201002211409.43888-1-sami.mujawar@arm.com> References: <20201002211409.43888-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: 9115111f-a18f-4a9c-bbed-08d867182514 X-MS-TrafficTypeDiagnostic: DB6PR0801MB2086:|VI1PR0801MB1935: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:7219;OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: +eB9Eq1H1PzszO64J31HXPsQdb+VFuvQWrHH+x7pRE3zKt99neqpEE6X6F+OYxlLR1p0fayfijMRvs+vWJOzmKCT5CD1q1sCrmTEMTqBnF1TDZw0h/y1amo/twgelRPVOaPSWVr14W12NAqxr3qyHrbtqghnHh6+dSa1mcwvlPU6iGzXk7dzmRZ1cQpYgEnQhrRo8lbseXiRx6DvnfHi9vwpDRT4VZFDUwuO3Gv/z9y0V7/1EQz2v4zbzFBYtenAISPEMSO7OjJs7OsQrnJD597j6r31YOQihJ5TmZClFqggBgK145lr0iRizBy2TWCKEZu9qDMVqBuYWAsfKDjLeGobAVEWogSjOrOXXrnRYZ0w3KqWU8CuTEtSOl5smA35WlWwlS1dxrXwyFfPx4fwqg07drTdosBB32d/CZiJ7H7eKF5GEg0CsCvlpoCw3ZVMNiXVKSwR80OSkyly3GBHGn9HpO/ApSlVp95i9YJgPjA= 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)(346002)(39860400002)(136003)(376002)(396003)(46966005)(83080400001)(81166007)(5660300002)(4326008)(82740400003)(26005)(316002)(1076003)(19627235002)(6666004)(54906003)(7696005)(2616005)(86362001)(478600001)(83380400001)(8936002)(70586007)(47076004)(966005)(70206006)(36756003)(6916009)(426003)(336012)(82310400003)(8676002)(186003)(2906002)(356005)(44832011);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB2086 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT030.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 357ab172-6107-44a0-4a44-08d8671820e0 X-Microsoft-Antispam-Message-Info: HJ6ccriBU7CNqNT/IXa5vaVV5VrVSKZZLAS55JQ5lqzppjXZOCZkYPwBXNe15wKLJaBgIrYTLdQHMXcF2j/2Q038J8hTOvhiekw0x6lrOms4ndOZAtS0DB8oZsfQdn875ZgUwmEw3whh2XrLnUrdkP1P/scdv7sOjydzDvYI44YKWL6Xn20OlSjO1VsYq3B+MnaUkw4P8qD771KRrtyODsngcyb3XYpp7kxeezxRQ9r+3jAk4UhMA0m76Yg8eabUtILek0FO4ehoe42mm8ynZiLeeifoYfHkNeJZwm1huSsciGcTf/jSoMhav8L9J/V1/kDLJUBMVS7LcdNh5rjg2Z6ohBwiPDeGUQZZaZxZIjXGIk+Z8AQoRBPaWnpHiXhQehdkdW91+yRNTqCXAl/xO7Gh0Ni/l8SlZ8Nsyc3nuB86EWcy/GmJu0FUHc9NS4KcS5M9IVTnJcpl92LwL4ZmszUYreQNggGtbzwx5J0ko9E= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2020 21:14:27.0807 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9115111f-a18f-4a9c-bbed-08d867182514 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: VE1EUR03FT030.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB1935 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: TEsMaXXN1EOUHYGQ9NmBrDpWx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1601673274; bh=AdHpr6yfikG+cctL0NNRhwWrLe7XDCCbUlsRG6ZKxjM=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=J1QiC/cbXzxoj0ku/b2mnZfXLgi5GYpOIiVXTXovUTSvr+9TRejlsLP2+4sz3KR3zc1 o5lxvgkpwngp0Fo6LRqPJ2SMOC9P2F5d+X0Ha0n1aCo0l98LBpoIk4ewyzG8yw3XxKoNv R/DSYluXaHqDfs4ItkYjUAp5Jz58zUaojEI= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The BaseSerialPortLib16550 library does not implement a constructor. This prevents the correct constructor invocation order for dependent libraries. e.g. A PlatformHookLib (for the Serial Port) may have a dependency on retrieving data from a Hob. A Hob library implementation may configure its initial state in the HobLib constructor. Since BaseSerialPortLib16550 does not implement a constructor, the Basetools do not resolve the correct order for constructor invocation. To fix this, add an empty constructor to the serial port library BaseSerialPortLib16550. Signed-off-by: Sami Mujawar Acked-by: Ard Biesheuvel Acked-by: Hao A Wu --- Notes: v5: - Fix function documentation to match doxygen style. [Sami] Ref: https://edk2.groups.io/g/devel/message/62148 =20 v4: - No code change, resending patch with v4 series. [Sami] Ref: https://edk2.groups.io/g/devel/topic/75081484 MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c | 1= 7 +++++++++++++++++ MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf | = 3 +++ 2 files changed, 20 insertions(+) diff --git a/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib1= 6550.c b/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550= .c index 9cb50dd80d5634ab2aa6d68bf5ca7fb891463eef..f10b5894663a979873427cffa84= a37b3064c623e 100644 --- a/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c +++ b/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c @@ -4,6 +4,7 @@ (C) Copyright 2014 Hewlett-Packard Development Company, L.P.
Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
Copyright (c) 2018, AMD Incorporated. All rights reserved.
+ Copyright (c) 2020, ARM Limited. All rights reserved. =20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -1102,3 +1103,19 @@ SerialPortSetAttributes ( return RETURN_SUCCESS; } =20 +/** Base Serial Port 16550 Library Constructor + + @retval RETURN_SUCCESS Success. +**/ +EFI_STATUS +EFIAPI +BaseSerialPortLib16550 ( + VOID + ) +{ + // Nothing to do here. This constructor is added to + // enable the chain of constructor invocation for + // dependent libraries. + return RETURN_SUCCESS; +} + diff --git a/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib1= 6550.inf b/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib165= 50.inf index 8b4ae3f1d4ee1e2e9a8b81eab4c900541ce8cfb6..92b7a8b7896a305d2ce22589f8a= 9593618d37bb7 100644 --- a/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf +++ b/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf @@ -2,6 +2,8 @@ # SerialPortLib instance for 16550 UART. # # Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2020, ARM Limited. All rights reserved. +# # SPDX-License-Identifier: BSD-2-Clause-Patent # ## @@ -14,6 +16,7 @@ [Defines] MODULE_TYPE =3D BASE VERSION_STRING =3D 1.1 LIBRARY_CLASS =3D SerialPortLib + CONSTRUCTOR =3D BaseSerialPortLib16550 =20 [Packages] MdePkg/MdePkg.dec --=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 (#65857): https://edk2.groups.io/g/devel/message/65857 Mute This Topic: https://groups.io/mt/77270945/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-