• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: IOMallocAligned casuses kernel trap
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IOMallocAligned casuses kernel trap


  • Subject: Re: IOMallocAligned casuses kernel trap
  • From: Michael Smith <email@hidden>
  • Date: Wed, 16 Aug 2006 02:15:34 -0700


On Aug 15, 2006, at 12:02 PM, email@hidden wrote:

I am writing a PCI device driver to transfer data from the board memory
to the system memory. I am trying to allocate a wired page to transfer
data.

Typically you don't want to do this; instead you would transfer directly to
your client's memory.


I do not have any code for transfer yet. After adding
set_Page = (UInt32*)IOMallocAligned(PAGE_SIZE,PAGE_SIZE) line, when I
loaded the kext kernel crashed. I then tried IOMalloc as well as
IOMallocPageable to check if they work. All of them result in kernel
crash. Can anyone tell what I am doing wrong here?

Not with so little information, no.

I read in kernel
programming on Mac (pdf document) that IOMallocAligned should not be
used. But that document did not say anything about IOMallocPageable.

You read a document that told you not to do something, so you went ahead and did it anyway?

If you're reading documents, I encourage you to read the one that explains
two-machine debugging. You're not going to get very far developing a device
driver without some capacity for debugging your mistakes, and this
mailing list is no substitute for the proper tools.


I would also encourage you to explore the large amount of I/O Kit device
driver source available on the web, and look for examples of the sort of
things that your driver needs to do. If you're not willing or able to share
your source code with us, there is little or no help that we can offer in return
when confronted with questions like the one you've asked above.


 = Mike

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: acl_delete_file_np
  • Next by Date: suggestions to develop a PCI driver
  • Previous by thread: IOMallocAligned casuses kernel trap
  • Next by thread: Apple code that handles Proxy settings (in System Prefs) in Darwin?
  • Index(es):
    • Date
    • Thread