From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (EUR04-HE1-obe.outbound.protection.outlook.com [40.107.7.57]) by mx.groups.io with SMTP id smtpd.web11.83462.1682438707570303956 for ; Tue, 25 Apr 2023 09:05:08 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=WvIZGAIB; spf=pass (domain: arm.com, ip: 40.107.7.57, 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=5KcKyZ1YyztqmqAKQYTcQ++Q2no7vf0XzDSlfXOfqaY=; b=WvIZGAIBrLrThpVSTkH9ei2BV82Yzg34AON+yxFbVNJsM4bS3sJA34qbfyQZS2TDieyH/jKvAxtqCll0UqPmv8Z3AuwhJlkzb7EYvesujYPH+jUw49qvN72bEcI5lXJHNDgwHiDhfj4ICC+05lyMLQb4cCDFO4LDFXsZY8hrQCY= Received: from DUZPR01CA0047.eurprd01.prod.exchangelabs.com (2603:10a6:10:469::16) by AS8PR08MB8466.eurprd08.prod.outlook.com (2603:10a6:20b:568::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.32; Tue, 25 Apr 2023 16:05:04 +0000 Received: from DBAEUR03FT011.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:469:cafe::ff) by DUZPR01CA0047.outlook.office365.com (2603:10a6:10:469::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.33 via Frontend Transport; Tue, 25 Apr 2023 16:05:04 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass 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; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DBAEUR03FT011.mail.protection.outlook.com (100.127.142.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6340.20 via Frontend Transport; Tue, 25 Apr 2023 16:05:04 +0000 Received: ("Tessian outbound e13c2446394c:v136"); Tue, 25 Apr 2023 16:05:04 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 2b64ea9de604fab9 X-CR-MTA-TID: 64aa7808 Received: from 901d203d8aa1.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 01779222-D317-467B-A41D-D47D9F9C1845.1; Tue, 25 Apr 2023 16:04:58 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 901d203d8aa1.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 25 Apr 2023 16:04:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oeRGFpucd8KBU3yI+8fhqjcLlqch+IZ+tuzhbbGa0xagmN4bDEq6Tl87tJ/mCEl6dwLF6811tUGVQdVkX8qMlvn8vW0tni+qshcx/p18wWYt//FQo5aMZB/5KHO5KRyKtlZk/hTVr94XGBr8RYTtivi+lwGzcdgbThN1726c5MO/nPW1vhck34CPPUwl645V11/nnnhdyvjLOwmZA5kDvcHB+v2RHJ1DKMDaAs/AiRo6xX86B9RetLZqRZ1d4OE2t6X/ImCgIvde96s1HKWBd9FFpKc8L0Mg5vfcjh5Ao7aTtsTNpGo4Mm0yQ8aZRiPYY9NySSNpGq29X7Jt+pDa4Q== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5KcKyZ1YyztqmqAKQYTcQ++Q2no7vf0XzDSlfXOfqaY=; b=OULrr9URUCi3j5wq2uT3SsHbeM7CcBc2mi+pMG5m55hbn2VGFFGbhbKqvRYc2GQ06RNxaZh5TR4C53/BWotN/+Kgc/ij0s5y40Au4ZcMW8//6fZzvAC/sszINhiDHqCE2yKRM4Iiv1Up2qoVuBy+aEtLLqfASqqf9karQq6woHtzVGgF1bIt4C+U3DmhE7nCpRMjR/XvxuBKWdyrtxEzHQLvL63wkS9d+vnZiB8olIr87cF2y+TYoyGRHXQCESXkq+uoZqAKiKCpIg2j+lOMDQc2oCxT/QeITcuzYTdkmMM4Qex4MrVP2MDVaKOvJjz9L7HXRrA9ZaCfCcJ1L0qxEg== 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 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=5KcKyZ1YyztqmqAKQYTcQ++Q2no7vf0XzDSlfXOfqaY=; b=WvIZGAIBrLrThpVSTkH9ei2BV82Yzg34AON+yxFbVNJsM4bS3sJA34qbfyQZS2TDieyH/jKvAxtqCll0UqPmv8Z3AuwhJlkzb7EYvesujYPH+jUw49qvN72bEcI5lXJHNDgwHiDhfj4ICC+05lyMLQb4cCDFO4LDFXsZY8hrQCY= Received: from DU2PR04CA0005.eurprd04.prod.outlook.com (2603:10a6:10:3b::10) by GV1PR08MB8451.eurprd08.prod.outlook.com (2603:10a6:150:83::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.32; Tue, 25 Apr 2023 16:04:52 +0000 Received: from DBAEUR03FT036.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:3b:cafe::82) by DU2PR04CA0005.outlook.office365.com (2603:10a6:10:3b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.33 via Frontend Transport; Tue, 25 Apr 2023 16:04:52 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;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; pr=C Received: from nebula.arm.com (40.67.248.234) by DBAEUR03FT036.mail.protection.outlook.com (100.127.142.193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6340.20 via Frontend Transport; Tue, 25 Apr 2023 16:04:52 +0000 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.2507.23; Tue, 25 Apr 2023 16:04:50 +0000 Received: from E114225.Arm.com (10.1.196.36) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.23 via Frontend Transport; Tue, 25 Apr 2023 16:04:50 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , , , Subject: [RFC PATCH v1 21/30] ArmVirtPkg: Kvmtool: Use Null version of DebugLib in PrePi Date: Tue, 25 Apr 2023 17:04:19 +0100 Message-ID: <20230425160428.27980-22-sami.mujawar@arm.com> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: <20230425160428.27980-1-sami.mujawar@arm.com> References: <20230425160428.27980-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT036:EE_|GV1PR08MB8451:EE_|DBAEUR03FT011:EE_|AS8PR08MB8466:EE_ X-MS-Office365-Filtering-Correlation-Id: c55dab9e-24eb-4525-f69f-08db45a6d4ea x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: Ckv6ZqXnfEuOVppj/k9UI4YyFbgAX+m8H8ptQPHM1tokW4bauuPCntJr8kXtYbm4QNSgvknNYF29Kag6reydoRarlwd4smNRrKwVoMGHkGYQulPSyl+eTsPo0frN4gqjvZlK+PAQT80owfvhTbcA+mhoHVk4hx8T0dYLaBOhIbXVQ4QCKelh5G/3BGQV1gpB07ctt7gflra//0bofKJufe1h3BIrNlDhJhBjvMPhny8P/6DY5hSUUTyzoxyIPVoGQS6wRhRFWP1NeHWJylDp7hvb+Fkc9NqFRXCMGMakKgeKdPO0wq2PZTJUBPtQHzwYrMK0vGfTTOXIWjQjpZzcGWTj6IvcfXmuCGx+7US5/Jxvi7+/EpF7pMugAXgSzoCsN+ddb/oPJS7KsKkW2z9jyq/QlAtC3u6tD/y+J5/ELZDFy2kw17NjvHeJzrRtY+R2E1c6myNPtAuBjtr0WghDmBoABUaCLwXVeVRuS3hp1/blTgKT+a5FlvqLmTSCOz6E7DQ+GMaypA/Z+YgmVssdxjX62L1HtD0/qpjeHCSFc3jTNsIYQq6NIDaZCTj7psnHZmslZ7pOnqYx7Z645sUKaNwgD7vjaUdTCQCm1Fh5IsIXWbkBcedF9rI2MluobQh+OxALLbHczqN4Was9eY+AnMA0GfBJDmLH1yU9lGgZXfK/stTlJYV7+OIZOVUgFy7HINRBy+1PcVzrpNX672Y34rapnZhlH0j7JWJ7ffVaWl0= 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:(13230028)(4636009)(376002)(346002)(396003)(136003)(39860400002)(451199021)(36840700001)(46966006)(36756003)(8676002)(54906003)(8936002)(34070700002)(478600001)(6916009)(70206006)(4326008)(70586007)(40480700001)(356005)(81166007)(44832011)(316002)(82740400003)(41300700001)(2906002)(5660300002)(2616005)(86362001)(36860700001)(186003)(336012)(426003)(26005)(1076003)(7696005)(6666004)(83380400001)(47076005)(82310400005)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB8451 Return-Path: Sami.Mujawar@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT011.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 48a5c1de-4c7d-47c1-c96d-08db45a6cdb6 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: phsHsIzk+EesfHjPREDhNhTpo0XBgKpXdRWqUQebC88b6Rb8TJjB2pknlpuhh9t9IGO6wg6iL0mRg5jbEWRijiH3gDMrptGQLNtC2WoADwL0znM3OUpbkoh9/rJz7/h/jCPkM3vu5bQr74S93w/UPLGyYf0HtDaoG4gPc1iZdQRbm/SLiMLOcqkaTuaSQTcCaShngqNWqoGVnyuW/WaYtURVV+QbEeXNN0P0j2bad8PTexr2guZIvoc4nrbIsEKhmjQuboIDq/ViebVkUMh8tdWOEOj8OO0iHi0Nge1G4p/AuSrFKry1Mf+kINt985L90BBISKBFvm9xxvOOpaSLfXSFc8KwF8GWyjGocBGZTCE5VX+WOdKhH+YezdkgS3LWxf1MSZKPDyx1iVWmU+q8qW6Ugap7LEgvXRhEOebjL3K+2772tdF9wxUiVi6YKtoNEoRVG3ud70Ctak1GceKfIWg2bSH6+NasnaR0JwVSF9CQ63pnCcs2AN7AqC9R1yPevrz1HaKF8UBv9mvBDCUHXzPA3ztEVBjmhgH5XdhACi3TqD+6QJ7ZMXnRT3URKFGgZOLpNSwOpoyplB1zMd3Ao83KL+MFMomjb6eAIFIGkahkmBWv+YjGztl6EWmXrwyHQ/29DJgvVA6J1P9gFnZKpzxw9I7Td8nGVQ+fnfc6we/hMgYZJphQbLBuQm+PONeAVDVIJ5mGR9RKD5g9JqTgmniTw+BdIcRcrdpgviOyQBc= 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;SFS:(13230028)(4636009)(376002)(346002)(396003)(136003)(39860400002)(451199021)(40470700004)(36840700001)(46966006)(36756003)(8676002)(8936002)(54906003)(40460700003)(34070700002)(478600001)(70586007)(6916009)(4326008)(70206006)(40480700001)(81166007)(44832011)(316002)(41300700001)(82740400003)(2906002)(5660300002)(2616005)(86362001)(36860700001)(186003)(336012)(426003)(26005)(1076003)(7696005)(6666004)(83380400001)(47076005)(82310400005);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2023 16:05:04.1800 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c55dab9e-24eb-4525-f69f-08db45a6d4ea 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: DBAEUR03FT011.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB8466 Content-Type: text/plain The patch at "6c8a08bd8a680 ArmVirtPkg/PrePi: Ensure timely execution of library constructors" moved the processing of library constructors before the MMU is initialised. This resulted in the BaseDebugLibSerialPort library constructor BaseDebugLibSerialPortConstructor () which initialises the serial port, being invoked before the MMU is enabled. However, the Realm Code requires the protection attribute of the MMIO regions to be configured as unprotected (shared with the host), which requires the MMU to be enabled. Otherwise, accesses to the MMIO region result in a synchronous external abort being reflected to the Realm by the RMM. Therefore, link the Null version of DebugLib in PrePi stage. Signed-off-by: Sami Mujawar --- ArmVirtPkg/ArmVirtKvmTool.dsc | 1 + 1 file changed, 1 insertion(+) diff --git a/ArmVirtPkg/ArmVirtKvmTool.dsc b/ArmVirtPkg/ArmVirtKvmTool.dsc index 467e5c166e1bbad3acbae78f53c225f5bac525a9..1cfd9e7ed8a6d2b0b054e130a84c66c2fec54e57 100644 --- a/ArmVirtPkg/ArmVirtKvmTool.dsc +++ b/ArmVirtPkg/ArmVirtKvmTool.dsc @@ -248,6 +248,7 @@ [Components.common] # ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf { + DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf LzmaDecompressLib|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf PrePiLib|EmbeddedPkg/Library/PrePiLib/PrePiLib.inf -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'