Re: IA64 probe instruction

From: Darren Williams <dsw_at_gelato.unsw.edu.au>
Date: 2004-09-14 20:53:03
Hi Christian

We have an ia64 technical mailing list at:
ia64-technical@gelato.unsw.edu.au

that has just started for this pariticlar type
of question you can sign up for the list at:
https://www.gelato.unsw.edu.au/mailman/listinfo/ia64-technical

Regards
Darren

On Tue, 14 Sep 2004, Christian Hildner wrote:

> Hi,
> 
> there is  behavior of the probe instruction that confuses me a little 
> bit. Testing of the attached module shows differences whether executed 
> with interrupts enabled or not.
> 
> # cat cpuinfo
> processor  : 0
> vendor     : GenuineIntel
> arch       : IA-64
> family     : Itanium 2
> model      : 0
> revision   : 7
> archrev    : 0
> features   : branchlong
> cpu number : 0
> cpu regs   : 4
> cpu MHz    : 900.000000
> itc MHz    : 900.000000
> BogoMIPS   : 1346.37
> 
> #dmesg
> init_module called ...
> init_module result 0x0000000000000001
> init_module done
> cleanup_module called ...
> Unable to handle kernel paging request at virtual address e00000404391fe30
> ...
> 
> Of course the reported address has nothing to do with the (nested!) 
> fault of the second
> probe instruction since interrupt resources are not written. But why 
> does the second
> probe interrupt instead of returning 0 or 1? The reference manual does 
> not distinct between
> psr.ic 0 or 1.
> 
> Although this is not really linux related maybe someone from Intel can 
> comment on this.
> 
> Christian

> #include <linux/kernel.h>
> #include <linux/module.h>
> 
> MODULE_DESCRIPTION("Probe test");
> MODULE_AUTHOR("Christian Hildner");
> MODULE_LICENSE("GPL");
> 
> int init_module(void)
> {
>     unsigned long addr;
>     unsigned long res;
> 
>     printk("init_module called ...\n");
>     asm volatile ("\n\n"
>         "movl %0=0xe000100000000000\n\n"
>         ";;\n\n"
>         "probe.r %1=%0,0\n\n"
>         ";;\n\n"
>         : "=r"(addr), "=r"(res)
>         :);
>     printk("init_module result 0x%016lx\n", res);
>     printk("init_module done\n");
>     return(0);
> }
> 
> void cleanup_module(void)
> {
>     unsigned long addr;
>     unsigned long res;
> 
>     printk("cleanup_module called ...\n");
>     asm volatile ("\n\n"
>         "rsm psr.i | psr.ic\n\n"
>         "movl %0=0xe000100000000000\n\n"
>         ";;\n\n"
>         "srlz.i\n\n"
>         ";;\n\n"
>         "probe.r %1=%0,0\n\n"
>         ";;\n\n"
>         "ssm psr.ic\n\n"
>         ";;\n\n"
>         "srlz.d\n\n"
>         "ssm psr.i\n\n"
>         ";;\n\n"
>         "srlz.i\n\n"
>         ";;\n\n"
>         : "=r"(addr), "=r"(res)
>         :);
>     printk("cleanup_module result 0x%016lx\n", res);
>     printk("cleanup_module done\n");
>     return;
> }
> 

--------------------------------------------------
Darren Williams <dsw AT gelato.unsw.edu.au>
Gelato@UNSW <www.gelato.unsw.edu.au>
--------------------------------------------------

-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Received on Tue Sep 14 06:56:58 2004

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:30 EST