Sherlocks Posted June 6, 2019 Share Posted June 6, 2019 @vector sigma long time no see vector. can we consider smcv3 on hwsensor3? like virtualsmc https://github.com/acidanthera/VirtualSMC/commit/b185559f470a49b6868d64e7507a4ee0566541d2 https://github.com/acidanthera/VirtualSMC/commit/8ce0c779727494ca0c028f28356cc602fa776d0f thanks in advance 1 Link to comment Share on other sites More sharing options...
vector sigma Posted June 6, 2019 Share Posted June 6, 2019 6 hours ago, Sherlocks said: @vector sigma long time no see vector. can we consider smcv3 on hwsensor3? like virtualsmc https://github.com/acidanthera/VirtualSMC/commit/b185559f470a49b6868d64e7507a4ee0566541d2 https://github.com/acidanthera/VirtualSMC/commit/8ce0c779727494ca0c028f28356cc602fa776d0f thanks in advance Sure. But just I need some other info: On 5/22/2019 at 2:55 PM, Sherlocks said: MacBookPro15,1 : REV rBR EPCI MacBookPro15,2 : REV rBR EPCI MacBookAir8,1 : REV rBR EPCI Macmini8,1 : REV rBR EPCI iMacPro1,1 : REV rBR EPCI will newer models behave the same? why MacBookXX aren't there? Link to comment Share on other sites More sharing options...
vector sigma Posted June 6, 2019 Share Posted June 6, 2019 On 6/5/2019 at 8:08 AM, jinbingmao said: Looking forward to the early update, after the improvement of the package release? development branch not yet ready 1 Link to comment Share on other sites More sharing options...
vector sigma Posted June 6, 2019 Share Posted June 6, 2019 (edited) @Sherlocks, @Slice please take a look the logic: static inline bool isModelREVLess(const char * model) { /* no following keys starting from: MacBookPro15,1 : REV RBr RPlt MacBookPro15,2 : REV RBr RPlt MacBookAir8,1 : REV RBr RPlt Macmini8,1 : REV RBr RPlt iMacPro1,1 : REV RBr RPlt */ bool result = false; long maj = 0; long rev = 0; const char *family[7] = { /* order is important */ "MacPro", "MacBookAir", "MacBookPro", "MacBook", "Macmini", "iMacPro", "iMac" }; if (!model) { return result; } for (int i = 0; i < 7; i++) { if (hw_strstr(model, family[i])) { char suffix[6], majStr[3], revStr[3]; // 15,10 (never seen but possible + null) // get the numeric part into a string snprintf(suffix, (strlen(model) - strlen(family[i])) + 1, "%s", model + strlen(family[i])); size_t commaIndex = 0; // get the comma position to split the suffix into a major and revision version: char c = suffix[commaIndex]; do { if (c == ',') { break; } commaIndex++; c = suffix[commaIndex]; } while (c != '\0'); if (commaIndex == 0) { return result; // failure } // populate the two strings with major and revision version: snprintf(majStr, commaIndex + 1, "%s", suffix); snprintf(revStr, (strlen(suffix) - commaIndex) + 1, "%s", suffix + commaIndex + 1); // make it numbers: maj = strtol(majStr, (char **)NULL, 10); rev = strtol(revStr, (char **)NULL, 10); // Apple never took 0 if (maj && rev) { // looks for a mach if (strncmp(family[i], "iMacPro", strlen("iMacPro")) == 0 && ((maj == 1 && rev >= 1) || maj >= 1)) { result = true; } else if (strncmp(family[i], "Macmini", strlen("Macmini")) == 0 && ((maj == 8 && rev >= 1) || maj >= 8)) { result = true; } else if (strncmp(family[i], "MacBookAir", strlen("MacBookAir")) == 0 && ((maj == 8 && rev >= 1) || maj >= 8)) { result = true; } else if (strncmp(family[i], "MacBookPro", strlen("MacBookPro")) == 0 && ((maj == 15 && rev >= 1) || maj >= 15)) { result = true; } } break; } } return result; } IORegistryEntry * rootNode = IORegistryEntry::fromPath("/efi/platform", gIODTPlane); if (rootNode) { OSData *data = OSDynamicCast(OSData, rootNode->getProperty("Model")); OSData *model = OSData::withCapacity(64); const unsigned char* raw = static_cast<const unsigned char*>(data->getBytesNoCopy()); for (int i = 0; i < data->getLength(); i += 2) { model->appendByte(raw[i], 1); } rev3 = isModelREVLess((const char *)model->getBytesNoCopy()); } ..... if isModelREVLess() then don't add REV RBr RPlt keys or remove them if found. Also every model grater then MacBookPro15,1 - MacBookAir8,1 -Macmini8,1 - iMacPro1,1, for example MacBookAir8,2 will not add these keys. Is fine? P.S. Not yet tested, will be soon. Waiting you to know if the logic is correct. Edited June 6, 2019 by vector sigma code update 1 Link to comment Share on other sites More sharing options...
vector sigma Posted June 6, 2019 Share Posted June 6, 2019 (edited) Looks like this should be done by Clover instead... EDIT REV is/was injected anyway from Info.plist for all the other booters. Edited June 6, 2019 by vector sigma 1 Link to comment Share on other sites More sharing options...
Sherlocks Posted June 6, 2019 Share Posted June 6, 2019 [mention=980913]Sherlocks[/mention], [mention=112217]Slice[/mention] please take a look the logic:static inline bool needREVGreaterEqualTo3(IORegistryEntry * node) { // "/efi/platform" /* no following keys starting from: MacBookPro15,1 : REV rBR EPCI MacBookPro15,2 : REV rBR EPCI MacBookAir8,1 : REV rBR EPCI Macmini8,1 : REV rBR EPCI iMacPro1,1 : REV rBR EPCI */ bool result = false; long maj = 0; long rev = 0; if (node) { char model[20]; OSData *data = OSDynamicCast(OSData, node->getProperty("Model")); if (data && data->getLength() > 0) { bcopy(data->getBytesNoCopy(), model, data->getLength()); const char *family[7] = { /* order is important */ "MacPro", "MacBookAir", "MacBookPro", "MacBook", "Macmini", "iMacPro", "iMac" }; for (int i = 0; i if (hw_strstr(model, family[i])) { char suffix[6], majStr[3], revStr[3]; // 15,10 (never seen but possible + null) // get the numeric part into a string snprintf(suffix, (strlen(model) - strlen(family[i])) + 1, "%s", model + strlen(family[i])); size_t commaIndex = 0; // get the comma position to split the suffix into a major and revision version: char c = suffix[commaIndex]; do { if (c == ',') { break; } commaIndex++; c = suffix[commaIndex]; } while (c != '\0'); if (commaIndex == 0) { return result; // failure } // populate the two strings with major and revision version: snprintf(majStr, commaIndex + 1, "%s", suffix); snprintf(revStr, (strlen(suffix) - commaIndex) + 1, "%s", suffix + commaIndex + 1); // make it numbers: maj = strtol(majStr, (char **)NULL, 10); rev = strtol(revStr, (char **)NULL, 10); // Apple never took 0 if (maj && rev) { // looks for a mach if (strncmp(family[i], "iMacPro", strlen("iMacPro")) == 0 && ((maj == 1 && rev >= 1) || maj >= 1)) { result = true; } else if (strncmp(family[i], "Macmini", strlen("Macmini")) == 0 && ((maj == 8 && rev >= 1) || maj >= 8)) { result = true; } else if (strncmp(family[i], "MacBookAir", strlen("MacBookAir")) == 0 && ((maj == 8 && rev >= 1) || maj >= 8)) { result = true; } else if (strncmp(family[i], "MacBookPro", strlen("MacBookPro")) == 0 && ((maj == 15 && rev >= 1) || maj >= 15)) { result = true; } } break; } } } } return result;} if needREVGreaterEqualTo3() then don't add REV rBR EPCI keys or remove them if found. Also every model grater then MacBookPro15,1 - MacBookAir8,1 -Macmini8,1 - iMacPro1,1, for example MacBookAir8,2 will not add these keys. Is fine? P.S. Not yet tested, will be soon. Waiting you to know if the logic is correct. looks great.clover bootloader need check for model? 나의 SM-N960N 의 Tapatalk에서 보냄 Link to comment Share on other sites More sharing options...
vector sigma Posted June 6, 2019 Share Posted June 6, 2019 (edited) 5 hours ago, Sherlocks said: clover bootloader need check for model? No is automatic and also remove any trace of them from "/efi/platform" if published by him, but needs to be tested with involved mac models, can you? P.S. I have to correct my self. Keys not added are REV RBr and RPlt. FakeSMC.kext.zip Edited June 6, 2019 by vector sigma code update 1 Link to comment Share on other sites More sharing options...
vector sigma Posted June 6, 2019 Share Posted June 6, 2019 Changes committed to r203. Link to comment Share on other sites More sharing options...
jinbingmao Posted June 6, 2019 Share Posted June 6, 2019 (edited) 5小时前,矢量西格玛说: 否是自动的,如果由他发布,也会从“/ efi / platform”删除它们的任何痕迹,但是需要使用相关的mac模型进行测试,对吗? PS我必须纠正自己。未添加的键是REV RBr和RPlt。 FakeSMC.kext.zip ok! Edited June 6, 2019 by jinbingmao 1 Link to comment Share on other sites More sharing options...
Sherlocks Posted June 6, 2019 Share Posted June 6, 2019 Changes committed to r203.thanks vector. it's great나의 SM-N960N 의 Tapatalk에서 보냄 1 Link to comment Share on other sites More sharing options...
vector sigma Posted June 6, 2019 Share Posted June 6, 2019 1 hour ago, jinbingmao said: ok! You have to ensure to load FakeSMC.kext and plugins from the same branch, that is only from the trunk (master) or only from the development branch. This last is used only for experimentation and only when everythings will be fine, changes will be applied to the trunk. Not yet ready.... we have a job 5 minutes ago, Sherlocks said: thanks vector. it's great Thanks. Tested? Link to comment Share on other sites More sharing options...
jinbingmao Posted June 6, 2019 Share Posted June 6, 2019 12 minutes ago, vector sigma said: 您必须确保从同一分支加载FakeSMC.kext和插件,该分支仅来自主干(主)或仅来自开发分支。最后一个仅用于实验,只有当每一件事都没有问题时,才会对行李箱进行更改。还没准备好....我们有工作 谢谢。测试? Link to comment Share on other sites More sharing options...
vector sigma Posted June 6, 2019 Share Posted June 6, 2019 (edited) 10 minutes ago, jinbingmao said: Looks like a translation for "target speed" needs. Anyway could you show me the smc dump to see where 'Processor Fan' lose 'n'? Edited June 6, 2019 by vector sigma Link to comment Share on other sites More sharing options...
jinbingmao Posted June 6, 2019 Share Posted June 6, 2019 At present, the South Bridge temperature of the main board Z87 chipset is not monitored. Everything else is complete. It's really comprehensive. It's a great job to go beyond history. target speed= 目标速度 Byte Limitation 1 Link to comment Share on other sites More sharing options...
jinbingmao Posted June 6, 2019 Share Posted June 6, 2019 (edited) When the temperature is below the critical temperature, the fan is the target speed. Edited June 6, 2019 by jinbingmao Link to comment Share on other sites More sharing options...
vector sigma Posted June 6, 2019 Share Posted June 6, 2019 (edited) 27 minutes ago, jinbingmao said: At present, the South Bridge temperature of the main board Z87 chipset is not monitored I need to know more about temperature for your chips. Maybe a dump made in windows or linux can help me? 27 minutes ago, jinbingmao said: Byte Limitation Yep, only 12 bytes allowed and your is longer: 50 72 6F 63 65 73 73 6F 72 20 46 61 6E 27 ... but we can fix it by giving a shorter name and let the app translate it to any. Example: "CPU" = "My cool processor's Fan"; Edited June 7, 2019 by vector sigma Link to comment Share on other sites More sharing options...
jinbingmao Posted June 7, 2019 Share Posted June 7, 2019 fan=风扇 1 Link to comment Share on other sites More sharing options...
vector sigma Posted June 7, 2019 Share Posted June 7, 2019 6 minutes ago, jinbingmao said: When the temperature is below the critical temperature, the fan is the target speed. I'm not sure to understand you, but in W836x.kext you can choose to let the motherboard doing its job automatically. An 'alarm' will always work if temperature is accurate. Usually I set to the low level possible even if the cpu increase 2 or 3 degrees as I love silence, but others that play with overclocking may need the possibility to go at max during their test stress. For all others.... imho just let the bios decide! Just now, jinbingmao said: fan=风扇 no need for this. Just CPU as fan name will be enough. The app knows is it a fan, so the app will show a more descriptive string. To be implemented, but is so easy to be done... Link to comment Share on other sites More sharing options...
jinbingmao Posted June 7, 2019 Share Posted June 7, 2019 6 minutes ago, vector sigma said: 我不太了解你,但在W836x.kext中你可以选择让主板自动完成它的工作。如果温度准确,“警报”将始终有效。通常我设置为低级别,即使cpu增加2或3度因为我喜欢沉默,但其他玩超频可能需要在测试压力期间达到最大值。对于所有其他人...... imho只是让bios决定! 不需要这个。只需CPU作为粉丝名称即可。该应用程序知道它是一个粉丝,因此该应用程序将显示更具描述性的字符串。要实施,但很容易做到...... Link to comment Share on other sites More sharing options...
vector sigma Posted June 7, 2019 Share Posted June 7, 2019 Tomorrow I'll show you how this can be utomatically translated in any language. See you! 1 Link to comment Share on other sites More sharing options...
Sherlocks Posted June 7, 2019 Share Posted June 7, 2019 (edited) On 6/6/2019 at 9:17 PM, vector sigma said: @Sherlocks, @Slice please take a look the logic: static inline bool isModelREVLess(const char * model) { /* no following keys starting from: MacBookPro15,1 : REV RBr RPlt MacBookPro15,2 : REV RBr RPlt MacBookAir8,1 : REV RBr RPlt Macmini8,1 : REV RBr RPlt iMacPro1,1 : REV RBr RPlt */ bool result = false; long maj = 0; long rev = 0; const char *family[7] = { /* order is important */ "MacPro", "MacBookAir", "MacBookPro", "MacBook", "Macmini", "iMacPro", "iMac" }; if (!model) { return result; } for (int i = 0; i < 7; i++) { if (hw_strstr(model, family[i])) { char suffix[6], majStr[3], revStr[3]; // 15,10 (never seen but possible + null) // get the numeric part into a string snprintf(suffix, (strlen(model) - strlen(family[i])) + 1, "%s", model + strlen(family[i])); size_t commaIndex = 0; // get the comma position to split the suffix into a major and revision version: char c = suffix[commaIndex]; do { if (c == ',') { break; } commaIndex++; c = suffix[commaIndex]; } while (c != '\0'); if (commaIndex == 0) { return result; // failure } // populate the two strings with major and revision version: snprintf(majStr, commaIndex + 1, "%s", suffix); snprintf(revStr, (strlen(suffix) - commaIndex) + 1, "%s", suffix + commaIndex + 1); // make it numbers: maj = strtol(majStr, (char **)NULL, 10); rev = strtol(revStr, (char **)NULL, 10); // Apple never took 0 if (maj && rev) { // looks for a mach if (strncmp(family[i], "iMacPro", strlen("iMacPro")) == 0 && ((maj == 1 && rev >= 1) || maj >= 1)) { result = true; } else if (strncmp(family[i], "Macmini", strlen("Macmini")) == 0 && ((maj == 8 && rev >= 1) || maj >= 8)) { result = true; } else if (strncmp(family[i], "MacBookAir", strlen("MacBookAir")) == 0 && ((maj == 8 && rev >= 1) || maj >= 8)) { result = true; } else if (strncmp(family[i], "MacBookPro", strlen("MacBookPro")) == 0 && ((maj == 15 && rev >= 1) || maj >= 15)) { result = true; } } break; } } return result; } IORegistryEntry * rootNode = IORegistryEntry::fromPath("/efi/platform", gIODTPlane); if (rootNode) { OSData *data = OSDynamicCast(OSData, rootNode->getProperty("Model")); OSData *model = OSData::withCapacity(64); const unsigned char* raw = static_cast<const unsigned char*>(data->getBytesNoCopy()); for (int i = 0; i < data->getLength(); i += 2) { model->appendByte(raw[i], 1); } rev3 = isModelREVLess((const char *)model->getBytesNoCopy()); } ..... if isModelREVLess() then don't add REV RBr RPlt keys or remove them if found. Also every model grater then MacBookPro15,1 - MacBookAir8,1 -Macmini8,1 - iMacPro1,1, for example MacBookAir8,2 will not add these keys. Is fine? P.S. Not yet tested, will be soon. Waiting you to know if the logic is correct. @vector sigma i checked latest build. need to change like this MacBookPro15,1 : REV RBr RPlt MacBookPro15,2 : REV RBr RPlt MacBookAir8,1 : REV RBr RPlt Macmini8,1 : REV RBr RPlt iMacPro1,1 : REV RBr RPlt to MacBookPro15,1 : REV RBr EPCI MacBookPro15,2 : REV RBr EPCI MacBookAir8,1 : REV RBr EPCI Macmini8,1 : REV RBr EPCI iMacPro1,1 : REV RBr EPCI Edited June 7, 2019 by Sherlocks Link to comment Share on other sites More sharing options...
vector sigma Posted June 7, 2019 Share Posted June 7, 2019 18 minutes ago, Sherlocks said: to MacBookPro15,1 : REV RBr EPCI MacBookPro15,2 : REV RBr EPCI MacBookAir8,1 : REV RBr EPCI Macmini8,1 : REV RBr EPCI iMacPro1,1 : REV RBr EPCI Can you test it before another commit? FakeSMC.kext.zip Take into account that for MacBookPro15,3+, MacBookAir8,2 +, Macmini8,2 + and iMacPro1,2 + will do the same. 1 Link to comment Share on other sites More sharing options...
Sherlocks Posted June 7, 2019 Share Posted June 7, 2019 1 hour ago, vector sigma said: Can you test it before another commit? FakeSMC.kext.zip Take into account that for MacBookPro15,3+, MacBookAir8,2 +, Macmini8,2 + and iMacPro1,2 + will do the same. great. i wonder if macbook11,1 or imac20,1 have t2 chip(smc3), probably will update fakesmc in future? 1 Link to comment Share on other sites More sharing options...
vector sigma Posted June 7, 2019 Share Posted June 7, 2019 (edited) 13 minutes ago, Sherlocks said: great. i wonder if macbook11,1 or imac20,1 have t2 chip(smc3), probably will update fakesmc in future? I made another change in the mean time: char argBuf[16]; if (PE_parse_boot_argn("-withREV", &argBuf, sizeof(argBuf))) { isRevLess = false; } else if (PE_parse_boot_argn("-noREV", &argBuf, sizeof(argBuf))) { isRevLess = true; } else { IORegistryEntry * rootNode = IORegistryEntry::fromPath("/efi/platform", gIODTPlane); if (rootNode) { OSData *data = OSDynamicCast(OSData, rootNode->getProperty("Model")); OSData *model = OSData::withCapacity(64); const unsigned char* raw = static_cast<const unsigned char*>(data->getBytesNoCopy()); for (int i = 0; i < data->getLength(); i += 2) { model->appendByte(raw[i], 1); } isRevLess = isModelREVLess((const char *)model->getBytesNoCopy()); } } -withREV will add all the keys -noREV will remove REV and others nothing, automatic... and will we have time to update and users happy. Edited June 7, 2019 by vector sigma code update 1 Link to comment Share on other sites More sharing options...
Sherlocks Posted June 7, 2019 Share Posted June 7, 2019 (edited) 8 minutes ago, vector sigma said: I made another change in the mean time: char argBuf[16]; if (PE_parse_boot_argn("-withREV", &argBuf, sizeof(argBuf))) { isRevLess = false; } else if (!PE_parse_boot_argn("-noREV", &argBuf, sizeof(argBuf))) { IORegistryEntry * rootNode = IORegistryEntry::fromPath("/efi/platform", gIODTPlane); if (rootNode) { OSData *data = OSDynamicCast(OSData, rootNode->getProperty("Model")); OSData *model = OSData::withCapacity(64); const unsigned char* raw = static_cast<const unsigned char*>(data->getBytesNoCopy()); for (int i = 0; i < data->getLength(); i += 2) { model->appendByte(raw[i], 1); } isRevLess = isModelREVLess((const char *)model->getBytesNoCopy()); } } -withREV will add all the keys -noREV will remove REV and others nothing, automatic... and will we have time to update and users happy. thanks. can you cleanup platformdata for future with maintenance? for example https://sourceforge.net/p/cloverefiboot/code/HEAD/tree/rEFIt_UEFI/Platform/platformdata.c#l223 { 0x02, 0x45, 0x0f, 0, 0, 0x00 }, "2018mbp", "j680", 0xf0a009 }, // there are no BIOS REV rBR EPCI to NULL, NULL, "j680", NULL }, if has smc3, don't add it blow https://sourceforge.net/p/cloverefiboot/code/HEAD/tree/rEFIt_UEFI/Platform/DataHubCpu.c#l458 https://sourceforge.net/p/cloverefiboot/code/HEAD/tree/rEFIt_UEFI/Platform/DataHubCpu.c#l467 it's just suggestion. or if you have a better idea Edited June 7, 2019 by Sherlocks Link to comment Share on other sites More sharing options...
Recommended Posts