From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR01-VE1-obe.outbound.protection.outlook.com (EUR01-VE1-obe.outbound.protection.outlook.com [40.107.14.83]) by mx.groups.io with SMTP id smtpd.web11.21930.1574174679066849865 for ; Tue, 19 Nov 2019 06:44:40 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=Uf8i1x08; spf=pass (domain: arm.com, ip: 40.107.14.83, 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=sP2MCtOvcqElWlrYeJVanbqHvI1JsUR9Xd6q9pyXpWE=; b=Uf8i1x08VPurDN9qv0AsJbIXEfnFMd8aY2yLaAZ8lIkMW/q9QUOxrBkvgdKRIJLjcxxvGZc8YOUVZb80BU36I7hAb59lwr1OVZna5soQORShd5d62DuJoZTcsVCUuSICx50pcKUY7SJX4Nn9NgoJELc0AY/umOnZsSDEZA1jVtk= Received: from VI1PR08CA0253.eurprd08.prod.outlook.com (2603:10a6:803:dc::26) by VI1PR08MB3231.eurprd08.prod.outlook.com (2603:10a6:803:4a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2451.23; Tue, 19 Nov 2019 14:44:36 +0000 Received: from DB5EUR03FT021.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::201) by VI1PR08CA0253.outlook.office365.com (2603:10a6:803:dc::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2451.23 via Frontend Transport; Tue, 19 Nov 2019 14:44:35 +0000 Authentication-Results: spf=fail (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=none action=none header.from=arm.com; Received-SPF: Fail (protection.outlook.com: domain of arm.com does not designate 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 DB5EUR03FT021.mail.protection.outlook.com (10.152.20.238) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2451.23 via Frontend Transport; Tue, 19 Nov 2019 14:44:35 +0000 Received: ("Tessian outbound a8f166c1f585:v33"); Tue, 19 Nov 2019 14:44:34 +0000 X-CR-MTA-TID: 64aa7808 Received: from f00ee4f7e167.2 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.12.53]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id 9A008937-0BB6-4C86-80B2-8558575E9764.1; Tue, 19 Nov 2019 14:44:29 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04lp2053.outbound.protection.outlook.com [104.47.12.53]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id f00ee4f7e167.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 19 Nov 2019 14:44:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Tvd85LmwNsg3bO6Hq7sOeuWm3BaMk/m9R8c2vDVJtpjqRgPgJmzUK4gDucXeZqv3v6MNd0pfoFH8+TtNw/vnSLA2e9ltxH6zOf2y2GfJbHEro8gZsZmFUW99A/fKCz0pBM8BEn6bFhKnvjs6vgKhWxRT8NmRsKw85bfKL2uDBAe0l2fcQmKIB8bStNBSGK8L7X3S9JX6bkchsdcSsoRS2IPe87Fm50EVhluxVkWDUNTjsjfWsLGIV1bMqb/4QehzYX9a/j5TQOYYIF/7TwjGPTFEUz+szFThuSjgQNrKz9NkOrZnZy2at3z/u8wp++YvwyZ+aRdcMs37vA8yH9GgeQ== 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=sP2MCtOvcqElWlrYeJVanbqHvI1JsUR9Xd6q9pyXpWE=; b=lgkvEjO9zXQiJGOjmtluzVqvrYjwuo5VOdbofrf1NVNBmEqjbbvURsXvRXqE1K5ppOvGSV9ljvcrQqf5qCzUCmOLTpMO6wFU3q6JdkIY2HFKscairpsKMxeMq1OjQ31iF0OZLSAOs7vKRA+pfILStN8tOw6yNoqjWTqLtGYxhYSYp9cB0PvJPz5D0EZwoUxr8hViJ1g+44wpOUlKZKCnDrBIuKOX3OIiHz3BdoNaPPLrGo4mOfL7MBzm9LPdqbkstRfIxLeSKuXeMcmpQsErPt8JLkGJ3Ae0Vn04r7W+K9BsdcITHb5MYYhnyBx39iF7G4LJ9fe24YP5mnCEtLjTAg== 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=sP2MCtOvcqElWlrYeJVanbqHvI1JsUR9Xd6q9pyXpWE=; b=Uf8i1x08VPurDN9qv0AsJbIXEfnFMd8aY2yLaAZ8lIkMW/q9QUOxrBkvgdKRIJLjcxxvGZc8YOUVZb80BU36I7hAb59lwr1OVZna5soQORShd5d62DuJoZTcsVCUuSICx50pcKUY7SJX4Nn9NgoJELc0AY/umOnZsSDEZA1jVtk= Received: from VE1PR08MB4783.eurprd08.prod.outlook.com (10.255.114.16) by VE1PR08MB4848.eurprd08.prod.outlook.com (10.255.113.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2451.28; Tue, 19 Nov 2019 14:44:28 +0000 Received: from VE1PR08MB4783.eurprd08.prod.outlook.com ([fe80::499a:6188:5e68:e375]) by VE1PR08MB4783.eurprd08.prod.outlook.com ([fe80::499a:6188:5e68:e375%5]) with mapi id 15.20.2451.031; Tue, 19 Nov 2019 14:44:28 +0000 From: "Krzysztof Koch" To: "Gao, Liming" , "devel@edk2.groups.io" , Sami Mujawar CC: "Ni, Ray" , "Gao, Zhichao" , Matteo Carlini , nd Subject: Re: [edk2-devel] [PATCH v2 1/1] ShellPkg: acpiview: Update SRAT parser to ACPI 6.3 Thread-Topic: [edk2-devel] [PATCH v2 1/1] ShellPkg: acpiview: Update SRAT parser to ACPI 6.3 Thread-Index: AQHVmWcPf/1ke7p1VEOXm8uPgEdVWaeQsz/wgAHj2ACAAAOAIA== Date: Tue, 19 Nov 2019 14:44:28 +0000 Message-ID: References: <20191112143937.68588-1-krzysztof.koch@arm.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E5437A2@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E5437A2@SHSMSX104.ccr.corp.intel.com> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 512eab9b-28bb-4231-ab82-f84afd17e0f9.0 x-checkrecipientchecked: true Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Krzysztof.Koch@arm.com; x-originating-ip: [217.140.106.52] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: d9abd13f-d485-49a8-ae63-08d76cfeff46 X-MS-TrafficTypeDiagnostic: VE1PR08MB4848:|VE1PR08MB4848:|VI1PR08MB3231: X-MS-Exchange-PUrlCount: 11 x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:8882;OLM:8882; x-forefront-prvs: 022649CC2C X-Forefront-Antispam-Report-Untrusted: SFV:NSPM;SFS:(10009020)(4636009)(366004)(396003)(39860400002)(376002)(136003)(346002)(13464003)(189003)(199004)(33656002)(486006)(9686003)(76176011)(54906003)(55016002)(6306002)(52536014)(25786009)(7696005)(229853002)(4326008)(66476007)(476003)(66446008)(64756008)(66556008)(6506007)(15650500001)(53546011)(15974865002)(74316002)(2501003)(110136005)(2906002)(6246003)(6116002)(316002)(3846002)(66066001)(8936002)(6436002)(236005)(733005)(71190400001)(71200400001)(14454004)(11346002)(446003)(14444005)(99286004)(606006)(256004)(30864003)(305945005)(186003)(86362001)(966005)(7736002)(81166006)(478600001)(5660300002)(8676002)(81156014)(102836004)(6636002)(76116006)(66946007)(26005)(19627235002);DIR:OUT;SFP:1101;SCL:1;SRVR:VE1PR08MB4848;H:VE1PR08MB4783.eurprd08.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: sWQi6jqc2RcIwRMZ0ULOfzJK37pPkj3O1OvtGEU05AnJa7ZvK3rYxjDYUIN/ueDOtGORzjLtg1ez0/MkxxTR07acH+3kb+ajJhxhoTMa3Btl3PBgSwaJKNlpRP1lxX3b1tlb9DYMIqx+HsY1o/Ya5beC4BdE5mcKqua1CYKrbBXLdn9avYvMPg44mGjwOEwuDXMA0S08EzQFVxs6yvsYHo/7KC33L+q1jB+yhiZq/etloA48NAd/39BQXVpfGLPVs7SN4EsSF4NhOzuI5T+HxQP/DaLQoICajy420JzOdC1B5TDpOzxoEmpfNVvNOgTuOsmkbYqslfW3I6wxy4WWcRN3LGYfWQalx6eYtjnCO0zmduuY3oc9viwV7ygE5aeYd3uheZPqpCUvmz0hPqPuhSP+7opGnJ82BKilxY2CvbEk5HgNu28pGhXSgT8kFGmNle8sU7EMzg7yi1tIxFh27GE+N5fPVJGAjcizq4XTZU4= MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4848 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Krzysztof.Koch@arm.com; Return-Path: Krzysztof.Koch@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT021.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: =?us-ascii?Q?CIP:63.35.35.123;IPV:CAL;SCL:-1;CTRY:IE;EFV:NLI;SFV:NSPM;SFS?= =?us-ascii?Q?:(10009020)(4636009)(346002)(376002)(136003)(396003)(3986040?= =?us-ascii?Q?0002)(1110001)(339900001)(189003)(199004)(13464003)(6116002)?= =?us-ascii?Q?(14444005)(70206006)(6306002)(110136005)(23726003)(70586007)?= =?us-ascii?Q?(486006)(86362001)(3846002)(305945005)(74316002)(7736002)(55?= =?us-ascii?Q?016002)(606006)(11346002)(5660300002)(446003)(54906003)(2360?= =?us-ascii?Q?05)(30864003)(476003)(33656002)(14454004)(52536014)(15650500?= =?us-ascii?Q?001)(15974865002)(733005)(50466002)(9686003)(126002)(1962723?= =?us-ascii?Q?5002)(316002)(336012)(356004)(26826003)(966005)(478600001)(4?= =?us-ascii?Q?326008)(97756001)(6636002)(6246003)(186003)(66066001)(229853?= =?us-ascii?Q?002)(26005)(76130400001)(8676002)(81166006)(105606002)(81156?= =?us-ascii?Q?014)(102836004)(6506007)(2906002)(53546011)(22756006)(257860?= =?us-ascii?Q?09)(8936002)(7696005)(47776003)(46406003)(8746002)(99286004)?= =?us-ascii?Q?(2501003)(76176011);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR08MB323?= =?us-ascii?Q?1;H:64aa7808-outbound-1.mta.getcheckrecipient.com;FPR:;SPF:F?= =?us-ascii?Q?ail;LANG:en;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws?= =?us-ascii?Q?.com;MX:1;A:1;?= X-MS-Office365-Filtering-Correlation-Id-Prvs: 1024c9be-2e30-49a6-14e6-08d76cfefaf0 NoDisclaimer: True X-Forefront-PRVS: 022649CC2C X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9JU1del/5nY3E6ZVqSbU0nLR07/PT8i6cZxuZbj3/s64kGTLXX++HybBbKJ29+QGazifhalrc727h1U75mUS2/+NNB3eafXxx/di6/0ItJd20FniSnH9p7g6M0NHwNJdyGfZSVsw9mIFljQq+/q2NFXQbauGjKbYMpyThFszCryR93cK8DEabbzjaR1QZzs+FReBbJ5Npxt1BPQgf5mJ2Q/HowHnSAreN24Yj4K8+56puXvz2ho/K7PDBYiXdTTDTyk5V6yLO8mEgFpMi2UOZq5u866ofZ2GeGFzPvsTF9gs4DhxtSpOB2GfnuAB6JYOv4WmCmZXIoFFdORNcqmGFDTHocizqe2QRKFgDYf7rMJx2iTk6Wl2zDemRvQVN0yZU5MTlJmq/QSFkPwoVh6/YjbLR7WU/7Hn2s17KyH5QNDogZZGE6A5tiiwbcr2QikMfbjwnqWRxaHRQauo4gzQ/4euk7pDwJvhvZ5aT0E1/hM= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Nov 2019 14:44:35.5839 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d9abd13f-d485-49a8-ae63-08d76cfeff46 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: VI1PR08MB3231 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Liming, This is a feature support. This patch is a rebased version of a reviewed p= atch that was pending to be merged due to a lack of 'tested-by', see: https://edk2.groups.io/g/devel/message/42297?p=3D,,,20,0,0,0::Created,,Krz= ysztof+Koch+SRAT,20,2,0,32042587 https://edk2.groups.io/g/devel/message/42665?p=3D,,,20,0,0,0::Created,,We+= can+review+for+your+code+change.+And+for+our+personal+point%2C+the+change+i= s+OK.,20,2,0,32042696 Kind regards, Krzysztof -----Original Message----- From: Gao, Liming =20 Sent: Tuesday, November 19, 2019 14:24 To: devel@edk2.groups.io; Sami Mujawar ; Krzysztof K= och Cc: Ni, Ray ; Gao, Zhichao ; Matt= eo Carlini ; nd Subject: RE: [edk2-devel] [PATCH v2 1/1] ShellPkg: acpiview: Update SRAT p= arser to ACPI 6.3 Krzysztof: Does this patch plan to catch to edk2 201911 stable tag? This change is = like a feature support. But, it doesn't pass review before soft feature fre= eze.=20 Thanks Liming > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Sami=20 > Mujawar > Sent: Monday, November 18, 2019 5:33 PM > To: Krzysztof Koch ; devel@edk2.groups.io > Cc: Ni, Ray ; Gao, Zhichao ;=20 > Matteo Carlini ; nd > Subject: Re: [edk2-devel] [PATCH v2 1/1] ShellPkg: acpiview: Update=20 > SRAT parser to ACPI 6.3 >=20 > Reviewed-by: Sami Mujawar >=20 > Regards, >=20 > Sami Mujawar > -----Original Message----- > From: Krzysztof Koch > Sent: 12 November 2019 02:40 PM > To: devel@edk2.groups.io > Cc: ray.ni@intel.com; zhichao.gao@intel.com; Matteo Carlini=20 > ; Sami Mujawar ; nd=20 > > Subject: [PATCH v2 1/1] ShellPkg: acpiview: Update SRAT parser to ACPI= =20 > 6.3 >=20 > Add support for parsing revision 3 of System Resource Affinity Table (SR= AT). >=20 > Decode and dump the new Generic Initiator Affinity Structure. >=20 > Validate the Device Handle Type field inside the Generic Initiator Affin= ity Structure. >=20 > Signed-off-by: Krzysztof Koch > --- >=20 > The changes can be seen at=20 > https://github.com/KrzysztofKoch1/edk2/tree/582_acpiview_6_3_srat_v2 >=20 > Notes: > v2: > - rebase on latest master [Krzysztof] >=20 > Readme.md = | 4 +- > ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c = | 33 +++ > ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h = | 16 + > > ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratParser.c= =20 > | 313 ++++++++++++++++++-- > 4 files changed, 343 insertions(+), 23 deletions(-) >=20 > diff --git a/Readme.md b/Readme.md > index=20 > acbcca88d3c62d392e6f94b1ad7de2d8627e3a38..594f16b20756ab78987fef4feac2 > e439743d5b4a 100644 > --- a/Readme.md > +++ b/Readme.md > @@ -17,7 +17,7 @@ for the UEFI and PI specifications from www.uefi.org. > > Windows > VS2019 > - edk2-ci > + master > > > src=3D"https://dev.azure.com/tianocore/edk2-ci/_apis/build/status/Window > s%20VS2019%20CI?branchName=3Dmaster"/> > @@ -34,7 +34,7 @@ for the UEFI and PI specifications from www.uefi.org. > > Ubuntu > GCC > - edk2-ci > + master > > > src=3D"https://dev.azure.com/tianocore/edk2-ci/_apis/build/status/Ubuntu > %20GCC5%20CI?branchName=3Dmaster"/> > diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c= =20 > b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c > index=20 > a569c3c55406ab58536834e56ce9701f7edeffee..2b2ecb93cef9ee28b752e7bf2d92 > 0b059dbf7d6b 100644 > --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c > +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c > @@ -405,6 +405,39 @@ Dump8Chars ( > ); > } >=20 > +/** > + This function traces 12 characters which can be optionally > + formated using the format string if specified. > + > + If no format string is specified the Format must be NULL. > + > + @param [in] Format Optional format string for tracing the data. > + @param [in] Ptr Pointer to the start of the buffer. > +**/ > +VOID > +EFIAPI > +Dump12Chars ( > + IN CONST CHAR16* Format OPTIONAL, > + IN UINT8* Ptr > + ) > +{ > + Print ( > + (Format !=3D NULL) ? Format : L"%c%c%c%c%c%c%c%c%c%c%c%c", > + Ptr[0], > + Ptr[1], > + Ptr[2], > + Ptr[3], > + Ptr[4], > + Ptr[5], > + Ptr[6], > + Ptr[7], > + Ptr[8], > + Ptr[9], > + Ptr[10], > + Ptr[11] > + ); > +} > + > /** > This function indents and prints the ACPI table Field Name. >=20 > diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h > b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h > index=20 > 20ca358bddfa5953bfb1d1bebaebbf3079eaba01..0dc721bd2cc59538432d4a9cab6c > 21728cc77d33 100644 > --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h > +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h > @@ -184,6 +184,22 @@ Dump8Chars ( > IN UINT8* Ptr > ); >=20 > +/** > + This function traces 12 characters which can be optionally > + formated using the format string if specified. > + > + If no format string is specified the Format must be NULL. > + > + @param [in] Format Optional format string for tracing the data. > + @param [in] Ptr Pointer to the start of the buffer. > +**/ > +VOID > +EFIAPI > +Dump12Chars ( > + IN CONST CHAR16* Format OPTIONAL, > + IN UINT8* Ptr > + ); > + > /** > This function indents and prints the ACPI table Field Name. >=20 > diff --git=20 > a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratParser > .c=20 > b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratParser > .c index=20 > a8aa420487bb6bf29fc38221d0b221573c64b8b3..d60476eb748e022f45d231e24c32 > b2b53e29bbd7 100644 > ---=20 > a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratParser > .c > +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratPa > +++ rs > +++ er.c > @@ -5,7 +5,7 @@ > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > @par Reference(s): > - - ACPI 6.2 Specification - Errata A, September 2017 > + - ACPI 6.3 Specification - January 2019 > **/ >=20 > #include > @@ -17,6 +17,7 @@ > // Local Variables > STATIC CONST UINT8* SratRAType; > STATIC CONST UINT8* SratRALength; > +STATIC CONST UINT8* SratDeviceHandleType; > STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo; >=20 > /** > @@ -32,13 +33,52 @@ EFIAPI > ValidateSratReserved ( > IN UINT8* Ptr, > IN VOID* Context > - ) > -{ > - if (*(UINT32*)Ptr !=3D 1) { > - IncrementErrorCount (); > - Print (L"\nERROR: Reserved should be 1 for backward compatibility.\= n"); > - } > -} > + ); > + > +/** > + This function validates the Device Handle Type field in the Generic= =20 > +Initiator > + Affinity Structure. > + > + @param [in] Ptr Pointer to the start of the field data. > + @param [in] Context Pointer to context specific information e.g. this > + could be a pointer to the ACPI table header. > +**/ > +STATIC > +VOID > +EFIAPI > +ValidateSratDeviceHandleType ( > + IN UINT8* Ptr, > + IN VOID* Context > + ); > + > +/** > + This function traces the Device Handle field inside Generic=20 > +Initiator > + Affinity Structure. > + > + @param [in] Format Format string for tracing the data. > + @param [in] Ptr Pointer to the start of the buffer. > +**/ > +STATIC > +VOID > +EFIAPI > +DumpSratDeviceHandle ( > + IN CONST CHAR16* Format, > + IN UINT8* Ptr > + ); > + > +/** > + This function traces the PCI BDF Number field inside Device Handle=20 > +- PCI > + > + @param [in] Format Format string for tracing the data. > + @param [in] Ptr Pointer to the start of the buffer. > +**/ > +STATIC > +VOID > +EFIAPI > +DumpSratPciBdfNumber ( > + IN CONST CHAR16* Format, > + IN UINT8* Ptr > + ); >=20 > /** > This function traces the APIC Proximity Domain field. > @@ -52,14 +92,7 @@ EFIAPI > DumpSratApicProximity ( > IN CONST CHAR16* Format, > IN UINT8* Ptr > - ) > -{ > - UINT32 ProximityDomain; > - > - ProximityDomain =3D Ptr[0] | (Ptr[1] << 8) | (Ptr[2] << 16); > - > - Print (Format, ProximityDomain); > -} > + ); >=20 > /** > An ACPI_PARSER array describing the SRAT Table. > @@ -103,6 +136,41 @@ STATIC CONST ACPI_PARSER SratGicITSAffinityParser[]= =3D { > {L"ITS Id", 4, 8, L"0x%x", NULL, NULL, NULL, NULL}, }; >=20 > +/** > + An ACPI_PARSER array describing the Generic Initiator Affinity=20 > +Structure **/ STATIC CONST ACPI_PARSER=20 > +SratGenericInitiatorAffinityParser[] =3D { > + {L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL}, > + {L"Length", 1, 1, L"0x%x", NULL, NULL, NULL, NULL}, > + > + {L"Reserved", 1, 2, L"0x%x", NULL, NULL, NULL, NULL}, > + {L"Device Handle Type", 1, 3, L"%d", NULL, (VOID**)&SratDeviceHandleT= ype, > + ValidateSratDeviceHandleType, NULL}, > + {L"Proximity Domain", 4, 4, L"0x%x", NULL, NULL, NULL, NULL}, > + {L"Device Handle", 16, 8, L"%s", DumpSratDeviceHandle, NULL, NULL,=20 > +NULL}, > + {L"Flags", 4, 24, L"0x%x", NULL, NULL, NULL, NULL}, > + {L"Reserved", 4, 28, L"0x%x", NULL, NULL, NULL, NULL} }; > + > +/** > + An ACPI_PARSER array describing the Device Handle - ACPI **/ STATIC= =20 > +CONST ACPI_PARSER SratDeviceHandleAcpiParser[] =3D { > + {L"ACPI_HID", 8, 0, L"0x%lx", NULL, NULL, NULL, NULL}, > + {L"ACPI_UID", 4, 8, L"0x%x", NULL, NULL, NULL, NULL}, > + {L"Reserved", 4, 12, L"0x%x", NULL, NULL, NULL, NULL} }; > + > +/** > + An ACPI_PARSER array describing the Device Handle - PCI **/ STATIC=20 > +CONST ACPI_PARSER SratDeviceHandlePciParser[] =3D { > + {L"PCI Segment", 2, 0, L"0x%x", NULL, NULL, NULL, NULL}, > + {L"PCI BDF Number", 2, 2, NULL, DumpSratPciBdfNumber, NULL, NULL,=20 > +NULL}, > + {L"Reserved", 12, 4, L"%x %x %x %x - %x %x %x %x - %x %x %x %x", Dump= 12Chars, > + NULL, NULL, NULL} > +}; > + > /** > An ACPI_PARSER array describing the Memory Affinity structure. > **/ > @@ -152,6 +220,190 @@ STATIC CONST ACPI_PARSER SratX2ApciAffinityParser[= ] =3D { > {L"Reserved", 4, 20, L"0x%x", NULL, NULL, NULL, NULL} }; >=20 > +/** > + This function validates the Reserved field in the SRAT table header. > + > + @param [in] Ptr Pointer to the start of the field data. > + @param [in] Context Pointer to context specific information e.g. this > + could be a pointer to the ACPI table header. > +**/ > +STATIC > +VOID > +EFIAPI > +ValidateSratReserved ( > + IN UINT8* Ptr, > + IN VOID* Context > + ) > +{ > + if (*(UINT32*)Ptr !=3D 1) { > + IncrementErrorCount (); > + Print (L"\nERROR: Reserved should be 1 for backward=20 > +compatibility.\n"); > + } > +} > + > +/** > + This function validates the Device Handle Type field in the Generic= =20 > +Initiator > + Affinity Structure. > + > + @param [in] Ptr Pointer to the start of the field data. > + @param [in] Context Pointer to context specific information e.g. this > + could be a pointer to the ACPI table header. > +**/ > +STATIC > +VOID > +EFIAPI > +ValidateSratDeviceHandleType ( > + IN UINT8* Ptr, > + IN VOID* Context > + ) > +{ > + UINT8 DeviceHandleType; > + > + DeviceHandleType =3D *Ptr; > + > + if (DeviceHandleType > EFI_ACPI_6_3_PCI_DEVICE_HANDLE) { > + IncrementErrorCount (); > + Print ( > + L"\nERROR: Invalid Device Handle Type: %d. Must be between 0 and = %d.", > + DeviceHandleType, > + EFI_ACPI_6_3_PCI_DEVICE_HANDLE > + ); > + } > +} > + > +/** > + This function traces the Device Handle field inside Generic=20 > +Initiator > + Affinity Structure. > + > + @param [in] Format Format string for tracing the data. > + @param [in] Ptr Pointer to the start of the buffer. > +**/ > +STATIC > +VOID > +EFIAPI > +DumpSratDeviceHandle ( > + IN CONST CHAR16* Format, > + IN UINT8* Ptr > + ) > +{ > + if (SratDeviceHandleType =3D=3D NULL) { > + IncrementErrorCount (); > + Print (L"\nERROR: Device Handle Type read incorrectly.\n"); > + return; > + } > + > + Print (L"\n"); > + > + if (*SratDeviceHandleType =3D=3D EFI_ACPI_6_3_ACPI_DEVICE_HANDLE) { > + ParseAcpi ( > + TRUE, > + 2, > + NULL, > + Ptr, > + sizeof (EFI_ACPI_6_3_DEVICE_HANDLE_ACPI), > + PARSER_PARAMS (SratDeviceHandleAcpiParser) > + ); > + } else if (*SratDeviceHandleType =3D=3D EFI_ACPI_6_3_PCI_DEVICE_HANDL= E) { > + ParseAcpi ( > + TRUE, > + 2, > + NULL, > + Ptr, > + sizeof (EFI_ACPI_6_3_DEVICE_HANDLE_PCI), > + PARSER_PARAMS (SratDeviceHandlePciParser) > + ); > + } > +} > + > +/** > + This function traces the PCI BDF Number field inside Device Handle=20 > +- PCI > + > + @param [in] Format Format string for tracing the data. > + @param [in] Ptr Pointer to the start of the buffer. > +**/ > +STATIC > +VOID > +EFIAPI > +DumpSratPciBdfNumber ( > + IN CONST CHAR16* Format, > + IN UINT8* Ptr > + ) > +{ > + CHAR16 Buffer[OUTPUT_FIELD_COLUMN_WIDTH]; > + > + Print (L"\n"); > + > + /* > + The PCI BDF Number subfields are printed in the order specified in = the ACPI > + specification. The format of the 16-bit PCI BDF Number field is as = follows: > + > + +-----+------+------+ > + |DEV | FUNC | BUS | > + +-----+------+------+ > + |15:11| 10:8 | 7:0 | > + +-----+------+------+ > + */ > + > + // Print PCI Bus Number (Bits 7:0 of Byte 2) UnicodeSPrint ( > + Buffer, > + sizeof (Buffer), > + L"PCI Bus Number" > + ); > + PrintFieldName (4, Buffer); > + Print ( > + L"0x%x\n", > + *Ptr > + ); > + > + Ptr++; > + > + // Print PCI Device Number (Bits 7:3 of Byte 3) UnicodeSPrint ( > + Buffer, > + sizeof (Buffer), > + L"PCI Device Number" > + ); > + PrintFieldName (4, Buffer); > + Print ( > + L"0x%x\n", > + (*Ptr & (BIT7 | BIT6 | BIT5 | BIT4 | BIT3)) >> 3 > + ); > + > + // PCI Function Number (Bits 2:0 of Byte 3) > + UnicodeSPrint ( > + Buffer, > + sizeof (Buffer), > + L"PCI Function Number" > + ); > + PrintFieldName (4, Buffer); > + Print ( > + L"0x%x\n", > + *Ptr & (BIT2 | BIT1 | BIT0) > + ); > +} > + > +/** > + This function traces the APIC Proximity Domain field. > + > + @param [in] Format Format string for tracing the data. > + @param [in] Ptr Pointer to the start of the buffer. > +**/ > +STATIC > +VOID > +EFIAPI > +DumpSratApicProximity ( > + IN CONST CHAR16* Format, > + IN UINT8* Ptr > + ) > +{ > + UINT32 ProximityDomain; > + > + ProximityDomain =3D Ptr[0] | (Ptr[1] << 8) | (Ptr[2] << 16); > + > + Print (Format, ProximityDomain); > +} > + > /** > This function parses the ACPI SRAT table. > When trace is enabled this function parses the SRAT table and @@ -183= ,6 +435,7 @@ ParseAcpiSrat ( > UINT8* ResourcePtr; > UINT32 GicCAffinityIndex; > UINT32 GicITSAffinityIndex; > + UINT32 GenericInitiatorAffinityIndex; > UINT32 MemoryAffinityIndex; > UINT32 ApicSapicAffinityIndex; > UINT32 X2ApicAffinityIndex; > @@ -190,6 +443,7 @@ ParseAcpiSrat ( >=20 > GicCAffinityIndex =3D 0; > GicITSAffinityIndex =3D 0; > + GenericInitiatorAffinityIndex =3D 0; > MemoryAffinityIndex =3D 0; > ApicSapicAffinityIndex =3D 0; > X2ApicAffinityIndex =3D 0; > @@ -232,7 +486,7 @@ ParseAcpiSrat ( > } >=20 > switch (*SratRAType) { > - case EFI_ACPI_6_2_GICC_AFFINITY: > + case EFI_ACPI_6_3_GICC_AFFINITY: > AsciiSPrint ( > Buffer, > sizeof (Buffer), > @@ -249,7 +503,7 @@ ParseAcpiSrat ( > ); > break; >=20 > - case EFI_ACPI_6_2_GIC_ITS_AFFINITY: > + case EFI_ACPI_6_3_GIC_ITS_AFFINITY: > AsciiSPrint ( > Buffer, > sizeof (Buffer), > @@ -266,7 +520,24 @@ ParseAcpiSrat ( > ); > break; >=20 > - case EFI_ACPI_6_2_MEMORY_AFFINITY: > + case EFI_ACPI_6_3_GENERIC_INITIATOR_AFFINITY: > + AsciiSPrint ( > + Buffer, > + sizeof (Buffer), > + "Generic Initiator Affinity Structure [%d]", > + GenericInitiatorAffinityIndex++ > + ); > + ParseAcpi ( > + TRUE, > + 2, > + Buffer, > + ResourcePtr, > + *SratRALength, > + PARSER_PARAMS (SratGenericInitiatorAffinityParser) > + ); > + break; > + > + case EFI_ACPI_6_3_MEMORY_AFFINITY: > AsciiSPrint ( > Buffer, > sizeof (Buffer), > @@ -283,7 +554,7 @@ ParseAcpiSrat ( > ); > break; >=20 > - case EFI_ACPI_6_2_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY: > + case EFI_ACPI_6_3_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY: > AsciiSPrint ( > Buffer, > sizeof (Buffer), > @@ -300,7 +571,7 @@ ParseAcpiSrat ( > ); > break; >=20 > - case EFI_ACPI_6_2_PROCESSOR_LOCAL_X2APIC_AFFINITY: > + case EFI_ACPI_6_3_PROCESSOR_LOCAL_X2APIC_AFFINITY: > AsciiSPrint ( > Buffer, > sizeof (Buffer), > -- > 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' >=20 >=20 >=20 >=20