IOUserClient and IOExternalMethodArguments
IOUserClient and IOExternalMethodArguments
- Subject: IOUserClient and IOExternalMethodArguments
- From: Duane Murphy <email@hidden>
- Date: Tue, 16 Jun 2009 15:33:01 -0700
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
I would like to take advantage of the structureInputDescriptor and
structureOutputDescriptor fields of IOExternalMethodArguments to
memory map the data passed from user space to the kernel.
I have done this by hand myself and it works just fine. However, I
can't seem to get this to work with these fields. It makes the code
much simpler if I can take advantage of these fields.
I make sure that the source memory in user space uses an anonymous
mmap() to make sure the memory is aligned and available for mapping.
When I detect that one of the descriptor fields is being used in my
kext, I prepare(), then map() the memory. Then I call
getVirtualAddress() using the resulting IOMemoryMap. No errors are
returned by any of the calls. But the resulting address can not be
accessed by the kernel. I get a kernel panic if I let my code run or
in gdb I simply get a "cannot access memory at address 0x34346000"
error.
Is it possible to use these descriptors for memory mapping? My
examination of the code seems to indicate that it should work.
What is it that I am doing wrong? What am I missing?
Thanks!
...Duane
-----BEGIN PGP SIGNATURE-----
Version: PGP Desktop 9.10.0 (Build 500)
Charset: US-ASCII
wsBVAwUBSjgdo0rg9acQ4r2CAQjacwf/TAQ79nDiweKI5AWcYmYXX8LioZgCT2zr
3ZZ3wFvupVr1NqZxKV2V7E2ZVwFFThZgsjkvpxYpX2RwFRBZ7BDp20WSuDT6bDjl
O1PV24LWfwovtM8gIl2TBZfarv0O4xb+guSyId34Y1R1tRzU8irSbxNNxoJyBqJI
IQag2ehjWf1pQs7uZTKDGNRgu078XJM8fmk9fnocuqCdCV8wVv+9I7qf91rqQOj3
RU6hEPjtKIu6MyrFtMxsnQ/K5ci29cVsANmFzOW2ipsdmIuTppxiVIA5qwenfK/R
wLcV8TnOh9wBicNpe1MKrtYJGw5owyDPGy+0hNYNsaxs92mpXoBKvQ==
=Mlm5
-----END PGP SIGNATURE-----
_______________________________________________
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