Within a device driver, I have to map device memory as well as kernel 
memory to user space. For known reasons 
(http://bugs.opensolaris.org/view_bug.do?bug_id=6358545), I have to 
build my own umem_cookie to use devmap_umem_setup(). This generally 
works fine for kernel DMA memory and even for device memory (although I 
will use devmap_devmem_setup()), using the respective kernel virtual 
address for the umem_cookie (plus the size and the non-pageable flag).

But certain mappings (i.e. of a single page of kernel memory) fail: 
devmap_umem_setup() is called successfully with the correct and valid 
(tested!), aligned kernel virtual address, and mmap() subsequently 
returns a "valid" address. However, accessing the memory from user space 
gives a bus error, and mdb shows that there is no mapping at all behind 
these virtual addresses.

How can it be that the mapping is successful throughout all calls, but 
no physical mapping is set up (for memory that is non-pageable and in 
the kernel address space)?

I am using SXCR b66 on Quad-CPU AMD Opterion boxes.

  Joachim

-- 
Joachim Worringen, Software Architect, Dolphin Interconnect Solutions
phone ++49/(0)228/324 08 17 - http://www.dolphinics.com
_______________________________________________
driver-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/driver-discuss

Reply via email to