Jump to content

Micky1979

Micky1979

Member Since 03 Oct 2010
Offline Last Active Private
*****

Posts I've Made

In Topic: Clover General discussion

04 April 2017 - 09:38 PM

here is report

0:114  0:000  KernelToPatch: 2 requested
0:114  0:000   - [00]: MSR 0xE2 _xcpm_idle instant reboot(c) Pike R. Alpha :: MatchOS: 10.12.x :: data len: 8 (don't have MatchBuild entry, have only MatchOS)
0:114  0:000   - [01]: MSR 0xE2 _xcpm_idle instant reboot(c) Pike R. Alpha :: MatchOS:  :: MatchBuild:  :: data len: 8 
only your code. not work.
2:508  0:000   - [00]: MSR 0xE2 _xcpm_idle instant reboot(c) Pike R. Alpha :: [OS: 10.12.5 | MatchOS: 10.12.x | MatchBuild: no] ==> allowed by OS
2:508  0:000   - [01]: MSR 0xE2 _xcpm_idle instant reboot(c) Pike R. Alpha :: [OS: 10.12.5 | MatchOS:  | MatchBuild: ] ==> not allowed by build
cecekpawon + your code
1:667  0:000   - [00]: MSR 0xE2 _xcpm_idle instant reboot(c) Pike R. Alpha :: [OS: 10.12.5 | MatchOS: 10.12.x | MatchBuild: no] ==> allowed by OS
1:667  0:000   - [01]: MSR 0xE2 _xcpm_idle instant reboot(c) Pike R. Alpha :: [OS: 10.12.5 | MatchOS:  | MatchBuild: ] ==> allowed by build
right. if log show "not set" or "emty", it will be useful.

 

Yep, the part I modded has nothing to do with empty strings. What I modified is the core of these/those set of functions and you confirm working as expected.
 
@Slice can you commit this code? this is my last request.
 
Farewell, keep up the good work Guys!  :wink_anim:

In Topic: Clover General discussion

03 April 2017 - 05:43 PM

solved case if MatchOS and MatchBuild have blank.

3:479  0:000   - [00]: HDMI-audio, port 0105, 0x19160000 :: [OS: 10.12.5 | MatchOS: 10.12.x | MatchBuild: no] ==> allowed by OS
3:479  0:000   - [01]: HDMI-audio, port 0105, 0x19160000 :: [OS: 10.12.5 | MatchOS:  | MatchBuild: ] ==> not allowed by build

1:377  0:000   - [00]: HDMI-audio, port 0105, 0x19160000 :: [OS: 10.12.5 | MatchOS: 10.12.x | MatchBuild: no] ==> allowed by OS
1:377  0:000   - [01]: HDMI-audio, port 0105, 0x19160000 :: [OS: 10.12.5 | MatchOS:  | MatchBuild: ] ==> allowed by build

Hi Sherlocks. MatchOS should return yes only if a match exist, but doing like you said, IMHO the log should be at least like this:

inform if no key present

:: [OS: 10.12.5 | MatchOS: not set | MatchBuild: not set ] ==> allowed 

or inform if empty

:: [OS: 10.12.5 | MatchOS: empty​ | MatchBuild: empty​ ] ==> allowed 

(or something similar)

 

and ..can you please try this improved (simplified and more robust)  version of GetStrArraySeparatedByChar() function?

struct
MatchOSes *GetStrArraySeparatedByChar(CHAR8 *str, CHAR8 sep)
{
  struct MatchOSes *mo;  
  INTN len = 0, i = 0, inc = 1;
  CHAR8 doubleSep[2];
  
  mo = AllocatePool(sizeof(struct MatchOSes));
  if (!mo) {
    return NULL;
  }
  mo->count = countOccurrences( str, sep ) + 1;
//  DBG("found %d %c in %s\n", mo->count, sep, str);
  len = (INTN)AsciiStrLen(str);
  doubleSep[0] = sep; doubleSep[1] = sep;
  
  if(AsciiStrStr(str, doubleSep) || !len || str[0] == sep || str[len -1] == sep) {
    mo->count = 0;
    mo->array[0] = NULL;
//    DBG("emtpy string\n");
    return mo;
  }
  
  if (mo->count > 1) {
    //INTN indexes[mo->count + 1];
    INTN *indexes = (INTN *) AllocatePool(mo->count + 1);
    
    for (i = 0; i < len; ++i) {
      CHAR8 c = str[i];
      if (c == sep) {
        indexes[inc]=i;
//        DBG("index %d = %d\n", inc, i);
        inc++;
      }
    }
    // manually add first index
    indexes[0] = 0;
    // manually add last index
    indexes[mo->count] = len;
    
    INTN startLocation = 0, endLocation = 0;
      
    for (i = 0; i < mo->count; ++i) {
      UINTN newLen = 0;
      startLocation = i ? indexes[i] + 1 : indexes[0];
      endLocation = (i == mo->count - 1) ? len : indexes[i + 1];
//      DBG("start %d, end %d\n", startLocation, endLocation);
      newLen = (endLocation - startLocation);
      mo->array[i] = AllocateCopyPool(newLen, str + startLocation);
      mo->array[i][newLen] = '\0';
      if (endLocation == len) break;
    }

    FreePool(indexes);
  }
  else {
//    DBG("str contains only one component and it is our string %s!\n", str);
    mo->array[0] = AllocateCopyPool(AsciiStrLen(str)+1, str);
  }
  return mo;
} 

here works well

In Topic: Clover General discussion

03 April 2017 - 01:10 AM

Hard to patch it... Really.

No (of course yes.. is hard :P ), but it does not seem the right section

In Topic: Chameleon 2.4svn Official PKG Installer

03 April 2017 - 01:03 AM

I've removed the attachement (was containing your MLB/ROM). 

 

Now do this:

sudo nvram nvda_drv=1 

..and reboot

In Topic: Clover Configurator loves Ares

03 April 2017 - 12:59 AM

the point is that:

P.S. 
so now I found intresting the pop up buttons in ACPI->DSTD->Patches and in KernelAndKextsPatches containings some patches ready and I added it to Ares, just the same as have you done in Clover Configurator: (1:1) 

i.e. now I've done the same!

© 2017 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy