This is the mail archive of the
mailing list for the glibc project.
Re: framebuffer corruption due to overlapping stp instructions on arm64
- From: Sinan Kaya <okaya at kernel dot org>
- To: Mikulas Patocka <mpatocka at redhat dot com>, Will Deacon <will dot deacon at arm dot com>, Jingoo Han <jingoohan1 at gmail dot com>, Joao Pinto <Joao dot Pinto at synopsys dot com>
- Cc: Ard Biesheuvel <ard dot biesheuvel at linaro dot org>, Matt Sealey <neko at bakuhatsu dot net>, Thomas Petazzoni <thomas dot petazzoni at free-electrons dot com>, libc-alpha at sourceware dot org, Catalin Marinas <catalin dot marinas at arm dot com>, Russell King <linux at armlinux dot org dot uk>, Linux Kernel Mailing List <linux-kernel at vger dot kernel dot org>, linux-arm-kernel <linux-arm-kernel at lists dot infradead dot org>, linux-pci at vger dot kernel dot org
- Date: Fri, 3 Aug 2018 13:32:10 -0400
- Subject: Re: framebuffer corruption due to overlapping stp instructions on arm64
- References: <alpine.LRH.firstname.lastname@example.org> <CAHCPf3tFGqkYEcWNN4LaWThw_rVqT316pzLv6T7RfxwO-eZ0EA@mail.gmail.com> <alpine.LRH.email@example.com> <CAKv+Gu8DeuksZhk1g3q_msSKV_hSY_2e1uzVten9-oGO3j9Sqg@mail.gmail.com> <20180803094129.GB17798@arm.com> <alpine.LRH.firstname.lastname@example.org>
On 8/3/2018 1:09 PM, Mikulas Patocka wrote:
Most accelerated graphics drivers rely heavily on the ability to map
the VRAM normal-non-cacheable (ioremap_wc, basically), and treat it as
Yeah, I'd expect framebuffers to be mapped as normal NC. That should be
fine for prefetchable BARs, no?
So - why does it corrupt data then? I've created this program that
reproduces the data corruption quicky. If I run it on /dev/fb0, I get an
instant failure. Sometimes a few bytes are not written, sometimes a few
bytes are written with a value that should be 16 bytes apart.
I tried to run it on system RAM mapped with the NC attribute and I didn't
get any corruption - that suggests the the bug may be in the PCIE
Note that normal-NC gives you write combining whereas device
nGnRE doesn't have any write-combining support.
normal-NC is typically mapped to prefetchable BAR space where
write-combining is welcome.
It could be an issue on the SOC itself too. I suggest you contact your