On 8/27/07, Aubrey Li <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I need to access physical memory from userspace, the following
> implementation doesn't work if offset < 0x400000.
>
> open("/dev/mem", O_RDONLY)
> mmap(0, len, PROT_READ,MAP_SHARED, fd, offset)
>
> However, I happened to get a program to access lower physical memory
> successfully.
> ====truss output====
> open("/dev/xsvc", O_RDONLY) = 3
> mmap(0x00000000, 131072, PROT_READ, MAP_SHARED|MAP_NORESERVE, 3,
> 917504) = 0xFEE5E000
>
> But it doesn't work when I paste it to my C file. What did I miss? how
> to access physical memory from userspace without restriction?
>
err..., I think I figured it out. Actually opening "/dev/xsvc" is the
right way to solve this issue.
-Aubrey
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code