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.63]) by mx.groups.io with SMTP id smtpd.web09.26845.1659973199979825495 for ; Mon, 08 Aug 2022 08:40:00 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=0sGe86TC; spf=pass (domain: arm.com, ip: 40.107.104.63, mailfrom: sami.mujawar@arm.com) ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=cP5+jcO+2k+fkEdKrdI+hWjJtAJ2nJXcf2zw1nbo0uhPo3LUx97mhIeh7etRIfVi9tK8oPVeUc+yhlEwCrBnfCq8fc9sSH+qGN9PjQNxjOVKry4DAniu+nytGFFaYvdlzX3MFAFxqh5HqUp+7Vm4wXkPtVa3PfIp1mxlvlh2HxFtjB0zrv8r9W5GibAqLZJBp4BRIwe9zkjqAnrj+c/n7RZckSGj6ecpHfWK4xL4+4nRpNtqN0Cgn/R393rkYa70+qZTD1jIvytvOS3ANy/SExjDcYWr+oIo7fUKjBTAD4URNn0c+hYx2WgsktN0vnyM0YSSOcu3ac6k8P9ud5GNqA== ARC-Message-Signature: i=2; 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=uqEG0VIqFHnhl9Wl7wikZ6szUxM0IwtRmCk2LHDef4k=; b=JsN3pqKt5O3uJgiogvBqcWSWOBjkZs4bZ6uD2dsHDhaztM2vzMG3PfqsmS7SRnDataqF+Y8boZ1nSM5izpW2ze09+EoaoxXMW4vTFp4eiNHmHI0egi59zB4dzJ1ioWlZrBAP3IBYlL9JR/QkXsGX4VFn9QNb5R2O+QtqkEOOyrudMji7YYOLh7QSES4ncu9blCqv3HxW50c80DkNc3hR/JLeuTB+wn2BJf3YKXYg7OvGdwp1JytcR8vJhiWH4bbVpK87keBSxgobFpQbNfG2F++6QVr/rR2cJQcadmZRi4Krh7uJYJxx3CeRGoN1x8/dDDAIsl5k23rdOEcEiGxsIQ== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=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=uqEG0VIqFHnhl9Wl7wikZ6szUxM0IwtRmCk2LHDef4k=; b=0sGe86TCpnkkda15KI8Tq1pWf0dezOcr9K+lZSUFsPC7jisksO5Zw+M9QspX+1AB/4D/xKz9iepGkV3hmvYei3OmgE8n+r/C1N5sjT7S/lc/uTEGho6220EqEP0eFMO8zKgIitXikbp5jd7SUF0uyxdVaTGPv4IdEOJa1kzUKfA= Received: from DB7PR05CA0034.eurprd05.prod.outlook.com (2603:10a6:10:36::47) by AM4PR0802MB2242.eurprd08.prod.outlook.com (2603:10a6:200:5f::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.14; Mon, 8 Aug 2022 15:39:56 +0000 Received: from DBAEUR03FT004.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:36:cafe::c8) by DB7PR05CA0034.outlook.office365.com (2603:10a6:10:36::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.20 via Frontend Transport; Mon, 8 Aug 2022 15:39:55 +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 DBAEUR03FT004.mail.protection.outlook.com (100.127.142.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.16 via Frontend Transport; Mon, 8 Aug 2022 15:39:55 +0000 Received: ("Tessian outbound 2af316122c7a:v123"); Mon, 08 Aug 2022 15:39:55 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 8330b01a22f2b727 X-CR-MTA-TID: 64aa7808 Received: from bd042de252f1.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 91B5EF39-9668-4809-BF5A-930BD8AD41EB.1; Mon, 08 Aug 2022 15:39:44 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id bd042de252f1.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 08 Aug 2022 15:39:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Fu0E6EW/SDZke6Ikael9RwqZqlPxektawz8qv2kNoh/s+xP7MyF8ipFPjdnF8+u/sjJfqc0YXsmKS0jvA5O435Zsj6ICRw4jjnXAFj+yNTj9L4EKD++IdWMIr/WngUbaRXV1PHJBpQOBlakqTWN73b0tjj5pJRbPBwVkgBZPKenfHvm52m2vpeyWJBfdT+xHsrwdc3yd3LpaRyYOCVcKvBxv0M2ojLqxUVEVzYbvO9K54hWV8q9pU1fsTn82Xikn+5FS8vt0DJdusIPVLByYtmtibBF2IrrkE06CtIBlYbxc4wkB3AMl31MGdqBpFiClZQDaafjVAvO7jpnldxL1lQ== 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=uqEG0VIqFHnhl9Wl7wikZ6szUxM0IwtRmCk2LHDef4k=; b=Tyw8wCoYBRH4rjc8flbyvw+o7JjhmqKnOQECl2bGe93/z+18/IB1XF5NxvOfuH3zfWgo+w79MluQdKT0trlHRCFs9aTJz7Uxy/SgX3rAqxN8uhvdQchO0e/xQlVG+qtXuY8lMCHmXouFFsgdkX5GFLRUgXLemjVNSwPVsieVyuUL24PEJUuMzWpR7Q0bl9hCYtW8CktJhpdDbf7dIpUKsAsEKoM81vguxfqFKnAThOoQbOLSqV2P0wu+fMLv/vrBqSx86Bd2TiY4+iHGKdZr2V/W2gn+euJ7IuQZBdcdocgug7o55wFMLUYUBIztpRXAJofGgCnwZo8Lzyv5pafDnA== 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=uqEG0VIqFHnhl9Wl7wikZ6szUxM0IwtRmCk2LHDef4k=; b=0sGe86TCpnkkda15KI8Tq1pWf0dezOcr9K+lZSUFsPC7jisksO5Zw+M9QspX+1AB/4D/xKz9iepGkV3hmvYei3OmgE8n+r/C1N5sjT7S/lc/uTEGho6220EqEP0eFMO8zKgIitXikbp5jd7SUF0uyxdVaTGPv4IdEOJa1kzUKfA= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) by PR3PR08MB5818.eurprd08.prod.outlook.com (2603:10a6:102:8b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.16; Mon, 8 Aug 2022 15:39:43 +0000 Received: from AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::d562:5a52:f638:7fe9]) by AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::d562:5a52:f638:7fe9%4]) with mapi id 15.20.5504.020; Mon, 8 Aug 2022 15:39:42 +0000 Message-ID: Date: Mon, 8 Aug 2022 16:39:41 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v3 4/6] DynamicTablesPkg: DynamicTableManagerDxe: Added check for installed tables From: "Sami Mujawar" To: Kun Qin , devel@edk2.groups.io CC: Alexei Fedorov , Joe Lopez , Pierre Gondois , "nd@arm.com" References: <20220731053727.536-1-kuqin12@gmail.com> <20220731053727.536-5-kuqin12@gmail.com> In-Reply-To: X-ClientProxiedBy: LO2P265CA0064.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:60::28) To AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: fc475abf-1960-4d74-14e7-08da79543e6c X-MS-TrafficTypeDiagnostic: PR3PR08MB5818:EE_|DBAEUR03FT004:EE_|AM4PR0802MB2242:EE_ 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: t+HV3vB5Jw1qe9BNeDLqBkzl1zymh9rpPjmwKYGIMl7HBQ4+tME1h27t44bYuhHBfa9BaO8TNywjIGHV8In+LXf9OS7OX72pzaU5bg0T1gFpZ0ugRYc4TNvzXv9olnz4FI3kakYZAFwn0mukG5ESa9z+PulaiwDuwL/4K0kyvDgKZuVrIm3/rThDr9uCrLg7RTyD5F9nKmaRscwzIqsz9tQ9JIu6r6OIjs9o3qSQDmdkug9nicSBFPSrxeGxhQLoGYGfgtnOCORtfMwOCh+RnT9YN7xSbIh5a/xgiMlnJ0t54/QP/slEZwCg1gPkxz2tvfcsczSFyVkR1UE94RadnzMzWyZbiP551TrFNpp3X3xjctnA3KiS3ljGdMLy6FJ0X2jVvD41sOQAFBMRJ6Gy0XpU+yaohUlIJyY21Mr01d1kDUHPwTDWlt2Z/yBHoWtg4VrTG7Ki4dGi8QJzoGue5wmSKIsxdPHsyzifPOyBTNBzu6BzuLSSL/eQTIMHWjTVlXkkKvAcOypU+izZVGEiFjkp5POvecc67bvqMti0Ad3+q+k1p9NwcXXQEUWuchM1rVXvXmYZ//OjAGLGnnDrSFxxsfyxSu/pu2D2zlnLs7HQivNi3CofoXKeNXLb3zkMuMP4XhTcZgeE5cMipMTFDHG5eDgOezXNYpcoOwcpp1pmW/0q4jerPAnMDh3m4QjSGjdv1RM+TP3LOcasgu67S0LKZQxAjVpplwOW9qdp3iwKW+KRPYAgQ4LytqLmXk7jYgPrODN5vLnpcU/Qh5qTY0onr3GrSDznpy/nALsZcI6XFg1NSVIMM44P1+UK8wRO6HV9OCdrALknmASc8dfI0y8SgjaEU2Qmt9bf8RiV3m8= 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:(13230016)(4636009)(366004)(396003)(376002)(346002)(136003)(39860400002)(478600001)(966005)(6486002)(36756003)(86362001)(41300700001)(6506007)(53546011)(6512007)(83380400001)(31686004)(186003)(2616005)(31696002)(54906003)(26005)(45080400002)(316002)(66476007)(66556008)(66946007)(8676002)(5660300002)(4326008)(38100700002)(8936002)(30864003)(44832011)(2906002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR08MB5818 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Return-Path: Sami.Mujawar@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT004.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: de8712a0-da00-4856-1d93-08da7954368e X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iMyDci4On13FwM1VD6HaJl1RoHb0Oj/jZpvRd2LWs1LS1vQfveADnMEssxWNzJdsl/6fcvQOerB21hd4iS7etueCnFVtIwXXQ16122uEV+8o81+ZTqyyK4ESX3cpb4nGigj0to2i5tSnHjvX1QpeUvqpfNWwfLjpclRf8/SnBDTFxBW2snzNmt1S2Qhzwu1dESi3A4VFIamKFUy33RuSaYMLD5zwPiRAdQz7nepspknkOBSYDpBLw4qNhZl1dTJlluGU+0vdn0+Wg9hMa9KEu+MAioZ+3TwROUf+/rWyMZzK9XkIQDBGJ/r//xyIt+J99uUtBD7FITdyidmLy0F6zsXKWNNStHRgJoSsNSAjmBdXPJ+HU+TpBQVVJ0y1OcnjnJlZk33B7Z8Cnujua3g5vVyDBlG16IZ3TmyJQfHzdwszqMDpMNcTaY4DBqvrCslN2MVVXGet148o6tBBre0iv7/LdiIF4KeIRwo6NnZNLgnn3Gk4xme2xD+dHr9amq7ByXLB+iSoIWMnaMFYimTuS63oO40ohE7e4378Q9KGJfLodmwNOPa2de4LLpSw1xdXzVZCcAghikCEFOTFB7els1FBGV5p2Kp2nHObXjXbxw3c26DnOVjOnAJK24Zdm0kjoncQqd6PkNs+C8zt9UZr7tKUNuZsCfovEfawcwC0a34VMgIGPJr3/4L8PnLoWssIKJeada0aLz7YRqYRQCdUqYB7enKBJJvZHc8R+uc1fIcxnqTHVqgooSn5L7ggNsiwt+yLvbU86yL+cFczbudmA6fvWiLyI7lsdqBpNbmjH0CWdN5ip8FgSxJ1Ssbdx/ZSJ193GXaOigFM4J6fPH3xhWF1IWXXgW4eqfIb/8lm0CZWT+eihNmRvZB+W1Fy66vo 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:(13230016)(4636009)(396003)(136003)(39860400002)(376002)(346002)(36840700001)(46966006)(40470700004)(2906002)(81166007)(356005)(6512007)(26005)(41300700001)(83380400001)(6506007)(53546011)(47076005)(40480700001)(36860700001)(82740400003)(2616005)(82310400005)(186003)(336012)(40460700003)(44832011)(966005)(45080400002)(8936002)(70586007)(4326008)(36756003)(70206006)(8676002)(478600001)(31686004)(6486002)(30864003)(86362001)(316002)(54906003)(31696002)(5660300002)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2022 15:39:55.7674 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fc475abf-1960-4d74-14e7-08da79543e6c 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: DBAEUR03FT004.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR0802MB2242 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi Kun, Please find my response inline marked [SAMI]. Regards, Sami Mujawar On 08/08/2022 02:05 pm, Sami Mujawar wrote: > Hi Kun, > > Thank you for this patch. > > Please find my response inline marked [SAMI]. > > Regards, > > Sami Mujawar > > On 31/07/2022 06:37 am, Kun Qin wrote: >> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3997 >> >> This change added an extra step to allow check for installed ACPI=20 >> tables. >> >> For FADT, MADT, GTDT, DSDT, DBG2 and SPCR tables, either=20 >> pre-installed or >> supplied through AcpiTableInfo can be accepted. >> >> An extra check for FADT ACPI table existence during installation step is >> also added. >> >> Cc: Sami Mujawar >> Cc: Alexei Fedorov >> >> Co-authored-by: Joe Lopez >> Signed-off-by: Kun Qin >> Reviewed-by: Pierre Gondois >> --- >> >> Notes: >> =C2=A0=C2=A0=C2=A0=C2=A0 v2: >> =C2=A0=C2=A0=C2=A0=C2=A0 - Function description updates [Sami] >> =C2=A0=C2=A0=C2=A0=C2=A0 - Refactorized the table verification [Pierre] >> =C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 v3: >> =C2=A0=C2=A0=C2=A0=C2=A0 - Added descriptions for new structures [Pierre= ] >> =C2=A0=C2=A0=C2=A0=C2=A0 - Added check for SDT protocol PCD before using= it [Pierre] >> >> DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManagerDxe.c= =20 >> | 214 ++++++++++++-------- >> DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManagerDxe.i= nf=20 >> |=C2=A0=C2=A0 4 + >> =C2=A0 2 files changed, 138 insertions(+), 80 deletions(-) >> >> diff --git=20 >> a/DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManagerDxe= .c=20 >> b/DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManagerDxe= .c=20 >> >> index ed62299f9bbd..7f3deef08a66 100644 >> ---=20 >> a/DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManagerDxe= .c >> +++=20 >> b/DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManagerDxe= .c >> @@ -10,6 +10,7 @@ >> =C2=A0 #include >> >> =C2=A0 #include >> >> =C2=A0 #include >> >> +#include >> >> =C2=A0 #include >> >> >> =C2=A0 // Module specific include files. >> >> @@ -22,6 +23,58 @@ >> =C2=A0 #include >> >> =C2=A0 #include >> >> >> +/// >> >> +/// Bit definitions for acceptable ACPI table presence formats. >> >> +/// Currently only ACPI tables present in the ACPI info list and >> >> +/// already installed will count towards "Table Present" during >> >> +/// verification routine. >> >> +/// >> >> +#define ACPI_TABLE_PRESENT_INFO_LIST=C2=A0 BIT0 >> >> +#define ACPI_TABLE_PRESENT_INSTALLED=C2=A0 BIT1 >> >> + >> >> +/// >> >> +/// Order of ACPI table being verified during presence inspection. >> >> +/// >> >> +#define ACPI_TABLE_VERIFY_FADT=C2=A0=C2=A0 0 >> >> +#define ACPI_TABLE_VERIFY_MADT=C2=A0=C2=A0 1 >> >> +#define ACPI_TABLE_VERIFY_GTDT=C2=A0=C2=A0 2 >> >> +#define ACPI_TABLE_VERIFY_DSDT=C2=A0=C2=A0 3 >> >> +#define ACPI_TABLE_VERIFY_DBG2=C2=A0=C2=A0 4 >> >> +#define ACPI_TABLE_VERIFY_SPCR=C2=A0=C2=A0 5 >> >> +#define ACPI_TABLE_VERIFY_COUNT=C2=A0 6 >> >> + >> >> +/// >> >> +/// Private data structure to verify the presence of mandatory >> >> +/// or optional ACPI tables. >> >> +/// >> >> +typedef struct { >> >> +=C2=A0 /// ESTD ID for the ACPI table of interest. >> >> +=C2=A0 ESTD_ACPI_TABLE_ID=C2=A0=C2=A0=C2=A0 EstdTableId; >> >> +=C2=A0 /// Standard UINT32 ACPI signature. >> >> +=C2=A0 UINT32=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 AcpiTableSignature; >> >> +=C2=A0 /// 4 character ACPI table name (the 5th char8 is for null=20 >> terminator). >> >> +=C2=A0 CHAR8=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 AcpiTableName[sizeof (UINT32) + 1]; >> >> +=C2=A0 /// Indicator on whether the ACPI table is required. >> >> +=C2=A0 BOOLEAN=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 IsMandatory; >> >> +=C2=A0 /// Formats of verified presences, as defined by ACPI_TABLE_PRES= ENT_* >> >> +=C2=A0 /// This field should be initialized to 0 and will be populated= =20 >> during >> >> +=C2=A0 /// verification routine. >> >> +=C2=A0 UINT16=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Presence; >> >> +} ACPI_TABLE_PRESENCE_INFO; >> >> + >> >> +/// >> >> +/// We require the FADT, MADT, GTDT and the DSDT tables to boot. >> >> +/// This list also include optional ACPI tables: DBG2, SPCR. >> >> +/// >> >> +ACPI_TABLE_PRESENCE_INFO mAcpiVerifyTables[ACPI_TABLE_VERIFY_COUNT] =3D= { >> >> +=C2=A0 { EStdAcpiTableIdFadt,=20 >> EFI_ACPI_6_2_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE, "FADT", TRUE,=C2=A0= 0 }, >> >> +=C2=A0 { EStdAcpiTableIdMadt,=20 >> EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE, "MADT",=20 >> TRUE,=C2=A0 0 }, >> >> +=C2=A0 { EStdAcpiTableIdGtdt,=20 >> EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE_SIGNATURE, "GTDT",=20 >> TRUE,=C2=A0 0 }, >> >> +=C2=A0 { EStdAcpiTableIdDsdt,=20 >> EFI_ACPI_6_2_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE,=20 >> "DSDT", TRUE,=C2=A0 0 }, >> >> +=C2=A0 { EStdAcpiTableIdDbg2, EFI_ACPI_6_2_DEBUG_PORT_2_TABLE_SIGNATURE= ,=20 >> "DBG2", FALSE, 0 }, >> >> +=C2=A0 { EStdAcpiTableIdSpcr,=20 >> EFI_ACPI_6_2_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE, "SPCR",=20 >> FALSE, 0 }, >> >> +}; >> >> + >> >> =C2=A0 /** This macro expands to a function that retrieves the ACPI Tabl= e >> >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 List from the Configuration Manager. >> >> =C2=A0 */ >> >> @@ -395,6 +448,7 @@ BuildAndInstallAcpiTable ( >> >> =C2=A0=C2=A0=C2=A0 @retval EFI_SUCCESS=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 Success. >> >> =C2=A0=C2=A0=C2=A0 @retval EFI_NOT_FOUND=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 If mandatory table is not found. >> >> +=C2=A0 @retval EFI_ALREADY_STARTED=C2=A0=C2=A0 If mandatory table found= in=20 >> AcpiTableInfo is already installed. >> >> =C2=A0 **/ >> >> =C2=A0 STATIC >> >> =C2=A0 EFI_STATUS >> >> @@ -404,75 +458,71 @@ VerifyMandatoryTablesArePresent ( >> =C2=A0=C2=A0=C2=A0 IN=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 UINT32=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 AcpiTableCount >> >> =C2=A0=C2=A0=C2=A0 ) >> >> =C2=A0 { >> >> -=C2=A0 EFI_STATUS=C2=A0 Status; >> >> -=C2=A0 BOOLEAN=C2=A0=C2=A0=C2=A0=C2=A0 FadtFound; >> >> -=C2=A0 BOOLEAN=C2=A0=C2=A0=C2=A0=C2=A0 MadtFound; >> >> -=C2=A0 BOOLEAN=C2=A0=C2=A0=C2=A0=C2=A0 GtdtFound; >> >> -=C2=A0 BOOLEAN=C2=A0=C2=A0=C2=A0=C2=A0 DsdtFound; >> >> -=C2=A0 BOOLEAN=C2=A0=C2=A0=C2=A0=C2=A0 Dbg2Found; >> >> -=C2=A0 BOOLEAN=C2=A0=C2=A0=C2=A0=C2=A0 SpcrFound; >> >> +=C2=A0 EFI_STATUS=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Status; >> >> +=C2=A0 UINTN=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 Handle; >> >> +=C2=A0 UINTN=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 Index; >> >> +=C2=A0 UINTN=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 InstalledTableIndex; >> >> +=C2=A0 EFI_ACPI_DESCRIPTION_HEADER=C2=A0 *DescHeader; >> >> +=C2=A0 EFI_ACPI_TABLE_VERSION=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Versi= on; >> >> +=C2=A0 EFI_ACPI_SDT_PROTOCOL=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = *AcpiSdt; >> >> >> -=C2=A0 Status=C2=A0=C2=A0=C2=A0 =3D EFI_SUCCESS; >> >> -=C2=A0 FadtFound =3D FALSE; >> >> -=C2=A0 MadtFound =3D FALSE; >> >> -=C2=A0 GtdtFound =3D FALSE; >> >> -=C2=A0 DsdtFound =3D FALSE; >> >> -=C2=A0 Dbg2Found =3D FALSE; >> >> -=C2=A0 SpcrFound =3D FALSE; >> >> =C2=A0=C2=A0=C2=A0 ASSERT (AcpiTableInfo !=3D NULL); >> >> >> +=C2=A0 Status =3D EFI_SUCCESS; >> >> + >> >> +=C2=A0 // Check against the statically initialized ACPI tables to see i= f=20 >> they are in ACPI info list >> >> =C2=A0=C2=A0=C2=A0 while (AcpiTableCount-- !=3D 0) { >> >> -=C2=A0=C2=A0=C2=A0 switch (AcpiTableInfo[AcpiTableCount].AcpiTableSigna= ture) { >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 case EFI_ACPI_6_2_FIXED_ACPI_DESCRIPTION= _TABLE_SIGNATURE: >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 FadtFound =3D TRUE; >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 break; >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 case EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPT= ION_TABLE_SIGNATURE: >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 MadtFound =3D TRUE; >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 break; >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 case EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPT= ION_TABLE_SIGNATURE: >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 GtdtFound =3D TRUE; >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 break; >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 case=20 >> EFI_ACPI_6_2_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE: >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 DsdtFound =3D TRUE; >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 break; >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 case EFI_ACPI_6_2_DEBUG_PORT_2_TABLE_SIG= NATURE: >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Dbg2Found =3D TRUE; >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 break; >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 case=20 >> EFI_ACPI_6_2_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE: >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 SpcrFound =3D TRUE; >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 break; >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 default: >> >> +=C2=A0=C2=A0=C2=A0 for (Index =3D 0; Index < ACPI_TABLE_VERIFY_COUNT; I= ndex++) { >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (AcpiTableInfo[AcpiTableCount].AcpiTa= bleSignature =3D=3D=20 >> mAcpiVerifyTables[Index].AcpiTableSignature) { >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mAcpiVerifyTables[Index].Pre= sence |=3D=20 >> ACPI_TABLE_PRESENT_INFO_LIST; >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 // Found this table, skip th= e rest. >> >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 break; >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } >> >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } >> >> =C2=A0=C2=A0=C2=A0 } >> >> >> -=C2=A0 // We need at least the FADT, MADT, GTDT and the DSDT tables to = boot >> >> -=C2=A0 if (!FadtFound) { >> >> -=C2=A0=C2=A0=C2=A0 DEBUG ((DEBUG_ERROR, "ERROR: FADT Table not found\n"= )); >> >> -=C2=A0=C2=A0=C2=A0 Status =3D EFI_NOT_FOUND; >> >> -=C2=A0 } >> >> +=C2=A0 // They also might be published already, so we can search from t= here >> >> +=C2=A0 if (FeaturePcdGet (PcdInstallAcpiSdtProtocol)) { >> >> +=C2=A0=C2=A0=C2=A0 AcpiSdt =3D NULL; >> >> +=C2=A0=C2=A0=C2=A0 Status=C2=A0 =3D gBS->LocateProtocol (&gEfiAcpiSdtPr= otocolGuid, NULL,=20 >> (VOID **)&AcpiSdt); >> >> >> -=C2=A0 if (!MadtFound) { >> >> -=C2=A0=C2=A0=C2=A0 DEBUG ((DEBUG_ERROR, "ERROR: MADT Table not found.\n= ")); >> >> -=C2=A0=C2=A0=C2=A0 Status =3D EFI_NOT_FOUND; >> >> -=C2=A0 } >> >> +=C2=A0=C2=A0=C2=A0 if (EFI_ERROR (Status) || (AcpiSdt =3D=3D NULL)) { >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 DEBUG ((DEBUG_ERROR, "ERROR: Failed to l= ocate ACPI SDT=20 >> protocol (0x%p) - %r\n", AcpiSdt, Status)); >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return Status; >> >> +=C2=A0=C2=A0=C2=A0 } >> >> >> -=C2=A0 if (!GtdtFound) { >> >> -=C2=A0=C2=A0=C2=A0 DEBUG ((DEBUG_ERROR, "ERROR: GTDT Table not found.\n= ")); >> >> -=C2=A0=C2=A0=C2=A0 Status =3D EFI_NOT_FOUND; >> >> -=C2=A0 } >> >> +=C2=A0=C2=A0=C2=A0 for (Index =3D 0; Index < ACPI_TABLE_VERIFY_COUNT; I= ndex++) { >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Handle=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 0; >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 InstalledTableIndex =3D 0; >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 do { >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Status =3D AcpiSdt->GetAcpiT= able (InstalledTableIndex,=20 >> (EFI_ACPI_SDT_HEADER **)&DescHeader, &Version, &Handle); >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (EFI_ERROR (Status)) { [SAMI] When running Kvmtool guest firmware I break from here with=20 EFI_NOT_FOUND. The problem is PcdInstallAcpiSdtProtocol is set to TRUE=20 in ArmVirt.dsc.inc and the Kvmtool guest firmware does not have any=20 preinstalled tables (i.e. all tables are generated using=20 DynamicTablesFramework). This means platforms that use only Dynamic Tables Framework would all=20 need to define PcdInstallAcpiSdtProtocol to FALSE. Is it possible to=20 rework this logic so that the existing platform code does not need=20 updating, please? [/SAMI] >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 break; >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } >> >> >> -=C2=A0 if (!DsdtFound) { >> >> -=C2=A0=C2=A0=C2=A0 DEBUG ((DEBUG_ERROR, "ERROR: DSDT Table not found.\n= ")); >> >> -=C2=A0=C2=A0=C2=A0 Status =3D EFI_NOT_FOUND; >> >> -=C2=A0 } >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 InstalledTableIndex++; >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } while (DescHeader->Signature !=3D=20 >> mAcpiVerifyTables[Index].AcpiTableSignature); >> >> >> -=C2=A0 if (!Dbg2Found) { >> >> -=C2=A0=C2=A0=C2=A0 DEBUG ((DEBUG_WARN, "WARNING: DBG2 Table not found.\= n")); >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (!EFI_ERROR (Status)) { >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mAcpiVerifyTables[Index].Pre= sence |=3D=20 >> ACPI_TABLE_PRESENT_INSTALLED; >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } >> >> +=C2=A0=C2=A0=C2=A0 } >> >> =C2=A0=C2=A0=C2=A0 } >> >> >> -=C2=A0 if (!SpcrFound) { >> >> -=C2=A0=C2=A0=C2=A0 DEBUG ((DEBUG_WARN, "WARNING: SPCR Table not found.\= n")); >> >> +=C2=A0 for (Index =3D 0; Index < ACPI_TABLE_VERIFY_COUNT; Index++) { >> >> +=C2=A0=C2=A0=C2=A0 if (mAcpiVerifyTables[Index].Presence =3D=3D 0) { >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (mAcpiVerifyTables[Index].IsMandatory= ) { >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 DEBUG ((DEBUG_ERROR, "ERROR:= %a Table not found.\n",=20 >> mAcpiVerifyTables[Index].AcpiTableName)); >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Status =3D EFI_NOT_FOUND; >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } else { >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 DEBUG ((DEBUG_WARN, "WARNING= : %a Table not found.\n",=20 >> mAcpiVerifyTables[Index].AcpiTableName)); >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } >> >> +=C2=A0=C2=A0=C2=A0 } else if (mAcpiVerifyTables[Index].Presence =3D=3D >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 (ACPI_TABLE_PRESENT_INFO_LIST |=20 >> ACPI_TABLE_PRESENT_INSTALLED)) >> >> +=C2=A0=C2=A0=C2=A0 { >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 DEBUG ((DEBUG_ERROR, "ERROR: %a Table fo= und while already=20 >> published.\n", mAcpiVerifyTables[Index].AcpiTableName)); >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Status =3D EFI_ALREADY_STARTED; >> >> +=C2=A0=C2=A0=C2=A0 } >> >> =C2=A0=C2=A0=C2=A0 } >> >> >> =C2=A0=C2=A0=C2=A0 return Status; >> >> @@ -489,8 +539,9 @@ VerifyMandatoryTablesArePresent ( >> =C2=A0=C2=A0=C2=A0 @param [in]=C2=A0 CfgMgrProtocol=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 Pointer to the Configuration=20 >> Manager >> >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= Protocol Interface. >> >> >> -=C2=A0 @retval EFI_SUCCESS=C2=A0=C2=A0 Success. >> >> -=C2=A0 @retval EFI_NOT_FOUND If a mandatory table or a generator is not= =20 >> found. >> >> +=C2=A0 @retval EFI_SUCCESS=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 Success. >> >> +=C2=A0 @retval EFI_NOT_FOUND=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 If a mandatory table or a generator=20 >> is not found. >> >> +=C2=A0 @retval EFI_ALREADY_STARTED=C2=A0=C2=A0 If mandatory table found= in=20 >> AcpiTableInfo is already installed. >> >> =C2=A0 **/ >> >> =C2=A0 STATIC >> >> =C2=A0 EFI_STATUS >> >> @@ -562,7 +613,7 @@ ProcessAcpiTables ( >> =C2=A0=C2=A0=C2=A0 if (EFI_ERROR (Status)) { >> >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 DEBUG (( >> >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 DEBUG_ERROR, >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "ERROR: Failed to find mandatory ACPI Ta= ble(s)." >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "ERROR: Failed to verify mandatory ACPI = Table(s) presence." >> >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 " Status =3D %r\n", >> >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Status >> >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 )); >> >> @@ -570,29 +621,32 @@ ProcessAcpiTables ( >> =C2=A0=C2=A0=C2=A0 } >> >> >> =C2=A0=C2=A0=C2=A0 // Add the FADT Table first. >> >> -=C2=A0 for (Idx =3D 0; Idx < AcpiTableCount; Idx++) { >> >> -=C2=A0=C2=A0=C2=A0 if (CREATE_STD_ACPI_TABLE_GEN_ID (EStdAcpiTableIdFad= t) =3D=3D >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 AcpiTableInfo[Idx].TableGene= ratorId) >> >> -=C2=A0=C2=A0=C2=A0 { >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Status =3D BuildAndInstallAcpiTable ( >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 TableFactoryProtocol, >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 CfgMgrProtocol, >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 AcpiTableProtocol, >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 &AcpiTableInfo[Idx] >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 ); >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (EFI_ERROR (Status)) { >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 DEBUG (( >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 DEBUG_ERROR, >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "ERROR: Failed t= o find build and install ACPI FADT Table." \ >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 " Status =3D %r\= n", >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Status >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 )); >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return Status; >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } >> >> +=C2=A0 if ((mAcpiVerifyTables[ACPI_TABLE_VERIFY_FADT].Presence &=20 >> ACPI_TABLE_PRESENT_INSTALLED) =3D=3D 0) { > > [SAMI] If I understand correctly, the mAcpiVerifyTables[x].Presence=20 > filed cannot be ACPI_TABLE_PRESENT_INFO_LIST and=20 > ACPI_TABLE_PRESENT_INSTALLED at the same time. Otherwise we would have=20 > returned EFI_ALREADY_STARTED from VerifyMandatoryTablesArePresent(). > > Since FADT is mandatory, the only valid conditions are: > > 1. ACPI_TABLE_PRESENT_INFO_LIST and !ACPI_TABLE_PRESENT_INSTALLED > > 2. !ACPI_TABLE_PRESENT_INFO_LIST & ACPI_TABLE_PRESENT_INSTALLED > > Therefore, I think the above check is not required. What do you think? > > [/SAMI] > >> >> +=C2=A0=C2=A0=C2=A0 // FADT is not yet installed >> >> +=C2=A0=C2=A0=C2=A0 for (Idx =3D 0; Idx < AcpiTableCount; Idx++) { >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (CREATE_STD_ACPI_TABLE_GEN_ID (EStdAc= piTableIdFadt) =3D=3D >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 AcpiTableInfo[Id= x].TableGeneratorId) >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 { >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Status =3D BuildAndInstallAc= piTable ( >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 TableFactoryProtocol, >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 CfgMgrProtocol, >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 AcpiTableProtocol, >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 &AcpiTableInfo[Idx] >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ); >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (EFI_ERROR (Status)) { >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 DEBUG (( >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 DEBU= G_ERROR, >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "ERR= OR: Failed to find build and install ACPI FADT=20 >> Table." \ >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 " St= atus =3D %r\n", >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Stat= us >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 )); >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return Status; >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } >> >> >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 break; >> >> -=C2=A0=C2=A0=C2=A0 } >> >> -=C2=A0 } // for >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 break; >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } >> >> +=C2=A0=C2=A0=C2=A0 } // for >> >> +=C2=A0 } >> >> >> =C2=A0=C2=A0=C2=A0 // Add remaining ACPI Tables >> >> =C2=A0=C2=A0=C2=A0 for (Idx =3D 0; Idx < AcpiTableCount; Idx++) { >> >> diff --git=20 >> a/DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManagerDxe= .inf=20 >> b/DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManagerDxe= .inf=20 >> >> index 028c3d413cf8..ad8b3d037c16 100644 >> ---=20 >> a/DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManagerDxe= .inf >> +++=20 >> b/DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManagerDxe= .inf >> @@ -34,8 +34,12 @@ [LibraryClasses] >> =C2=A0=C2=A0=C2=A0 UefiBootServicesTableLib >> >> =C2=A0=C2=A0=C2=A0 UefiDriverEntryPoint >> >> >> +[FeaturePcd] >> >> +=C2=A0 gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol=C2=A0 #= # CONSUMES >> >> + >> >> =C2=A0 [Protocols] >> >> =C2=A0=C2=A0=C2=A0 gEfiAcpiTableProtocolGuid=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 # PROTOCOL=20 >> ALWAYS_CONSUMED >> >> +=C2=A0 gEfiAcpiSdtProtocolGuid=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 # PROTOCOL=20 >> ALWAYS_CONSUMED >> >> >> =C2=A0=C2=A0=C2=A0 gEdkiiConfigurationManagerProtocolGuid=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 # PROTOCOL=20 >> ALWAYS_CONSUMED >> >> =C2=A0=C2=A0=C2=A0 gEdkiiDynamicTableFactoryProtocolGuid=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # PROTOCOL=20 >> ALWAYS_CONSUMED >>