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-devel

RE: [Xen-devel] EPS Signature

To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>, "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>, "Xen devel list" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] EPS Signature
From: "Kaushik Barde" <Kaushik_Barde@xxxxxxxxxxx>
Date: Sun, 11 Feb 2007 15:39:29 -0800
Delivery-date: Sun, 11 Feb 2007 15:39:22 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <C1F49BCC.17D8%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcdG/Nc6FhN5E7LwEduJCgAX8io7RQAASYugAHRDoLABK2G7PwASBzjWABqxFWA=
Thread-topic: [Xen-devel] EPS Signature
Actually, following code snippet where our DOM-0 driver tries to set
some data in unused Gdt areas, 
Its generating Bad EIP errors when we try to access it (by it's physical
address). 

SetGDT Code is something like following:
 

{
        tGdtRequest     l_Request;
        unsigned char   *lp_Data;
        int cpu;
        struct desc_struct l_Desc, *gdt_table;
        u64 l_entry_ma;
        u64 l_desc_64;

        /* Get the structure from the user */

        copy_from_user(&l_Request, (tGdtRequest *)arg,
sizeof(tGdtRequest));

        /* Set up a ptr to the kernel's GDT */

        copy_from_user(&l_Desc, l_Request.userBuffer, sizeof(struct
desc_struct));

        cpu = get_cpu();
        gdt_table  = get_cpu_gdt_table(cpu);
        l_entry_ma = virt_to_bus(&(gdt_table[l_Request.entryNum]));
        l_desc_64  = *( (u64 *) &l_Desc);
        HYPERVISOR_update_descriptor(l_entry_ma, l_desc_64);
        //l_Desc = gdt_table[l_Request.entryNum] = l_Desc;
        put_cpu();
}
 
Which has call to virt_to_bus(..), which I thought was a suspect, hence,
the usage question..

I also tried using HYPERVISOR_update_descriptor(..) instead..without
much luck.

I am also little confused, if the memory/io mapping is taken care of by
Xen, shouldn't DOM-0 driver calls remain unchanged? Or be compiled with
Xen replacement hyper-calls? 
That is of course, if Xen treats DOM-0 differently (basic mm
stand-point).


-Kaushik

-----Original Message-----
From: Keir Fraser [mailto:Keir.Fraser@xxxxxxxxxxxx] 
Sent: Sunday, February 11, 2007 2:09 AM
To: Kaushik Barde; Ian Pratt; Xen devel list
Subject: Re: [Xen-devel] EPS Signature 

Isa_bus_to_virt() is available. Isa_virt_to_bus() isn't. Why would you
need
the latter?

 -- Keir

On 11/2/07 01:33, "Kaushik Barde" <Kaushik_Barde@xxxxxxxxxxx> wrote:

> 
> 
> I get following Error..
> 
> 496: error: `isa_virt_to_bus_is_UNSUPPORTED' undeclared (first use in
this
> function)
> 
> Is it truely unsupported or I am missing proper includes..
> 
> I suspect later but "UNSUPPORTED" makes me uncomfortable.
> 
> Please advise.
> 
> -Kaushik
> 
> 
> 
> -----Original Message-----
> From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx on behalf of Ian Pratt
> Sent: Sun 2/4/2007 6:52 PM
> To: Kaushik Barde; Xen devel list
> Subject: RE: [Xen-devel] EPS Signature
>  
>> We want to access the EBDA Entry Point Signature at 40:0E for our
> DOM-0
>> through a driver,
>> We noticed that driver is trying to read from a pseudo physical
> location
>> and not the physical machine RAM location. Hence it's not getting the
>> proper value. But if we have to read from the machine RAM location we
> can
>> use ( virt_to_bus or bus_to_virt) per dev_list comments.
>> 
>> But this area is under the control of hypervisor. I do not know if we
> can
>> ioremap these pages ( those which belong to hypervisor).
>> 
>> I am trying to see if we can be able to get to the 40:0E address. And
> get
>> the correct EPS signature
> 
> Dom0 already has the bottom 1MB of physical ram mapped. You can use
the
> poorly named isa_bus_to_virt()
> 
> Ian
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



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