From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by mx.groups.io with SMTP id smtpd.web12.11326.1638464992925973954 for ; Thu, 02 Dec 2021 09:09:53 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Us6ZyIzP; spf=pass (domain: kernel.org, ip: 145.40.68.75, 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 ams.source.kernel.org (Postfix) with ESMTPS id C7B76B82243 for ; Thu, 2 Dec 2021 17:09:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 82CDCC53FCF for ; Thu, 2 Dec 2021 17:09:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638464983; bh=IJATAmoc3KI19wEIdLR8LsLegaM/8wr7YwxCPp5NFfI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Us6ZyIzPGwnDvdbGD0Ouk30XUIZzZKUAIl21X4VObbTzunHNtOBh9CFbSt6XPW0tP v7hCIYo7vUHvxA/7fSi3CrM6gYfKY0OfVj2FF/PXOGtsk3/MvwuR6xG95bXMyGFGeR ivMCF3y+JCu0O3tK2RLywB89OTW4LIjzor6ZB08vOrsMIpXV1lvRvljGFa2ODvrBJ2 pVkVEBWkKyxRXIKkhGM7sKJi6xpjqC+Zd5Ta00UUPjYgLNWMsz5L2Pn3bu18laVFjT ZFWmqJqieyXOCP3Qm1BV6UybkjyrPONOtVH3/wpn7ixfbf4IKnOcD0kyzQrvgeSB9z eFsubXWpx56qQ== Received: by mail-oi1-f173.google.com with SMTP id n66so414170oia.9 for ; Thu, 02 Dec 2021 09:09:43 -0800 (PST) X-Gm-Message-State: AOAM532xtSGuU01Crathuqb6qJ0t28X3OsCRPX0WboQ9k0PvEO6Uxmh8 v02qFMIg2ElW7Ju5ds/sjYLbH/DKhL7qKvdRNhE= X-Google-Smtp-Source: ABdhPJy4Hry3GcXnrwGCEfqgq6lafDgrCGvpOfm8whHH7droI8X8GINCu6QLbVzbaSTA0+g1JTwDz3mJw8WL/Of7NJM= X-Received: by 2002:aca:ad95:: with SMTP id w143mr5206647oie.47.1638464982744; Thu, 02 Dec 2021 09:09:42 -0800 (PST) MIME-Version: 1.0 References: <20211202165206.79615-1-jeremy.linton@arm.com> In-Reply-To: From: "Ard Biesheuvel" Date: Thu, 2 Dec 2021 18:09:31 +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 18:03, Ard Biesheuvel wrote: > > 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? It appears only 2/9 is affected, the remaining ones apply cleanly, with the exception of 9/9, which seems to be missing entirely. Could you please resend that one as well?