From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (EUR05-DB8-obe.outbound.protection.outlook.com [40.107.20.60]) by mx.groups.io with SMTP id smtpd.web09.13458.1633369649898206642 for ; Mon, 04 Oct 2021 10:47:30 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=bJvLDwR6; spf=pass (domain: arm.com, ip: 40.107.20.60, 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=VwL2tbltobbgkTIVW+b4I4mUZVqnsmX4QZ7jG6qfJDI=; b=bJvLDwR6F55iwJ55HZ9Vlyd6TH8VjFCnoJLyThVF9/3N+O5yJA/MNMnZd4yeJcQIy0MB7DSeLsuQOAsMps+AdCwbw85Z9fw58RxBHptPdcvvsmhZJj/Id7oE+G0xD2wvvSriyggqVl7RDIlrFJ85IrTY+/EvyCBN4REEHL3SOyg= Received: from AM5PR0101CA0034.eurprd01.prod.exchangelabs.com (2603:10a6:206:16::47) by AM8PR08MB6403.eurprd08.prod.outlook.com (2603:10a6:20b:355::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.19; Mon, 4 Oct 2021 17:47:27 +0000 Received: from VE1EUR03FT019.eop-EUR03.prod.protection.outlook.com (2603:10a6:206:16:cafe::41) by AM5PR0101CA0034.outlook.office365.com (2603:10a6:206:16::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.13 via Frontend Transport; Mon, 4 Oct 2021 17:47:27 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) 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.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT019.mail.protection.outlook.com (10.152.18.153) 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 17:47:26 +0000 Received: ("Tessian outbound c21c48fbc857:v103"); Mon, 04 Oct 2021 17:47:26 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 54a4b43d4443a7f7 X-CR-MTA-TID: 64aa7808 Received: from dbabb5ed2ddb.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id F8431C4F-5BD6-4DCC-93E6-047603DE2AF1.1; Mon, 04 Oct 2021 17:47:16 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id dbabb5ed2ddb.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 04 Oct 2021 17:47:16 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l+L5uSEq/NZOTL6seQ4MLyefnEnK0kH1zsQkjrzczJdSxC3bPyY0Dl3WF/9uEc8K2xfiGJIDoalGAe+G6PiXpezhhtYOYQNvRG6iThoJQTT7PJnNlbhkVV4H8vKOS6wd2IJeWckSQNme25HK8B4VY5D3IpsOJrUE2dDxZl2liJdOoO/58i6f2LBdWKwxumCiTDmRJsKHApe+Wdr0IqQsYfTNS2lxBpd8a9+yBov+rb9SNFsbPGXyV3HiQK6D9lwMenJOvjqbH/JMfc47YE5qfngl6IVipYdUKqslYC4XHu0K/ARaJd4GbiIQ1nlWQohbgDearKsTLQ/zlHW4jOQhrg== 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=VwL2tbltobbgkTIVW+b4I4mUZVqnsmX4QZ7jG6qfJDI=; b=I+ZTHm/WGTF6E2pdukqLdXPF1weoN1eAHsja8+qrMUn3IwZM66YSP1psyXyjll28HT3U06M6otwQNkbpsc4OzksQNlIJbE1il1Npk4J2tYkjv1NH6jsTbQY2qvb2ESX++nrtuCCWp6xuERcjbVcedjUQej+Z1jWb2Su/xJbmFI6DFBuVhmAaEn5i9N1wFkpA1K+gBTHUdYEKlMrrY7jFLS8wl9V694GMEFscDwvAzpZnUrF96rZ9YbNljx0eqtu+DYBgqnpnkNlLCfnTvyh8zDchJ51EmcMT3xdDCWV+k0SAhsdnabd1CGYmcCiXFlRV+tOu+m0onC1lyJcpCf5oDg== 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=VwL2tbltobbgkTIVW+b4I4mUZVqnsmX4QZ7jG6qfJDI=; b=bJvLDwR6F55iwJ55HZ9Vlyd6TH8VjFCnoJLyThVF9/3N+O5yJA/MNMnZd4yeJcQIy0MB7DSeLsuQOAsMps+AdCwbw85Z9fw58RxBHptPdcvvsmhZJj/Id7oE+G0xD2wvvSriyggqVl7RDIlrFJ85IrTY+/EvyCBN4REEHL3SOyg= 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 AM5PR0801MB1715.eurprd08.prod.outlook.com (2603:10a6:203:3c::10) 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 17:47:14 +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 17:47:14 +0000 Subject: Re: [edk2-platforms][PATCH v3 4/5] EmbeddedPkg: Add helpers for HEST table generation To: Omkar Anand Kulkarni , devel@edk2.groups.io Cc: Ard Biesheuvel , nd References: <20210824053403.24103-1-omkar.kulkarni@arm.com> <20210824053403.24103-5-omkar.kulkarni@arm.com> From: "Sami Mujawar" Message-ID: <02de6152-ce53-d95e-7384-f3e0052b2e96@arm.com> Date: Mon, 4 Oct 2021 18:47:19 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 In-Reply-To: <20210824053403.24103-5-omkar.kulkarni@arm.com> X-ClientProxiedBy: LO4P123CA0447.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a9::20) 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 LO4P123CA0447.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a9::20) 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 17:47:14 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9f88a949-6836-46b7-8ec9-08d9875f07ae X-MS-TrafficTypeDiagnostic: AM5PR0801MB1715:|AM8PR08MB6403: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:1265;OLM:1265; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: iFto+Tf4TkFIwDJG8UnG4GnEgW6nvACEXkLLeod2MeTi8ctqZu9tTsOsYxBb9MEqpuqA0iLjTlpk6iNZoqjJaQgEuPEGAtrzZIO5jfZWZmRA+GZylcUR01YW6Cam/f/5Pw7l1ljR1NjrxpL0GEiFkzWILb/XlYBbsTp+QIxYd7RKtFqNeOK7K3XHFWRu/hLb9DSkgqw0gGDkKq7O7xYVlx6mP6e6sdqibBz20oOA3IAkunzV6ZET6ZfMTRb7XniwtrnjIidtqkVzpb9sykbhNnEfBEcYVKoaYWvLpRbKf3Rz83tYhCqET5H7BfmLdK5DRHWKiYHLsY7MtxHNMYo8tL3BmXbP7rjyFW5VtRyXoSLDdHx2ikY4t5dhl2FZjxIQnfCTsqsSPp/Nj2IdeizFUX5iytmjK8GJV2ZSIVPCnoe6/xXfRuuBFLLmxa7dy8cXyoWOe+lb+wR8+a91lrl185HnEVEq3qxBwD6lDFfIrRclRHszdBPQLueT1oTPRyuwn3y14DD44cAWx3B+JD67BJNGWvqVoQNQvmsXQTA+Avoj7fVA1co6XS3AY0EqlbmJh4N338o+zR21tDLnSWxZJQzOReKxqk9QWwiETj3AVDUo/TPCbcZQoGCf7rhaYbQrMxRqlrgMXMejC8N4vsiIqsjUHuqInYFDUS6+BQiKaVqS7TkApDV+KTBKWzImmmWKIOnvKBpgnVNSPDGOWdsKz1d1TGFWK4T0zv2a5SkUUAbxixBJtqm/TszygI/G2oMtDdSA/3nfFZH0GbfQxb7r9A== 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)(6486002)(86362001)(508600001)(316002)(31696002)(54906003)(66556008)(66476007)(83380400001)(38350700002)(38100700002)(16576012)(2616005)(31686004)(956004)(5660300002)(8936002)(8676002)(4326008)(53546011)(66946007)(52116002)(186003)(26005)(2906002)(44832011)(36756003)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1715 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: VE1EUR03FT019.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 88f42525-463d-4845-c197-08d9875f0057 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TD/7z6+JBrCSPqLEWBxghDebSezMeUQKcI1r6pccAXG2nYkHqr9O2cbn+E5bijK2UVNMpsJZgzfKv66J+ZZiNl9+hPC+WWRMQrx16Ei1l2IjZ51CgFFH/5vkebDW8DuF2EoD271mo77JHS8HzxTQ3TfZcQOU9oNRw+zRtA78pukBS9z1bTNdeW3QNrLxS9oY5fKVlUewKtoScH/M9THBjfvSEIRiPsLyxgO2S/pziiQmrqxE8qevIj3KRAFFwA5g/GNfcerCPXfM5nE38lf6OEVS+h30EzooT4X8XrWJsrvEVRZqOYxA87kDNXZIi5B3hKchT++9KByBDX60QA07GMl0k2dxa1q1676dr4h5VF42iTcohSOujFR2XXMwFaKVhy0Q9TiB78JOdMnQclzqrzumHpBz2FLEZxnMOCRCVt4+S0I2sztvCrAO6+YfmisYgw8Ss3WmZltJnpf641e0hClx1eDvSFwdvbKKjHpF3MYKw8C5d0Zcf3n8nXxNPw6hRTg0bWaonCyUVgmKU7YWoF2IrQPZsC6xoJKfIG++7Rgj4gCp4zppPIIzkqgdHuwK5AJ9gXZD7Q/8uG+qq2I2kQ4OjjFdvwj84WHl/68MIJDUGz8wnwk5OrznAIPdrD1N99Qc8gkN7VB/CpswQKiiOf4IOUwKX5sTluIErjn/XIBpFQv0g1dkIRfSknPyQUCh2xelCll3EZDRfXvBoD6I77Ly+NLD3jC80O7uyU1PgWQ= 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:(4636009)(36840700001)(46966006)(5660300002)(53546011)(6486002)(36756003)(54906003)(82310400003)(316002)(508600001)(70586007)(70206006)(44832011)(31696002)(336012)(83380400001)(16576012)(31686004)(2906002)(86362001)(36860700001)(4326008)(81166007)(8676002)(26005)(2616005)(8936002)(186003)(356005)(47076005)(956004)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2021 17:47:26.9125 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9f88a949-6836-46b7-8ec9-08d9875f07ae 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: VE1EUR03FT019.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR08MB6403 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 06:34 AM, Omkar Anand Kulkarni wrote: > Add helper macros for the generation of the HEST ACPI table. Macros to > initialize the HEST GHESv2 Notification Structure and Error Status > Structure are introduced. > > Signed-off-by: Omkar Anand Kulkarni > --- > EmbeddedPkg/Include/Library/AcpiLib.h | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) > > diff --git a/EmbeddedPkg/Include/Library/AcpiLib.h b/EmbeddedPkg/Include/Library/AcpiLib.h > index c142446d9d59..6de067823011 100644 > --- a/EmbeddedPkg/Include/Library/AcpiLib.h > +++ b/EmbeddedPkg/Include/Library/AcpiLib.h > @@ -22,6 +22,7 @@ > #define ARM_GAS16(Address) { EFI_ACPI_5_0_SYSTEM_MEMORY, 16, 0, EFI_ACPI_5_0_WORD, Address } > #define ARM_GAS32(Address) { EFI_ACPI_5_0_SYSTEM_MEMORY, 32, 0, EFI_ACPI_5_0_DWORD, Address } > #define ARM_GASN(Address) { EFI_ACPI_5_0_SYSTEM_MEMORY, 0, 0, EFI_ACPI_5_0_DWORD, Address } > +#define ARM_GAS64(Address) { EFI_ACPI_6_3_SYSTEM_MEMORY, 64, 0, EFI_ACPI_6_3_QWORD, Address } > > // > // Macros for the Multiple APIC Description Table (MADT) > @@ -89,6 +90,25 @@ > WatchdogTimerGSIV, WatchdogTimerFlags \ > } > > +// > +// HEST table GHESv2 type related structure. > +// Helper Macro to initialize the HEST GHESv2 Notification Structure. > +// Refer Table 18-394 in ACPI Specification, Version 6.3. > +// > +#define EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_STRUCTURE_INIT(Type, \ > + PollInterval, EventId) \ > + { \ > + Type, \ > + sizeof (EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_STRUCTURE), \ > + {0, 0, 0, 0, 0, 0, 0}, /* ConfigurationWriteEnable */ \ > + PollInterval, \ > + EventId, \ > + 0, /* Poll Interval Threshold Value */ \ > + 0, /* Poll Interval Threshold Window */ \ > + 0, /* Error Threshold Value */ \ > + 0 /* Error Threshold Window */ \ > + } > + > typedef > BOOLEAN > (EFIAPI *EFI_LOCATE_ACPI_CHECK) (