Re: 32/64 bit user/kernel space compatibility and forcing execution of 32 bit binary from 32/64/32bit PPC 3-way universal binary.
Re: 32/64 bit user/kernel space compatibility and forcing execution of 32 bit binary from 32/64/32bit PPC 3-way universal binary.
- Subject: Re: 32/64 bit user/kernel space compatibility and forcing execution of 32 bit binary from 32/64/32bit PPC 3-way universal binary.
- From: Chris Sarcone <email@hidden>
- Date: Wed, 23 Sep 2009 16:06:53 -0700
Paul --The 64 bit Snow Leopard kernel requires 64 bit drivers. User space programs that communicate with kernel space user clients must do so in a binary compatible way. Our plan was to have a Universal app (Intel 32 and Intel 64) that talked to its corresponding kernel space user clients. Unfortunately for our plan, Mac OS X 10.5 and 10.6 always run 64 bit capable apps on 64 bit capable hardware, meaning our 64 bit app often attempts to communicate to 32 bit drivers leading to failed communication.
This was discussed at WWDC two years ago. You can probably find the presentation collateral online at iTunes.
Questions: 1 – Is it true that user space apps that communicate directly with kernel space user clients must share the same data model (ILP32 or LP64)?
No. But, they must agree on the layout for shared data structures being the same by either packing the structure or padding it appropriately.
2 – Is it possible for a 64 bit user space app to talk to a 32 bit (IOUserClient subclass) driver? Note: we have control over our custom method signatures, but methods inherited from the IOUserClient seem to change their signature (i.e. stack frame layout) based on the data model it’s compiled for…
Yes, it is possible. Apple's own apps and user clients do this.
3 - Is there a way we can force our Universal app to always run in 32 bit mode, except when running on a 64 bit kernel?
I don't see why you'd want this. It seems like you would simply fix the issues with the shared data model and then ship 32/64 apps and drivers.
-- Chris
------------------
6 Infinite Loop
M/S 306-2MS
Cupertino CA 95014
phone: (408) 974-4033
fax: (408) 862-7577
email: email@hidden
|
_______________________________________________
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