From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by mx.groups.io with SMTP id smtpd.web10.2821.1587392303749983755 for ; Mon, 20 Apr 2020 07:18:24 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@akeo-ie.20150623.gappssmtp.com header.s=20150623 header.b=1jqfaJE9; spf=none, err=permanent DNS error (domain: akeo.ie, ip: 209.85.221.67, mailfrom: pete@akeo.ie) Received: by mail-wr1-f67.google.com with SMTP id j1so6964813wrt.1 for ; Mon, 20 Apr 2020 07:18:23 -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=MLz1qBtti/LXxGMbTq5lN1QFDt2qfO5KevkGMI+lV+k=; b=1jqfaJE9SdovuhFa6xfdEFxKEJKKVZqtl3WlObeFL9v9dUR6UYVgw9g0SgOIygurng X89Ci/XOMt/SL0zbnepUlCnw0IydGBNst8zu1t41g+T450lWYpxA9DKTDn2VAFQUzTFq /p2ufJ6e7pDTif6KwwIbiAAJy4wPpOg6xKf9RH7TDfga/QNfYBGBtbciHotbQMWRXkZ/ a6hTJwcNXN0tDI+1aNwnzV9DQabzu7vdqBEeDCH+PJabP9dqXjYJbzFW22K69x/Aarn0 r0o/NxhdVoY3x0i0xyxpQYAod3auqvRkZBLlz/6aULQLK2pGxx13gT5MkpDFZAe3C6Ek t8cA== 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=MLz1qBtti/LXxGMbTq5lN1QFDt2qfO5KevkGMI+lV+k=; b=i09JSUB26l12AP+garF5Y1QZAFzpl/f8OCCTK6sL9sSibbM8kHqZpgvACd6HcgVqsu Huzirg3LvmI1ZV4jViFooCJEJCQ6+EPv19cspox/+cNsGSjLRwIa10SSjL/lErNTaWAd FZBsp3yXtYNxjKm8LKeIyQ7akjK62bCDDbdkzTi0vUKN4vEpx3e1dZV5YUyQQNFpLet5 jULdtVhtUGNPeH5/m1qvRe04jQtV2LNz3j8uvQXhEzwwd8Xyeo+FtKO+6imevKXHve1f rAHZueorsUi0xGQg6RoJaaBNdiJpHA7jjCd33KSzMC5wuOuyzMe0JItgvGN9S6bq6C9g A7ew== X-Gm-Message-State: AGi0Puawqy/dthxb1Xl6m/ELFlcL8s1TvPcwEi/1pR8n1NakPvDLErIl QHV26WE6k5j/muvNdYEpqU1WlA== X-Google-Smtp-Source: APiQypJIldokft+/SNMC/8N+m6gCQ/cfOMQohf+1/ehtJk47dzs7UcOzb7Bd/ahJxWqpr3hvmyGHUA== X-Received: by 2002:adf:fe03:: with SMTP id n3mr18410061wrr.315.1587392301892; Mon, 20 Apr 2020 07:18:21 -0700 (PDT) Return-Path: Received: from [10.0.0.122] ([84.203.47.66]) by smtp.googlemail.com with ESMTPSA id 185sm1713424wmc.32.2020.04.20.07.18.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Apr 2020 07:18:19 -0700 (PDT) Subject: Re: [edk2-devel] [edk2-platform][PATCH v1 0/4] Platform/RaspberryPi : Enable TFTP shell command To: Ard Biesheuvel , awarkentin@vmware.com, Andrew Fish , "devel@edk2.groups.io" Cc: Samer El-Haj-Mahmoud , Leif Lindholm References: <20200419130417.3298-1-samer@elhajmahmoud.com> <8d59e616-9910-4935-2e1f-5da75fc1d34a@arm.com> <831705c6-0915-ba1a-adc0-3078b2af1a43@akeo.ie> <28ac6ff0-86eb-fde7-63f6-c1c7dc0f0724@akeo.ie> <2046f801-45c2-f591-fdf8-18e2edb093d3@akeo.ie> <160753416257B0CA.29096@groups.io> <10bee111-6628-e111-1057-9608bbd31521@arm.com> <267c888b-73bb-8a5e-dbd3-17ac25099d55@arm.com> From: "Pete Batard" Message-ID: Date: Mon, 20 Apr 2020 15:18:17 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <267c888b-73bb-8a5e-dbd3-17ac25099d55@arm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit On 2020.04.20 13:43, Ard Biesheuvel wrote: > On 4/20/20 1:55 PM, Pete Batard wrote: >> On 2020.04.20 07:45, Ard Biesheuvel wrote: > ... >>> I rejected ACPI 6.3 table upgrades because, in their current form, >>> the only thing they achieve is losing the ability to boot an OS that >>> predates ACPI 6.3. Every piece of the platform currently being >>> described via ACPI can be described using 5.1 tables. >> >> Actually, that is not technically correct. >> >> But I will concede that you probably aren't aware of this, because we >> didn't bring up this point when we discussed the matter earlier. >> >> One thing you may want to know is that most of the binary blobs we >> picked up from the Microsoft IoT endeavour were ACPI 6.0, and, >> especially, the MADT we got had actually been abusing the GICR Base >> Address field, which was introduced in 6.0, to place then >> "nonsensical" value of 1 in there. >> >> And for reasons that only Microsoft knows, unless you do have a value >> of 1 there, Windows 10 on the Pi 3 will not boot at all. In other >> words, if you are to use ACPI 6.x with carry-over defaults from 5.1, >> Windows 10 can simply not boot, at least on the Pi 3. >> >> Now, what happened is that, when we started introducing some 5.1 >> tables elsewhere, I went with trying to harmonize everything to 5.1 >> and effectively *downgraded* the 6.0 tables we got from Microsoft to >> 5.1 (which nobody seemed to mind then, on account, I will also assert, >> that nobody realized that we actually had 6.0 tables where 6.0 >> features might be relevant). >> >> It turns out that, if you do use 5.1, Windows 10 *seems* to be happy >> about the MADT, even as it is obviously missing a GICR Base Address >> field with a 1 value, and *appears* to work as expected. >> >> However, because of the proprietary nature of the OS, we have >> absolutely no idea whether having a "properly manipulated" GICR Base >> Address for Windows is important or not. The obvious reasoning is >> that, if Microsoft abused that field in their tables and especially >> if, when using ACPI 6.x, Windows 10 doesn't boot unless it sees the >> expected value there, an ACPI 6.x MADT with the relevant value >> populated might be something that we actually want to see. >> > > I agree that it makes sense to harmonize the table versions, and avoid > mixing and matching different versions of the spec. The structures are > usually defined in a way where new fields added at then end, and the > sizes are explicitly defined, so that an older OS can consume newer > versions of the tables. > > At least, that is the theory ... > >>> ACPI 6.3 tables are not 'better' or 'more current' than 5.1 ones. >> >> The example above begs to differ (though of course, short of actually >> knowing why the heck Microsoft decided to abuse GICR Base Address, >> it's hard to know what 'better' means in this case). >> >> It does seem to me like Microsoft were effectively using the most >> recent ACPI version they could use when they produced their IoT >> tables. And we certainly did happen to downgrade some of that, and may >> have gotten lucky that it all seemed to work (with the point being >> that, if we seem to be happy that downgrading ACPI tables from 6.0 to >> 5.1 and validating that we aren't observing obvious ill effects is >> okay, then upgrading ACPI tables to 6.3 and validating that we aren't >> observing ill effects should be fine too). >> > > If compatibility with Microsoft Windows 10 requires a certain minimum > version of the tables, then I don't mind adhering to that. > >>> ACPI 6.3 tables should be used if/when they are needed, and not before. >> >> I disagree here again, on account of trying to showcase elements where >> we can, and this is one place we can do this. >> >> I see absolutely zero technical reasons to want to stick with ACPI 5.1 >> especially as we already have one 6.3 table (PPTT) and we're going to >> have to upgrade a couple others to at least 6.0 anyway to get back to >> the position we were in with the Microsoft's blobs, so that we can be >> more confident about Windows' behaviour. >> >> As a matter of fact, using ACPI 6.3 before it is effectively needed is >> exactly the kind of move I see as wanting to apply when we know that a >> platform is going to be used as a de facto showcase. It may seem like >> a simple "newer is always better!" push to you, but the way I see it >> is that, by doing so, we are going to help developers of new >> platforms, who will be looking at the Pi for reference (whether we >> like it or not) and, if they are developing for modern hardware, are >> going to be looking at using new features that introduced only in >> recent ACPI. Thus, even if we don't make any use of these features on >> the Pi's, those developers might be grateful to find that there exists >> a working example of using a relatively up to date ACPI, and that they >> won't have to reinvent the wheel. >> >> Especially, as opposed to what might be the case for other platforms, >> we don't have a baggage of "older" OSes that we may hinder support for >> if we do move to ACPI 6.3 (especially as, outside of Windows, most Pi >> 3 OSes will be using DT rather than ACPI, and, without SD and Genet >> support, the idea of older OSes needing to work with Pi 4 is a bit >> ludicrous). >> >> So, whereas I agree that your reasoning is generally sound for most >> platforms, the fact that the Pi is going to be used as a de-facto >> showcase or starting point by folks interested in developing a new ARM >> platform, makes, I will assert, the situation a bit different here, >> and I would really appreciate if you could give some more thoughts to >> the points I am trying to make. In this case, I believe that the Pi >> should be the "exception that proves the rule". >> >> Furthermore, and this IMO is the most important point, we are not >> going to be sitting idle if we do upgrade to 6.3 and someone comes to >> us with a report that using modern ACPI appears to be causing them >> trouble (which, I will also assert, may actually be something that >> might be of great interest to folks on this list if that happens). As >> opposed to proprietary platforms, where ACPI is pretty much set in >> stone by the vendor and where addressing issues is a struggle, and, >> even if the vendor is very reactive and produces an update, where >> flashing a new firmware can be a tricky operation for some users, we >> are Open Source, easy to reach for reports, and the firmware "update" >> process of the Pi could not be any simpler (copy a file to an SD card >> and you're done). So I'd really like to help squelch the idea that if >> we do decide to upgrade to ACPI 6.3, and we effectively find out that >> it causes issues, we're simply going to stand by and let these >> unaddressed, whilst telling users of the platform "too bad". None of >> what we are doing is ever meant to be static or immutable, even after >> a goal has been reached. Thus, if there are issues with upgrading to >> 6.3, we're going to make darn sure that we address them, in the same >> way we have been planning to address issues that might be raised from >> some of our forced downgrades from 6.0 to 5.1. >> > > Thanks Pete. > > I still don't agree with the whole showcase aspect of this discussion, > but since there are apparently other good reasons to upgrade these > tables that nobody brought up before, I am not going to oppose any > changes on this front, I appreciate that, thanks. > provided that the commit logs articulate in > sufficient detail why we think this is necessary (so that people looking > at this port for guidance have the background as well) Okay. I think I can do that. > Out of curiosity, why did we need a 6.3 PPTT for RPi4? Well, PPTT was introduced in 6.2, and I am going to speculate that since 6.3 introduced a bit more Processor Structure Flags and other elements (haven't checked the differences in detail), we probably went for 6.3 so that we could easily toggle those if needed, without having to go through a version upgrade. In other words, since we were introducing a recent ACPI feature from scratch, I surmise that the idea was that we might as well go all the way in order to potentially spare us some work later. But you'd have to ask Jeremy for the actual details. And since we're talking about this, I just want to make clear that, once we update to 6.3, I don't have plans to update our tables to 6.4 or later unless we explicitly need those features, as the objective here is to use the most recent version of ACPI that exists at the time where a new platform (that we somewhat want to use as a showcase) is being introduced and nothing more. Regards, /Pete