From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail03.groups.io (mail03.groups.io [45.79.227.220]) by spool.mail.gandi.net (Postfix) with ESMTPS id 095DB740045 for ; Fri, 12 Apr 2024 14:34:07 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=/CpEBP++TKbmI3V4h8GMyXfvbdtbkYDJgPTnbomtdiY=; c=relaxed/simple; d=groups.io; h=Received-SPF:Received-SPF:From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:NoDisclaimer:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20240206; t=1712932446; v=1; b=VJZZeewX+0adXLHh4DiWVVq9DQw2RKPdLs4tcfip+slSw0oE6pUeSxfUWfbDeRBruk4qAqt8 df3z1TDsa8PQoC0fK44yE8HhKolsRmpSc8nVTsStffE9xug/Z4h1LpnKCxO72ECu+TVg5tjBD5d jRe70lqj90SsQ3NXGWC1NE4LvCwFbp229XB+6qMN6+eqxcOub8R1c9viJm2OKdlPyAj2Tloqiqs 78wshJbQ7fUZJKsRNMtsV6gx+6ZrWkEtVCqkZjXzMHeBmBs7v8stV1HTw9Y5NdBk5FcWQ3D4i8R F5e54mcV/SdI6SA7+sosgHJfpMpMHUwQ1B4H2vVatbuvg== X-Received: by 127.0.0.2 with SMTP id hZftYY7687511xlWrWfqEXBf; Fri, 12 Apr 2024 07:34:06 -0700 X-Received: from EUR04-DB3-obe.outbound.protection.outlook.com (EUR04-DB3-obe.outbound.protection.outlook.com [40.107.6.74]) by mx.groups.io with SMTP id smtpd.web10.48543.1712932437266793988 for ; Fri, 12 Apr 2024 07:33:57 -0700 X-Received: from AS9PR05CA0313.eurprd05.prod.outlook.com (2603:10a6:20b:491::22) by DU0PR08MB7882.eurprd08.prod.outlook.com (2603:10a6:10:3b2::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.56; Fri, 12 Apr 2024 14:33:53 +0000 X-Received: from AMS0EPF00000194.eurprd05.prod.outlook.com (2603:10a6:20b:491:cafe::6c) by AS9PR05CA0313.outlook.office365.com (2603:10a6:20b:491::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.34 via Frontend Transport; Fri, 12 Apr 2024 14:33:53 +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 X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AMS0EPF00000194.mail.protection.outlook.com (10.167.16.214) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7452.22 via Frontend Transport; Fri, 12 Apr 2024 14:33:53 +0000 X-Received: ("Tessian outbound f1e9a43166b5:v313"); Fri, 12 Apr 2024 14:33:53 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 243449fba46209df X-CR-MTA-TID: 64aa7808 X-Received: from f24f25cd4208.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 6DFC3773-DED4-4F8B-B89B-17F903D8971A.1; Fri, 12 Apr 2024 14:33:41 +0000 X-Received: from EUR01-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id f24f25cd4208.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 12 Apr 2024 14:33:41 +0000 X-Received: from DB8PR06CA0058.eurprd06.prod.outlook.com (2603:10a6:10:120::32) by DB9PR08MB7445.eurprd08.prod.outlook.com (2603:10a6:10:36f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Fri, 12 Apr 2024 14:33:38 +0000 X-Received: from DU6PEPF00009525.eurprd02.prod.outlook.com (2603:10a6:10:120:cafe::a3) by DB8PR06CA0058.outlook.office365.com (2603:10a6:10:120::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.26 via Frontend Transport; Fri, 12 Apr 2024 14:33:38 +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 X-Received: from nebula.arm.com (40.67.248.234) by DU6PEPF00009525.mail.protection.outlook.com (10.167.8.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7452.22 via Frontend Transport; Fri, 12 Apr 2024 14:33:38 +0000 X-Received: from AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) 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.2507.35; Fri, 12 Apr 2024 14:33:34 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 12 Apr 2024 14:33:34 +0000 X-Received: from E114225.Arm.com (10.1.196.56) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Fri, 12 Apr 2024 14:33:34 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , Subject: [edk2-devel] [PATCH v2 19/45] ArmVirtPkg: Kvmtool: Use Null version of DebugLib in PrePi Date: Fri, 12 Apr 2024 15:32:56 +0100 Message-ID: <20240412143322.5244-20-sami.mujawar@arm.com> In-Reply-To: <20240412143322.5244-1-sami.mujawar@arm.com> References: <20240412143322.5244-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DU6PEPF00009525:EE_|DB9PR08MB7445:EE_|AMS0EPF00000194:EE_|DU0PR08MB7882:EE_ X-MS-Office365-Filtering-Correlation-Id: 584af391-67f1-4034-407a-08dc5afd940c 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: 0FwJCnYd4cSbCBw3fKZXcppN0bWedPtFZHZ7AQmqpmZd3AKQIoECRnKE/8X9DtrSJ79NcGYNCyRFrDGzm+PR8c01f2ZnpHz9KPvfZ99Hqd71DuN3CqpcIdTZ81pPYYmD9Z6+gT6hGQbRksYmqi/+cpJt5ryho3ybpAoG6qRJZHetg8Y5qPgih33A1STIJ9HdA7POR59uAQIhCvLauUbvwq8NrxooDpugVjZ6/7dvW9KNUlRTgxw9r5La9bpT1QWHn0Vo2MWrROB8RZKQvBJu2ToZH7fxLiLA+uk2JkF3EVBsp6vWzQNs2hJsrPKmA4s7mvGvDBzbmQL1VDg2j4ZiWaTRNXzYab10x7V/ieRx68Uf+ISXyrVP/BWD6iLZ/UQagFJVOBw15PU6h2Q9004IlIzI8HDRuEqH/WNU7TZvbJQJB5wjZm2BWbFB9IGnzAWNnLbxOFYevyz1t4BgsV1DSNO8uFldeQCal/VRaW9xBFDIU6qQHTq4QpGXogSie1IzqmLiTJrmz1+rUON1ud8L4kSbfBNM4exZ8iUBuFlBg+1splym3VeU9M86g4uJx94CeciP6geChzwRAwxjIFwhl+Eoi/mF2LCptdlBlIXO7E5D+YU10H8gjFKARxnfxTfc6HksM6XloRJZ9QmSx7qQr1vv8ChBhRUxbXSH69PjkkVls6RW0qVDOkcgcmVFvnoswruvaek7Z1Fmocz0H80mqR9UWqgDOtf+oFnbM94nsh524VjbO1gJKXUgVodpM/dv 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:(13230031)(1800799015)(82310400014)(36860700004)(376005);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB7445 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AMS0EPF00000194.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 6d884d6c-e198-43f9-7a34-08dc5afd8ac5 X-Microsoft-Antispam-Message-Info: +rCcUDiBE7jA9flSN/zF61p7+KIbfaH6yAaYO3MRY3Zk6ytdHgP1i9yq7+hRhGyy+RU5/VdXYEz+Msetpt/iEq24K9t70/PJw2cwiXhJDBMPOcL3AvAEOG+SbsBLd42OF89KprbKhF1t7rmxMMIooCZ4vdGpVWyxeCWF3lJoG944vCXXz+ndpbWcHYdGnJ5zs7nz9yoKZBrXHfboO/Z0Incj2j6JQhxCpS4FegaqWLQbqvE+FtHAVApqFVClFFyxacSdDZsM+tCNRTJSHm5wzDzNDvn48mowY2ngqZtNAutCtyRozeHbdF+zWV/14zdORP26Xrg6DphoXPbGrwIIFnNOrfB6V1ko/sXN5pqAA7itlDMGMPY0x08hDTz6ALUPqgLUR2MKVDyeYYxOXdtSlyBcDwCPI3NnilkLC79ckRQQRwTnb4hBpDKRQSrt3+AHr30n7Nnv/8+EOUo44x/zqpkCMU8lgpStnP6dAyKHiMco9dhUbzn6q25Eq7ZYD+IDJJZxSNx2udsGslTJZGoVOhYL51J5UMscYcE9sL9EbysgzScNum0+s2mNL3Tir1c4qxydzEhoLZPq2DMJOsJwiLhKgTYLWGoaEvljC7FHm/2oRQzzHFm/C0kRokTitjYpzoA2GVpCpe/kQtHrV7GMzozztBZC2hG/Y7SwPXMLfnxV8bAmEB6JHH8kaGr+8kRQvCRUlnXBS19g6Qiu26lhKuAzX3ZbHp66n7Y7+at6I08KjuD7dSglTNzCRov99L39 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2024 14:33:53.6199 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 584af391-67f1-4034-407a-08dc5afd940c 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: AMS0EPF00000194.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB7882 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Fri, 12 Apr 2024 07:33:57 -0700 Resent-From: sami.mujawar@arm.com Reply-To: devel@edk2.groups.io,sami.mujawar@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: zEnbOBOwdARC0WdNbelG6uqVx7686176AA= Content-Type: text/plain X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=VJZZeewX; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=arm.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.227.220 as permitted sender) smtp.mailfrom=bounce@groups.io 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. Cc: Ard Biesheuvel Cc: Leif Lindholm Cc: Gerd Hoffmann 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 20da3319667900e64755272fa110d57452d1fc67..d09b3e06928ad70dba8581bd605a7c76b231ba61 100644 --- a/ArmVirtPkg/ArmVirtKvmTool.dsc +++ b/ArmVirtPkg/ArmVirtKvmTool.dsc @@ -250,6 +250,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)' -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117690): https://edk2.groups.io/g/devel/message/117690 Mute This Topic: https://groups.io/mt/105483429/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-