From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR03-VE1-obe.outbound.protection.outlook.com (EUR03-VE1-obe.outbound.protection.outlook.com [40.107.5.40]) by mx.groups.io with SMTP id smtpd.web09.14048.1633371823938449716 for ; Mon, 04 Oct 2021 11:23:44 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=eky9/rY3; spf=pass (domain: arm.com, ip: 40.107.5.40, 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=7ZsmykmbPVkY/0JQrk9B11E3HCRtd/3f4Q3LI1WC3MI=; b=eky9/rY3vQSZXFnFPYVu5Ah1HE0sJ59ncF9AJEFF1fAb79EIiJ7+xT2J7ByP9cq68vNvBQK9tsPj5zrWKgosDbnygTSGQEodSDSI0Q6OI4sVLgp7mIX+tNqAQucAoS+F+y11/2lp0KYK4pEla9pST28ratg8yLzv1AzDoWHbHPM= Received: from AM5PR1001CA0039.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:206:15::16) by DB7PR08MB3642.eurprd08.prod.outlook.com (2603:10a6:10:4a::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.15; Mon, 4 Oct 2021 18:23:33 +0000 Received: from VE1EUR03FT043.eop-EUR03.prod.protection.outlook.com (2603:10a6:206:15:cafe::a3) by AM5PR1001CA0039.outlook.office365.com (2603:10a6:206:15::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.14 via Frontend Transport; Mon, 4 Oct 2021 18:23:32 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.33.187.114) 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 (protection.outlook.com: domain of arm.com designates 63.33.187.114 as permitted sender) receiver=protection.outlook.com; client-ip=63.33.187.114; helo=64aa7808-outbound-2.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-2.mta.getcheckrecipient.com (63.33.187.114) by VE1EUR03FT043.mail.protection.outlook.com (10.152.19.122) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.14 via Frontend Transport; Mon, 4 Oct 2021 18:23:32 +0000 Received: ("Tessian outbound 8b24208353e0:v103"); Mon, 04 Oct 2021 18:23:32 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 5c5ac64268fece57 X-CR-MTA-TID: 64aa7808 Received: from e6e5e47cbc0f.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 2D2AB318-5E8E-4F8E-ACBE-DA5E261A4BE1.1; Mon, 04 Oct 2021 18:23:12 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e6e5e47cbc0f.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 04 Oct 2021 18:23:12 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AoRt3H7TG6bYrpNQRLV40IJReKtXsylj6IrCCaNHllQDxXoAS+Ir7BMoRsEEGP/C0JRYgO+FZYR27tqVsTHDDVbBSOjfvqxCFIo0Ql01xR1WEDsSVlH//zynT4Ik/HqX4ziEPyezKH/U+IvCsA1zJmKcUw/3RVWjQ5eky6EQb8jpXgGN8BJK+H9tD8uyHqoNrCrNtEji4Rfy0ZZG0VHdM4r3CjphF18DCIwTt9fbOUMCbSl+S/qtqPpwgdXgijs5DAEuqS//fow/phv8aFGp1+Tge/1TiNj2eXRteWWb4xWgy3dgnvtuRJMmFwcl2P3lU+1ISNvzPDNnAUAyDWsdlw== 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=7ZsmykmbPVkY/0JQrk9B11E3HCRtd/3f4Q3LI1WC3MI=; b=ObY1Brv5hSNaF/XevmXA8sKWGBqCtqhNzDQ3Z/1HSL9nouS/HuT0fcJcx5ftZ8LWEzUAUCp0kGRGfEmOGCCXZ8X+0HlYYar9/r96Bx5PZCQJLtPlIQJpRGFDVG4WV1QM62mlGtL/EjUe3zdZk1mOTo8VOOW8Arn/JQFIsfuuIUSgDZynFREwEjgeMGojULZAgA8ojP1h0qk9zclIMyO70CDCV2PclfjOX3bqpkUdX/S1FSB0uP1Gz9GE6B1T50Lt2GG7tflxlAdSgLuhQI0f/FIbD+B5zpyNGbYPp5FUd4QhO8f3lxr/pqixLYmRpfSh3OBYrbeujl1Sxm+NA4HCqA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; 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=7ZsmykmbPVkY/0JQrk9B11E3HCRtd/3f4Q3LI1WC3MI=; b=eky9/rY3vQSZXFnFPYVu5Ah1HE0sJ59ncF9AJEFF1fAb79EIiJ7+xT2J7ByP9cq68vNvBQK9tsPj5zrWKgosDbnygTSGQEodSDSI0Q6OI4sVLgp7mIX+tNqAQucAoS+F+y11/2lp0KYK4pEla9pST28ratg8yLzv1AzDoWHbHPM= Authentication-Results-Original: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) by AM6PR08MB4534.eurprd08.prod.outlook.com (2603:10a6:20b:ba::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.22; Mon, 4 Oct 2021 18:23:10 +0000 Received: from AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::54b5:239d:9896:ee65]) by AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::54b5:239d:9896:ee65%4]) with mapi id 15.20.4566.022; Mon, 4 Oct 2021 18:23:10 +0000 Subject: Re: [edk2-platforms][PATCH v3 3/5] Platform/Sgi: define memory region for GHES error status block To: Omkar Anand Kulkarni , devel@edk2.groups.io Cc: Ard Biesheuvel , nd References: <20210824060027.27246-1-omkar.kulkarni@arm.com> <20210824060027.27246-4-omkar.kulkarni@arm.com> From: "Sami Mujawar" Message-ID: Date: Mon, 4 Oct 2021 19:23:13 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 In-Reply-To: <20210824060027.27246-4-omkar.kulkarni@arm.com> X-ClientProxiedBy: LO2P265CA0339.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:d::15) To AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) MIME-Version: 1.0 Received: from [10.1.196.43] (217.140.106.52) by LO2P265CA0339.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.21 via Frontend Transport; Mon, 4 Oct 2021 18:23:09 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f2133cb1-b864-48d4-941e-08d987641289 X-MS-TrafficTypeDiagnostic: AM6PR08MB4534:|DB7PR08MB3642: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:1303;OLM:1303; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: veugBFDWlZ8Fga0s+Rp2Yk8u6xOYhACFm+KTGwJDmniUkcHFSteONpfa7AiU154IxDsnTLjqOuGIUzARxeYZ5IUxbQWw0xNu0RfEzq+ifaPImqlbmLnPDN5we1PKt7lwRJDWGnCpnYcvws4HlR3tI0DV1OBKhjU353lCJmnwEpOyh6TPZQylKw3AY98isHzZUC2nwZE9OYoZxlcU1ffbF8Hsc2kimY8YA26/x72OCyc597s4OUVqMCBy233/ccBP/VUjBI5qTD5rUvIFX78NgiTjehaigqBu5bmTS71Cq8vpJiLEMx+tbMg70Uxo2m4uTx+lxicY/zWZf1DsDlTKTxvZO1LSqC6jOVESdlfcjqb27lBvdM4QWH82Ck6yUPCZ4trriwDK4a63H6h83MW35qxz6NnX1PuikXsHIJQFvemP9MvbojAnhvW+0tGzxfGcu2qWdJKRpB49+/qyPAheP6Cgua8wo0MlVHN3UrKjtGrKTS/gqC0zs+eFP0kIbkaV2Ub+sgcJt2gwYZJQOAUOz85TbzT/KPRBOfhdqFdUTYU2HvLu8Fbn9uDnnIymp2dYMAlO8ma4V2gUtJWjXU9gT29bNBI3B67j0qzZrf3zoWCMtbF0X+5wNwyNMXSM6f0098VhZZL9jnKNd48fhlsxuaJ29S6UoF7nD1Hs8uiQ4V5EVnajBiVaXQy2LEQaTuaBCYwyWx9h8Tzc+5Imoy6T5KNL5Sz/f4S3cD7zsXjAEy28xyV6Zl4TaDZqma0z7pQx8w2cNCSbhvdk67LxPq9ACw== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR08MB6806.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(53546011)(52116002)(8936002)(83380400001)(36756003)(86362001)(5660300002)(38350700002)(38100700002)(186003)(6486002)(44832011)(66476007)(66946007)(26005)(6666004)(16576012)(66556008)(31696002)(2616005)(31686004)(4326008)(8676002)(2906002)(956004)(316002)(508600001)(54906003)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4534 Original-Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; Return-Path: Sami.Mujawar@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT043.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 7221414c-84fb-4925-e2db-08d987640507 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FJaT7ujqEr+72KajCtjUbNgzUxJifjna1NsOP6YU8sc+6Wc1EtfLRW4t5mLmLW7n0B58M1Am86FDGmYgUFHBAlXUy+Gb32apwbalozq9Q7of+BwWds3wCTgNvkJ902zYLGuI7vRDikVV0UxLIwu0nZI0Re1/1uY/VWkjPLZJzrHAw5gVViHdKIFV09p/Mrl6xkiArlsc6uNQLNzLnLU6UMA4MpJ4uEZfdF3yrPz/ut+u9IvTtRIQOTs4BagTLF2Dwv2v5IhevdeJKTv90pLqOO0J2xgT3dVUlcc9NEY/Wtgu5dNch3hcU3u7DMnPdnLwbsDqhSm9JNNecORXEC/ndcquShzsDM3sSyZW6GJDxAUytBRUjCQ9FyvNVRj5WCIgQ/9zVJVWRjtAdU4g5M2iobGlVIcmFEGLGoWHosbG5f30RkGfsOZh44WhIgmkMNzE5Q3o6fwSb6I8PFi21vj1HSSUz2+b8PGVF73RVG+B8Na/Uotvd1OZNAzRQ1rhhHlVUZ/phBDQjviVXppKI49yW67i1Gbk0S4oWMzpecXcePZgS8H1rsSWdtxAiyBWEZ+56or5WzK6h1h89vMXW6L7tGJ2Y2ue9xZ2mj6efgKBaP0yMSEUL5+RqDQ9E8yT79Ns7arJIuGu1df/xia+3qjocelI8hHklbd1fRciZIUfAmLbS9Mx7374rxxefqpIXx7ACtDXi6PyvrciCYVqxQFg84JjDYDVHoO3GLvgwGs1q2c= X-Forefront-Antispam-Report: CIP:63.33.187.114;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-2.mta.getcheckrecipient.com;PTR:ec2-63-33-187-114.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(4636009)(46966006)(36840700001)(186003)(2906002)(53546011)(8936002)(6666004)(26005)(2616005)(956004)(36756003)(356005)(4326008)(6486002)(70586007)(70206006)(8676002)(336012)(31696002)(36860700001)(81166007)(44832011)(86362001)(54906003)(31686004)(47076005)(83380400001)(316002)(508600001)(82310400003)(16576012)(5660300002)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2021 18:23:32.6081 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f2133cb1-b864-48d4-941e-08d987641289 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.33.187.114];Helo=[64aa7808-outbound-2.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR03FT043.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3642 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Hi Omkar, This patch looks good to me. Reviewed-by: Sami Mujawar Regards, Sami Mujawar On 24/08/2021 07:00 AM, Omkar Anand Kulkarni wrote: > Allow platforms to define the base address and size of the memory region > that is reserved for MM drivers to populate the GHES generic error > status block with information about the platform error. > > Co-authored-by: Thomas Abraham > Signed-off-by: Omkar Anand Kulkarni > --- > Platform/ARM/SgiPkg/SgiPlatform.dec | 1 + > Platform/ARM/SgiPkg/SgiPlatform.dsc.inc | 4 ++++ > Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf | 6 ++++++ > Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c | 13 +++++++++++-- > 4 files changed, 22 insertions(+), 2 deletions(-) > > diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dec b/Platform/ARM/SgiPkg/SgiPlatform.dec > index 8cd818a9bf64..e46fa5d9a1d5 100644 > --- a/Platform/ARM/SgiPkg/SgiPlatform.dec > +++ b/Platform/ARM/SgiPkg/SgiPlatform.dec > @@ -31,6 +31,7 @@ > [PcdsFeatureFlag.common] > gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported|FALSE|BOOLEAN|0x00000001 > gArmSgiTokenSpaceGuid.PcdVirtioNetSupported|FALSE|BOOLEAN|0x00000010 > + gArmSgiTokenSpaceGuid.PcdGhesMmSupported|FALSE|BOOLEAN|0x00000027 > > [PcdsFixedAtBuild] > gArmSgiTokenSpaceGuid.PcdDramBlock2Base|0|UINT64|0x00000002 > diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc b/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc > index bb32584de63d..5307280ef9a3 100644 > --- a/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc > +++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc > @@ -107,6 +107,10 @@ > gArmSgiTokenSpaceGuid.PcdVirtioNetSupported|TRUE > gEfiMdeModulePkgTokenSpaceGuid.PcdEnableVariableRuntimeCache|FALSE > > +!if $(ENABLE_GHES_MM) == TRUE > + gArmSgiTokenSpaceGuid.PcdGhesMmSupported|TRUE > +!endif > + > [PcdsFixedAtBuild.common] > gArmTokenSpaceGuid.PcdVFPEnabled|1 > gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000 > diff --git a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf > index 22e247ea4fae..8cc362ea194f 100644 > --- a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf > +++ b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf > @@ -79,10 +79,16 @@ > gArmSgiTokenSpaceGuid.PcdWdogBase > gArmSgiTokenSpaceGuid.PcdWdogSize > > + gArmPlatformTokenSpaceGuid.PcdGhesGenericErrorDataMmBufferBase > + gArmPlatformTokenSpaceGuid.PcdGhesGenericErrorDataMmBufferSize > + > gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 > gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase > > +[FeaturePcd] > + gArmSgiTokenSpaceGuid.PcdGhesMmSupported > + > [Guids] > gArmSgiPlatformIdDescriptorGuid > gEfiHobListGuid ## CONSUMES ## SystemTable > diff --git a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c > index 8139b75d8ee4..fd4a90bbc0ef 100644 > --- a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c > +++ b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c > @@ -1,6 +1,6 @@ > /** @file > * > -* Copyright (c) 2018-2020, ARM Limited. All rights reserved. > +* Copyright (c) 2018-2021, ARM Limited. All rights reserved. > * > * SPDX-License-Identifier: BSD-2-Clause-Patent > * > @@ -17,7 +17,8 @@ > > // Total number of descriptors, including the final "end-of-table" descriptor. > #define MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS \ > - (14 + (FixedPcdGet32 (PcdChipCount) * 2)) > + (14 + (FixedPcdGet32 (PcdChipCount) * 2)) + \ > + (FeaturePcdGet (PcdGhesMmSupported)) > > /** > Returns the Virtual Memory Map of the platform. > @@ -239,6 +240,14 @@ ArmPlatformGetVirtualMemoryMap ( > VirtualMemoryTable[Index].Length = PcdGet64 (PcdMmBufferSize); > VirtualMemoryTable[Index].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_UNCACHED_UNBUFFERED; > > + if (FeaturePcdGet (PcdGhesMmSupported)) { > + // GHESv2 Generic Error Memory Space > + VirtualMemoryTable[++Index].PhysicalBase = PcdGet64 (PcdGhesGenericErrorDataMmBufferBase); > + VirtualMemoryTable[Index].VirtualBase = PcdGet64 (PcdGhesGenericErrorDataMmBufferBase); > + VirtualMemoryTable[Index].Length = PcdGet64 (PcdGhesGenericErrorDataMmBufferSize); > + VirtualMemoryTable[Index].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE; > + } > + > // End of Table > VirtualMemoryTable[++Index].PhysicalBase = 0; > VirtualMemoryTable[Index].VirtualBase = 0;