From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.5430.1588769435777853575 for ; Wed, 06 May 2020 05:50:35 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ard.biesheuvel@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 74FA81FB; Wed, 6 May 2020 05:50:35 -0700 (PDT) Received: from [192.168.1.81] (unknown [10.37.8.179]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 625B23F68F; Wed, 6 May 2020 05:50:34 -0700 (PDT) Subject: Re: [edk2-platforms][PATCH 1/1] Platform/RPi/AcpiTables: Update all tables to latest ACPI To: Pete Batard , devel@edk2.groups.io Cc: leif@nuviainc.com, awarkentin@vmware.com References: <20200506113748.8060-1-pete@akeo.ie> <7fe273c7-f0f0-b60f-39a8-e4385271abb6@arm.com> From: "Ard Biesheuvel" Message-ID: Date: Wed, 6 May 2020 14:50:30 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 5/6/20 2:45 PM, Pete Batard wrote: > On 2020.05.06 13:26, Ard Biesheuvel wrote: >> On 5/6/20 1:37 PM, Pete Batard wrote: >> ... >>> Therefore, since we do see a need for ACPI 6.x features, and >>> effectively have a 6.3 table with PPTT, and also since we have >>> tested that we are not seeing ill effects from doing so for the >>> most common OSes we support, we bring all of the relevant ACPI >>> tables to version 6.3. >>> >>> This is mostly accomplished by simply altering the version of >>> ACPI being references in the macros, >> >> OK, so even the macros that resolve to the exact same code are=20 >> renamed. I suppose this means a blanket rename of everything once ACPI= =20 >> 6.4 comes out? >=20 > No. >=20 > I am considering that we are still in the process of introducing the=20 > platform, therefore we introduce it with the most up to date version of= =20 > ACPI at that time. >=20 > Though I could see some point in doing so, I have no plan to update out= =20 > ACPI for the Pi's every time a new version is released, unless there is= =20 > an actual need to do so for a specific table or there is a blanket=20 > request (from seeing lots of folks using our code as a starting point)=20 > that warrants it. >=20 > In other words, even as RPi3 was introduced a year ago, I consider that= =20 > we are still in the process of adding RPi3/RPi4 as a brand new platform= ,=20 > and therefore want to use the most up to date ACPI at the time of=20 > introduction. But I'm definitely not making a point of trying to follow= =20 > ACPI updates past that this. >=20 Good. >>> except for the new fields >>> being initialized in the MADT table where we: >>> * Use 1 for GICR Base Address in GICC_STRUCTURE_INIT because, even >>> =C2=A0=C2=A0 as this field is not supposed to apply to any of our pla= tforms, >>> =C2=A0=C2=A0 this is what Microsoft used in the original Pi 3 hardcod= ed MADT >>> =C2=A0=C2=A0 blobs and Windows 10 doesn't boot on the Pi 3 if set to = 0. >> >> Fair enough. >> >>> * Use 2 for GIC version in GIC_DISTRIBUTOR_INIT, since the Pi 4 GIC >>> =C2=A0=C2=A0 is v2 only. >>> >> >> OK. But you are introducing new references to ACPI_6_0 macros here. If= =20 >> the point is to rename everything for cosmetic reasons, shouldn't you=20 >> use 6.3 there as well? >=20 > Well, EFI_ACPI_6_0_GIC_DISTRIBUTOR_INIT was not updated for 6_1, 6_2,=20 > 6_3 (most likely because the macro, which is defined in=20 > EmbeddedPkg/Include/Library/AcpiLib.h applies the same for all 6.x=20 > versions), so I just used the highest version I could find, which is=20 > 6_0. This is based on what I saw other platforms do. >=20 > I don't mind sending an EDK2 patch to add the various=20 > EFI_ACPI_6_x_GIC_DISTRIBUTOR_INIT if that's what you request, but that=20 > seems a bit like overkill and may break existing platforms, because it=20 > will most likely require moving EFI_ACPI_6_0_GIC_DISTRIBUTOR_INIT to a=20 > different header (MdePkg/Include/IndustryStandard/Acpi60.h). >=20 Fair enough. Reviewed-by: Ard Biesheuvel Pushed as 66d1b02429fa..11189124fbc2