From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mx.groups.io with SMTP id smtpd.web09.11129.1638464646886469124 for ; Thu, 02 Dec 2021 09:04:07 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bDdiGOiG; spf=pass (domain: kernel.org, ip: 139.178.84.217, mailfrom: ardb@kernel.org) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EDCBF62758 for ; Thu, 2 Dec 2021 17:04:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 652EDC53FD3 for ; Thu, 2 Dec 2021 17:04:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638464645; bh=gKg4HY9ZoEz5FE1DbSkmOAiv8aKuprubDsWxr+RkWdE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=bDdiGOiGP+aSWv7w/rWNiSUokf/g8HCqx50khwlOJ9Uz+Lwd/5zfO2T5Vi0m4g3qn Bz/qhSzo1akTMRoPLD2NQwz7DX9pyI8IPOPRzwgh8LSuw5u1O+bDT4LKkyT+mnzumK p0BGVbJNWYHKWGTyBDZuIzWrmK4o5PKWV2vqCCRZmJyIDOcmmefr4iN2CrwdUwRPOs w9m0oU0IdiX2QeMQP6E1uAnck3AuefAMCvCJtehppR05nayTY1ITV8OZ6sM3nf49Xv fzIs9ZBDotk+WIcU+DN8BeWNLbkDpMMsqzQTE+g/4NI+EU3MWQTMltyF6zIor9b6gR sUoFHgZ4lykUA== Received: by mail-ot1-f48.google.com with SMTP id w6-20020a9d77c6000000b0055e804fa524so507070otl.3 for ; Thu, 02 Dec 2021 09:04:05 -0800 (PST) X-Gm-Message-State: AOAM533bO9NlWQRjdmatQuqFPGl1SLVlszJwbPCLIjqAT52EAGW0IFNm fxLro622iKyGPtVIM2OHKEDQI/VPDW6F6gNMBmA= X-Google-Smtp-Source: ABdhPJzFaj4IqMjXUCcht8y2so/hVVXuvnTQUapHIYjM41yip8KWWHnGDTOlrEJOz2ZXVvdC3hFb9nvrD9AsDv03bYM= X-Received: by 2002:a05:6830:1514:: with SMTP id k20mr11989573otp.147.1638464644631; Thu, 02 Dec 2021 09:04:04 -0800 (PST) MIME-Version: 1.0 References: <20211202165206.79615-1-jeremy.linton@arm.com> In-Reply-To: <20211202165206.79615-1-jeremy.linton@arm.com> From: "Ard Biesheuvel" Date: Thu, 2 Dec 2021 18:03:53 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-devel] [PATCH 0/9] Platform/RaspberryPi: Utilize SPI flash for EFI variables To: edk2-devel-groups-io , Jeremy Linton Cc: Peter Batard , Ard Biesheuvel , Leif Lindholm , Andrei Warkentin , Sunny Wang , Samer El-Haj-Mahmoud , =?UTF-8?B?TWFyaW8gQsSDbMSDbmljxIM=?= Content-Type: text/plain; charset="UTF-8" On Thu, 2 Dec 2021 at 17:52, Jeremy Linton wrote: > > The RPi4 has a SPI flash with unused capacity. This set detects if > that capacity is sufficient for a UEFI variable store and utilizes > it as such. This fixes a long list of problems, and along the way likely > also fixes a random boot failure caused by the FaultTolerantWriteDxe > garbage collecting, and erasing the flash volume header which is being > used to return information about the underlying variable storage capacity. > > This set was dependent on an earlier, mostly ignored set of changes to > move the GPIO/etc devices into their own SSDT and disable them. Because > of that, the two sets have been merged. > > Why is that? Because the SPI flash is mux'ed with the PWM used to play > audio out the 3.5mm audio jack on this device. This causes a long list > of problems we must try and avoid, starting with the fact that the pins > need to be controlled by the uefi runtime service. The other problem is > obviously that any time a variable is updated, if the user is utilizing > the 3.5mm audio they will hear clicks and pops. Turns out that behavior > isn't unique to this patch set because the low level boot/etc exhibits this > when running in a TFA+uboot/edk2 environment. A fairly small tweak to TFA > fixes the majority of this, and the remaining runtime problems caused > by this patch actually are very slight and generally not noticeable unless > one goes looking for them. OTOH, we revert to the earlier non persisted > variable store if the firmware is running in a DT only mode, or the > user enables the ACPI GPIO block. > > > Jeremy Linton (9): > Platform/RaspberryPi: Cleanup menu visibility > Platform/RaspberryPi: Give the user control over the XHCI mailbox > Platform/RaspberryPi: Move GPIO/SPI/I2C to SSDT > Platform/RaspberryPi: Add menu item to enable/disable GPIO > Platform/RaspberryPi: Add constants for controlling SPI > Platform/RaspberryPi: Add mailbox cmd to control audio amp > Platform/RaspberryPi: Add SPI/GPIO to memory map > Platform/RaspberryPi: Allow pin function selection at runtime > Platform/RaspberryPi: Add SPI flash variable store. > Very nice! I am having trouble applying these patches, though. Could you please resend without the random whitespace changes?