[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20131216154601.GH17713@arm.com>
Date: Mon, 16 Dec 2013 15:46:01 +0000
From: Catalin Marinas <catalin.marinas@....com>
To: Mark Salter <msalter@...hat.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"patches@...aro.org" <patches@...aro.org>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
Will Deacon <Will.Deacon@....com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"matt.fleming@...el.com" <matt.fleming@...el.com>,
"linux-efi@...r.kernel.org" <linux-efi@...r.kernel.org>,
Leif Lindholm <leif.lindholm@...aro.org>,
"roy.franz@...aro.org" <roy.franz@...aro.org>
Subject: Re: [PATCH 1/3] arm64: add EFI stub
On Fri, Dec 06, 2013 at 02:55:54PM +0000, Mark Salter wrote:
> On Thu, 2013-12-05 at 14:18 +0000, Catalin Marinas wrote:
> > On Fri, Nov 29, 2013 at 10:05:10PM +0000, Mark Salter wrote:
> > > + add x2, sp, 16
> > > + str x8, [x2]
> > > + bl efi_entry
> > > + cmn x0, #1
> > > + b.eq efi_load_fail
> > > +
> > > + /*
> > > + * efi_entry() will have relocated the kernel image if necessary
> > > + * and we return here with device tree address in x0 and the kernel
> > > + * entry point stored at *image_addr. Save those values in registers
> > > + * which are preserved by __flush_dcache_all.
> > > + */
> > > + ldr x1, [sp, #16]
> > > + mov x20, x0
> > > + mov x21, x1
> > > +
> > > + bl __flush_dcache_all
> >
> > Regarding __flush_dcache_all, I plan to remove it for all cases apart
> > from power management with the MMU disabled. With MMU enabled, there is
> > no guarantee that this function does the right thing. It's even worse in
> > the guest context.
>
> According to booting.txt, the dcache needs to be invalidated. Is there
> something existing I can use or do I need to write it?
The function will stay for a few cases where needed. But here the
D-cache and MMU are still on at this point and there is a slight chance
of speculative loads after the flush (though only clean lines). You
could move this after he MMU disabling (but still keep the I-cache on
for performance).
--
Catalin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists