From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (EUR03-DBA-obe.outbound.protection.outlook.com [40.107.104.80]) by mx.groups.io with SMTP id smtpd.web11.7419.1686919291617018340 for ; Fri, 16 Jun 2023 05:41:32 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=5n+Xt7tR; spf=pass (domain: arm.com, ip: 40.107.104.80, 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=s7lcTtcd03JTYNsr4K6egilwcPZh3dqEK1vNJzmsVWg=; b=5n+Xt7tROPSsPnLl2SmY6PNtO1G69PaDcZdAys27eG+oQRU/L1Hld4Ki0rQkd6QBsqROYMHj0eCjp9GG0K2taCvmHpZ8fi4IWh40xAibtBKbHOpYwMZzioHv2uPUlaMqilJdNQ10OvMv6p7ai5Q/0FPqKcJJfwN1oCb10IMc4ck= Received: from AM5PR1001CA0002.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:206:2::15) by PA4PR08MB5998.eurprd08.prod.outlook.com (2603:10a6:102:e9::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.29; Fri, 16 Jun 2023 12:41:27 +0000 Received: from AM7EUR03FT003.eop-EUR03.prod.protection.outlook.com (2603:10a6:206:2:cafe::88) by AM5PR1001CA0002.outlook.office365.com (2603:10a6:206:2::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.25 via Frontend Transport; Fri, 16 Jun 2023 12:41:27 +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 AM7EUR03FT003.mail.protection.outlook.com (100.127.140.227) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.25 via Frontend Transport; Fri, 16 Jun 2023 12:41:27 +0000 Received: ("Tessian outbound 8b05220b4215:v136"); Fri, 16 Jun 2023 12:41:26 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 8bb193556918a7f5 X-CR-MTA-TID: 64aa7808 Received: from 4bc6908e9d9d.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 149A3779-3398-4549-AB4F-F25FDE8A8843.1; Fri, 16 Jun 2023 12:41:14 +0000 Received: from EUR01-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 4bc6908e9d9d.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 16 Jun 2023 12:41:14 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iydgSVCDC7pI6aoLJ9D4MuCylRWVQXoD2bdf1miQLu/2HhiVkXWBjEFvpbig1jo+ZXj9jc5l7Ylh6lmNLG9x/fkS7kJGAaq2bN+ihqjTAmK/8ygYgIu8y618InJsJ5KQwz6IiCA3XN+HYvMZ6XAEFwAiUx0vPJQVgN4gmjOk9fSEEwNxD4xcf6zWkI6fwAI1y7Q+6+F+xp4gKhFq86cPh5idwS2qe6h0j3N+hQ1uRyzyaM7elG8FGrYtr8DYk83pTZtwm3ZD4/W8TSyqWSRrwZVm+YLKJFFrfHYkpHy7yDHTp0/JByX9Icnmmwq//50ccVd2YlliuhiwGX1hd7+/3A== 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=s7lcTtcd03JTYNsr4K6egilwcPZh3dqEK1vNJzmsVWg=; b=J3pE/LybP75VV+B9ua0oW3kHGV8NDKSQsGFtDTPlDmThTTnOckRki5L5SCqjn1eupc7i0f8vCVJZ4DxIgazM3lDbZaNvaY21HUjywC/L+Wbx7QIEW11CxQT7WEz7P1SxOEEvabOT8+d18Nr9zvCoKSQ44Oec/x1YReDtuh0UOQU9NHzSV8LQIm4FF7H4LaJKvPBOY5gMKoBvU63GIwZBk5Uw1lj4WfA3BT5tFb0IoB7KsMp2AhZtfKps/onKvYsRkj/cIzouA7CKK+ouCE4VwgC9F7NPVtEHPaWF1xBISXc1kkUoBndMFkbn2U4D2pxjQ63GwKaCPBMEXk4esLrV2g== 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=s7lcTtcd03JTYNsr4K6egilwcPZh3dqEK1vNJzmsVWg=; b=5n+Xt7tROPSsPnLl2SmY6PNtO1G69PaDcZdAys27eG+oQRU/L1Hld4Ki0rQkd6QBsqROYMHj0eCjp9GG0K2taCvmHpZ8fi4IWh40xAibtBKbHOpYwMZzioHv2uPUlaMqilJdNQ10OvMv6p7ai5Q/0FPqKcJJfwN1oCb10IMc4ck= Received: from AS9PR05CA0204.eurprd05.prod.outlook.com (2603:10a6:20b:495::25) by DB9PR08MB6362.eurprd08.prod.outlook.com (2603:10a6:10:25a::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.29; Fri, 16 Jun 2023 12:41:08 +0000 Received: from AM7EUR03FT006.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:495:cafe::d4) by AS9PR05CA0204.outlook.office365.com (2603:10a6:20b:495::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.29 via Frontend Transport; Fri, 16 Jun 2023 12:41:07 +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 AM7EUR03FT006.mail.protection.outlook.com (100.127.141.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6500.25 via Frontend Transport; Fri, 16 Jun 2023 12:41:08 +0000 Received: from AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) 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; Fri, 16 Jun 2023 12:41:01 +0000 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.23; Fri, 16 Jun 2023 12:41:00 +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; Fri, 16 Jun 2023 12:41:00 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , , Subject: [PATCH edk2-platforms v1 1/1] Platform/Arm: Disable memmap platform timers for JunoR0 Date: Fri, 16 Jun 2023 13:40:59 +0100 Message-ID: <20230616124059.19524-1-sami.mujawar@arm.com> X-Mailer: git-send-email 2.16.2.windows.1 MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT006:EE_|DB9PR08MB6362:EE_|AM7EUR03FT003:EE_|PA4PR08MB5998:EE_ X-MS-Office365-Filtering-Correlation-Id: e11aa472-8fc9-4173-aacf-08db6e670087 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: Ajt/SjBzu1U3Oj7tDT25OV3CjjeVGAhq1VdZegaqgknDAX5jaOe3rDu0uRBA2DJzALwYQHLJFNftbTRuIJDdiqwzx3YumY0TtVAg4Qg0DcqZ9nqkdjeMYzD2Mq24vRDUWXqaWzNPrV4gmEA7lDQbXcnH3kHVk3B3oHbEQORKdrUdgrh0DzyCzvGMzBc92pF+gvaX3MGtdSfzsEDAeviXIb9msGzFP0v9Mu2l98temqHGDswo61Mgl1yKI9tUEC5/KyaJfqYac1tgx8DcXlOKgOpA3ySEtFVsNzNDkcei3RHdtPjW2Yx4d7Qv4TTM2NcG/U3XGB/4hy1ovOhxgfFJwwgb5LQ/nIpzeadl8x78UWeJWRzi+H8T72JWsyl/6YfRB5m0XO/QfPtuKY1AuEV2StUXnKDJXzEi1MTWOg2UDXOoiDfOQU/P3dlZvV+zpwcfUOMSz5KWqInanzQIsaP8W5lZhSk+JmoDKPnnYFCA7mfFTMe0M1HKR0EJzYPMZbMuM46btptPyP2nV4auThxj+xdRqzMOk4TVu89lKcmJ9TDN5A4IAjdnJ7CVeCvbJTrYoKyhY19DP9fUWWtSMNoXWdIOWb34hWIh229N/Ky1gnKcGVGmgOgtW6fgK7zdsDN4HM6hVsW/O+xUGJ2kLtedzujr6HdFmo1fpEudzrAyTAMGnNnc1fHyO6n+i7oEVW62+MdicNturllDuRVQWNv2EGVy70hky8EiJBLpzBkGtYEnhWC4iGrlscorBjJ1O/hB0HEcqvHAaJwsd83erU0Txg25Aa3+OlYfMxuvfnVVJ2c= 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)(39860400002)(136003)(346002)(376002)(396003)(451199021)(36840700001)(46966006)(40470700004)(478600001)(54906003)(966005)(7696005)(40460700003)(356005)(81166007)(5660300002)(8936002)(44832011)(8676002)(82310400005)(36756003)(2906002)(41300700001)(86362001)(82740400003)(40480700001)(316002)(6916009)(4326008)(70206006)(70586007)(26005)(1076003)(186003)(36860700001)(83380400001)(47076005)(336012)(426003)(2616005)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB6362 Return-Path: Sami.Mujawar@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT003.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 05452ba6-d3d6-4273-13f1-08db6e66f51b X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: D+2Eu8iQ92rDsDyoNHJLAiyy46s5DnI+13EGRKBudhR3x64N6JWAUQPn8mg8e40s/i3mRL9jmf3EBN3B6PHEGX+8v6nbE8MUtppEYRsZqbStWxQcbhlddygmc9XqHVIQrNIgCiUavyt5qNPIpJLSt7NtpAFYBcIqdqNtBor6noouL8J3EfhtbZioKLPTRuGwcEzsljktzgyuE1ojTVzAfGlXKIZhtwro8g02PfdslQJbXEAZeQLjlwUHsGZiWgkQORJ9AL83zgEY07FSJpKFZE5xUZibmW/r0ICc7ofiwvQOndau+vf555PslucMbE8CuLv0DDNR7ZHGpPd6jW1gQtd5/CSRXg9aDLhMqd4TL28UGoM5zNcuyCUinIZFZh4Uvgbox0rkYIN87tGJ3uXqBF83WwY6y29xIphb+NX2V1Z51BALGTYQpLj0SPF4azbYTiV7aQtoZ7E9bbsLYStykA5wg57OpUkGOfB7moMt4v0H7yFjdf+75rWn1K7UG5GRT3lDXs8ylYpUyvmDsWKSpPFEin/iy6ZPT35W1bYCdHc3bSTHV2edd8mpgSIAl9p1TRknbcA3JLVbgDeKwqW8dgK86IixoPMXmZZNE2kTtFmT3cOUnLs29IXQR/frKQ4/AtSA6yXwnHOiwXKvOOdXTHQXmcNARwcvYIcvSTKRyTkpL6t1+7p87tmWDP2XHS55HACDfH9MN0dkE52vrkKLjLS7zL+ijFe5oU2PWICIZTiqA98tb2EL5pEGoH0bj3lw+bMkRhSNlQlHa1MzTxtA+w== 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)(39860400002)(136003)(451199021)(46966006)(40470700004)(36840700001)(2906002)(40460700003)(41300700001)(5660300002)(8676002)(44832011)(8936002)(316002)(4326008)(70586007)(70206006)(6916009)(82310400005)(36756003)(40480700001)(336012)(426003)(36860700001)(47076005)(83380400001)(2616005)(1076003)(26005)(186003)(82740400003)(81166007)(86362001)(478600001)(54906003)(966005)(7696005);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2023 12:41:27.2010 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e11aa472-8fc9-4173-aacf-08db6e670087 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: AM7EUR03FT003.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB5998 Content-Type: text/plain Juno includes a system-level wakeup timer which is an implementation of the ARM Generic Timer architecture. The CNTCTL frame contains some registers that are accessible using a Non-Secure access. Juno R0 incorrectly limits these accesses to Secure access only. This issue is documented in the Juno Errata 832219: APB port security breaks SBSA compliance https://developer.arm.com/documentation/epm008857/latest This results in a crash when the OS tries to access these registers. Therefore, disable memory mapped platform timers for Juno R0. Cc: Ard Biesheuvel Cc: Thomas Abraham Cc: Sudeep Holla Signed-off-by: Sami Mujawar Reported-by: Sudeep Holla --- The changes can be seen at: https://github.com/samimujawar/edk2-platforms/tree/1496_junor0_disable_memmap_plat_timers_v1 Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c | 48 ++++++++++++-------- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c b/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c index 48f0fd370f073c8fed1a649d8c4ab28b062a8290..91f035480dcfe81e93febfac2ef703d6c77737f1 100644 --- a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c +++ b/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c @@ -1,7 +1,7 @@ /** @file Configuration Manager Dxe - Copyright (c) 2017 - 2022, Arm Limited. All rights reserved.
+ Copyright (c) 2017 - 2023, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent @@ -1380,26 +1380,38 @@ GetArmNameSpaceObject ( break; case EArmObjPlatformGTBlockInfo: - Status = HandleCmObject ( - CmObjectId, - PlatformRepo->GTBlockInfo, - sizeof (PlatformRepo->GTBlockInfo), - ARRAY_SIZE (PlatformRepo->GTBlockInfo), - CmObject - ); + if (PlatformRepo->JunoRevision == JUNO_REVISION_R0) { + // Disable Memory Mapped Platform Timers for Juno R0 + // due to Juno Erratum 832219. + Status = EFI_NOT_FOUND; + } else { + Status = HandleCmObject ( + CmObjectId, + PlatformRepo->GTBlockInfo, + sizeof (PlatformRepo->GTBlockInfo), + ARRAY_SIZE (PlatformRepo->GTBlockInfo), + CmObject + ); + } break; case EArmObjGTBlockTimerFrameInfo: - Status = HandleCmObjectRefByToken ( - This, - CmObjectId, - PlatformRepo->GTBlock0TimerInfo, - sizeof (PlatformRepo->GTBlock0TimerInfo), - ARRAY_SIZE (PlatformRepo->GTBlock0TimerInfo), - Token, - GetGTBlockTimerFrameInfo, - CmObject - ); + if (PlatformRepo->JunoRevision == JUNO_REVISION_R0) { + // Disable Memory Mapped Platform Timers for Juno R0 + // due to Juno Erratum 832219. + Status = EFI_NOT_FOUND; + } else { + Status = HandleCmObjectRefByToken ( + This, + CmObjectId, + PlatformRepo->GTBlock0TimerInfo, + sizeof (PlatformRepo->GTBlock0TimerInfo), + ARRAY_SIZE (PlatformRepo->GTBlock0TimerInfo), + Token, + GetGTBlockTimerFrameInfo, + CmObject + ); + } break; case EArmObjGicCInfo: -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'