firmware: tegra: bpmp: Do only aligned access to IPC memory area
authorTimo Alho <talho@nvidia.com>
Wed, 22 Jun 2022 13:22:59 +0000 (16:22 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Sep 2022 08:30:03 +0000 (10:30 +0200)
commit6db913f5e449fcc0d1577d22f6c1955216aef2d2
treeff908f50eb70ee6f3adfcd00da1bb0cf5c7ce6d2
parent80d46e73e8d3c935b6ac976caba9f5c5c6362b92
firmware: tegra: bpmp: Do only aligned access to IPC memory area

commit a4740b148a04dc60e14fe6a1dfe216d3bae214fd upstream.

Use memcpy_toio and memcpy_fromio variants of memcpy to guarantee no
unaligned access to IPC memory area. This is to allow the IPC memory to
be mapped as Device memory to further suppress speculative reads from
happening within the 64 kB memory area above the IPC memory when 64 kB
memory pages are used.

Signed-off-by: Timo Alho <talho@nvidia.com>
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Cc: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/firmware/tegra/bpmp.c