From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by mx.groups.io with SMTP id smtpd.web10.51618.1585578822555789453 for ; Mon, 30 Mar 2020 07:33:42 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@akeo-ie.20150623.gappssmtp.com header.s=20150623 header.b=rRmkqsgG; spf=none, err=permanent DNS error (domain: akeo.ie, ip: 209.85.128.65, mailfrom: pete@akeo.ie) Received: by mail-wm1-f65.google.com with SMTP id a81so22174488wmf.5 for ; Mon, 30 Mar 2020 07:33:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=QHvnixk9xG2jiuEzpJUurBnvlh9j4cOKwjFJ2Wh5IXI=; b=rRmkqsgG03nBeDFByLJzdpyY/Tl2Dvjsdtnls1rvRsQ7XAHaZrwkXTuLfMlyYLfYpx 2FDynCEgu+LRfXDU/m+/21F7f7pHQ6knvw+Phl2PHtuDWVHkxzCaeNRi0tAKgCYmUssA Lrbpx0t3KkkUulFRjIV8SYnbnx/mFKKVUZUH2M/70t7P1yh0o0lRXzG5s8DuaxjQvXSX /1Vj1mlG83AkjuvMdGooI+DY6wAYOpN3mQBMzkVmq6cUSlxbN41XKUeAus0En4kcV9V6 C91fbaX/yoUBBnp5Zc/EqJXIflZ7VxywQruXoZQDN2kAsv1AWEev0LY5BpQ+k7hQOWvv 7Ddg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=QHvnixk9xG2jiuEzpJUurBnvlh9j4cOKwjFJ2Wh5IXI=; b=IlrUUIePBeTS8iLII8NFETqQP+Y5nELuqVVMLSD1kcD3NOcsx/62r9O8t6HsFjY3iR DBwX1PZ10PaC7hdE7xPkXOpnCbNQ4mQJ/S7HYcDYEYgrMsPEBFbQi+qcZJy+siYSX5oV Vct53Hm4x2R/UhyGTAk19ej0pL+71cfGd4ZMJmmJquFdKVWw1OE/NVNeg+L5hwdEWur6 PMxSuAC2A8qB1N/kzYMkSZgTnnHKEeWyjZxqxdPM9VCz+N9fkfciUokpzfVuZ2weq+pz GtTpafZgsEdLLvouKaakFu8IHPRCECjzAp6O/jCbgmVk+lH36dCVE5hBZI6IQmnYifxL 6WIA== X-Gm-Message-State: ANhLgQ3qohJFdh8fZ6e40zFaPapdukX+UoiYFQA9n89hEZVd9HSO9elS n/2duKlwqR0MsFKdDl5Hc+csOg== X-Google-Smtp-Source: ADFU+vvxYcb/Y96wXm6eE6oxfEpu+DXAESvu0+DlI75NNPFaJhKocqJlZnRPslRBAKJiQmDYo/AmSw== X-Received: by 2002:a1c:6146:: with SMTP id v67mr13994366wmb.78.1585578821082; Mon, 30 Mar 2020 07:33:41 -0700 (PDT) Return-Path: Received: from [10.0.0.122] ([84.203.45.232]) by smtp.googlemail.com with ESMTPSA id w204sm21528638wma.1.2020.03.30.07.33.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Mar 2020 07:33:40 -0700 (PDT) Subject: Re: [PATCH 1/1] EmbeddedPkg/AcpiLib: add GICC table init macro for ACPI 6.3 To: Ard Biesheuvel Cc: edk2-devel-groups-io , Leif Lindholm References: <20200327130117.11304-1-pete@akeo.ie> <6fb85ee0-1894-8a6b-73d0-2a7adc0799ab@akeo.ie> From: "Pete Batard" Message-ID: Date: Mon, 30 Mar 2020 15:33:39 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit On 2020.03.30 15:19, Ard Biesheuvel wrote: > 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 subject 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 that >>>>>> complies with 6.3. >>>> >>>> This is what happens if you try to use EFI_ACPI_6_0_GICC_STRUCTURE_INIT >>>> 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 ‘EFI_ACPI_RESERVED_BYTE’ >>>> {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 ‘EFI_ACPI_6_0_GICC_STRUCTURE_INIT’ >>>> 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. I'll be the first to agree that are much better platforms to use as starting point. Unfortunately they don't come at the same price point and widespread availability, which is why I think there is value is trying to showcase what we can with the Pi's, despite their major annoying quirks. Regards, /Pete