xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* How works Xen mmu ?
@ 2010-05-18  8:01 Sylvestre Gallon
  2010-06-02 20:07 ` Keir Fraser
  0 siblings, 1 reply; 7+ messages in thread
From: Sylvestre Gallon @ 2010-05-18  8:01 UTC (permalink / raw)
  To: xen-devel

Hi,

I am trying to port an homemade operating system in Dom0 but I have a
problem with mmu operation. I have read Xen docs and mailling lists
archives and I  still do not understand well how mmu works on Xen.

My need is to simply perform an identity mapping at 0xb8000 to allow
my operating system to access the vga frammebuffer. So my first idea
was to use HYPERVISOR_mmu_update like this :

mmu_update_t mmu;
uint8_t *buf = (uint8_t *) 0xb8000;

mmu.ptr = 0xb8000 | MMU_MACHPHYS_UPDATE
mmu.val = 0xb8000
HYPERVISOR_mmu_update(&mmu, 1, NULL, DOMID_SELF);

buf[0] = 'a';
buf[1] = 0x7;

But it does not work :/

After that I was think that I need to put in mmu.val the exact entry
for the PTE (add R/W flags, present flags etc...) So I have replaced
mmu.val = 0xb8000 by mmu.val = 0xb8003 but it still not work....

Can you help me please, I am stuck :/

-- 
Sylvestre Gallon

^ permalink raw reply	[flat|nested] 7+ messages in thread
* How works Xen mmu ?
@ 2010-05-25 13:07 Sylvestre Gallon
  0 siblings, 0 replies; 7+ messages in thread
From: Sylvestre Gallon @ 2010-05-25 13:07 UTC (permalink / raw)
  To: xen-devel

Hi,

I am trying to port an homemade operating system in Dom0 but I have a
problem with mmu operation. I have read Xen docs and mailling lists
archives and I  still do not understand well how mmu works on Xen.

My need is to simply perform an identity mapping at 0xb8000 to allow
my operating system to access the vga frammebuffer. So my first idea
was to use HYPERVISOR_mmu_update like this :

mmu_update_t mmu;
uint8_t *buf = (uint8_t *) 0xb8000;

mmu.ptr = 0xb8000 | MMU_MACHPHYS_UPDATE
mmu.val = 0xb8000
HYPERVISOR_mmu_update(&mmu, 1, NULL, DOMID_SELF);

buf[0] = 'a';
buf[1] = 0x7;

But it does not work :/

After that I was think that I need to put in mmu.val the exact entry
for the PTE (add R/W flags, present flags etc...) So I have replaced
mmu.val = 0xb8000 by mmu.val = 0xb8003 but it still not work....

Can you help me please, I am stuck :/

-- 
Sylvestre Gallon

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-06-03 15:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-18  8:01 How works Xen mmu ? Sylvestre Gallon
2010-06-02 20:07 ` Keir Fraser
2010-06-03 13:16   ` Sylvestre Gallon
2010-06-03 13:29     ` Keir Fraser
2010-06-03 15:23       ` Sylvestre Gallon
2010-06-03 15:54         ` Keir Fraser
  -- strict thread matches above, loose matches on Subject: below --
2010-05-25 13:07 Sylvestre Gallon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).