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] Re: [patch 14/15] ia64: kexec: Only map PAL when ma

Hi Yamahata-san

What do you think about the following?

/* rr7 (and rr6) may already be set to XEN_EFI_RR, which
 * would indicate a nested EFI, SAL or PAL call, such
 * as from an MCA. This may have occured during a call
 * to set_one_rr_efi(). To be safe, repin everything anyway.
 */

#define XEN_EFI_RR_ENTER(rr6, rr7) do {                 \
        rr6 = ia64_get_rr(6UL << 61);                   \
        rr7 = ia64_get_rr(7UL << 61);                   \
        set_one_rr_efi(6UL << 61, XEN_EFI_RR);          \
        set_one_rr_efi(7UL << 61, XEN_EFI_RR);          \
        efi_map_pal_code();                             \
} while (0)

/* There is no need to do anything if the saved rr7 (and rr6)
 * is XEN_EFI_RR, as it would just switch them from XEN_EFI_RR to XEN_EFI_RR
 * Furthermore, if this is a nested call it is important not
 * to unpin efi_unmap_pal_code() until the outermost call is finished
 */

#define XEN_EFI_RR_LEAVE(rr6, rr7) do {                 \
        if (rr7 != XEN_EFI_RR) {                        \
                efi_unmap_pal_code();                   \
                set_one_rr_efi(6UL << 61, rr6);         \
                set_one_rr_efi(7UL << 61, rr7);         \
        }                                               \
} while (0)


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

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