Linux malloc의 Logical to Physical memory address???

zzang7653의 이미지

안녕하세요..고수님들의 조언 부탁드립니다.

질문은 간단합니다.

"Linux user application에서 malloc으로 memory 할당한 다음 logical memory address를

device driver에 넘겨서 physical memory address를 알고 싶습니다."

따로 함수가 있다는 얘기도 들었는데 조언 부탁드립니다.

감사합니다.

익명 사용자의 이미지

Hi zzang:
This is not recommendation method which let's driver get the user space Physical address.
And as i know, there is no way to do it even we can do this from technical side.
I believe there is workaround for your purpose.

Thanks

bushi의 이미지

get_user_pages(), page_to_pfn().