From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a01:111:f400:fe0e::621; helo=eur04-vi1-obe.outbound.protection.outlook.com; envelope-from=achin.gupta@arm.com; receiver=edk2-devel@lists.01.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on0621.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0e::621]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6891D211D56C9 for ; Wed, 6 Mar 2019 08:35:09 -0800 (PST) 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=3lBSOLPMA7/dfPZGL0zXXKsK2g547nmDreygf2+BCg8=; b=bX5rjug7XkXBfKKjyZfxLUTm0XpFxxtR4Xphchx1SeXQ+Qv3mqjIVNyFSKSHMV5SsT6E5QGU+lWVP/BIbf7gnnM9ruuymm8glNo4zoqk4kCDHKYslfQk/BHo5Gh9fe0fL1XBKSAJyz9Tjq3a4aCCQHbMLh2O1zRrNxj6yt/gBu4= Received: from AM0PR08MB2980.eurprd08.prod.outlook.com (52.134.92.153) by AM0PR08MB3444.eurprd08.prod.outlook.com (20.177.110.205) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.16; Wed, 6 Mar 2019 16:35:07 +0000 Received: from AM0PR08MB2980.eurprd08.prod.outlook.com ([fe80::a133:50fa:bbbe:81a6]) by AM0PR08MB2980.eurprd08.prod.outlook.com ([fe80::a133:50fa:bbbe:81a6%5]) with mapi id 15.20.1665.020; Wed, 6 Mar 2019 16:35:07 +0000 From: Achin Gupta To: Ard Biesheuvel CC: "edk2-devel@lists.01.org" , Supreeth Venkatesh , Jiewen Yao , Leif Lindholm , Jagadeesh Ujja , nd Thread-Topic: [PATCH 05/10] StandaloneMmPkg/StandaloneMmCoreEntryPoint: drop explicit SerialPortLib call Thread-Index: AQHU01f1YoQlVPxnRE+q4w/HKlZ+T6X+zmMA Date: Wed, 6 Mar 2019 16:35:07 +0000 Message-ID: <20190306163458.GQ21602@mac-ubuntu-vm> References: <20190305133248.4828-1-ard.biesheuvel@linaro.org> <20190305133248.4828-6-ard.biesheuvel@linaro.org> In-Reply-To: <20190305133248.4828-6-ard.biesheuvel@linaro.org> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Mutt/1.9.4 (2018-02-28) x-originating-ip: [95.146.138.15] x-clientproxiedby: LO2P265CA0436.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:e::16) To AM0PR08MB2980.eurprd08.prod.outlook.com (2603:10a6:208:5b::25) x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f8841cec-d185-4767-2df0-08d6a251b128 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM0PR08MB3444; x-ms-traffictypediagnostic: AM0PR08MB3444: nodisclaimer: True x-microsoft-exchange-diagnostics: 1; AM0PR08MB3444; 20:26fGejSBk5YN/L1ab6pa1mzR+2gC5v5NrP3LAaQdzIpLbr/RqQbfF1NYkExD2zplf2KIOAg8eAKjhPiWTaG0mXfp2w7BDFjoBeI9ZK8xgVIfGYc8hVKlQnZK4uxt/CoWw4R6ISZ3BM6VExKS0qheP7R7XdqXqyupm3nmUfZUwCs= x-microsoft-antispam-prvs: x-forefront-prvs: 0968D37274 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6029001)(7916004)(396003)(136003)(366004)(346002)(376002)(39860400002)(199004)(189003)(71190400001)(476003)(7736002)(71200400001)(305945005)(1076003)(25786009)(52116002)(99286004)(14454004)(54906003)(26005)(76176011)(4326008)(2906002)(186003)(86362001)(478600001)(97736004)(6916009)(229853002)(33716001)(6246003)(58126008)(72206003)(102836004)(68736007)(6506007)(81166006)(6436002)(6486002)(316002)(81156014)(446003)(66066001)(486006)(256004)(11346002)(3846002)(6346003)(8676002)(106356001)(5660300002)(105586002)(6116002)(33656002)(386003)(44832011)(6512007)(9686003)(8936002)(53936002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR08MB3444; H:AM0PR08MB2980.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Achin.Gupta@arm.com; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: I2rExACek267iVMZzvq7UCTe9XBiNsUxp4XBnyi3urb1EVJaivYq2CYxRX/cVWGOTzUhJ7CnSZRayG98xovhhZlihtZ/DmpLxSmaii6z4S0jFMv6RDZ81FpRanBKQKP6EkomBJfNGwtOLfbtGHxdbPtN2LLOboJeC1kR44GGU541R8ef2VKZ3FtDPka0eM0YJxCJaL4J1vkXR8qtC8LoNohkNo0x9pPo8Yhp7etL+nUUHlC36Yd3+wmRPdxpCsudqsdvsd92iwxlmOfmMq2EdQMPKy2jeQp2B/z9tmi+xqL2zK8tBPW/3uGO2DDMPvqtgtGSHVPfkfUOBNkkEsdo/C5sG0T04ZQgM+6iZvADM6ZcZ14S/6JptqLhayu3W6pC43/8+faT+MyJQOYjTU5EaqT+fvew8Se2y1xvl/wAJl4= MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: f8841cec-d185-4767-2df0-08d6a251b128 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Mar 2019 16:35:07.0807 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3444 Subject: Re: [PATCH 05/10] StandaloneMmPkg/StandaloneMmCoreEntryPoint: drop explicit SerialPortLib call 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: Wed, 06 Mar 2019 16:35:11 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-ID: <46818569AFFD324687DD05B3333C9711@eurprd08.prod.outlook.com> Content-Transfer-Encoding: quoted-printable Hi Ard, On Tue, Mar 05, 2019 at 02:32:43PM +0100, Ard Biesheuvel wrote: > Sending DEBUG output to the serial port should only be done via > DebugLib calls, which is in charge of initializing the serial > port when appropriate. So drop the explicit SerialPortInitialize () > invocation, and rely on normal constructor ordering to get the > serial port into the appropriate state at the right time. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ard Biesheuvel > --- > StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmC= oreEntryPoint.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/S= tandaloneMmCoreEntryPoint.c b/StandaloneMmPkg/Library/StandaloneMmCoreEntry= Point/AArch64/StandaloneMmCoreEntryPoint.c > index 5cca532456fd..c8e11a253d24 100644 > --- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/Standalo= neMmCoreEntryPoint.c > +++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/Standalo= neMmCoreEntryPoint.c > @@ -232,9 +232,6 @@ _ModuleEntryPoint ( > VOID *TeData; > UINTN TeDataSize; > > - Status =3D SerialPortInitialize (); > - ASSERT_EFI_ERROR (Status); This is done in the first few instructions after EL3 ERETs into S-EL0 to initialise the StMM partition. The constructors will be called a bit later.= I agree with the change but does EDK2 provide a mechanism for early prints to= the console in case we need this in future. cheers, Achin > - > // Get Secure Partition Manager Version Information > Status =3D GetSpmVersion (); > if (EFI_ERROR (Status)) { > -- > 2.20.1 >