From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (NAM11-CO1-obe.outbound.protection.outlook.com [40.107.220.72]) by mx.groups.io with SMTP id smtpd.web11.20013.1688146229033772249 for ; Fri, 30 Jun 2023 10:30:29 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@nvidia.com header.s=selector2 header.b=LYOIckjo; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: nvidia.com, ip: 40.107.220.72, mailfrom: jbrasen@nvidia.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J0EGREYUi00KCeSoT53+tpun/kU8jtSFD8m4aqTcjVxXzeMIpNVqCThg61sqeMDm7pp4fH67wsQMJyZ4UVj/g3EbePV3sbfzmd4u9z0gGFPFOZU5b4OIwi5yM+4qDEYPU5K/CKjvSYfHHBmEXjPwiULOzgIZufyD9O0awZCeyab+f3ca2AyRh6s6Y59+1urp8+QrolKnulKfEWvKboV10B3AijOD9X8tKfPRAr68+DsUUvJnjEAdjheNZdFkDB3eDpS2Pu65ZbNaF/GyYkui9BNZwWED4NKLmoV9c2jQjdP57pvJWnFMXMKZruChVZ3+oabSRwu0xcN/ZwnPq5nB9Q== 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=SltGp/UyoSzFxloDnApzxOzULGbi8bWv7Cv+z9Cw/1c=; b=JPBqjL25vA0Q9huwHIf/p7I3RToNRADl2+uX3VUfjxMppsYlVehIjbOBuXIvbWR+vj/oGOCwJlsQlKO9tuCKF+8Gj123DDO+wnC3mT4vxHDYFVOvl/bVAagIz99cOMqE51etAV+RK2aVImKeEN+XPjYLce4/ND6G4KV4NXnjpDYkntbUffZr7eoSa4NIyOFyItQKzMW6OrDSROUnnKuu+6qRql1tOW06Qca9mpPpW9th7dxiX9fG8C/7Qe0b8yVLtHCtIlXEWoHWvvX9Z3N5gLYr12Vcre+Jv9FUXkKOHLgp8AMHWitlo1gPlSLnjl0Dt3AK35LEFQXbYOvOL7Nh7Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SltGp/UyoSzFxloDnApzxOzULGbi8bWv7Cv+z9Cw/1c=; b=LYOIckjo4ZIektx0mCDM1NMc2cOzmpl6q7ov0dugFDgP/NYNWyvF7+TOBelJ8q9PqYFerLKxv/4YVCDDYRGA5Ex+lNB6YO+WGy6kQRm//7Rc2KxKpqWRdZcsgkhlafGQhAOBP4Mia4mK5Ly0Ifvm5UY9TalJD6qfchBzuFok0uuJef5zCmjqQHztNDlcnXSGKM+59m04CqUqHbfHpItV71/sXjLHvwMPgUg2EOoOx0y/bMG6AoLKxwG7dPbEwKGZ6gcgdSvxYDgnlZytA7jrkV6Ka92UpFqHf4EGSsh77LClrtRO18y0isx2b60g4h87QtSu4Zg/LS6QyG6Svm1LBA== Received: from DS7PR05CA0018.namprd05.prod.outlook.com (2603:10b6:5:3b9::23) by SN7PR12MB8058.namprd12.prod.outlook.com (2603:10b6:806:348::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24; Fri, 30 Jun 2023 17:30:26 +0000 Received: from DM6NAM11FT090.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3b9:cafe::82) by DS7PR05CA0018.outlook.office365.com (2603:10b6:5:3b9::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.10 via Frontend Transport; Fri, 30 Jun 2023 17:30:26 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by DM6NAM11FT090.mail.protection.outlook.com (10.13.172.184) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.43 via Frontend Transport; Fri, 30 Jun 2023 17:30:26 +0000 Received: from drhqmail202.nvidia.com (10.126.190.181) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Fri, 30 Jun 2023 10:30:16 -0700 Received: from drhqmail202.nvidia.com (10.126.190.181) by drhqmail202.nvidia.com (10.126.190.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Fri, 30 Jun 2023 10:30:16 -0700 Received: from 6cd8174ac25c.nvidia.com (10.127.8.9) by mail.nvidia.com (10.126.190.181) with Microsoft SMTP Server id 15.2.986.37 via Frontend Transport; Fri, 30 Jun 2023 10:30:15 -0700 From: "Jeff Brasen" To: CC: , , , , Jeff Brasen Subject: [PATCH v2 2/2] ShellPkg/Dp: Allow dp command to work without ACPI Date: Fri, 30 Jun 2023 17:30:15 +0000 Message-ID: <25ff522f4d049a9cf48a3698ebe4dcc0f7a94e21.1688141699.git.jbrasen@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-NVConfidentiality: public Return-Path: jbrasen@nvidia.com X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT090:EE_|SN7PR12MB8058:EE_ X-MS-Office365-Filtering-Correlation-Id: 920b95c8-f51a-4f66-0db7-08db798fb166 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 710fXzec5e7da9BxTeeWkyxUfcx9u0akJaH4WJcHItidjRUNWHM5X17BkDI+oiSrN36BG+FlEu1QnszWD44a9O5rw1men1hWEALqZRPl9rS8XL6+l5C+ub5Xiq2DCiF8xs0/X2nBhDw721B/Qz8j1dcoyK8t++sqqERMFDPpk/em1gGqDtMC/S+hf+a8+qHy4/Z+kEUY2JCTyyPx7lov9NZqMHCzSMmvN1CKwy5/gty3N6jqGUH9RRYifhjUEJMioY5QQAzUoqOUy0qZYEw1q2XgGCTwHbMFNfyV3BsYUCvsNh3wYd/1DOEhjxKHFXSsB4eQ8NAms1BmO7YjLM/whlQiE8ZNw09gDiMw56e9C1uW64iiCY2CXCvyW5u0J/oDRa51qPK7xZO9peGKqjgPHyloVkXuCJ22OCOy2oppDqRysmgqr+0DdY+afgBV/3b6O5rL+PTw2t+04DMsA3lZdEqueMXtO73OTt37DwcqqYaXq1CnwWH2k7vB/8q64ND+LiRN6tzFkY1VbsiU+H/mfHYpCxrVnideN5C9ZAIhvF6I4RkXyKUxMRrbqxKHn/52DExdhB+n/0Z5TxUueNYMlyY0x8+8vtnBMjh/x5yUj/00fB5hW3H+JK/D4yAtvh3IdQc6wS90SWKmVWMB27BKq558vdkwN4bzuy2ZbFm6Gdw+nAkcs1P866D415kOjVGo+GtK7aDbcnatKbpHqFfeDEhPSKPdg5NABoyNHVyMH5EI+5bK1iMhVmzEwm5G3EU2 X-Forefront-Antispam-Report: CIP:216.228.118.233;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc7edge2.nvidia.com;CAT:NONE;SFS:(13230028)(4636009)(346002)(136003)(376002)(39860400002)(396003)(451199021)(40470700004)(46966006)(36840700001)(8936002)(70586007)(70206006)(8676002)(316002)(4326008)(6916009)(86362001)(41300700001)(36756003)(7696005)(82740400003)(40480700001)(2906002)(5660300002)(82310400005)(186003)(26005)(107886003)(36860700001)(336012)(2616005)(83380400001)(426003)(47076005)(40460700003)(54906003)(478600001)(7636003)(356005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2023 17:30:26.5190 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 920b95c8-f51a-4f66-0db7-08db798fb166 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.233];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT090.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB8058 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain If the system does not have ACPI setup use the configuration table to get the performance info. Signed-off-by: Jeff Brasen --- ShellPkg/DynamicCommand/DpDynamicCommand/DpApp.inf | 1 + .../DpDynamicCommand/DpDynamicCommand.inf | 1 + ShellPkg/DynamicCommand/DpDynamicCommand/Dp.c | 11 ++++++++--- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ShellPkg/DynamicCommand/DpDynamicCommand/DpApp.inf b/ShellPkg/= DynamicCommand/DpDynamicCommand/DpApp.inf index 4a58286b8c1a..d9e1c23a1ee7 100644 --- a/ShellPkg/DynamicCommand/DpDynamicCommand/DpApp.inf +++ b/ShellPkg/DynamicCommand/DpDynamicCommand/DpApp.inf @@ -54,6 +54,7 @@ [LibraryClasses] =20 [Guids] gPerformanceProtocolGuid ## CONSUMES ## S= ystemTable + gEdkiiFpdtExtendedFirmwarePerformanceGuid ## CONSUMES ## S= ystemTable =20 [Protocols] gEfiLoadedImageProtocolGuid ## CONSUMES diff --git a/ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf = b/ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf index 013bdbd4a07e..2723fee7066e 100644 --- a/ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf +++ b/ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf @@ -55,6 +55,7 @@ [LibraryClasses] =20 [Guids] gPerformanceProtocolGuid ## CONSUMES ## S= ystemTable + gEdkiiFpdtExtendedFirmwarePerformanceGuid ## CONSUMES ## S= ystemTable =20 [Protocols] gEfiLoadedImageProtocolGuid ## CONSUMES diff --git a/ShellPkg/DynamicCommand/DpDynamicCommand/Dp.c b/ShellPkg/Dynam= icCommand/DpDynamicCommand/Dp.c index 512a146da6dd..98c84d2ef938 100644 --- a/ShellPkg/DynamicCommand/DpDynamicCommand/Dp.c +++ b/ShellPkg/DynamicCommand/DpDynamicCommand/Dp.c @@ -129,17 +129,22 @@ EFI_STATUS GetBootPerformanceTable ( ) { + EFI_STATUS Status; FIRMWARE_PERFORMANCE_TABLE *FirmwarePerformanceTable; =20 FirmwarePerformanceTable =3D (FIRMWARE_PERFORMANCE_TABLE *)EfiLocateFirs= tAcpiTable ( EFI_ACPI_5_0_= FIRMWARE_PERFORMANCE_DATA_TABLE_SIGNATURE ); if (FirmwarePerformanceTable =3D=3D NULL) { - ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_GET_ACPI_FPDT_FAIL= ), mDpHiiHandle); - return EFI_NOT_FOUND; + Status =3D EfiGetSystemConfigurationTable (&gEdkiiFpdtExtendedFirmware= PerformanceGuid, (VOID **)&mBootPerformanceTable); + if (EFI_ERROR (Status)) { + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_GET_ACPI_FPDT_FA= IL), mDpHiiHandle); + return EFI_NOT_FOUND; + } + } else { + mBootPerformanceTable =3D (UINT8 *)(UINTN)FirmwarePerformanceTable->Bo= otPointerRecord.BootPerformanceTablePointer; } =20 - mBootPerformanceTable =3D (UINT8 *)(UINTN)FirmwarePerformanceTable->= BootPointerRecord.BootPerformanceTablePointer; mBootPerformanceTableSize =3D ((BOOT_PERFORMANCE_TABLE *)mBootPerformanc= eTable)->Header.Length; =20 return EFI_SUCCESS; --=20 2.25.1