some question about access I/O memory in Pistachio
"于爱民" <[email protected]>
| Newsgroups | gmane.comp.micro-kernel.l4.l4ka.general |
|---|---|
| Message-ID | <200712042204156.SM03028@lois-4c7e856724> |
hello,everyone!!
I am developing a device driver based on Pistachio. The device's memory-mapped io address is fed40f00.
I added the following code in Sigma0.cc and got the result:
code:
vendor=*(int *)(0x06400000);
printf("read data from 6400000 success\n");
vendor=*(int *)(0xee025000);
printf("read data from 0xee025000 success\n");
vendor=*(int *)(0xfed40f00);
printf("read data from 0xfed40f00 success\n");
result:
read data from 6400000 success
read data from 0xee025000 success
sigma0 accessed kernel space @fed40f00,ip=00021797 -deny
In KDB environment, I got the following debug info:
>ptab
Space [current]
Memory area:
...........
ee025000 [0e00c025] phys=0e00c000 map=ee025000 4kB r~x (R~X) user WB
............
fed00000 [0ec001e3]: phys=0ec00000 map=fec00000 4MB rwx (RWX) kernel global WB
I think it is because Kernel has mapped the virtual address fed40f00 to a physical memory address. Is it right and what or how should I do to develop the device driver?
Thank you very much
Best regard
[email protected]
2007-12-04