Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How do I get physical address of my buffer



Hi all,

# Sorry, I missed to send a mail > admin-san

How do I get physical address of my buffer created by
IOBufferMemoryDescriptor ?

My current code is the followings. This is called at my start method.
If my driver calls getPhysicalAddress (both), kernel crash is
occurred. What should I do before I call getPhysicalAddress ?


MyDesc = IOBufferMemoryDescriptor::withCapacity(kMyBufferSIze,
kIODirectionOut,
true);

MyMap = MyDesc->map(kIOMapAnywhere
| kIOMapInhibitCache);

MyVirAddr = MyMap->getVirtualAddress();

-> MyPhyAddr = MyMap->getPhysicalAddress();
-> MyPhyAddr = MyDesc->getPhysicalAddress();

# I test MyMap-> and MyDesc-> but both cause kernel crash...


Regards,

Zak

<<<< Kazutaka Sawa * yano ELECTRIC CO.,LTD.* >>>>
<<<< >>>>
<<<< E-Mail. mailto:email@hidden >>>>
<<<< URL. http://www.yano-el.co.jp/ >>>>
<<<< Tel. +81-78-993-0001 Fax. +81-78-997-6491 >>>>
_______________________________________________
darwin-drivers mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-drivers
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.