Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Dec 2013 15:02:43 +0100
From:      Wojciech Macek <wma@semihalf.com>
To:        Olivier Houchard <mlfbsd@ci0.org>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: arm SMP on Cortex-A15
Message-ID:  <CANsEV8e-w4-VDpcQ-B1D0pstJu6MoqZcXBdnfO=1Xx919EbtQw@mail.gmail.com>
In-Reply-To: <20131219131426.GA17686@ci0.org>
References:  <CANsEV8euHTsfviiCMP_aet3qYiK2T-oK%2B-37eay7zAPH2S2vaA@mail.gmail.com> <20131219131426.GA17686@ci0.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Regarding 2., I would consider it as a proof of concept, or the least
invasive workaround - a lot of those flushes might not be necessary. But it
suggests, that there is a place in pmap where a situation of prefetching
old TLB can happen. I've seen some functions where, for example,
flush&pte_sync order is reversed, so this is the path that needs to be
investigated to get a proper fix.

Wojtek


2013/12/19 Olivier Houchard <mlfbsd@ci0.org>

> Hi Wojciech,
>
> On Thu, Dec 19, 2013 at 12:41:59PM +0100, Wojciech Macek wrote:
> > Hi,
> >
> > Finally, I'm able to run FreeBSD stable on Cortex-A15. The TLB issue
> which
> > was observed, was caused by an aggressive A15 feature called "L2 TLB
> > prefetch".
> >
>
> Wow that's great news !
>
> > There are 4 fixes that helped:
> > 0. Prerequisite, Olivier's patch for PCPU atomicity.
>
> Cool, I'll commit it, then.
>
> > 1. TEX remap - to be compliant with spec, TEX remap is used to configure
> > memory as Inner Shareable
> > 2. TLB flush SE - after each PTE modification and PTE_SYNC, there is no
> > guarantee that newly created entry is not overlapped by old value in TLB
> > cache. Do flush_SE to ensure proper mapping.
>
> Wow, I failed to realized we were missing so many flush. And I've read the
> pmap code to find any of those many many times. Great work !
>
>
> > 3. During context switch, ensure that tlb flush is executed after ttb is
> > changed. Clean BTB to be compliant with specs.
> >
> > Above patches can be found here
> >
> https://drive.google.com/folderview?id=0B-7yTLrPxaWteWFtWUQxVVNHVFk&usp=sharing
> >
> >
> > None of them is 100%-ready, but should work. Any comments and/or testing
> > are really appreciated.
> >
>
> Regards,
>
> Olivier
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANsEV8e-w4-VDpcQ-B1D0pstJu6MoqZcXBdnfO=1Xx919EbtQw>