Jump to content

Clover General discussion


ErmaC
29,866 posts in this topic

Recommended Posts

Slice, i have a question, is it possible to make a patch that writes to a system region before OS X booting begins?

 

I know i can do it via ACPI on _INI or _WAK or whatever, but the problem is, that GPU region in 10.11 is locked on _WAK... (hibernate wake)...

on 10.10 i did this via acpi...

 

Cheers :-)

Link to comment
Share on other sites

Hi all,

i'm facing a problem with Clover upgrade (from rev.3280 to rev.3292). I don't know why but Clover's installer says that i'm running an unsupported OS.

Obviously that's not true: currently i'm using Clover v3280 with El Capitan and everything works like a charm.

 

Any ideas?

Link to comment
Share on other sites

Hi all,

i'm facing a problem with Clover upgrade (from rev.3280 to rev.3292). I don't know why but Clover's installer says that i'm running an unsupported OS.

Obviously that's not true: currently i'm using Clover v3280 with El Capitan and everything works like a charm.

 

Any ideas?

Is SIP disabled?  I get the same error message when SIP is enabled and I try to install/update clover.  All you need to allow is filesystem access (0x2)

  • Like 1
Link to comment
Share on other sites

Is SIP disabled?  I get the same error message when SIP is enabled and I try to install/update clover.  All you need to allow is filesystem access (0x2)

I think you are right... I have SIP enabled (0x0). I'll try (0x2 or 0x3) as soon as possible.

 

EDIT: it works! Thx you!!!

Link to comment
Share on other sites

Slice, i have a question, is it possible to make a patch that writes to a system region before OS X booting begins?

 

I know i can do it via ACPI on _INI or _WAK or whatever, but the problem is, that GPU region in 10.11 is locked on _WAK... (hibernate wake)...

on 10.10 i did this via acpi...

 

Cheers :-)

Yes, it is possible if you give me more details.

  • Like 1
Link to comment
Share on other sites

Rehabman maked a change already to overwrite it with Intelbacklight on every brightness change... its not a perfect solution, because not optimal, but its working really good!

 

So at least you don't need to make changes, if you don't want,

but if you want :-)

 

Let me explain:

OperationRegion (RMPC, PCI_Config, 0x10, 0x04)
            Field (RMPC, AnyAcc, NoLock, Preserve)
            {
                BAR1,   32
            }

OperationRegion (BRIT, SystemMemory, (BAR1 + 0x000C824F), 0x05)
        Field (BRIT, AnyAcc, Lock, Preserve)
        {
            LEVW,   8,   <--- NEED Overwrite to 0xC0
            XBQC,   16, 
            MAXL,   16
        }

Its needed to change brightness on Intel GPU's for laptops... IntelBacklight/ACPIBacklight does the same...

On Yosemite we did this on _WAK or the _INI inside PNLF Device...

On Capitan this doesn't work anymore, thats why Rehab created IntelBacklight...

 

#define LEVW 0xc8250

REG32_WRITE(LEVW, 0xC0000000)

 

Thats what i seen in IntelBacklight sources from RehabMan...

 

Cheers :-)

Link to comment
Share on other sites

Issue: I've just updated El Capitan from 10.11 to 10.11.1 and got instant reboot when booting to Mac OSX.

Solution: Up-to-date latest Clover. I suppose/think it relate to Kernel. Thanks to Clover team :)

And this is latest Clover 3297 that i've built this morning by Clovergrowpro.

https://drive.google.com/file/d/0B_mXhYUpIP9-WVJwVkpodkFIUU0/view?usp=sharing

Link to comment
Share on other sites

Rehabman maked a change already to overwrite it with Intelbacklight on every brightness change... its not a perfect solution, because not optimal, but its working really good!

 

So at least you don't need to make changes, if you don't want,

but if you want :-)

 

Let me explain:

OperationRegion (RMPC, PCI_Config, 0x10, 0x04)
            Field (RMPC, AnyAcc, NoLock, Preserve)
            {
                BAR1,   32
            }

OperationRegion (BRIT, SystemMemory, (BAR1 + 0x000C824F), 0x05)
        Field (BRIT, AnyAcc, Lock, Preserve)
        {
            LEVW,   8,   <--- NEED Overwrite to 0xC0
            XBQC,   16, 
            MAXL,   16
        }

Its needed to change brightness on Intel GPU's for laptops... IntelBacklight/ACPIBacklight does the same...

On Yosemite we did this on _WAK or the _INI inside PNLF Device...

On Capitan this doesn't work anymore, thats why Rehab created IntelBacklight...

 

#define LEVW 0xc8250

REG32_WRITE(LEVW, 0xC0000000)

 

Thats what i seen in IntelBacklight sources from RehabMan...

 

Cheers :-)

No problem. Just tell me more, where the RMPC region located? In the IGPU device? ADR=?

Link to comment
Share on other sites

Something like

UINT32 LevelW = 0xC0000000;
    Status = PciIo->Mem.Write(
                              PciIo,
                              EfiPciIoWidthUint32,
                              0,
                              0xc8250,
                              1,
                              &LevelW
                              );

in the Settings.c/SetDevice/

Conditionally if set in config.

May be evening I can do this.

  • Like 1
Link to comment
Share on other sites

Something like

UINT32 LevelW = 0xC0000000;
    Status = PciIo->Mem.Write(
                              PciIo,
                              EfiPciIoWidthUint32,
                              0,
                              0xc8250,
                              1,
                              &LevelW
                              );

in the Settings.c/SetDevice/

Conditionally if set in config.

May be evening I can do this.

 

The 0xc850 is an offset from the BAR1 address in PCI_config (at offset 16). Not sure if the code you propose accounts for that...

 

Relevant snippets from IntelBaclight:

    m_provider = OSDynamicCast(IOPCIDevice, provider);
..
    m_baseMap = m_provider->mapDeviceMemoryWithRegister(kIOPCIConfigBaseAddress0);  //kIOPCIConfigBaseAddress0 is 16
..
    m_baseAddr = reinterpret_cast<volatile void *>(m_baseMap->getVirtualAddress());
...
#define REG32_WRITE(offset,value)   ((*(volatile UInt32*)((UInt8*)m_baseAddr+(offset))) = (value))
#define LEVW 0xc8250
REG32_WRITE(LEVW, m_config->m_levwInit);  // m_levwInit is 0xC0000000
  • Like 1
Link to comment
Share on other sites

I think Mem.Write operates with kIOPCIConfigBaseAddress0. Will be checked.

 

EDITED.

For example

//
// PCI Configuration Registers
//
#define XHC_BAR_INDEX               0x00

#define XHC_PCI_BAR_OFFSET          0x10       // Memory Bar Register Offset
#define XHC_PCI_BAR_MASK            0xFFFF     // Memory Base Address Mask

So index=0 corresponds to offset 0x10 == 16

  • Like 1
Link to comment
Share on other sites

@Slice a question regarding that part of code:

Prop = GetProperty (DictPointer, "Image");
  if (Prop != NULL) {
    if (Entry->ImagePath) {
      FreePool (Entry->ImagePath);
      Entry->ImagePath = NULL;
    }

    if (Entry->Image) {
      egFreeImage (Entry->Image);
      Entry->Image     = NULL;
    }

    if (Prop->type == kTagTypeString) {
      Entry->ImagePath = PoolPrint (L"%a", Prop->string);
    }
  } else {
    Prop = GetProperty (DictPointer, "ImageData");
    if (Prop != NULL) {
      if (Entry->Image) {
        egFreeImage (Entry->Image);
        Entry->Image     = NULL;
      }
      if (Entry->ImagePath) {
        FreePool (Entry->ImagePath);
        Entry->ImagePath = NULL;
      }
      if (Prop->type == kTagTypeString) {
        UINT32 len       = (UINT32)(AsciiStrLen (Prop->string) >> 1);
        if (len > 0) {
          UINT8 *data    = (UINT8 *)AllocateZeroPool (len);
          if (data) {
            Entry->Image = egDecodeImage (data, hex2bin (Prop->string, data, len), NULL, TRUE);
          }
        }
      } else if (Prop->type == kTagTypeData) {
        Entry->Image     = egDecodeImage (Prop->data, Prop->dataLen, NULL, TRUE);
      }
    }
  }

Image or ImageData (also for DriveImage or DriveImageData), the path to a image seem preferred  istead of reading "data" also if available.

If "Image" key is found and is a string that represent a path "ImageData" is skipped.

BTW if "ImageData" key is type data, and no "image" key, then data is loaded, or if is a string a path to a image is loaded (or accept hex values in a string tag?), is correct? 

What's the purpose to have both?

 

I'm doing something, I need a clarification, thanks

Link to comment
Share on other sites

"Image" is a file name, <string>.

"ImageData" is a contents of the file, <data>

 

 

post-674334-0-88198300-1445611658_thumb.png

It's ok? :)

 

EDIT

 

Image is a file name or a path in the filesystem?

 

<key>Image</key>

<string>ImagePath</string>

 

is a path

Edited by Micky1979
Link to comment
Share on other sites

i am being dumb... spent the entire day getting El Capitan to work on my mothers hackintosh but for some reason probably through fatigue i can get clover to boot the desired Hard Drive automatically....

 

<key>Boot</key>

<dict>

<key>Arguments</key>

<string>dart=0</string>

<key>Debug</key>

<false/>

<key>DefaultLoader</key>

<string>clov</string>

<key>DefaultVolume</key>

<string>33A0AFB2-2C88-4BED-AC1E-662EEAE51B91</string>

<key>Legacy</key>

<string>PBR</string>

<key>Secure</key>

<false/>

<key>Timeout</key>

<integer>5</integer>

<key>XMPDetection</key>

<false/>

</dict>

 

can someone help me only thing left to do and i am close to 12 hours at this... 

Link to comment
Share on other sites

i am being dumb... spent the entire day getting El Capitan to work on my mothers hackintosh but for some reason probably through fatigue i can get clover to boot the desired Hard Drive automatically....

 

Boot

Arguments

dart=0

Debug

DefaultLoader

clov

DefaultVolume

33A0AFB2-2C88-4BED-AC1E-662EEAE51B91

Legacy

PBR

Secure

Timeout

5

XMPDetection

 

can someone help me only thing left to do and i am close to 12 hours at this... 

The answer

<key>DefaultLoader</key>
<string>boot.efi</string>

You set too many keys that you don't know. Don't use CC! 

You have to set only those keys that you know.

  • Like 1
Link to comment
Share on other sites

The answer

<key>DefaultLoader</key>
<string>boot.efi</string>

You set too many keys that you don't know. Don't use CC! 

You have to set only those keys that you know.

 

 

thanks and yes it is my first time with clover configurator... but also copying bits from my z87 deluxe config... 

 

will keep reading... thanks it worked... 

Link to comment
Share on other sites

I think Mem.Write operates with kIOPCIConfigBaseAddress0. Will be checked.

 

EDITED.

For example

//
// PCI Configuration Registers
//
#define XHC_BAR_INDEX               0x00

#define XHC_PCI_BAR_OFFSET          0x10       // Memory Bar Register Offset
#define XHC_PCI_BAR_MASK            0xFFFF     // Memory Base Address Mask

So index=0 corresponds to offset 0x10 == 16

 

The 0xc850 is an offset from the BAR1 address in PCI_config (at offset 16). Not sure if the code you propose accounts for that...

 

Relevant snippets from IntelBaclight:

    m_provider = OSDynamicCast(IOPCIDevice, provider);
..
    m_baseMap = m_provider->mapDeviceMemoryWithRegister(kIOPCIConfigBaseAddress0);  //kIOPCIConfigBaseAddress0 is 16
..
    m_baseAddr = reinterpret_cast<volatile void *>(m_baseMap->getVirtualAddress());
...
#define REG32_WRITE(offset,value)   ((*(volatile UInt32*)((UInt8*)m_baseAddr+(offset))) = (value))
#define LEVW 0xc8250
REG32_WRITE(LEVW, m_config->m_levwInit);  // m_levwInit is 0xC0000000

 

 

Thanks to you both!

 

Checked out Clover v3301, and its working perfect :-)

Awesome :-)

 

Theoretically ACPI Backlight should work with this patch now :-)

But will never use it, sine intelbacklight is far better :-)

 

Thanks :-)

 

Cheers :-)

 

PS: if german translations are needed / russian translations, i can help :-)

 

Cheers :-)

Link to comment
Share on other sites

×
×
  • Create New...