Jump to content

Clover General discussion


ErmaC
29,866 posts in this topic

Recommended Posts

I say we try something different, protect reserved regions differently. Because macOS does not make a difference between runtime and non-runtime reserved, it only maps the runtime reserved as the same as runtime data. But I would have to think that there is a reason those reserved regions exist and according to the spec you are not supposed to use the memory regardless of the runtime flag. So maybe we should try protected runtime reserved as runtime code and non runtime reserved as runtime data?

 

vit, that's only half the range when slide >= 128 for non SB and IB. What about 0x200000 to 0xFE00000? Also, this is a bad idea what if that's where the runtime was just protected? Don't want to wipe that.

 

EDIT: Oops left part of sentence out, lol.

I suppose you miscalculated some stuff. I did implement memory reservation code for IGPU, but the only thing it brought were more frequent boot failures from what I can tell.

You may play with it by setting APTIOFIX_PROTECT_IGPU_SANDY_IVY_RESERVED_MEMORY to 1.

  • Like 1
Link to comment
Share on other sites

Correct me if I am wrong but OsxFatBinaryDrv-64.efi was a Mandatory Drivers not visible since very short time

and now visible and selectable. This has never and to mention and why? No description about the Drivers in the Packages ?

Sorry for my ignorance

Thanks

This are the mandatory drivers (without FV support)

post-221558-0-09155100-1515860685_thumb.png

  • Like 1
Link to comment
Share on other sites

Correct me if I am wrong but OsxFatBinaryDrv-64.efi was a Mandatory Drivers not visible since very short time

and now visible and selectable. This has never and to mention and why? No description about the Drivers in the Packages ?

Sorry for my ignorance

Thanks

It is not a mandatory driver since 10.9.

It is the driver to support FAT Binary Boot.efi. The last one was 10.8.1 AFAIK.

Since 10.9 boot.efi is just 64bit driver.

  • Like 1
Link to comment
Share on other sites

It is not a mandatory driver since 10.9.

It is the driver to support FAT Binary Boot.efi. The last one was 10.8.1 AFAIK.

Since 10.9 boot.efi is just 64bit driver.

This Divers is not Visible in Your today  latest available  source Forge Packages ➤ R4369 since for Years

and is installed By Default Mandatory for about  5 years

This Drivers is Installed if you choose UEFI Install

 

 

 

captu238.png

 

captu239.png

 

 

 

 

 

------------------------------------------------------------------------------------

 

EDIT ***

And now with the latest commit I compile the source and create the Package and now Today the Drivers is not Mandatory

Is selectable in the Package.

 

This is my question Why for long time is a mandatory Drivers installed by Default and Today its not mandatory ?

 

 

 

 

captu240.png

 

 

 

 

 

 

 

Link to comment
Share on other sites

Hey,

 
I am trying to find our why I need VoodooTSCSycn on my x299 system.
 
I am comparing my published efi platform data to one from a a real iMacPro. The obvious differences are (other keys are removed for clarity):
 
iMacPro
    | +-o platform  <class IOService, id 0x100000113, !registered, !matched, active, busy 0, retain 7>
    |     {
    |       "board-rev" = <09>
    |       "InitialTSC" = <26486eee7a2a0000>
    |       "apple-coprocessor-version" = <00000200>
    |       "FSBFrequency" = <00105e5f00000000>
    |       "board-id" = <"Mac-7BA5B2D9E42DDD94">
    |     }
 
My x299 hack
    | +-o platform  <class IOService, id 0x100000113, !registered, !matched, active, busy 0, retain 9>
    |     {
    |       "CPUFrequency" = <40e6a2d600000000>
    |       "FSBFrequency" = <6717f60500000000>
    |       "InitialTSC" = <984a9bd600000000>
    |     }
 
So iMacPro has a board-rev and board-id property, but I don't think that matters here. 
 
More interestingly, there is no CPUFrequency on the real mac, and that key is not referenced anywhere in the kernel or boot.efi. So while this is a difference, it probably does not matter (i can boot without one).
 
The FSBFrequency on the iMacPro is 1600Mhz, like if it was multiplied by the logical core count(16*100Mhz). In the kernel, FSBFrquency is not used for skylake cpu family, but there is a reference in boot.efi, so it might matter.
 
And the most interesting, the InitialTSC value is 3600501400Hz for my system, and that is probably correct. However, this field on the iMacPro looks like it should not contain the TSC frequency, but the intital tsc tick value, something like you can read by rdtsc64(). This value is read by the kernel to  tsc_at_boot and then used like this in one point: 
if (tsc_rebase_abs_time == 0) tsc_rebase_abs_time = _rtc_tsc_to_nanoseconds(rdtsc64() - tsc_at_boot, rntp);
 
Which makes it clear that this value should indeed be a tick number, not a frequency value.
 
At another point, tsc_at_boot is stored in sysctl like this:
SYSCTL_QUAD(_machdep_tsc, OID_AUTO, at_boot, CTLFLAG_RD|CTLFLAG_LOCKED, &tsc_at_boot, "");
 
That variable on my system after boot is:
 machdep.tsc.at_boot: 0
 
Which is interesting, as it is set on efi/platform, but somehow ends up being 0.
 
So my questions are:
  • Why is the FSBFrequency 1600Mhz on the iMacPro? Does it even matter?
  • Is the InitialTSC value calculated by clover properly? The use of this value by the kernel indicates it is not.
Link to comment
Share on other sites

Some "bugs" live long time. We had to make this driver to be not mandatory since 5 years ago.

ok thanks Slice , understand me well I was just surprised to see him appear in the list of UEFI Drivers in my last compilation.

Link to comment
Share on other sites

Fastest way to include the new AptioFix into edk2 dir to work with Clover / other projects:

cd edk2
svn checkout https://github.com/vit9696/AptioFix/trunk/AptioFixPkg
#update
svn up

Include to dsc:

[Components]
  ...
  AptioFixPkg/Platform/AptioInputFix/AptioInputFix.inf
  AptioFixPkg/Platform/AptioMemoryFix/AptioMemoryFix.inf

* AptioMemoryFix need BaseRngLib
* AptioInputFix need some of external CupertinoNet libs

 

EDIT1: Or just call build AptioFixPkg.dsc from e/cbuild script LOL

EDIT2: More easier now

git clone https://github.com/vit9696/AptioFixPkg
Edited by cecekpawon
  • Like 6
Link to comment
Share on other sites

Fastest way to include the new AptioFix into edk2 dir to work with Clover / other projects:

cd edk2
svn checkout https://github.com/vit9696/AptioFix/trunk/AptioFixPkg
#update
svn up

Include to dsc:

[Components]
  ...
  AptioFixPkg/Platform/AptioInputFix/AptioInputFix.inf
  AptioFixPkg/Platform/AptioMemoryFix/AptioMemoryFix.inf

EDIT: Or just call build AptioFixPkg.dsc from e/cbuild script LOL

 

* AptioMemoryFix need BaseRngLib

* AptioInputFix need some of external CupertinoNet libs

No need to stuff vit9696 packages to edk2/ or clover/. It can be anywhere -- environment variable PACKAGES_PATH invented exactly for that. See edk2 docs.

  • Like 2
Link to comment
Share on other sites

More problem.

 

I just saw vit9696 have update his AptioMemFix and add IGPU mem fix.

 

I think this maybe good for HD3000 who face glitches.

 

But I use LegacyClover with HD3000 also have glitches. How can I do?

 

Can I add AptioMemFix to Drivers64 with LegacyClover?

 

 

从我的 iPhone 发送,使用 Tapatalk

Link to comment
Share on other sites

No need to stuff vit9696 packages to edk2/ or clover/. It can be anywhere -- environment variable PACKAGES_PATH invented exactly for that. See edk2 docs.

 

Poor me, DF told me about Multiple_Workspace while ago and Im not following his suggest until you link me to the right doc. Thanks nms! And you DF!

  • Like 1
Link to comment
Share on other sites

 

I got a new problem and I had never saw.

 

 

从我的 iPhone 发送,使用 Tapatalk

Try to do anything to narrow the problem:

- reduce a number of injected kexts

- reduce number of patches

- change AptioFix ion

- build Clover with Debug messages

and so on

  
	if (drvPtr == 0 || infoPtr == 0 || extraPtr == 0 || drvPtr > infoPtr || drvPtr > extraPtr || infoPtr > extraPtr) {
		Print(L"\nInvalid device tree for kext injection\n");
    gBS->Stall(5000000);
		return EFI_INVALID_PARAMETER;
	}
  

  • Like 1
Link to comment
Share on other sites

Try to do anything to narrow the problem:

- reduce a number of injected kexts

- reduce number of patches

- change AptioFix ion

- build Clover with Debug messages

and so on

  
	if (drvPtr == 0 || infoPtr == 0 || extraPtr == 0 || drvPtr > infoPtr || drvPtr > extraPtr || infoPtr > extraPtr) {
		Print(L"\nInvalid device tree for kext injection\n");
    gBS->Stall(5000000);
		return EFI_INVALID_PARAMETER;
	}
  

This problem happened after Clover_r4369 with new osxaptiofix2drv with nvram support.

 

But this laptop have nvram support before 4369 and have no problem but after 4369 it can’t boot into macOS and I replace the vit9696’s AptioFix and still show this.

 

Number of kexts and number of patches I have tested yet and have no related with this problem.

 

Tomorrow I will test Clover 4359 with it osxaptiofix2frv and test if have this problem again.

 

 

从我的 iPhone 发送,使用 Tapatalk

Link to comment
Share on other sites

I suppose you miscalculated some stuff. I did implement memory reservation code for IGPU, but the only thing it brought were more frequent boot failures from what I can tell.

You may play with it by setting APTIOFIX_PROTECT_IGPU_SANDY_IVY_RESERVED_MEMORY to 1.

 

Wow that sounds nice. Is that IGPU fix fixing the usage of IGPU with a full connector next to a dedicated card? Because that is hard crashing all the time in FCPX. 

Link to comment
Share on other sites

@vit9696 @Slice

 

Hi guys, 

 

I mentioned both of you because I don't have clue what is the problem: the kext or the bootloader. I have AudioALC with Layout-ID 11. Let's that I select Internal Speakers from System Preferences. Everything works no problem but when I reboot it switches back to headphones.

 

So everytime I startup the machine I need to manually select Internel Speakers, why doesn't remeber what was used last time ?

 

NVRAM is working as it should.

 

Logs and stuff:

 

https://drive.google.com/open?id=1sAcqNZCI-luSzkCkikR39UO0HC4LVDe_

 

Thanks a lot !

Link to comment
Share on other sites

@vit9696 @Slice

 

Hi guys, 

 

I mentioned both of you because I don't have clue what is the problem: the kext or the bootloader. I have AudioALC with Layout-ID 11. Let's that I select Internal Speakers from System Preferences. Everything works no problem but when I reboot it switches back to headphones.

 

So everytime I startup the machine I need to manually select Internel Speakers, why doesn't remeber what was used last time ?

 

NVRAM is working as it should.

 

Logs and stuff:

 

https://drive.google.com/open?id=1sAcqNZCI-luSzkCkikR39UO0HC4LVDe_

 

Thanks a lot !

 

Try another layout-id. 

Link to comment
Share on other sites

I suppose you miscalculated some stuff. I did implement memory reservation code for IGPU, but the only thing it brought were more frequent boot failures from what I can tell.

You may play with it by setting APTIOFIX_PROTECT_IGPU_SANDY_IVY_RESERVED_MEMORY to 1.

 

Your code does not do what I suggested. Please re-read what I said about protecting NON runtime reserved regions, you're only protecting the runtime reserved regions...

Link to comment
Share on other sites

Your code does not do what I suggested. Please re-read what I said about protecting NON runtime reserved regions, you're only protecting the runtime reserved regions...

Do Windows or Linux do that? Can't believe it's THAT screwed, but well, worth trying maybe
Link to comment
Share on other sites

Do Windows or Linux do that? Can't believe it's THAT screwed, but well, worth trying maybe

 

Memory marked as reserved cannot be used by the OS. So if the memory range is not preserved by the kernel as something else, eventually it will be assigned to something.

Link to comment
Share on other sites

Try another layout-id. 

 

That layout-id works the best. Another layout ID has useless stuff like digital audio a lots of line ins wich I don't have.

 

So..How can I patch the DSDT or get the pin configuration and implement it by myself in the AppleALC kext ?

Link to comment
Share on other sites

That layout-id works the best. Another layout ID has useless stuff like digital audio a lots of line ins wich I don't have.

 

So..How can I patch the DSDT or get the pin configuration and implement it by myself in the AppleALC kext ?

 

Ask @insanelydeepak. He is author of layout-id 11. As i know this layout is ONLY for AC97 front panel without autodetect. That's why it switches back to headphones after reboot. Use layout-id 5. It have only Digital Audio and Internal Speakers/Headphones (with autodetect) 

Link to comment
Share on other sites

Ask @insanelydeepak. He is author of layout-id 11. As i know this layout is ONLY for AC97 front panel without autodetect. That's why it switches back to headphones after reboot. Use layout-id 5. It have only Digital Audio and Internal Speakers/Headphones (with autodetect) 

 

Thanks a lot !

Link to comment
Share on other sites

×
×
  • Create New...