|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen/arm64: fix section shift when mapping 2MB block in boot page table
On Tue, 2014-01-14 at 19:51 +0800, Chen Baozi wrote:
> On Jan 14, 2014, at 17:57, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote:
>
> > On Tue, 2014-01-14 at 01:06 +0800, Chen Baozi wrote:
> >> Section shift for level-2 page table should be #21 rather than #20.
> >
> > Thanks, are you finding these issues on actual hardware or just by
> > inspection?
>
> Oh, I noticed this because I was inspecting my Mini-OSâs code by
> comparing with this. :-)
Ah, I see!
> > I think this change is correct, also arm32 has:
> >
> > 1: /* Setup boot_second: */
> > ldr r4, =boot_second
> > add r4, r4, r10 /* r1 := paddr (boot_second) */
> >
> > lsr r2, r9, #20 /* Base address for 2MB mapping
> > */
> > lsl r2, r2, #20
> > orr r2, r2, #PT_UPPER(MEM) /* r2:r3 := section map */
> > orr r2, r2, #PT_LOWER(MEM)
> >
> > Either they are both wrong or both right (I think both wrong).
> >
> > The effect of this error is that bit #20 of paddr(boot_second) is
> > preserved as bit #20 of the PTE, rather than being cleared. bit #20 of
> > an entry at this level is UNK/SBZP -- so we survive this mistake even if
> > paddr(boot_second) happens to have bit #20 set.
> >
> > Really this code should use {FIRST,SECOND,THIRD}_SHIFT, and this file
> > already includes asm/page.h so they should be availableâ
>
> Ok, Iâll write the V2 to fix them all.
Thanks!
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |