From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by mx.groups.io with SMTP id smtpd.web10.51230.1585577969493558393 for ; Mon, 30 Mar 2020 07:19:29 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=xF4MHD5U; spf=pass (domain: linaro.org, ip: 209.85.221.66, mailfrom: ard.biesheuvel@linaro.org) Received: by mail-wr1-f66.google.com with SMTP id j17so21781890wru.13 for ; Mon, 30 Mar 2020 07:19:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=PeTJm+MajuF69pNY1t3EyoMMjn+5n5JAtOuJgINIWHA=; b=xF4MHD5UHilYf2hlv52VJ0f56WgtCaYhdADXNYAPAU8P83FANfdPxCEtZJFTAAhiZt YiVa5J2hXQCAQkPZZwIrPNaSo4i+l5ro9ML3+eVnpv/9bw2/d+AtFAfwBClgXY4+lbVx db+fwD971yqZjGzKzhSTJ/m54h6V6OfTgThvmUnU+nNdIbvoC9oDqq+PafQqbHlPkoJS RClKBf2jMugAD216b8uV2Gme3zX8VoTY7DNvof8NR87NeK+QPZU9YhHo+63emJVERUMN 8Y+Mj6Jkb/c8L/DbL4SWl8w/QyJXpDmDHnrDB0lzs3rH7m4vtT6Cs7NqH8ZD6GWVzWX9 gUDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=PeTJm+MajuF69pNY1t3EyoMMjn+5n5JAtOuJgINIWHA=; b=iicR+/w9ZZlNc3wzxiy8Bt2OlLbeu0TSheyp/YP6o/mMHXxFpn0o5ul61znvRciRb+ nrpxm5cr0tmjJ9cYr+KQwkvEcUB8ziQNCJaoo6YKWY8a7jE20L2m0vJZcQtr5a+OPr1e miBkzt5WkHWD2kBRs7rcaRW/GLa3OPZeUD5+EYGmE5YzzXnPi2xcEc1GvSjIQdUPE2As Z6iHUHgsXqg5im+CKBtKdC00OBMLu230Q/mbtHd2KWM6L8cQOiW2IeJ8DlDet2T7GVkT s/00+plx3ODF4NRgwgJrj/ANQQEASKNNuCKTOknA5ae3mzboTCW3uiqbv93KhwZxawkF 0UGw== X-Gm-Message-State: ANhLgQ1olEolE7X1BajLG2fBLWIfxnEZLhuGacgZzngSAGMZSnK3RrRU tZIhoV3egLr63xzvysOx3F+pJhnFKN796WGIFffWEQ== X-Google-Smtp-Source: ADFU+vtxVV50tOyGtgrY7j3d0xc2b+p4nX0G9EQNS2xLiiRMKQP/Vgljj+/+L7nAgI1pEHanjWlYGd4G8kIna1hj1aw= X-Received: by 2002:adf:afdb:: with SMTP id y27mr15348883wrd.208.1585577967933; Mon, 30 Mar 2020 07:19:27 -0700 (PDT) MIME-Version: 1.0 References: <20200327130117.11304-1-pete@akeo.ie> <6fb85ee0-1894-8a6b-73d0-2a7adc0799ab@akeo.ie> In-Reply-To: From: "Ard Biesheuvel" Date: Mon, 30 Mar 2020 16:19:16 +0200 Message-ID: Subject: Re: [PATCH 1/1] EmbeddedPkg/AcpiLib: add GICC table init macro for ACPI 6.3 To: Pete Batard Cc: edk2-devel-groups-io , Leif Lindholm Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 30 Mar 2020 at 16:07, Pete Batard wrote: > > On 2020.03.30 15:01, Ard Biesheuvel wrote: > > On Mon, 30 Mar 2020 at 15:56, Pete Batard wrote: > >> > >> On 2020.03.30 14:20, Ard Biesheuvel wrote: > >>> On Mon, 30 Mar 2020 at 15:12, Ard Biesheuvel wrote: > >>>> > >>>> On Mon, 30 Mar 2020 at 15:09, Pete Batard wrote: > >>>>> > >>>>> On 2020.03.30 14:06, Ard Biesheuvel wrote: > >>>>>> On Fri, 27 Mar 2020 at 14:06, Pete Batard wrote: > >>>>>>> > >>>>>>> Incidentally, this is not an [edk2-platform] patch, as the subjec= t line > >>>>>>> from previous mail seemed to indicate, but an [edk2] patch. > >>>>>>> > >>>>>> > >>>>>> Do we have a user for this? > >>>>> > >>>>> Yes we do. I have a pachset lined up that updates the Raspberry Pi = ACPI > >>>>> to 6.3, that has a dependency on this. > >>>>> > >>>> > >>>> But does the RPi have SPE and the associated overflow interrupt? > >> > >> No, but it doesn't matter since the specs indicate that SPE values can > >> be set to zero if unused/non-applicable. > >> > >>>> ACPI > >>>> is designed to be backward compatible, so it is perfectly acceptable > >>>> to use the 6.2 macros in the context of a firmware implementation th= at > >>>> complies with 6.3. > >> > >> This is what happens if you try to use EFI_ACPI_6_0_GICC_STRUCTURE_INI= T > >> in a 6.3 context: > >> > >> /usr/src/edk2/MdePkg/Include/IndustryStandard/Acpi10.h:297:33: error: > >> excess elements in scalar initializer [-Werror] > >> #define EFI_ACPI_RESERVED_BYTE 0x00 > >> ^~~~ > >> Building ... > >> /usr/src/edk2/MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf [AARCH64] > >> /usr/src/edk2/EmbeddedPkg/Include/Library/AcpiLib.h:64:30: note: in > >> expansion of macro =E2=80=98EFI_ACPI_RESERVED_BYTE=E2=80=99 > >> {EFI_ACPI_RESERVED_BYTE, EFI_ACPI_RESERVED_BYTE, > >> EFI_ACPI_RESERVED_BYTE} \ > >> ^~~~~~~~~~~~~~~~~~~~~~ > >> /usr/src/edk2-platforms/Platform/RaspberryPi/AcpiTables/Madt.aslc:64:5= : > >> note: in expansion of macro =E2=80=98EFI_ACPI_6_0_GICC_STRUCTURE_INIT= =E2=80=99 > >> EFI_ACPI_6_0_GICC_STRUCTURE_INIT ( > >> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > >> > > > > What do you mean exactly by 'in a 6.3 context': are you trying to > > statically initialize a 63 struct with the 60 macro? > > Yes. I am trying to upgrade all of our ACPI tables to 6.3, on account > that (part of a commit message from the edk2-platform I have lined up): > > ----------------------------------------------------------------------- > Because of its widespread availability and low price, we expect the > Raspberry Pi source to be used by platform developers as a starting > point to create their own platform implementation. > Actually, even though I *really* like the RPi4 port in terms of functionality and polish, it is *not* a good example to follow to build a new platform. First of all, it is based on PrePi instead of PrePeiCore, and so it is very difficult to add PEI phase drivers for, e.g., capsule update or measured boot. But in general, the quirky hardware and firmware arrangement make it a one-off design IMO, and new platforms should use something like SynQuacer as a reference instead.