Jump to content

zhhbc

Members
  • Content count

    22
  • Joined

  • Last visited

About zhhbc

  • Rank
    InsanelyMac Protégé
  1. @Mieze, Thanks a lot for your tip. You are right, there is an AMT built into BIOS. I tried to disable it completely from BIOS. But, the computer couldn't boot up anymore, it seems waiting for something after loading ethernet driver. The good news is that after I disabled the watchdog, (the watchdog is 5 seconds, and it is more or less matching the delay between computer wakes up and hang when watchdog is enabled), and disabled WOL, I didn't see hang problem(crossing fingers). thanks for a lot for your great effort providing the driver, and your suggestion that fixed the hang problem!
  2. @Mieze, I am running into a problem potential related to the drive. Here is the symptom: when computer boot up, the everything works fine, but when the computer wakes up from sleep, sometimes ( not always), the computer freezes: i.e. No KP, but screens just freezes, keyboard stops working as well. After removing IntelMausiEthernet.kext, there is no more freezes. The computer is HP EliteDesk 800 G1. The NIC is onboard Intel Corporation Ethernet Connection I217-LM (rev 04). I am running macOS 10.12.6. I tried IntelMausiEthernet version 2.2.0. And recompiled from latest codebase (2.3.0), both show the same symptom. Any hint to how can I debug this problem? I really hope that I could get your driver working on the computer. Thanks a lot!
  3. AppleALC — dynamic AppleHDA patching

    Yes, I was using 11 due to codecAddress=2 I just tried AppleHDAPatcher with layoutid 5, 9. Unfortunately, I got different Sound assertions and the audio device doesn't even show up in sound preference. Here are the assertion from dmesg: Sound assertion in AppleHDADriver at line 1572 Sound assertion in AppleHDADriver at line 2252 Sound assertion in AppleHDADriver at line 219 Sound assertion in AppleHDADriver at line 1110
  4. AppleALC — dynamic AppleHDA patching

    Unfortunately. it didn't work . there is no sound from any jack, even though it shows it should work
  5. AppleALC — dynamic AppleHDA patching

    I was able to get AppleHDA recognized audio code ALC662 (at address 2) with AppleALC using layout-id 11 on G41-M7 motherboard running 10.9.5. However, there is no sound output to any jack. dmeag shows "Sound assertion in AppleHDAWidget at line 2208". Any suggestion?
  6. @Slice, @RehabMan is right. The intention of the function is uniquifying all duplicated strings regardless if they are updated later or not. For inspiron 5558, it doesn't matter as both values are updated later. But for general case, it is safer to have it in place. Thanks,
  7. Yes, I did check, actually, that was the first thing I checked after saw wrong productname. Unfortunately, it was incorrect. What puzzled me is that the dump from clover before booting into osx is correct. But after booting into el capitan, the smbios is incorrect ( from ioreg), the smbios pointed by "efi/configuration-table/EB9D2D31..." is incorrect, the productname from IOService is incorrect. They are all wrong in the same way . So I think SMBIOS or /efi has been altered before AppleSMBIOS loaded.
  8. Thanks for accepting patch. My guess that the reason that auto patch didn't work is that "smbios.c" uses LF+CR for newline (dos format), the patch you created, may be is unix style (LF only) It will be a good idea that we do the same for other tables as you suggested great catch. Yes, "break" should be used here. Yes, I saw fakesmc update product-name using OEMVendor, but even with a fix, I still have the same problem. Any other suggestion where I could check for 13 character problem?
  9. @Slice @RehabMan Here is type1 dump from shell64.efi: Type=1, Handle=0x1 Dump Structure as: Index=7,Length=0x3F,Addr=0xEDDC2 00000000: 01 1B 01 00 01 03 02 04-44 45 4C 4C 4B 00 10 46 *........DELLK..F* 00000010: 80 4D B9 C7 4F 36 38 35-06 03 00 44 65 6C 6C 20 *.M..O685...Dell * 00000020: 49 6E 63 2E 00 30 31 00-49 6E 73 70 69 72 6F 6E *Inc..01.Inspiron* 00000030: 20 35 35 35 38 00 39 4B-46 4D 36 38 35 00 00 * 5558.9KFM685..* Structure Type: System Information Format part Len : 27 Structure Handle: 1 Manufacturer: Dell Inc. ProductName: Inspiron 5558 Version: 01 SerialNumber: 9KFM685 Dump Uuid size=16: 00000000: 44 45 4C 4C 4B 00 10 46-80 4D B9 C7 4F 36 38 35 *DELLK..F.M..O685* System Wakeup Type: Power Switch SKUNumber: Inspiron 5558 Family: @RehabMan, I see your point. But standard offsetof macro does not work due to "-Werror=pointer-to-int-cast" option used in Makefile. src/edk2/Clover/Library/OpensslLib/Include/OpenSslSupport.h:75:34: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] #define offsetof(type, member) ( (int) & ((type*)0) -> member ) ^ src/edk2/Clover/rEFIt_UEFI/Platform/smbios.c:91:2: note: in expansion of macro 'offsetof' offsetof(SMBIOS_TABLE_TYPE1, Manufacturer), ^ cc1: all warnings being treated as errors make: *** [src/edk2/Build/Clover/RELEASE_GCC49/X64/Clover/rEFIt_UEFI/refit/OUTPUT/Platform/smbios.obj] Error 1 I had to create my own version, the new patch is : --- rEFIt_UEFI/Platform/smbios.c (revision 3358) +++ rEFIt_UEFI/Platform/smbios.c (working copy) @@ -84,7 +84,17 @@ #define SMBIOS_PTR SIGNATURE_32('_','S','M','_') #define MAX_TABLE_SIZE 512 +#define smbios_offsetof(s,m) ( (SMBIOS_TABLE_STRING) ((char *)&((s*)0)->m - (char*)0)) +SMBIOS_TABLE_STRING SMBIOS_TABLE_TYPE1_STR_IDX[] = { + smbios_offsetof(SMBIOS_TABLE_TYPE1, Manufacturer), + smbios_offsetof(SMBIOS_TABLE_TYPE1, ProductName), + smbios_offsetof(SMBIOS_TABLE_TYPE1, Version), + smbios_offsetof(SMBIOS_TABLE_TYPE1, SerialNumber), + smbios_offsetof(SMBIOS_TABLE_TYPE1, SKUNumber), + smbios_offsetof(SMBIOS_TABLE_TYPE1, Family), + 0x00 }; // offsets of structures that values are strings for type 1 + /* Functions */ // validate the SMBIOS entry point structure @@ -393,6 +403,28 @@ return; } +VOID UniquifySmbiosTableStr (SMBIOS_STRUCTURE_POINTER SmbiosTableN, SMBIOS_TABLE_STRING* str_idx) +{ + int i, j; + SMBIOS_TABLE_STRING cmp_idx; + SMBIOS_TABLE_STRING cmp_str; + SMBIOS_TABLE_STRING ref_str; + + if ( 0 == str_idx[0] ) return; // SMBIOS doesn't have string structures, just return; + for (i = 1; ;i++) { + cmp_idx = str_idx[i]; + if ( 0 == cmp_idx ) break; + cmp_str = SmbiosTableN.Raw[cmp_idx]; + if ( 0 == cmp_str ) continue; // if string is undefine, continue + for ( j = 0; j < i; j++ ) { + ref_str = SmbiosTableN.Raw[str_idx[j]]; + if ( cmp_str == ref_str ) { + SmbiosTableN.Raw[cmp_idx] = 0; // pretend the string doesn't exist + UpdateSmbiosString (SmbiosTableN, &SmbiosTableN.Raw[cmp_idx], GetSmbiosString(SmbiosTableN, ref_str)); + } + } + } +} VOID PatchTableType1() { @@ -412,6 +444,8 @@ CopyMem((CHAR8*)newSmbiosTable.Type1+NewSize, (CHAR8*)SmbiosTable.Type1+Size, TableSize - Size); //copy strings newSmbiosTable.Type1->Hdr.Length = (UINT8)NewSize; + UniquifySmbiosTableStr(newSmbiosTable, SMBIOS_TABLE_TYPE1_STR_IDX); + newSmbiosTable.Type1->WakeUpType = SystemWakeupTypePowerSwitch; Once = TRUE;
  10. from SmbiosA.h typedef union { SMBIOS_TABLE_HEADER *Hdr; SMBIOS_TABLE_TYPE0 *Type0; SMBIOS_TABLE_TYPE1 *Type1; ... UINT8 *Raw; } SMBIOS_STRUCTURE_POINTER; SmbiosTableN is union of pointers to structs, so SmbiosTableN.raw is pointer to array of UINT8. did I miss anything?
  11. Do you mean SmbiosTableN.Raw is not a pointer to array? Or something else?
  12. Not sure about your comments. I already posted my patch to fix "share" string index problem. As to 13 character limitation, it doesn't seem to be clover issue. You are right. Now I have no clue which program/kext impose the 13 character limitation. the limitation is for ProductName and SKUNumber, other fields in type1 don't suffer this.
  13. I already checked SMBIOS codes, and dumped smbios after patch has been done, the 13 byte truncation problem was not here. At this point, I dont think clover causes truncation problem. Thanks, I will try kozleks' version. FakeSMC does process SMBIOS, I need study the source code more though. https://github.com/kozlek/HWSensors/blob/2c7d7818c6bbaf3777cddd141158c515201d71fc/Shared/OEMInfo.cpp
  14. Yes, I used correct board-id (Mac-189A3D4F975D5FFC). However, in smbios it becomes "Mac-189A3D4F9 ", the 7 characters after 13th become spaces(0x20), (that is the same problem that "MacBookPro11,1" becomes "MacBookPro11"), the productname from "ioreg -l" is "Mac-189A3D4F9" with trailing white space removed by AppleSMBIOS kext ( I think). Could you please recommend one for me to try?
  15. I dumped smbios (with the patch in previous post) just before clover booting into osx, and the dump files looks okay. So the 13 characters limitation is not caused by clover. So maybe one of extra kexts modified the SMBIOS. Here is my extra kext list: 3:206 0:000 Preparing kexts injection for arch=x86_64 from \EFI\CLOVER\kexts\Other 3:206 0:000 Extra kext: \EFI\CLOVER\kexts\Other\FakePCIID.kext 3:207 0:000 Extra kext: \EFI\CLOVER\kexts\Other\FakePCIID_Intel_HD_Graphics.kext 3:210 0:003 Extra kext: \EFI\CLOVER\kexts\Other\FakeSMC.kext 3:212 0:002 Extra kext: \EFI\CLOVER\kexts\Other\VoodooPS2Controller.kext 3:216 0:003 Extra PlugIn kext: \EFI\CLOVER\kexts\Other\VoodooPS2Controller.kext\Contents\PlugIns\VoodooPS2Keyboard.kext 3:218 0:001 Extra PlugIn kext: \EFI\CLOVER\kexts\Other\VoodooPS2Controller.kext\Contents\PlugIns\VoodooPS2Mouse.kext 3:219 0:001 Extra PlugIn kext: \EFI\CLOVER\kexts\Other\VoodooPS2Controller.kext\Contents\PlugIns\VoodooPS2Trackpad.kext 3:221 0:001 Extra kext: \EFI\CLOVER\kexts\Other\RealtekRTL8100.kext 3:230 0:008 Extra kext: \EFI\CLOVER\kexts\Other\BrcmFirmwareData.kext 3:239 0:009 Extra kext: \EFI\CLOVER\kexts\Other\ACPIBacklight.kext 3:241 0:001 Extra kext: \EFI\CLOVER\kexts\Other\BrcmPatchRAM2.kext 3:246 0:005 Extra kext: \EFI\CLOVER\kexts\Other\ACPIBatteryManager.kext 3:248 0:001 Preparing kexts injection for arch=x86_64 from \EFI\CLOVER\kexts\10.11 I think FakeSMC.kext may be the cause. I didn't remember where I grabbed fakesmc, where is latest official FakeSMC?
×