WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

Re: [Xen-ia64-devel] [patch 14/14] ia64: kexec: Map EFI regions into the

To: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Subject: Re: [Xen-ia64-devel] [patch 14/14] ia64: kexec: Map EFI regions into the same place they are maped into in Linux
From: Simon Horman <horms@xxxxxxxxxxxx>
Date: Tue, 15 Jul 2008 12:38:36 +1000
Cc: Aron Griffis <aron@xxxxxx>, Alex Williamson <alex.williamson@xxxxxx>, xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 14 Jul 2008 19:38:42 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20080715022629.GA12668%yamahata@xxxxxxxxxxxxx>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20080714092138.629986006@xxxxxxxxxxxx> <20080714093114.002737376@xxxxxxxxxxxx> <20080714104411.GH6955%yamahata@xxxxxxxxxxxxx> <20080714122217.GB29296@xxxxxxxxxxxx> <20080715022629.GA12668%yamahata@xxxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.18 (2008-05-17)
On Tue, Jul 15, 2008 at 11:26:29AM +0900, Isaku Yamahata wrote:
> On Mon, Jul 14, 2008 at 10:22:19PM +1000, Simon Horman wrote:

[snip]

> > > --- a/xen/include/asm-ia64/linux-xen/linux/efi.h  Mon Jul 14 19:31:54 
> > > 2008 +0900
> > > +++ b/xen/include/asm-ia64/linux-xen/linux/efi.h  Mon Jul 14 19:33:20 
> > > 2008 +0900
> > > @@ -25,6 +25,7 @@
> > >  #include <asm/system.h>
> > >  
> > >  #ifdef XEN
> > > +#include <asm/meminit.h>     /* GRANULEROUNDDOWN */
> > >  extern void * pal_vaddr;
> > >  #endif
> > >  
> > > @@ -474,6 +475,10 @@
> > >  } while (0)
> > >  
> > >  #define XEN_EFI_RR_RESTORE(rr6, rr7) do {                \
> > > + ia64_ptr(0x1 /*I*/,                             \
> > > +          GRANULEROUNDDOWN(                      \
> > > +                  (unsigned long)pal_vaddr),     \
> > > +          IA64_GRANULE_SHIFT);                   \
> > >   set_one_rr_efi(6UL << 61, rr6);                 \
> > >   set_one_rr_efi(7UL << 61, rr7);                 \
> > 
> > I don't think this is quite right because ia64_new_rr7_efi
> > (via set_one_rr_efi()) will just reinsert the pal_vaddr.
> > 
> > I think it might be better to make things a bit more symmetrical.
> > Pin pal_vaddr in XEN_EFI_RR_SAVE after calling set_one_rr_efi(),
> > unpin it in XEN_EFI_RR_RESTORE (as above) and not touch it at all in
> > set_one_rr_efi().
> > 
> 
> Agreed. I also came up that it should be more symmetorical.
> It should that ia64_new_rr7_efi() shouldn't pin down pal code and
> the macros should be something like
> 
> #define XEN_EFI_RR_SAVE
>       set_one_rr_efi(rr6)
>       set_one_rr_efi(rr7)
>       pin down pal code
>         ia64_ptr()
>         ia64_itr()
>         Probably efi_map_pal_code() can be stolen.
>         Maybe inline function?
>         
> #define XEN_EFI_RR_RESTORE
>       purge pinning pal code
>         ia64_ptr(...)
>       set_one_rr_efi(rr6)
>       set_one_rr_efi(rr7)

Yes, that is pretty much what I was thinking.
It seemed nice to create a efi_unmap_pal_code() as well.

I sent a new series this morning, which includes this patch.
Let me know what you think.

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel

<Prev in Thread] Current Thread [Next in Thread>