From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR02-AM5-obe.outbound.protection.outlook.com (EUR02-AM5-obe.outbound.protection.outlook.com [40.107.0.54]) by mx.groups.io with SMTP id smtpd.web10.7866.1585129224818344124 for ; Wed, 25 Mar 2020 02:40:25 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=KOtSijVP; spf=pass (domain: arm.com, ip: 40.107.0.54, mailfrom: krzysztof.koch@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=SyFsxom62A7ErGG7hIEMJqEe+YV/mm2FkPa8P+ezyjA=; b=KOtSijVPw/TVDMm3DcS0SN930EK2T8C6G9vzlGTQQovXj5kbd7AgpmJL6CmzEnvRDFWmHKEYinz02+Oy1WyivuspKmd/ZMyJ9H3YJRkIxUxdXCEPIms9XlSDnz8vrwT57IZa/haMwA7788d/NlbZGfmM0nJBqI5Ppoj9iwoKbAM= Received: from AM0PR06CA0092.eurprd06.prod.outlook.com (2603:10a6:208:fa::33) by VI1PR08MB3247.eurprd08.prod.outlook.com (2603:10a6:803:3d::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.22; Wed, 25 Mar 2020 09:40:21 +0000 Received: from VE1EUR03FT043.eop-EUR03.prod.protection.outlook.com (2603:10a6:208:fa:cafe::15) by AM0PR06CA0092.outlook.office365.com (2603:10a6:208:fa::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.18 via Frontend Transport; Wed, 25 Mar 2020 09:40:21 +0000 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=bestguesspass 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 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.2856.17 via Frontend Transport; Wed, 25 Mar 2020 09:40:21 +0000 Received: ("Tessian outbound 60d769d68364:v48"); Wed, 25 Mar 2020 09:40:21 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: d4e71ce7bb38bb23 X-CR-MTA-TID: 64aa7808 Received: from 096b2561b28f.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id CC3048EA-5612-4B4C-B91F-611534AA2B5F.1; Wed, 25 Mar 2020 09:40:15 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 096b2561b28f.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 25 Mar 2020 09:40:15 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ngyt9Bc1PGjXzjNbGohOWN18H41JjePyb7IUtRJXEuVedq9n+cwnm2+diYyKVvyV+yURVFQ+b2ZkWkF7ltUnrR7h5/aelqqObm6VP7gc72PD/nqF8Pin3vqOGIbEwpbxPLG2Vi7mvvZYeES0Nt1mZ9SLqq1GFVCu19dmu7clWIL80LTHHcqI860qbutSgFDiz67rbcevyc8Hmhh1nfpuwidU071LKw23wEAnLqMpWFwSvKX0muIImXPK5lsrBSCQ+f6lv2K1OccfSDndSHi7Qq0JTK63yW+qoUrl7+UbLftGzdYvmeGn0Kf1B0pt7hmsowarNYHR4XhmJFEJhJ+lVw== 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-SenderADCheck; bh=SyFsxom62A7ErGG7hIEMJqEe+YV/mm2FkPa8P+ezyjA=; b=IA1p2SC4gUD+4ijiDYdNe/He1BRMCa6dewpj2VXevKmEPuadI3b5RwuOdV8WlJssIr9T+dikrE9OhOfeFO0d4vavo8Ux0cYvl2eiP+7OpeV4kYWomz53WN9+RBgESyI+AdfX/jG2iWBmWiN25Kqo8eptAGVnx7zs0dTllVPpvIu1CfOvcT1slVOsaVXqBcbPxjccC6+v7jqR2Sl+IBMqQobYdyafyRu6NqVPe6hAQ5Pq7bAwgrhiOHSHcV//lP9aM+oLh3DVSYQwzPa2mlSO7ly3DG9MlJgec1/qW8OVoplbabQ7K2ESZbQK4Q8TwRGZhh0jAmnVMEdQPGOACqaRNQ== 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=bestguesspass 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=SyFsxom62A7ErGG7hIEMJqEe+YV/mm2FkPa8P+ezyjA=; b=KOtSijVPw/TVDMm3DcS0SN930EK2T8C6G9vzlGTQQovXj5kbd7AgpmJL6CmzEnvRDFWmHKEYinz02+Oy1WyivuspKmd/ZMyJ9H3YJRkIxUxdXCEPIms9XlSDnz8vrwT57IZa/haMwA7788d/NlbZGfmM0nJBqI5Ppoj9iwoKbAM= Received: from AM4PR05CA0008.eurprd05.prod.outlook.com (2603:10a6:205::21) by HE1PR0801MB1722.eurprd08.prod.outlook.com (2603:10a6:3:87::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.20; Wed, 25 Mar 2020 09:40:12 +0000 Received: from VE1EUR03FT047.eop-EUR03.prod.protection.outlook.com (2603:10a6:205:0:cafe::a7) by AM4PR05CA0008.outlook.office365.com (2603:10a6:205::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.19 via Frontend Transport; Wed, 25 Mar 2020 09:40:12 +0000 Authentication-Results-Original: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=bestguesspass 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; Received: from nebula.arm.com (40.67.248.234) by VE1EUR03FT047.mail.protection.outlook.com (10.152.19.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.2856.17 via Frontend Transport; Wed, 25 Mar 2020 09:40:12 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) 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.1415.2; Wed, 25 Mar 2020 09:39:27 +0000 Received: from E119924.Arm.com (10.57.55.133) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Wed, 25 Mar 2020 09:39:26 +0000 From: "Krzysztof Koch" To: CC: , , , , , Subject: [PATCH v1 3/3] ShellPkg: acpiview: Check if SBBR mandatory ACPI tables are installed Date: Wed, 25 Mar 2020 09:39:24 +0000 Message-ID: <20200325093924.22884-4-krzysztof.koch@arm.com> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: <20200325093924.22884-1-krzysztof.koch@arm.com> References: <20200325093924.22884-1-krzysztof.koch@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;IPV:;CTRY:IE;EFV:NLI;SFV:NSPM;SFS:(10009020)(4636009)(376002)(39860400002)(396003)(346002)(136003)(46966005)(70586007)(70206006)(186003)(336012)(2906002)(82740400003)(2616005)(26005)(316002)(54906003)(426003)(4326008)(356004)(86362001)(44832011)(36756003)(81166006)(478600001)(47076004)(8936002)(6916009)(7696005)(8676002)(5660300002)(1076003)(81156014);DIR:OUT;SFP:1101;SCL:1;SRVR:HE1PR0801MB1722;H:nebula.arm.com;FPR:;SPF:Pass;LANG:en;PTR:InfoDomainNonexistent; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4c61b08e-2db3-4387-9745-08d7d0a0894b X-MS-TrafficTypeDiagnostic: HE1PR0801MB1722:|VI1PR08MB3247: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:1186;OLM:1186; X-Forefront-PRVS: 0353563E2B X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 0BVJIe9VWs25BOv7acUgEaaTkl0vINJTfy6/nDPgzo0vciF2tLACbO2HfOx4mEu/YUZeHI8pmkaZ5XUEtSTu9+sfBE+rQzl39k9eEb8im+wnA3a3fSKwE44zpmjmDgllBRaHOto1aRGAtq4TnV1evfWWzyH59x8cEmmz1I4rEbT3XqboKDrwhxSUepZFS58p4JEvelN7hFCp3ejQsmryv7aNiakPyjQnjKGzFhIZ+DOVpMBXVU+uPL6PzlBAH8H/0pAXKtMTwSbs+a/CD1aHtx1hitHLNCQQO4hgehbBzNR7Byjt5RpApl46rdIB6AInEmTy66hByHGZJChWeGP2x2HzeQtlATjKiFr3OstVecWpGlDJwArWDsqKlYQ5XSnhBbxpSUTXK3s3zq5qvK4AFTEkCkzlyf8GQPiKgVuZdsgvq+UmS65tfm3CUkI94jflWgpvy3jojhK5LpiDQmiJkbf5EyWADAPooevTIw+o5h9r3+KuP0tefvEdZDKe1lLkku5tp6Rt/FsbXV1KDWU4yQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1722 Original-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=bestguesspass action=none header.from=arm.com; Return-Path: Krzysztof.Koch@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT043.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123;IPV:CAL;SCL:-1;CTRY:IE;EFV:NLI;SFV:NSPM;SFS:(10009020)(4636009)(346002)(396003)(39860400002)(376002)(136003)(46966005)(86362001)(2906002)(54906003)(7696005)(1076003)(36756003)(70206006)(82740400003)(8676002)(70586007)(5660300002)(8936002)(336012)(44832011)(426003)(186003)(81156014)(81166006)(6916009)(316002)(478600001)(26005)(4326008)(47076004)(26826003)(2616005)(36906005);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR08MB3247;H:64aa7808-outbound-1.mta.getcheckrecipient.com;FPR:;SPF:Pass;LANG:en;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; X-MS-Office365-Filtering-Correlation-Id-Prvs: ce1385fa-3987-4e77-5dca-08d7d0a083f8 X-Forefront-PRVS: 0353563E2B X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GrLpFmnzrl6PTpxrq7RGgCIixAruGEfFJu97ldw5EQHBc7j2x7DhuNRm2xX7ManCcP60bys7SKoJS2udQvCKp2+yrzdkcymwuZ4eG4uNwNJARkefjYVXtLpk6s5LvhAkMQVuBYsOQ1VOl57Rfy/ugl3QtjhatM1Rx75qUq5/LceGLP9hx6Pzp5/kN31Z+IXPNDHjy6ElpR+66toTbku1ViFbvPZTqe/UQ4SNXUGJa7bYYJwohVnZxg2LGBp7w7FK4b/2nPgslK55zg/3wD/cAzfpMP1iLE+3dZ8YiLUEW1OaNPgPGaR/NHB4On6bwfwNExnl1IS5I6Q1zg4/mfvpL3eV15Njs5H/i+ZRCs2MH9JLTqqZ72wQ88gmfYl0lTwLjIiC/BocNzCqJ+lznP1wFfXW0Z2H+1gljKac4DqEsqZLnKN0P83Ai8Lw67G5hbclilLmEU6+Eo0XQ3dUZn3mUm5XPOK9KDn98SGtutzrMvL7O100qTHfn4Cnpwj7zCUMVUj5XDCDfJsXrC1MX/yeeA== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Mar 2020 09:40:21.1910 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4c61b08e-2db3-4387-9745-08d7d0a0894b 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-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3247 Content-Type: text/plain For Arm-based platforms, count the instances of installed tables for each ACPI table listed as 'mandatory' in any Server Base Boot Requirements (SBBR) specification. Validate that the all the mandatory SBBR tables present. Report an error for each missing table. This new feature is optional and can be enabled with the -r command line parameter. Reference(s): - Arm Server Base Boot Requirements 1.2, September 2019 - Arm Server Base Boot Requirements 1.1, May 2018 - Arm Server Base Boot Requirements 1.0, March 2016 Signed-off-by: Krzysztof Koch --- Notes: v1: - check if SBBR mandatory ACPI tables are installed [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c | 16 ++++++++++++++ ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c | 22 ++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c index 501967c4dde680809c56e5d79ed744a1013a69e1..d5b9eee5232399c4df50d0f9598810413759fed6 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c @@ -3,6 +3,12 @@ Copyright (c) 2016 - 2020, ARM Limited. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent + + @par Glossary: + - Sbbr or SBBR - Server Base Boot Requirements + + @par Reference(s): + - Arm Server Base Boot Requirements 1.2, September 2019 **/ #include @@ -12,6 +18,10 @@ #include "AcpiTableParser.h" #include "AcpiView.h" +#if defined(MDE_CPU_ARM) || defined (MDE_CPU_AARCH64) +#include "Arm/SbbrValidator.h" +#endif + /** A list of registered ACPI table parsers. **/ @@ -216,6 +226,12 @@ ProcessAcpiTable ( } } +#if defined(MDE_CPU_ARM) || defined (MDE_CPU_AARCH64) + if (GetMandatoryTableValidate ()) { + ArmSbbrIncrementTableCount (*AcpiTableSignature); + } +#endif + Status = GetParser (*AcpiTableSignature, &ParserProc); if (EFI_ERROR (Status)) { // No registered parser found, do default handling. diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c index 49c2e87c430d7fb57793f6405ebee91cb8f6cbaa..84ffb3595750a3e7d65fdb82c0f90bc2d76c659e 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c @@ -2,6 +2,12 @@ Copyright (c) 2016 - 2020, ARM Limited. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent + + @par Glossary: + - Sbbr or SBBR - Server Base Boot Requirements + + @par Reference(s): + - Arm Server Base Boot Requirements 1.2, September 2019 **/ #include @@ -16,6 +22,10 @@ #include "AcpiView.h" #include "UefiShellAcpiViewCommandLib.h" +#if defined(MDE_CPU_ARM) || defined (MDE_CPU_AARCH64) +#include "Arm/SbbrValidator.h" +#endif + EFI_HII_HANDLE gShellAcpiViewHiiHandle = NULL; // Report variables @@ -438,6 +448,12 @@ AcpiView ( return EFI_UNSUPPORTED; } +#if defined(MDE_CPU_ARM) || defined (MDE_CPU_AARCH64) + if (GetMandatoryTableValidate ()) { + ArmSbbrResetTableCounts (); + } +#endif + // The RSDP length is 4 bytes starting at offset 20 RsdpLength = *(UINT32*)(RsdpPtr + RSDP_LENGTH_OFFSET); @@ -466,6 +482,12 @@ AcpiView ( return EFI_NOT_FOUND; } +#if defined(MDE_CPU_ARM) || defined (MDE_CPU_AARCH64) + if (GetMandatoryTableValidate ()) { + ArmSbbrReqsValidate ((ARM_SBBR_VERSION)GetMandatoryTableSpec ()); + } +#endif + ReportOption = GetReportOption (); if (ReportTableList != ReportOption) { if (((ReportSelected == ReportOption) || -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'