On Tue, 13 Jul 2010, Wei LIU wrote:
> Hi, Xen experts.
>
> We are writing some experiment code to use Mini-OS as a driver domain.
>
> As a proof-of-concept prototype, we try to port TPM driver to Mini-OS.
> The driver comes from OSLO (Open Source LOader), which is simple
> enough to understand its behavior.
>
> We use TPM-1.2 memory map I/O interface. The problem is that when we
> do "read", e.g. read vendor ID, everything just go fine. When we do
> "write", e.g. issue a command to hardware, the whole page becomes
> 0xff.
>
> That's weird. I think I might have some problem mapping I/O memory. I
> go through Intel manual, XenoLinux TPM driver code and TIS
> specification and couldn't tell why.
>
> How we map those pages:
>
> map_frames_ex(&mfn, 5, 0, 1, 1, DOMID_IO, 0,
> L1_PROT|_PAGE_PWT|_PAGE_PCD|_PAGE_DIRTY|_PAGE_ACCESSED|_PAGE_IO);
> flush_tlb();
>
> These operations are analogous to XenoLinux ones, I think. You are
> welcome to point out my stupid mistakes. And, if mapping is not the
> problem, which direction should I head for.
>
> Any reply is appreciated. Thanks!
>
Do they fail with -3?
If so, they fail because the stubdom is not PRIV_FOR DOMID_IO.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|