Help - Search - Members - Calendar
Full Version: CPUID help
Project OS X Forums > Previous Releases > Mac OS X Leopard 10.5 > Leopard Guides & Tutorials > New Users Discussion
identity
i know that the kernels(except voodoo) wont work without cpuid opcode patching in amd cpus,and it was removed using "marwins amd utility" before...
http://en.wikipedia.org/wiki/CPUID states that the registers r loaded with cpu specific info....
so is it possible (in future?) to create a kext(or mergin this feature with decryptor.kext) that changes the register values to intel specific one so there will not be any requirement of patched kernel in future for amd?...
Valentine
Voodoo kernel does that. It has "on the fly" patching built in. No need for AMD patching, no need for any "patcher kext".
identity
QUOTE (Valentine @ May 21 2009, 04:50 PM) *
Voodoo kernel does that. It has "on the fly" patching built in. No need for AMD patching, no need for any "patcher kext".

i know that angry.gif
read the question properly before answering angry.gif ...i have clearly stated "except voodoo"
what i want to know is is it possible to run sys using "vanilla kernel" in future if whatever i said is implemented.. ...
Valentine
I read the question properly before answering smile.gif

There is no need for any "patcher kext". And cos of that no one will do one.

Or is it that you wan't some new feature? Then explain what it shall be. Word a propper question...

identity
QUOTE (Valentine @ May 21 2009, 05:37 PM) *
I read the question properly before answering smile.gif

There is no need for any "patcher kext". And cos of that no one will do one.

Or is it that you wan't some new feature? Then explain what it shall be. Word a propper question...

i didnt write "patched kext" anywhere in my post...
mods please answer to the question
realityiswhere
There would be a lot of factors involved in properly answering this question..

1. How soon after the kernel is loaded would the kernel extension responsible be loaded?

If it's not fast enough, the system would panic, and the point would be moot.

2. Is there justification enough for it?

IMHO not really, because as Valentine already stated, Voodoo is acceptable enough for the vast majority of AMD users, and if not, they would need excellent reasoning behind it to get a talented enough developer to *make* the kernel extension, again provided that the first factor I mentioned above were satisfied.

3. Is there enough basic support for an AMD processor to use the native kernel to execute the libsa ( "stand-alone library" ) before the kextd (kext daemon, loads kexts into the kernel) becomes available to actually LOAD the new theoretical extension?

I don't think so. To quote from Amit Singh's book "Mac OS X Internals":

QUOTE
During early stages of bootstrapping, kextd is not yet available. libsa provides a subset of kextd's capabilities to the kernel. Examples of specific functionality implemented by libsa for loading, linking, and recording kernel extension object files include the following:

  • Simple memory allocation
  • Binary searching
  • Sorting
  • Miscellaneous string-handling functions
  • Symbol remangling
  • A dependency graph package used while determining kernel extension dependencies
  • Decompression of compressed kernels and verification of checksums


Long story short: I don't think it's practical when Voodoo already works, and I seriously doubt the native kernel's ability to not only use libsa properly with an AMD proc, but also to load the kextd and then the opcode patching provided by the "kext" in question.
Hara Taiki
Even so, the kernel has to be running for these libraries to load and run anyway, so if the kernel can't boot these libraries wont load anyway (from how it sounds). In kernel patching is perfect.
iPhoneTom
QUOTE (identity @ May 21 2009, 10:14 AM) *
so is it possible (in future?) to create a kext(or mergin this feature with decryptor.kext) that changes the register values to intel specific one so there will not be any requirement of patched kernel in future for amd?...


You not really asked, if an kext will ever emulate an Intel CPUID (MSR)?




Slice
Even if we emulate Intel CPUID by kernel or by kext we are not sure that processor specific features are the same.
I investigated codes of ACPI_SMC_PlatformPlugin. It asks kernel for CPUID and then analyses it.
Preliminary what I know:
cpu_family must be 6.
cpu_model = {13..18} - I am not clear here.
iPhoneTom
QUOTE (Slice @ May 24 2009, 09:02 AM) *
Even if we emulate Intel CPUID by kernel or by kext we are not sure that processor specific features are the same.
I investigated codes of ACPI_SMC_PlatformPlugin. It asks kernel for CPUID and then analyses it.
Preliminary what I know:
cpu_family must be 6.
cpu_model = {13..18} - I am not clear here.


Hrm... you need to adjust _all_ CPUID values i think, so cpu vendor, model, family, extmodel, extfamily.
Vendor has to be 0x756E6547 for Intel CPUs.
identity
thanks for the ans people..
one more thing is segmentation fault(SEGSEGV signal) related to this...bcos toh modbin etc kernels SEGSEGV signal generated for some process if CPUID not patched...?
is it like patching removes the cpuid instruction and changes the address of preceding instructions and segments addresses?...........
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.