[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 2/7] xen/arm: setup the fixmap in head.S



On Thu, 25 Oct 2012, Ian Campbell wrote:
> On Wed, 2012-10-24 at 16:03 +0100, Stefano Stabellini wrote:
> > @@ -183,6 +184,16 @@ skip_bss:
> >         teq   r12, #0
> >         bne   pt_ready
> >         
> > +       /* console fixmap */
> > +       ldr   r1, =xen_fixmap
> > +       add   r1, r1, r10            /* r1 := paddr (xen_fixmap) */
> > +       mov   r3, #0
> > +       lsr   r2, r11, #12
> > +       lsl   r2, r2, #12            /* 4K aligned paddr of UART */
> > +       orr   r2, r2, #PT_UPPER(DEV_L3)
> > +       orr   r2, r2, #PT_LOWER(DEV_L3) /* r2:r3 := 4K dev map including 
> > UART */
> > +       strd  r2, r3, [r1, #0]       /* Map it in the first fixmap's slot */
> > +       
> >         /* Build the baseline idle pagetable's first-level entries */
> >         ldr   r1, =xen_second
> >         add   r1, r1, r10            /* r1 := paddr (xen_second) */
> [...]
> > @@ -205,12 +216,13 @@ skip_bss:
> >     ldr   r4, =start
> >     lsr   r4, #18                /* Slot for vaddr(start) */
> >     strd  r2, r3, [r1, r4]       /* Map Xen there too */
> > +
> >  #ifdef EARLY_UART_ADDRESS
> > -   ldr   r3, =(1<<(54-32))      /* NS for device mapping */
> > -   lsr   r2, r11, #21
> > -   lsl   r2, r2, #21            /* 2MB-aligned paddr of UART */
> > -   orr   r2, r2, #PT_UPPER(DEV)
> > -   orr   r2, r2, #PT_LOWER(DEV) /* r2:r3 := 2MB dev map including UART */
> > +   /* xen_fixmap pagetable */
> > +   ldr r2, =xen_fixmap
> > +   add r2, r2, r10
> > +   orr   r2, r2, #PT_UPPER(PT)
> > +   orr   r2, r2, #PT_LOWER(PT) /* r2:r3 := paddr (xen_fixmap) */
> 
> We should setup the fixmap infrastructure even if !EARLY_UART_ADDRESS,
> unless we set it up again later?
> 
> As it stands it looks like you setup the generic fixmap mapping iff
> EARLY_UART_ADDRESS (second hunk above) but setup the UART mapping within
> that unconditionally (first hunk) which is exactly backwards, isn't it ?

Yes, you are right, they should be inverted.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.