Jump to content

Clover General discussion


ErmaC
30,171 posts in this topic

Recommended Posts

I'm not sure to do it well so because I don't get my GTX 750 TI to work with loadvbios :/ I already tried to flash it and it was working but I prefere to keep tthe original vbios on it and patch on the fly with clover

I think you confuse  with a role of VBIOS. If it flashed then it will work before computer started and initializes hardware.

When Clover Load VBIOS it will not take part in the initialization. It will be taken into account by system drivers if they want to look into the BIOS.

This Clover ability proved for Radeon Mobility as only way to do it working. I have no experience with necessity for desktop geforce.

 

Managed to install the GM of El Cap on my sig machine, i re-created the entire config.plist and started to use audio injection in the config, and also on the fly DSDT fixes, i used to disable dsdt fixes before, but it looks to be working the same with them enabled.

Any hints on those fixes ? keep them, disable them ?

 

Thank you.

 

I am not sure how needed are those fixes for my UEFI only system, can someone sugest what fixed out of those are recommended? keeping in mind i have the integrated igpu disabled.

It is for your observation if some fixes improve or worsen something in the system.

My advice: set all fixes except IDE, SATA, - this is obsolete fixes, and  Airport, Wirefire if you have no such devices.

Link to comment
Share on other sites

"slide" is just a factor in the addition to the kernel address space... I don't remember the exact values and I can't check right now, but it is basically DEFAULT_KERNEL_ADDRESS + slide * KERNEL_SLIDE_FACTOR. I doubt memory corruption is related, but I can't exclude it. :)

Link to comment
Share on other sites

I think wake from hibernate (suspend to disk) only works with OsxAptioFix2... (and correct hibernatemode and correct slide value).

 

Don't know the details as I have no interest in hibernate (using SSD).

With OsxAptioFix2 and EFI i have working hibernate, where the slide value doesn't matter.

My hope was that OsxAptioFix1 will fix my not working SD-card reader after startup, which works after wake from sleep and wake from hibernate, maybe the clover developer have an idea why i have this behavior 

Link to comment
Share on other sites

@Download-Fritz- Can you update the X99 HaswellE patch to work with El Cap? stinga11's X99 kernel patch for Yos also works for El Cap providing you manually run it  (sudo perl -pi -e 's|\x74\x11\x83\xF8\x3C|\x74\x11\x83\xF8\x3F|g' /System/Library/Kernels/kernel)...

 

Sure would make creating a Clover El Cap X99 Installer easier.

 

Thanks- 

Link to comment
Share on other sites

Yeah it does, if I clone a el cap drive from a z97 box I can boot Once, after that I need to copy a patched kernel to the /S/L/Kernels folder to get the box to boot. Otherwise the box runs nicely but I'm primarily interested in the ability to create an installer to recover from a problem or I'm not going to risk running El Cap...

Link to comment
Share on other sites

It is for your observation if some fixes improve or worsen something in the system.

My advice: set all fixes except IDE, SATA, - this is obsolete fixes, and  Airport, Wirefire if you have no such devices.

 

 

Thank you for the reply on this, this is about what i just did. i enabled things except igpu, airport, firewire, ide and sata.

 

Another issue i have in El Cap is this error in sys profiler. With or without the fixes, same error here. In 10.10 i don't see this error.

Except this error i see, the system works ok.

post-435455-0-50717700-1442304106_thumb.png

Link to comment
Share on other sites

Thank you for the reply on this, this is about what i just did. i enabled things except igpu, airport, firewire, ide and sata.

 

Another issue i have in El Cap is this error in sys profiler. With or without the fixes, same error here. In 10.10 i don't see this error.

Except this error i see, the system works ok.

Yes, I also see some errors in System Profiler. May be ElCapitan uses more strict rules what it should be in DSDT related to PCI devices.

May be _SUN properties.

  • Like 1
Link to comment
Share on other sites

@Slice

Please i have this in config plist :

<key>RtVariables</key>
<dict>
<key>BooterConfig</key>
<string>0x28</string>
<key>CsrActiveConfig</key>
<string>0x67</string>
</dict>

now in terminal i see SIP enabled 

 

 

Last login: Tue Sep 15 14:14:15 on ttys000
iMac-di-magnifico:~ magnifico$ csrutil status
System Integrity Protection status: enabled (Custom Configuration).
 
Configuration:
Apple Internal: disabled
Kext Signing: disabled
Filesystem Protections: disabled
Debugging Restrictions: disabled
DTrace Restrictions: disabled
NVRAM Protections: disabled

 

Maybe i need rootless =0 ?

Link to comment
Share on other sites

@Download-Fritz- Can you update the X99 HaswellE patch to work with El Cap? stinga11's X99 kernel patch for Yos also works for El Cap providing you manually run it  (sudo perl -pi -e 's|\x74\x11\x83\xF8\x3C|\x74\x11\x83\xF8\x3F|g' /System/Library/Kernels/kernel)...

 

Sure would make creating a Clover El Cap X99 Installer easier.

 

Thanks- 

Strange but I see Clover already do this

BOOLEAN KernelHaswellEPatch(VOID *KernelData)
{
  // Credit to stinga11 for the patches used below
  // Based on Pike R. Alpha's Haswell patch for Mavericks

  UINT8   *Bytes;
  UINT32  Index;
  BOOLEAN PatchApplied;

  DBG("Searching for Haswell-E patch pattern\n");

  Bytes = (UINT8*)KernelData;
  PatchApplied = FALSE;

  for (Index = 0; Index < 0x1000000; ++Index) {
    if (Bytes[Index] == 0x74 && Bytes[Index + 1] == 0x11 && Bytes[Index + 2] == 0x83 && Bytes[Index + 3] == 0xF8 && Bytes[Index + 4] == 0x3C) {
      Bytes[Index + 4] = 0x3F;

      DBG("Found Haswell-E pattern #1; patched.\n");

      if (PatchApplied) {
        break;
      }

      PatchApplied = TRUE;
    }

Check, please, where is discrepancy?

 

PS. Can someone see debug on the screen? 

@Slice

Please i have this in config plist :

<key>RtVariables</key>
<dict>
<key>BooterConfig</key>
<string>0x28</string>
<key>CsrActiveConfig</key>
<string>0x67</string>
</dict>

now in terminal i see SIP enabled 

Last login: Tue Sep 15 14:14:15 on ttys000
iMac-di-magnifico:~ magnifico$ csrutil status
System Integrity Protection status: enabled (Custom Configuration).
 
Configuration:
Apple Internal: disabled
Kext Signing: disabled
Filesystem Protections: disabled
Debugging Restrictions: disabled
DTrace Restrictions: disabled
NVRAM Protections: disabled

Maybe i need rootless =0 ?

No.

No new condition, no other value.

Check your mistakes.

Link to comment
Share on other sites

@Slice

Please i have this in config plist :

<key>RtVariables</key>
<dict>
<key>BooterConfig</key>
<string>0x28</string>
<key>CsrActiveConfig</key>
<string>0x67</string>
</dict>

now in terminal i see SIP enabled 

Last login: Tue Sep 15 14:14:15 on ttys000
iMac-di-magnifico:~ magnifico$ csrutil status
System Integrity Protection status: enabled (Custom Configuration).
 
Configuration:
Apple Internal: disabled
Kext Signing: disabled
Filesystem Protections: disabled
Debugging Restrictions: disabled
DTrace Restrictions: disabled
NVRAM Protections: disabled

Maybe i need rootless =0 ?

 
That’s correct. Why do you think it's wrong?
 
Check table here for values since DP7.
If you want csrutil to report a status of disabled then you need to use 0x77
 

 

  • Like 2
Link to comment
Share on other sites

Strange but I see Clover already do this

BOOLEAN KernelHaswellEPatch(VOID *KernelData)
{
  // Credit to stinga11 for the patches used below
  // Based on Pike R. Alpha's Haswell patch for Mavericks

  UINT8   *Bytes;
  UINT32  Index;
  BOOLEAN PatchApplied;

  DBG("Searching for Haswell-E patch pattern\n");

  Bytes = (UINT8*)KernelData;
  PatchApplied = FALSE;

  for (Index = 0; Index < 0x1000000; ++Index) {
    if (Bytes[Index] == 0x74 && Bytes[Index + 1] == 0x11 && Bytes[Index + 2] == 0x83 && Bytes[Index + 3] == 0xF8 && Bytes[Index + 4] == 0x3C) {
      Bytes[Index + 4] = 0x3F;

      DBG("Found Haswell-E pattern #1; patched.\n");

      if (PatchApplied) {
        break;
      }

      PatchApplied = TRUE;
    }

Check, please, where is discrepancy?

 

The only discrepancy is, that the perl script uses the global option, which tells Perl to replace all matches, and not just the first one.

If I understand the code snippet right, the for loop goes from range 0 to 0x1000000 (why 0x1000000 ?) and replaces the first occurrence and sets the boolean PatchApplied to true and after the i+1 loops, where i is the first index of the occurrence , and then it breaks the loop and returns.

So it won't work, if there are more than one occurrences of "x74\x11\x83\xF8\x3C" to be replaced.

 

Edit:

And there you have a out of bound exception and memory corruption, if the occurrences got found on index>(0x1000000-3).

Link to comment
Share on other sites

I can't find it in 10.10.5 kernel too.

 

 

I took ElCapitan GM -> /System/Library/Kerneks/kernel

and search the string by HexEdit.

Not found.

What is wrong?

attachicon.gifScreen Shot 2015-09-15 at 23.22.57.png


ElCapitan kernel size is

0xA35960

I see.

Wouldn't it be better to find out the kernel size and use it as variable, instead of hardcode it in the code?

 

As in:

fseek(f, 0, SEEK_END); // seek to end of file
kernelSize = ftell(f); // get current file pointer
fseek(f, 0, SEEK_SET); // seek back to beginning of file
// proceed with allocating memory and reading the file

or

#include <sys/stat.h>
struct stat st;
stat(filename, &st);
kernelSize = st.st_size;
Link to comment
Share on other sites

 

I can't find it in 10.10.5 kernel too.

 

 

I see.

Wouldn't it be better to find out the kernel size and use it as variable, instead of hardcode it in the code?

 

As in:

fseek(f, 0, SEEK_END); // seek to end of file
kernelSize = ftell(f); // get current file pointer
fseek(f, 0, SEEK_SET); // seek back to beginning of file
// proceed with allocating memory and reading the file

or

#include <sys/stat.h>
struct stat st;
stat(filename, &st);
kernelSize = st.st_size;

 

No, Clover is not loaded kernel. It is done by boot.efi.

Moreover, Clover can't use functions like "fseek", "stat" because it works in other space.

It can find a file "kernel" to catch it size but we are not sure it is the same as loaded by boot.efi.

Perhaps kernel/kext patching can be made a little smarter? Why not look up the symbol in the symbol table first, and use the offset to the data/assembly to start searching for the target pattern? You would need to add a name of the target but hey. This way is also faster.

It was not made by some reason.

Link to comment
Share on other sites

Hi guys, I've reinstalled OS X El Capitan, the GM on the surface pro and I'm using the latest clover and whatever csractiveconfig I try I always get:

 

 

Configuration:

    Apple Internal: disabled

    Kext Signing: disabled

    Filesystem Protections: disabled

    Debugging Restrictions: disabled

    DTrace Restrictions: disabled

    NVRAM Protections: disabled

 

Any suggestion?

 

I solved removing RtVariables from clover's config.plist and then used Clover Configurator to add 0x28 and 0x01 csractiveconfig, probably the plist was not correctly edited...  facepalm.gif

Now I get the correct output when running csrutil status:

 

Configuration:

    Apple Internal: disabled

    Kext Signing: disabled

    Filesystem Protections: enabled

    Debugging Restrictions: enabled

    DTrace Restrictions: enabled

    NVRAM Protections: enabled

 
Hope this can help someone else too...!
 
^_^
Link to comment
Share on other sites

@snatch

Im'not sure for that,I did a new clean (vanilla) install to EL_Capitan GM

I think you're right. Created an installer with "createmediainstall" and CloverUEFI r3264, didn't do any kernel patch or use the HaswellE patch and it installed fine and is up and running now.  Thanks-

Link to comment
Share on other sites

I took ElCapitan GM -> /System/Library/Kerneks/kernel

and search the string by HexEdit.

Not found.

What is wrong?

attachicon.gifScreen Shot 2015-09-15 at 23.22.57.png

ElCapitan kernel size is

0xA35960

This patch works with 10.9.5, 10.10, 10.10.1

 

 

EDIT: some users have reported that they have used El Capitan GM without the need for patch, which makes sense since from the version 10.10.2 apple included native support for processors Haswell-E

Link to comment
Share on other sites

×
×
  • Create New...