Jump to content
theconnactic

Mavericks kernel testing on AMD (formerly Mountain Lion kernel testing on AMD)

6,477 posts in this topic

Recommended Posts

Thank you guys very much!

 

Both tests i proposed are meant only for Bulldozer CPUs, mac_carol: old AMDs will need a perfected ssse3 emulator. Do you have a FX-series CPU? If you have, that's a progress: no more instant reboots.

 

The fact the boot got stuck at Kernel=LP64 means that the kernel boots fine, but the user land doesn't. Strange: that's typical of a non-Bulldozer CPU trying to boot a patched x86_64 kernel (it usually gets stuck at that point because is where the userland should show up and while we can trick the kernel to believe the CPU supports ssse3, this is not possible with the user land, thus the need of a ssse3 emulator).

 

I'll take a look on it again later tonight.

Share this post


Link to post
Share on other sites
Advertisement

Just thought id add in another processor testing and findings.

 

The kernel needs to be modified, we get the same error as you.

 

we are all waiting for the new modified kernel to test

 

please, test them with boot flag; -v-f . I want to know if you get the same error.

 

I do not use kextcache so a -f isnt needed. it always loads all kexts

Share this post


Link to post
Share on other sites

Thank you guys very much!

 

Both tests i proposed are meant only for Bulldozer CPUs, mac_carol: old AMDs will need a perfected ssse3 emulator. Do you have a FX-series CPU? If you have, that's a progress: no more instant reboots.

 

The fact the boot got stuck at Kernel=LP64 means that the kernel boots fine, but the user land doesn't. Strange: that's typical of a non-Bulldozer CPU trying to boot a patched x86_64 kernel (it usually gets stuck at that point because is where the userland should show up and while we can trick the kernel to believe the CPU supports ssse3, this is not possible with the user land, thus the need of a ssse3 emulator).

 

I'll take a look on it again later tonight.

 

Mac_carol has Phenom II 965:

 

FYI, both Lion 10.7.5 & ML 10.8.0 were running within Chameleon v2.2-r2117 on AMD P-II x4 965

Share this post


Link to post
Share on other sites

Thank you, Delta0! That's the explanation.

 

We need a FX user to test those. Gilles?

 

Do I need to update my Lion to 10.7.5 to test accurately or is it fine on 10.7.4? I have Chameleon v2.1svn r1819 installed.

Share this post


Link to post
Share on other sites

I once had received a patch specifically targetting AMD for Lion.

I'm sharing it here because some of the things done (like -msse4a and some other patches including to the OSKext:: parts...)

We could use some usefull parts of it.

Still haven't got around to experimenting myself but I'll get on it as soon as I have the time...

Hope it's useful...

 

On CPUID patching, something which I dug up from Leopard days: http://www.insanelym...cpuidtxt-files/

 

From my understanding the OS will boot with no CPUID, but some apps will crash. Good luck!

Unfortunately it won't...

Some CoreServices use CPUID instructions too... including WindowServer...

diff_1699.24.23.diff.zip

Share this post


Link to post
Share on other sites

Hi, Andy!

 

Glad to see you here!

 

We've been extensively using RAWx86's 10.7.4 patches (which, by their turn, are based on Bronzovka's and yours, hence the name "BronzovkAnVoodoo") to make a working 10.8.x for AMD machines (and based on the same patches, i made a working 10.7.5 kernel for bulldozer CPUs). We'd been stuck with the lack of ssse3 support on most of AMD CPUs until recently, when Sinetek came up with his ssse3 emulator. It's not ready yet, but it's a light at the end of the tunnel.

 

I downloaded the patch you posted, and i'll start experiencing with it both with 10.7.5 and 10.8.x. Thank you!

 

P.S.: add, if you can, the chat room #legacykernel on the server irc.osx86.hu

Share this post


Link to post
Share on other sites

P.S.: add, if you can, the chat room #legacykernel on the server irc.osx86.hu

 

It redirect to another forum... Also can you reply to my post above.

 

Thanks

Share this post


Link to post
Share on other sites

Do I need to update my Lion to 10.7.5 to test accurately or is it fine on 10.7.4? I have Chameleon v2.1svn r1819 installed.

 

The test is destined for now to Bulldozer (FX-series) CPUs. Old AMDs will have to wait for an improved ssse3 emulator. And the revision of chameleon should be exactly the one i posted, with the kernel patcher module installed.

 

P.S.: i'm on the chatroom now, it is at www.irc.osx86.hu

Share this post


Link to post
Share on other sites

Hey guys

 

Currently at work and i have a number of FX4100 (about 30) at my disposal at the moment. ive not done the hackintosh scene for a while however ive been reading this thread for the last week and would like to offer my services/ hardware for tests....

 

all i need is to be told what i need to do or what to download

 

Regards

Slowie

Share this post


Link to post
Share on other sites

I've been running some tests...

The kernel stops after core crypto even on an Intel CPU...

It must be something generic...

I'm still investigating... kernel = for ML...

Posting my diff now...

Still more work to do on the SSSE3emu in order to get it to work on 64bit kernel too...

remember: %ebp = 32bit %rbp = 64bit + size = 8, not 4...

Also other problem... the pointer to bp gets passed from memory to memory...

Don't know about Xcode 3.2.6 but latest from app store with command line tools installed makes a big fuzz about passing into 8(%rbp) or 4(%ebp)

xnu-2050.18.24-BAV_sinactic.diff.zip

Share this post


Link to post
Share on other sites

@Andy,

 

Besides the emu, what is the difference in the patches for AMD CPUs and legacy Intel CPUs? Or are they one and the same (I'm speaking strictly about the kernel, not any binpatching)

 

I have a legacy Intel rig (breadboarded lol) that I can test kernel development with. Assuming we're working on legacy Intel as well.

 

There is also something I'm wondering: what about Lion? I'll try applying the diff to the Lion kernels and see what happens. :)

Share this post


Link to post
Share on other sites

We all have us very much love. I would like to once again apologize to Alessandro. It was not my intention to see Alessandro here on display. I asked iPoco produce all posts by me again.

let us to work on a Mountain Lion AMD kernel continue.

Share this post


Link to post
Share on other sites

I've just booted the kernel succesfully on my Intel...

Attached are the compiled kernel and the diff I used.

It seemed that the new IOCatalogue mods and OSKext mods are the thing that made the damn thing hang.

I removed the following from the diff:

diff -Nur xnu-2050.18.24-orig/iokit/IOKit/IOCatalogue.h xnu-2050.18.24/iokit/IOKit/IOCatalogue.h
--- xnu-2050.18.24-orig/iokit/IOKit/IOCatalogue.h 2011-10-06 22:35:33.000000000 +0200
+++ xnu-2050.18.24/iokit/IOKit/IOCatalogue.h 2012-12-10 16:50:02.000000000 +0100
@@ -276,4 +276,16 @@
extern const OSSymbol * gIOProbeScoreKey;
extern IOCatalogue    * gIOCatalogue;

+
+extern "C" {
+    /* kaitek: see ::addDrivers() and StartIOKit() for more information about the built-in kernel
+	 * kext blacklist. */
+    typedef struct {
+	    const char *name;
+	    uint32_t hits;
+    } blacklist_mod_t;
+    extern boolean_t blacklistEnabled;
+    extern blacklist_mod_t blacklistMods[];
+};
+
#endif /* ! _IOKIT_IOCATALOGUE_H */

diff -Nur xnu-2050.18.24-orig/iokit/Kernel/IOCatalogue.cpp xnu-2050.18.24/iokit/Kernel/IOCatalogue.cpp
--- xnu-2050.18.24-orig/iokit/Kernel/IOCatalogue.cpp 2012-12-10 18:24:44.000000000 +0100
+++ xnu-2050.18.24/iokit/Kernel/IOCatalogue.cpp 2012-12-10 19:59:31.000000000 +0100
@@ -74,6 +74,29 @@
#pragma mark Utility functions
#endif

+static void
+UniqueProperties(OSDictionary * dict)
+{
+    OSString * data;
+   
+    data = OSDynamicCast(OSString, dict->getObject(gIOClassKey));
+    if (data) {
+	    const OSSymbol *classSymbol = OSSymbol::withString(data);
+	   
+	    dict->setObject( gIOClassKey, (OSSymbol *) classSymbol);
+	    classSymbol->release();
+    }
+   
+    data = OSDynamicCast(OSString, dict->getObject(gIOMatchCategoryKey));
+    if (data) {
+	    const OSSymbol *classSymbol = OSSymbol::withString(data);
+	   
+	    dict->setObject(gIOMatchCategoryKey, (OSSymbol *) classSymbol);
+	    classSymbol->release();
+    }
+    return;
+}
+
#if PRAGMA_MARK
#pragma mark IOCatalogue class implementation
#endif
@@ -163,7 +186,7 @@
 {
 dict = OSDynamicCast(OSDictionary, obj);
 if (!dict) continue;
- OSKext::uniquePersonalityProperties(dict);
+ UniqueProperties(dict);
	 if( 0 == dict->getObject( gIOClassKey ))
	 {
		 IOLog("Missing or bad \"%s\" key\n",
@@ -243,7 +266,7 @@
 const OSSymbol	   * key;
 unsigned int		   idx;

-    OSKext::uniquePersonalityProperties(matching);
+    UniqueProperties(matching);

 set = OSOrderedSet::withCapacity( 1, IOServiceOrdering,
								   (void *)gIOProbeScoreKey );
@@ -303,71 +326,91 @@
 }

 set = OSOrderedSet::withCapacity( 10, IOServiceOrdering,
-	    (void *)gIOProbeScoreKey );
+									 (void *)gIOProbeScoreKey );
 if (!set) {
	 goto finish;
 }
-
+   
 iter = OSCollectionIterator::withCollection(persons);
 if (!iter) {
	 goto finish;
 }
-
-   /* Start with success; clear it on an error.
-    */
+   
+    /* Start with success; clear it on an error.
+	 */
 result = true;
-
+   
 IORWLockWrite(lock);
 while ( (object = iter->getNextObject()) ) {
-   
+	   
	 // xxx Deleted OSBundleModuleDemand check; will handle in other ways for SL
-
+	   
	 OSDictionary * personality = OSDynamicCast(OSDictionary, object);
-
+	   
	 SInt count;
-
+	   
	 if (!personality) {
		 IOLog("IOCatalogue::addDrivers() encountered non-dictionary; bailing.\n");
		 result = false;
		 break;
	 }
-
-	    OSKext::uniquePersonalityProperties(personality);
-
-	    // Add driver personality to catalogue.
-
- OSArray * array = arrayForPersonality(personality);
- if (!array) addPersonality(personality);
- else
- {	  
-	 count = array->getCount();
-	 while (count--) {
-  OSDictionary * driver;
- 
-  // Be sure not to double up on personalities.
-  driver = (OSDictionary *)array->getObject(count);
- 
-	    /* Unlike in other functions, this comparison must be exact!
-  * The catalogue must be able to contain personalities that
-  * are proper supersets of others.
-  * Do not compare just the properties present in one driver
-  * pesonality or the other.
-  */
-  if (personality->isEqualTo(driver)) {
-	  break;
+	   
+	    if (blacklistEnabled) {
+   OSString *modName = OSDynamicCast(OSString, personality->getObject(gIOModuleIdentifierKey));
+   const char *modNameStr = NULL;
+   if (modName)
+    modNameStr = modName->getCStringNoCopy();
+   if (modNameStr) {
+    boolean_t shouldMatch = TRUE;
+    for (uint32_t n = 0; blacklistMods[n].name; n++) {
+	 if (strcmp(blacklistMods[n].name, modNameStr))
+	  continue;
+	 if (!blacklistMods[n].hits++)
+	  printf("warning: skipping personalities in blacklisted kext %s\n",
+		  modNameStr);
+	 shouldMatch = FALSE;
+    }
+    if (!shouldMatch)
+	 continue;
+   }
  }
-	 }
-	 if (count >= 0) {
-  // its a dup
-  continue;
-	 }
-	 result = array->setObject(personality);
-	 if (!result) {
-  break;
-	 }
+	   
+	    UniqueProperties(personality);
+	   
+	    // Add driver personality to catalogue.
+	   
+	    OSArray * array = arrayForPersonality(personality);
+	    if (!array) addPersonality(personality);
+	    else
+	    {
+		    count = array->getCount();
+		    while (count--) {
+			    OSDictionary * driver;
+			   
+			    // Be sure not to double up on personalities.
+			    driver = (OSDictionary *)array->getObject(count);
+			   
+			    /* Unlike in other functions, this comparison must be exact!
+				 * The catalogue must be able to contain personalities that
+				 * are proper supersets of others.
+				 * Do not compare just the properties present in one driver
+				 * pesonality or the other.
+				 */
+			    if (personality->isEqualTo(driver)) {
+				    break;
+			    }
+		    }
+		    if (count >= 0) {
+			    // its a dup
+			    continue;
+		    }
+		    result = array->setObject(personality);
+		    if (!result) {
+			    break;
+		    }
	 }
-
- set->setObject(personality);	   
+	   
+	    set->setObject(personality);	   
 }
 // Start device matching.
 if (result && doNubMatching && (set->getCount() > 0)) {
@@ -375,11 +418,11 @@
	 generation++;
 }
 IORWLockUnlock(lock);
-
+   
finish:
 if (set)  set->release();
 if (iter) iter->release();
-
+   
 return result;
}

@@ -545,7 +588,7 @@
 if ( !iter )
	 return kIOReturnNoMemory;

-    OSKext::uniquePersonalityProperties( matching );
+    UniqueProperties( matching );

 // terminate instances.
 do {
@@ -754,111 +797,7 @@

void IOCatalogue::reset(void)
{
-    IOCatalogue::resetAndAddDrivers(/* no drivers; true reset */ NULL,
-	    /* doMatching */ false);
-    return;
-}
-
-bool IOCatalogue::resetAndAddDrivers(OSArray * drivers, bool doNubMatching)
-{
-    bool				   result			  = false;
-    OSArray			  * newPersonalities    = NULL;  // do not release
-    OSCollectionIterator * iter			    = NULL;  // must release
-    OSOrderedSet		 * matchSet		    = NULL;  // must release
-    const OSSymbol	   * key;
-    OSArray			  * array;
-    OSDictionary		 * thisNewPersonality  = NULL;  // do not release
-    OSDictionary		 * thisOldPersonality  = NULL;  // do not release
-    signed int			 idx, newIdx;
-
-    if (drivers) {
-	    newPersonalities = OSDynamicCast(OSArray, drivers);
-	    if (!newPersonalities) {
-		    goto finish;
-	    }
-	   
-	    matchSet = OSOrderedSet::withCapacity(10, IOServiceOrdering,
-		    (void *)gIOProbeScoreKey);
-	    if (!matchSet) {
-		    goto finish;
-	    }
-	    iter = OSCollectionIterator::withCollection(personalities);
-	    if (!iter) {
-		    goto finish;
-	    }
-    }
-
-    result = true;
-
 IOLog("Resetting IOCatalogue.\n");
-
-   /* No goto finish from here to unlock.
-    */
-    IORWLockWrite(lock);
-   
-    while ((key = (const OSSymbol *) iter->getNextObject()))
-    {
-	    array = (OSArray *) personalities->getObject(key);
-	    if (!array) continue;
-	    for (idx = 0; (thisOldPersonality = (OSDictionary *) array->getObject(idx)); idx++)
-	    {
-		    if (thisOldPersonality->getObject("KernelConfigTable")) continue;
-		    if (newPersonalities) for (newIdx = 0;
-			    (thisNewPersonality = (OSDictionary *) newPersonalities->getObject(newIdx));
-			    newIdx++)
-		    {
-	    /* Unlike in other functions, this comparison must be exact!
-		    * The catalogue must be able to contain personalities that
-		    * are proper supersets of others.
-		    * Do not compare just the properties present in one driver
-		    * pesonality or the other.
-		    */
-			    if (thisNewPersonality->isEqualTo(thisOldPersonality)) 
-				    break;
-		    }
-		    if (thisNewPersonality)
-		    {
-			    // dup, ignore
-			    newPersonalities->removeObject(newIdx);
-		    }
-		    else
-		    {
-			    // not in new set - remove
-			    // only remove dictionary if this module in not loaded - 9953845
-			    if ( isModuleLoaded(thisOldPersonality) == false )
-			    {
-				    if (matchSet)  matchSet->setObject(thisOldPersonality);
-				    array->removeObject(idx);
-				    idx--;
-			    }
-		    }
-	    }
-    }
-
-	 // add new
-	 for (newIdx = 0;
-		  (thisNewPersonality = (OSDictionary *) newPersonalities->getObject(newIdx));
-		  newIdx++)
-	 {
-		 OSKext::uniquePersonalityProperties(thisNewPersonality);
-		 addPersonality(thisNewPersonality);
-		 matchSet->setObject(thisNewPersonality);
-	 }
-
-   /* Finally, start device matching on all new & removed personalities.
-    */
-    if (result && doNubMatching && (matchSet->getCount() > 0)) {
-	    IOService::catalogNewDrivers(matchSet);
-	    generation++;
-    }
-
-    IORWLockUnlock(lock);
-
-finish:
-    if (matchSet) matchSet->release();
-    if (iter)	 iter->release();
-
-    return result;
}

bool IOCatalogue::serialize(OSSerialize * s) const
@@ -910,7 +849,7 @@
* These functions are no longer used are necessary for C++ binary
* compatibility on i386.
**********************************************************************/
-#if __i386__
+#if __ppc__ || __i386__

bool IOCatalogue::recordStartupExtensions(void)
{  return false;  }
@@ -921,4 +860,4 @@
kern_return_t IOCatalogue::removeKernelLinker(void)
{  return KERN_NOT_SUPPORTED;  }

-#endif /* __i386__ */
+#endif /* __ppc__ || __i386__ */
\ No newline at end of file

diff -Nur xnu-2050.18.24-orig/libkern/c++/OSKext.cpp xnu-2050.18.24/libkern/c++/OSKext.cpp
--- xnu-2050.18.24-orig/libkern/c++/OSKext.cpp 2012-09-17 20:17:17.000000000 +0200
+++ xnu-2050.18.24/libkern/c++/OSKext.cpp 2012-12-10 19:20:38.000000000 +0100
@@ -1925,7 +1925,7 @@
 const char   * versionCString		   = NULL;  // do not free
 const char   * compatibleVersionCString = NULL;  // do not free
 OSBoolean    * scratchBool			  = NULL;  // do not release
-    OSDictionary * scratchDict			  = NULL;  // do not release
+  //  OSDictionary * scratchDict			  = NULL;  // do not release

 if (infoDict) {
	 panic("Attempt to set info dictionary on a kext "
@@ -2066,11 +2066,11 @@

   /* Make sure common string values in personalities are uniqued to OSSymbols.
 */
-    scratchDict = OSDynamicCast(OSDictionary,
-	    getPropertyForHostArch(kIOKitPersonalitiesKey));
-    if (scratchDict) {
-	    uniquePersonalityProperties(scratchDict);
-    }
+    //scratchDict = OSDynamicCast(OSDictionary,
+	  //  getPropertyForHostArch(kIOKitPersonalitiesKey));
+    //if (scratchDict) {
+    //uniquePersonalityProperties(scratchDict);
+    //}

 result = true;

@@ -2130,7 +2130,7 @@

/*********************************************************************
*********************************************************************/
-static void
+/*static void
uniqueStringPlistProperty(OSDictionary * dict, const char * key)
{
 OSString	   * stringValue = NULL;  // do not release
@@ -2153,10 +2153,10 @@

 return;
}
-
+*/
/*********************************************************************
*********************************************************************/
-static void
+/*static void
uniqueStringPlistProperty(OSDictionary * dict, const OSString * key)
{
 OSString	   * stringValue = NULL;  // do not release
@@ -2178,44 +2178,44 @@
 if (symbolValue) symbolValue->release();

 return;
-}
+}*/

/*********************************************************************
* Replace common personality property values with uniqued instances
* to save on wired memory.
*********************************************************************/
/* static */
-void
-OSKext::uniquePersonalityProperties(OSDictionary * personalityDict)
-{
+//void
+//OSKext::uniquePersonalityProperties(OSDictionary * personalityDict)
+//{
   /* Properties every personality has.
 */
-    uniqueStringPlistProperty(personalityDict, kCFBundleIdentifierKey);
-    uniqueStringPlistProperty(personalityDict, kIOProviderClassKey);
-    uniqueStringPlistProperty(personalityDict, gIOClassKey);
+  //  uniqueStringPlistProperty(personalityDict, kCFBundleIdentifierKey);
+    //uniqueStringPlistProperty(personalityDict, kIOProviderClassKey);
+    //uniqueStringPlistProperty(personalityDict, gIOClassKey);

   /* Other commonly used properties.
 */
-    uniqueStringPlistProperty(personalityDict, gIOMatchCategoryKey);
-    uniqueStringPlistProperty(personalityDict, gIOResourceMatchKey);
-    uniqueStringPlistProperty(personalityDict, gIOUserClientClassKey);
-
-    uniqueStringPlistProperty(personalityDict, "HIDDefaultBehavior");
-    uniqueStringPlistProperty(personalityDict, "HIDPointerAccelerationType");
-    uniqueStringPlistProperty(personalityDict, "HIDRemoteControlType");
-    uniqueStringPlistProperty(personalityDict, "HIDScrollAccelerationType");
-    uniqueStringPlistProperty(personalityDict, "IOPersonalityPublisher");
-    uniqueStringPlistProperty(personalityDict, "Physical Interconnect");
-    uniqueStringPlistProperty(personalityDict, "Physical Interconnect Location");
-    uniqueStringPlistProperty(personalityDict, "Vendor");
-    uniqueStringPlistProperty(personalityDict, "Vendor Identification");
-    uniqueStringPlistProperty(personalityDict, "Vendor Name");
-    uniqueStringPlistProperty(personalityDict, "bConfigurationValue");
-    uniqueStringPlistProperty(personalityDict, "bInterfaceNumber");
-    uniqueStringPlistProperty(personalityDict, "idProduct");
+//    uniqueStringPlistProperty(personalityDict, gIOMatchCategoryKey);
+  //  uniqueStringPlistProperty(personalityDict, gIOResourceMatchKey);
+   // uniqueStringPlistProperty(personalityDict, gIOUserClientClassKey);
+//
+//    uniqueStringPlistProperty(personalityDict, "HIDDefaultBehavior");
+//    uniqueStringPlistProperty(personalityDict, "HIDPointerAccelerationType");
+ //   uniqueStringPlistProperty(personalityDict, "HIDRemoteControlType");
+  //  uniqueStringPlistProperty(personalityDict, "HIDScrollAccelerationType");
+  //  uniqueStringPlistProperty(personalityDict, "IOPersonalityPublisher");
+ //   uniqueStringPlistProperty(personalityDict, "Physical Interconnect");
+  //  uniqueStringPlistProperty(personalityDict, "Physical Interconnect Location");
+//    uniqueStringPlistProperty(personalityDict, "Vendor");
+//    uniqueStringPlistProperty(personalityDict, "Vendor Identification");
+//    uniqueStringPlistProperty(personalityDict, "Vendor Name");
+//    uniqueStringPlistProperty(personalityDict, "bConfigurationValue");
+//    uniqueStringPlistProperty(personalityDict, "bInterfaceNumber");
+//    uniqueStringPlistProperty(personalityDict, "idProduct");

-    return;
-}
+//    return;
+//}

/*********************************************************************
*********************************************************************/
@@ -8874,9 +8874,9 @@

/*********************************************************************
 *********************************************************************/
-bool _OSKextInUnloadedPrelinkedKexts( const OSSymbol * theBundleID )
+bool _OSKextInUnloadedPrelinkedKexts( const OSSymbol * __unused theBundleID )
{
-    int unLoadedCount, i;
+    int unLoadedCount, __unused i;
 bool result = false;

 IORecursiveLockLock(sKextLock);
@@ -8889,16 +8889,6 @@
	 goto finish;
 }

-    for (i = 0; i < unLoadedCount; i++) {
-	    const OSSymbol *    myBundleID;	 // do not release
-	   
-	    myBundleID = OSDynamicCast(OSSymbol, sUnloadedPrelinkedKexts->getObject(i));
-	    if (!myBundleID) continue;
-	    if (theBundleID->isEqualTo(myBundleID->getCStringNoCopy())) {
-		    result = true;
-		    break;
-	    }
-    }
finish:
 IORecursiveLockUnlock(sKextLock);
 return(result);

diff -Nur xnu-2050.18.24-orig/libkern/libkern/c++/OSKext.h xnu-2050.18.24/libkern/libkern/c++/OSKext.h
--- xnu-2050.18.24-orig/libkern/libkern/c++/OSKext.h 2012-02-14 01:36:58.000000000 +0100
+++ xnu-2050.18.24/libkern/libkern/c++/OSKext.h 2012-12-10 17:21:56.000000000 +0100
@@ -596,7 +596,7 @@

   /* Converts common string-valued properties to OSSymbols for lower memory consumption.
 */
-    static void uniquePersonalityProperties(OSDictionary * personalityDict);
+    //static void uniquePersonalityProperties(OSDictionary * personalityDict);

 virtual bool			   declaresExecutable(void);	 // might be missing
 virtual bool			   isInterface(void);

diff -Nur xnu-2050.18.24-orig/iokit/Kernel/IOStartIOKit.cpp xnu-2050.18.24/iokit/Kernel/IOStartIOKit.cpp
--- xnu-2050.18.24-orig/iokit/Kernel/IOStartIOKit.cpp 2011-06-02 03:33:41.000000000 +0200
+++ xnu-2050.18.24/iokit/Kernel/IOStartIOKit.cpp 2012-12-10 16:50:02.000000000 +0100
@@ -91,6 +91,16 @@
 IORegistryEntry *  root;
 OSObject *   obj;

+    uint32_t   bootArg;
+ /* kaitek: todo: implement some kind of mechanism whereby the user can specify a
+	 * custom list of kexts to be blacklisted. perhaps categories with the current
+	 * list designated "default" and additional categories like "gfx", etc. */
+
+ if (PE_parse_boot_argn("blacklist", &bootArg, sizeof(&bootArg)) && !bootArg) {
+	    blacklistEnabled = FALSE;
+	    printf("warning: disabling kext blacklist\n");
+    }
+   
 root = IORegistryEntry::initialize();
 assert( root );
 IOService::initialize();
@@ -120,6 +130,24 @@
// From <osfmk/kern/debug.c>
extern int debug_mode;

+   
+    /* kaitek / qoopz: blacklist of common kexts that are known to be problematic or undesirable
+	 * for virtually all non-apple hardware. see notes in StartIOKit(). */
+
+ boolean_t blacklistEnabled = TRUE;
+ blacklist_mod_t blacklistMods[] = {
+	 { "com.apple.driver.AppleIntelMeromProfile", 0 },
+	 { "com.apple.driver.AppleIntelNehalemProfile", 0 },
+	 { "com.apple.driver.AppleIntelPenrynProfile", 0 },
+	 { "com.apple.driver.AppleIntelYonahProfile", 0 },
+	 { "com.apple.driver.AppleIntelCPUPowerManagement", 0 }, // must be added to use in 10.6.1+
+	 { "com.apple.iokit.CHUDKernLib",    0 },
+	 { "com.apple.iokit.CHUDProf",   0 },
+	 { "com.apple.iokit.CHUDUtils",   0 },
+	 { NULL,	  0 }
+ };
+
+   
/*****
 * Pointer into bootstrap KLD segment for functions never used past startup.
 */

So we need a new blacklister in time... but at least it boots up now...

Also if AMD requires some mods to the loading algo's we'll need to make them...

For now, please test it and if it doesn't work with latest Xcode (instant reset) somebody can recompile it with Xcode 3.2.6

I hope it works though... it does for Intel now... :thumbsup_anim:

Also the ssse3emu needs some more work for 64bit... but I slightly modified the code allready so it does compile (untested though...)

 

@Andy,

 

Besides the emu, what is the difference in the patches for AMD CPUs and legacy Intel CPUs? Or are they one and the same (I'm speaking strictly about the kernel, not any binpatching)

 

I have a legacy Intel rig (breadboarded lol) that I can test kernel development with. Assuming we're working on legacy Intel as well.

 

There is also something I'm wondering: what about Lion? I'll try applying the diff to the Lion kernels and see what happens. :)

Unfortunately legacy (32-bit) CPU's don't stand a change on ML...

Lion no problem as that supports 32-bit kernel and CPU's (some legacy work has been done so that shouldn't be a problem...).

ML removed some of the i386 versions of some of the kexts so you can't boot a 32-bit kernel at all on ML.

Too bad though... :hammer:

xnu-2050.18.24-test2.diff.zip

AnV_kernel.zip

Share this post


Link to post
Share on other sites

Congratulations, Andy! Going to test the kernel later tonight.

 

About Pooky's rig, i think it's a Pentium-D, so it's not exactly a legacy (32-bit) intel CPU, but an unsupported (by Apple) 64-bit which cannot run ssse3 instructions (so it's at the same boat as all us AMD users).

 

As always, please you guys post pics and vids of your tests. Thank you!

 

Hey guys

 

Currently at work and i have a number of FX4100 (about 30) at my disposal at the moment. ive not done the hackintosh scene for a while however ive been reading this thread for the last week and would like to offer my services/ hardware for tests....

 

all i need is to be told what i need to do or what to download

 

Regards

Slowie

 

Thank you very much! Your help will surely be very welcome!

Share this post


Link to post
Share on other sites

Exactly. Sorry I didn't specify, it is a Pentium D. :)

 

I was thinking legacy Intel = pre-Core CPUs.

Share this post


Link to post
Share on other sites

Exactly. Sorry I didn't specify, it is a Pentium D. :)

 

I was thinking legacy Intel = pre-Core CPUs.

 

Haha :D I have like thousands of those CPUs, Pentium D, Celeron D, Pentium 3, Pentium 4, Celeron Mobile :D

They can run SL just fine, never tried Lion (ML is impossible atm I think :|)

Share this post


Link to post
Share on other sites

@akimoa: did you update to 10.8.2? It is necessary...

Also: still need to update blacklister. Will build a new kernel later today...

Share this post


Link to post
Share on other sites

Also in your case it panics on AppleEFI kexts. Untill I get the blacklister fixed you need to remove AppleEFIRuntime.kext and AppleIntelCPUPowerManagement kexts. After that it should get further... Also I have some ideas about fixing the ssse3emu in 64bit mode. Will keep you posted... the trick will be pushing the rax register. Putting the pointer there. Placing the pointer into 16(%%ebp). Popping back into rax and last popa (.byte 0x61)

Share this post


Link to post
Share on other sites

Also in your case it panics on AppleEFI kexts. Untill I get the blacklister fixed you need to remove AppleEFIRuntime.kext and AppleIntelCPUPowerManagement kexts. After that it should get further... Also I have some ideas about fixing the ssse3emu in 64bit mode. Will keep you posted... the trick will be pushing the rax register. Putting the pointer there. Placing the pointer into 16(%%rbp). Popping back into rax and last popa (.byte 0x61)

Share this post


Link to post
Share on other sites

Sometime soon (hopefully tomorrow) I'll do some testing on my Athlon II x4 640. I'll install ML with MyHack on my Intel hack, update it to 10.8.2, remove AppleEFI.kext and AppleIntelCPUPowerManagement.kext, then try it on my AMD machine with AnV's kernel. Anything else I should know before I begin?

 

Also, I have an SSSE3 and SSE3-less 32-bit only Intel Pentium M 1.8 GHz that might be useful for testing the Lion kernel.

 

-instant idiot

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By verymilan
      Hi, i recently set up High Sierra on my AMD computer with the help of the amdosx community (i actually used an installer just to confirm that something would work in the first place before i spend hours for nothing, i can and could have downloaded High Sierra the "legal" way).
      However the graphicscard is recognized properly, the 6gig are recognized and i have no artifacts and no screen tearing with the official nvidia webdriver,
      but unfortunally, dark colors have horizontal dark stripes in them and specific bright colors like on left bar of system windows such as settings do flicker like low fps.

      I only used the clover on the flash drive for now and i'd like if it's worth digging deeper of if i should just forget about it as it is a common nvidia problem on macOS.
      Would be amazing to know.
       
      Closer machine infos:
      * High Sierra (misses a recent minor patch as my network is veeeery slow and i got this nvidia issue anyway so i mainly jumped back to linux)
      * AMD fx8350
      * Asus Sabertooth 990fx Ref. 2.0
      * NVIDIA GeForce GTX 1060 6GB
       
    • By hackintosh_builder
      Hello, I am interested in building a Hackintosh using Threadripper. Could you please recommend good motherboard(s)? Is there one that is fully compatible with the Hackintosh?
    • By abhinav
      How to install macOS 10.13 High Sierra in Vmware Workstation 14 Pro on AMD Machine
      Unlocker cmd already installed for vmware workstation 14
      vmx file edited...added smc.version="0"
       
      My System Specs
      AMD FX8120 8 Core
      Corsair Vengeance 32 GB DDR3 RAM
      Asus 990FX Sabertooth Motherboard
      Sandisk Ultra II 480 GB SSD SATA 3
      Asus STRIX 960 GTX 4 GB DCU II Model Pixel Shader 5 DirectX 12 Support
       
      Virtual Machine Specs
      16 GB RAM
      2 processors and 4 cores = 8 core processor
      SATA hard drive
      128 MB video memory

    • By M1GU5L
      Last year i tried to install Sierra but after installing it keped booting to a black screen, now i want to try with high sierra but i dont know what i have to do to get this to work.
      I heard about the whatevergreen and lilu kexts but i dont know what to do with them, can anyone help me solving this?

      my pc specs

      Intel Core i5-4460 3.20 GHz with iGPU Intel HD Graphics 4600
      Asus H81M-A
      8GB RAM Kingston Hyper x 1600 mhz
      Asus Strix R9 380 4GB
    • By haegar33
      I have browsed thru all forums and all threads for this card but apparently my system is still something special. With some cumbersome effort (none of the simple one-click ##### and other USB-Installers methods ever worked for me) I managed to install Sierra 10.12.5. However when booting is nearly finsihed I get the famous black screen which can be recovered by quickly unplug/plug the DP monitor cable leading finally to a proper initialisation of my 290X. 

      1.) RadeoDeInit is on, without this patch the screens stays dark forever
      2.) Booting with iGFX never works for me, I always get memory allocation errors during boot until I disable the Intel graphics completely.
      3.) I am on Clover 4318, newer version do not make any differences.
      4.) I am using a System Configuration for an Imac 14,2. Most other configs do not make difference either.

      I have not started again the nightmare of Framebuffer patching (as I remember from Yosemite) and I think it will not help as the card is recognised by Sierra but just not initialised.
       
×