-
Notifications
You must be signed in to change notification settings - Fork 10
Apply SPI TPM patches from upstream #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
tdavenvidia
wants to merge
152
commits into
NVIDIA-BaseOS-6:main
Choose a base branch
from
tdavenvidia:spi-tpm-v3
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Ian May <ian.may@canonical.com>
Signed-off-by: Ian May <ian.may@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/1786013 Signed-off-by: Ian May <ian.may@canonical.com>
Ignore: yes Signed-off-by: Ian May <ian.may@canonical.com>
Signed-off-by: Ian May <ian.may@canonical.com>
Signed-off-by: Ian May <ian.may@canonical.com>
Signed-off-by: Ian May <ian.may@canonical.com>
This reverts commit 93f3643. Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/1786013 Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
Ignore: yes Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/1992162 Properties: no-test-build Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/1786013 Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/1786013 Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Ignore: yes Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/1996300 Properties: no-test-build Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Ignore: yes Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/1998795 Properties: no-test-build Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Ignore: yes Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/1999745 Properties: no-test-build Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2002679 This reverts commit e96b739. In order to use the same compiler as used for kinetic:linux (gcc-12) we have made some changes to explicitly compile jammy:linux-hwe-5.19 with the same compiler. However, such changes are breaking the build of a number of dkms packages. Revert this commit, which would make the kernel compile with the default GCC in Jammy (gcc-11), while a proper solution is being worked on. Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Ignore: yes Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2002679 Changing the gcc version used for the build from gcc-12 to gcc (11) removed CONFIG_INIT_STACK_ALL_ZERO and CONFIG_SHADOW_CALL_STACK from being an option on the kernel config. Update the annotations file accondingly, keeping the annotation instead of simply removing it so when the configs are re-enabled in the future it stays as a reminder to update the annotation. Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2001755 Properties: no-test-build Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
…3.01.02) BugLink: https://bugs.launchpad.net/bugs/1786013 Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
In the Jammy environment, some config options cannot be enabled as enforced in the parent kernel. Add code to automatically adjust those. This was attempted to be manual edits to the annotations. However those get overwritten on each rebase. So instead add it to the local-mangle script but run only if the compiler set to be used is gcc-11. Ignore: yes Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
…ter) BugLink: https://bugs.launchpad.net/bugs/1786013 Signed-off-by: Ian May <ian.may@canonical.com>
Signed-off-by: Ian May <ian.may@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/1786013 Signed-off-by: Ian May <ian.may@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/1982519 nvbug: https://nvbugswb.nvidia.com/NVBugs5/redir.aspx?url=/3728100 With this change, the NFS driver would be enabled to support GPUDirectStorage(GDS). The change is around frwr_map and frwr_unmap in the NFS driver, where the IO request is first intercepted to check for GDS pages and if it is a GDS page then the request is served by GDS driver component called nvidia-fs, else the request would be served by the standard NFS driver code. Signed-off-by: Sourab Gupta <sougupta@nvidia.com> Acked-by: Kiran Kumar Modukuri <kmodukuri@nvidia.com> Acked-by: Rebanta Mitra <rmitra@nvidia.com> Signed-off-by: Brad Figg <bfigg@nvidia.com>
Ignore: yes Signed-off-by: Brad Figg <bfigg@nvidia.com>
Ignore: yes Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com> Signed-off-by: Brad Figg <bfigg@nvidia.com>
CVE-2023-1829 Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Acked-by: Cengiz Can <cengiz.can@canonical.com> Acked-by: Stefan Bader <stefan.bader@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Brad Figg <bfigg@nvidia.com>
BugLink: https://bugs.launchpad.net/bugs/2017596 Properties: no-test-build Signed-off-by: Brad Figg <bfigg@nvidia.com>
…ter) BugLink: https://bugs.launchpad.net/bugs/1786013 Signed-off-by: Brad Figg <bfigg@nvidia.com>
Signed-off-by: Brad Figg <bfigg@nvidia.com>
CONFIG_SERIAL_8250_MID=y CONFIG_SND_HDA_INTEL_DMI_SILENT_STREAM=y CONFIG_HSU_DMA=y Signed-off-by: Brad Figg <bfigg@nvidia.com>
Signed-off-by: Brad Figg <bfigg@nvidia.com>
…idia-fs version changed to 2.15.3~jammy Signed-off-by: Brad Figg <bfigg@nvidia.com>
BugLink: https://bugs.launchpad.net/bugs/2021535 ARM architecture only has 'memory', so all devices are accessed by MMIO if possible. Signed-off-by: Jammy Huang <jammy_huang@aspeedtech.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20230421003354.27767-1-jammy_huang@aspeedtech.com Acked-by: Brad Figg <bfigg@nvidia.com> Acked-by: Jamie Nguyen <jamien@nvidia.com> (cherry picked from commit 4327a6137ed43a091d900b1ac833345d60f32228) Signed-off-by: Ian May <ian.may@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/1786013 Signed-off-by: Ian May <ian.may@canonical.com>
Ignore: yes Signed-off-by: Ian May <ian.may@canonical.com>
Signed-off-by: Ian May <ian.may@canonical.com>
Copied from master Ignore: yes Signed-off-by: Ian May <ian.may@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2021991 Properties: no-test-build Signed-off-by: Ian May <ian.may@canonical.com>
Signed-off-by: Ian May <ian.may@canonical.com>
This reverts commit 68642af. Signed-off-by: Tushar Dave <tdave@nvidia.com>
This reverts commit 84f2a45. Signed-off-by: Tushar Dave <tdave@nvidia.com>
Tegra QSPI controller only supports half duplex transfers. Set half duplex constrain flag. Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com> Link: https://lore.kernel.org/r/20230223162635.19747-3-kyarlagadda@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit f7482d8285b638be87a594a30edaaf1341135c1a) Signed-off-by: Tushar Dave <tdave@nvidia.com>
Check for non dma transfers that do not fit in FIFO has issue and skips combined sequence for Tegra234 & Tegra241 which does not have GPCDMA. Fixes: 1b8342c ("spi: tegra210-quad: combined sequence mode") Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com> Link: https://lore.kernel.org/r/20230224164034.56933-1-kyarlagadda@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 047ee71ae4f412d8819e39e4b08c588fa299cfc2) Signed-off-by: Tushar Dave <tdave@nvidia.com>
Fix warn: iterator used outside loop: 'xfer'. 'xfer' variable contain invalid value in few conditions. Complete transfer within DATA phase in successful case and at the end for failed transfer. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Link:https://lore.kernel.org/all/202210191211.46FkzKmv-lkp@intel.com/ Fixes: 8777dd9 ("spi: tegra210-quad: Fix combined sequence") Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com> Link: https://lore.kernel.org/r/20230227200428.45832-1-kyarlagadda@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 2449d436681d40bc63ec2c766fd51b632270d8a7) Signed-off-by: Tushar Dave <tdave@nvidia.com>
TPM specification [1] defines flow control over SPI. Client device can insert a wait state on MISO when address is transmitted by controller on MOSI. Detecting the wait state in software is only possible for full duplex controllers. For controllers that support only half- duplex, the wait state detection needs to be implemented in hardware. Add a flag SPI_TPM_HW_FLOW for TPM device to set when software flow control is not possible and hardware flow control is expected from SPI controller. Reference: [1] https://trustedcomputinggroup.org/resource/pc-client-platform-tpm -profile-ptp-specification/ Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com> Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com> Link: https://lore.kernel.org/r/20230421091309.2672-2-kyarlagadda@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 67a142dc9eb96a5cc018e5db62390665eb5f038c) (tdave: minor conflict in include/linux/spi/spi.h) Signed-off-by: Tushar Dave <tdave@nvidia.com>
Trusted Platform Module requires flow control. As defined in TPM interface specification, client would drive MISO line at same cycle as last address bit on MOSI. Tegra234 and Tegra241 QSPI controllers have TPM wait state detection feature which is enabled for TPM client devices reported in SPI device mode bits. Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com> Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com> Link: https://lore.kernel.org/r/20230421091309.2672-4-kyarlagadda@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 967ca91a996f82219f2883e9e53d8e20df49025a) Signed-off-by: Tushar Dave <tdave@nvidia.com>
TPM devices may insert wait state on last clock cycle of ADDR phase. For SPI controllers that support full-duplex transfers, this can be detected using software by reading the MISO line. For SPI controllers that only support half-duplex transfers, such as the Tegra QSPI, it is not possible to detect the wait signal from software. The QSPI controller in Tegra234 and Tegra241 implement hardware detection of the wait signal which can be enabled in the controller for TPM devices. The current TPM TIS driver only supports software detection of the wait signal. To support SPI controllers that use hardware to detect the wait signal, add the function tpm_tis_spi_hw_flow_transfer() and move the existing code for software based detection into a function called tpm_tis_spi_sw_flow_transfer(). SPI controllers that only support half-duplex transfers will always call tpm_tis_spi_hw_flow_transfer() because they cannot support software based detection. The bit SPI_TPM_HW_FLOW is set to indicate to the SPI controller that hardware detection is required and it is the responsibility of the SPI controller driver to determine if this is supported or not. For hardware flow control, CMD-ADDR-DATA messages are combined into a single message where as for software flow control exiting method of CMD-ADDR in a message and DATA in another is followed. Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org> (cherry picked from commit 394dfc8ac4b00b38d4fb781794967aa5b2eac687 linux-next) Signed-off-by: Tushar Dave <tdave@nvidia.com>
Enable missing configs in the arm64 defconfig to get all devices probing on the mt8183-kukui-jacuzzi-juniper machine. The devices enabled are: ATH10K SDIO wireless adapter, Elan touchscreen, cr50 TPM, MediaTek SPI controller, JPEG video decoder, ANX7625 DSI/DPI to DP bridge (used for the internal display), MT8183 sound cards, SCP co-processor, MediaTek Global Command Engine (controlled by CMDQ driver), MediaTek Smart Voltage Scaling (SVS) engine, CCI frequency and voltage scaling, AUXADC thermal sensors. All symbols are enabled as modules with the exception of SPI, which is enabled as builtin since on some platforms like mt8195-cherry, the ChromeOS Embedded Controller is connected through SPI and it is responsible for the regulators powering the MMC controller used for the SD card, and thus SPI support is required for booting. By enabling the support for all of this machine's devices on the defconfig we make it effortless to test the relevant hardware both by developers as well as CI systems like KernelCI. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20221109195012.1231059-1-nfraprado@collabora.com Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com> (cherry picked from commit 83f3da5 linux-next) Signed-off-by: Tushar Dave <tdave@nvidia.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.