Jump to content

Clover Change Explanations

clover bootloader changelog

  • Please log in to reply
54 replies to this topic

#1
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 5,824 posts
  • Gender:Male
  • Location:Moscow

*
POPULAR

Here I propose all developer will publish their explanation of changes made.

 

Only developers allowed to post here.

 

Also there will be no questions and discussion. There is another thread "Clover general discussions" here.

 

Previous change explanations up to revision 3088 is attached.

Attached File  ChangesHistory.rtfd.zip   5.21MB   352 downloads

 

 

Next revisions up to current 3174 contains:

1. Bugs eliminations.

2. Speed improvements.

3. Support for new hardware: DDR4, Haswell 5th, AMD Radeon, Nvidia, Intel Graphics.

4. Approved kernel and kext patches.

Nothing new for users.



#2
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 5,824 posts
  • Gender:Male
  • Location:Moscow

Rev 3193

 

Bugs elimination.

SATA driver improvements.



#3
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 5,824 posts
  • Gender:Male
  • Location:Moscow

Rev 3208 by Apianti

Fix enable secure boot, should work now.


Rev 3210-3214

Implemented Proportional font width.

It must be set in every theme.plist

<dict>
	<key>Author</key>
	<string>Slice</string>
	<key>Description</key>
	<string>Main metallic looking theme</string>
	<key>Theme</key>
	<dict>
		<key>Font</key>
		<dict>
			<key>Proportional</key>
			<true/>
			<key>CharWidth</key>
			<integer>10</integer>
			<key>Path</key>
			<string>BoG_LucidaConsole_10W_NA.png</string>
			<key>Type</key>
			<string>Load</string>
		</dict>

It will be better if CharWidth will be even value to avoid dirty.

The best if CharWidth = FontWidth - 2

 

Compare:

Fixed width

Attached File  Screen Shot 2015-05-29 at 10.06.49.png   219.04KB   52 downloads

Proportional

Attached File  Screen Shot 2015-05-29 at 14.47.28.png   255.78KB   48 downloads

 



#4
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 5,824 posts
  • Gender:Male
  • Location:Moscow

Rev 3222

load specific ROM for nvidia cards, ©ErmaC

 

Implemented a possibility to load ROM with name specific to subvendor_id

It allows to keep a database of different ROMs in one place.

For example

10de_0f00_1458_3544.rom

 

Rev 3222 - 3224.

Implemented NvidiaGeneric names. Idea by ErmaC.

	<key>Graphics</key>
	<dict>
		<key>Inject</key>
		<dict>
			<key>ATI</key>
			<false/>
			<key>Intel</key>
			<false/>
			<key>NVidia</key>
			<true/>
		</dict>
		<key>NvidiaGeneric</key>
		<true/>

If this true then generic name for Videocard will be used. For example instead of

Gigabyte Geforce 7300LE 

I see

NVIDIA Geforce 7300LE

 

 

Rev 3224

Implemented NvidiaSingle

If you have two cards Nvidia and wants to inject only first one :rofl:   then you can set this parameter.

		<key>NvidiaSingle</key>
		<false/>



#5
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 5,824 posts
  • Gender:Male
  • Location:Moscow

Rev 3229 Released.

Added initial support for El Capitan.



#6
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 5,824 posts
  • Gender:Male
  • Location:Moscow

Rev 3237

Repaired menu width with proportional fonts.



#7
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 5,824 posts
  • Gender:Male
  • Location:Moscow

Rev 3250

 

New runtime variables needed for El Capitan and Yosemite.

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

Bit definitions are follow

For CsrActiveConfig

/* Rootless configuration flags */
#define CSR_ALLOW_UNTRUSTED_KEXTS     (1 << 0)
#define CSR_ALLOW_UNRESTRICTED_FS     (1 << 1)
#define CSR_ALLOW_TASK_FOR_PID        (1 << 2)
#define CSR_ALLOW_KERNEL_DEBUGGER     (1 << 3)
#define CSR_ALLOW_APPLE_INTERNAL      (1 << 4)
#define CSR_ALLOW_DESTRUCTIVE_DTRACE	(1 << 5) /* name deprecated */
#define CSR_ALLOW_UNRESTRICTED_DTRACE	(1 << 5)
#define CSR_ALLOW_UNRESTRICTED_NVRAM	(1 << 6)

#define CSR_VALID_FLAGS (CSR_ALLOW_UNTRUSTED_KEXTS | \
                          CSR_ALLOW_UNRESTRICTED_FS | \
                          CSR_ALLOW_TASK_FOR_PID | \
                          CSR_ALLOW_KERNEL_DEBUGGER | \
                          CSR_ALLOW_APPLE_INTERNAL | \
                          CSR_ALLOW_UNRESTRICTED_DTRACE | \
                          CSR_ALLOW_UNRESTRICTED_NVRAM)

For example bit 0 (value 0x01) allows to use unsigned kexts from /Library/Extensions folder.

 

For BooterConfig there are flags

/* Bitfields for boot_args->flags */
#define kBootArgsFlagRebootOnPanic    (1 << 0)
#define kBootArgsFlagHiDPI            (1 << 1)
#define kBootArgsFlagBlack            (1 << 2)
#define kBootArgsFlagCSRActiveConfig	(1 << 3)
#define kBootArgsFlagCSRPendingConfig	(1 << 4)
#define kBootArgsFlagCSRBoot          (1 << 5)
#define kBootArgsFlagBlackBg          (1 << 6)
#define kBootArgsFlagLoginUI          (1 << 7)

This flags is analyzed by boot.efi not by kernel and present in boot_args that read by kernel.

Yosemite kernel has follow usage of this flag

int
csr_get_active_config(csr_config_t *config)
{
	boot_args *args = (boot_args *)PE_state.bootArgs;
	if (args->flags & kBootArgsFlagCSRActiveConfig) {
		*config = args->csrActiveConfig & CSR_VALID_FLAGS;
	} else {
		/* XXX: change to 0 when <rdar://problem/16239698> is in the build */
		*config = CSR_ALLOW_APPLE_INTERNAL;
	}

	return 0;
}

Setting the bit 0x20 is equivalent to kernel flag "rootless=0" (Yosemite kernel)

void
csr_init(void)
{
	boot_args *args = (boot_args *)PE_state.bootArgs;
	if (args->flags & kBootArgsFlagCSRBoot) {
		/* special booter; allow everything */
		csr_allow_all = 1;
	}

	int rootless_boot_arg;
	if (PE_parse_boot_argn("rootless", &rootless_boot_arg, sizeof(rootless_boot_arg))) {
		/* XXX: set csr_allow_all to boot arg value for now
		 * (to be removed by <rdar://problem/16239861>) */
		csr_allow_all = !rootless_boot_arg;
		/* if rootless=1, do not allow everything when CSR_ALLOW_APPLE_INTERNAL is set */
		csr_allow_internal &= !rootless_boot_arg;
	}
}

There is still the question what is changed in El Capitan as we have no the sources.



#8
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 5,824 posts
  • Gender:Male
  • Location:Moscow

Rev 3262

I wish to propose new way to inject device properties.

For backward compatibility old way is still working.

 

New way advanced user will be able to make different injection for two graphics cards even if they are similar. It is not possible for rev <=3261.

As well there is a possibility to inject properties for non-standard device (TVTuner?).

 

Detailed instructions will be in Clover Instructions thread ASAP.

Attached File  Screen Shot 2015-08-24 at 15.42.14.png   83.91KB   54 downloads



#9
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 5,824 posts
  • Gender:Male
  • Location:Moscow

Rev 3264

Compatibility with new EDK2 18475 (and more?).

New compiled legacy boot tested on G41M-ES2H motherboard.

 

Rev 3265

Add slot name into System Profiler for HDMI device on AMD or Nvidia videocards to avoid PCI device error...



#10
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 5,824 posts
  • Gender:Male
  • Location:Moscow

Rev 3266

A task: Mavericks and ElCapitan use different framebuffers so ATIConnectorData must be different.

As well FakeCPUID needed for Mavericks is not needed for ElCapitan.

Users must have an ability to load different config.plist for different systems.

Moreover I may propose different configs for similar systems on different volumes.

Or just two entries with different configs without manual switch settings.

That is.

Now we can write name of config into Custom Entry (without .plist extensions!). Tested on Lion computer.

Attached File  Screen Shot 2015-09-16 at 14.38.50.png   89.46KB   93 downloads

a line Settings=special mean a file special.plist which is the same as config.plist but with other values.

GUI looks like this

Attached File  screenshot12.png   1.21MB   62 downloads

First entry has SubEntries with a possibility to return to common setting from common config.plist.

Attached File  screenshot11.png   1.21MB   65 downloads

 

Choosing common or special setting I can boot same system with two different settings.

In my demo this is different VideoCard names. NvidiaGeneric=true/false

 

In this demo I used file special.plist.

It may be ElCapitan.plist or config-666.plist or any other to your taste.

 

One note, this plist should not contain sections Boot and GUI.



#11
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 5,824 posts
  • Gender:Male
  • Location:Moscow

Rev 3269.

 

I have to make one backward incompatibility with previous versions.

If you had KernelAndKextPatches section inside Custom entries then now you you follow instructions for rev 3266 and move these patches to separate config.

Else it will not work and you will have only common patches.

 

So KernelAndKextPatches section is in config.plist as main section and not in subsection.

 

It is needed as I debugged a crash in it.

PS. It also means nobody used it before ;)



#12
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 5,824 posts
  • Gender:Male
  • Location:Moscow

Rev 3281. Two folders for inject kexts by TheRacerMaster

Explanation in             #8498            



#13
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 5,824 posts
  • Gender:Male
  • Location:Moscow

Rev 3298.

A possibility to Set Intel Backlight             #8717            

	<key>Devices</key>
	<dict>
		<key>SetIntelBacklight</key>
		<true/>



#14
blackosx

blackosx

    InsanelyMacaholic

  • Coders
  • 3,706 posts
  • Gender:Male
  • Location:UK
By default, when Clover scans your partitions for loaders, each volume found is checked for Linux installations. This check takes a short time, but becomes more noticeable with the more volumes you have. And using a theme with larger icons, for example BGM256, takes even longer.

Commit #3325 adds the option for you to disable the scan for Linux installations if you know you don’t have any.

To disable the scan, you can now add Linux=false to the GUI->Scan section of your config.plist.
<key>GUI</key>
<dict>
  <key>Scan</key>
  <dict>
    <key>Linux</key>
    <false/>
  </dict>
</dict>
Legacy booting now loads the GUI 2 seconds faster for me.

#15
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 5,824 posts
  • Gender:Male
  • Location:Moscow

Up to revision 3306 there was internationalizations.

 

Rev 3309

Workaround for core count calculations.

 

Rev 3314

Added file boot1f32 to ISO. It was not here before!

 

Rev 3319

As I successfully created Clang-3.8 from llvm sources I made changes to have a possibility to compile Clover by this new compiler.

Also synchronisation with recent EDK2.

 

Rev 3321

Add an item into Clover menu for instant set *-platform-id  which used as ig-platform-id or snb-platform-id.

 

Rev 3325

Speedup boot by disabling linux scan

		<key>Scan</key>
		<dict>
			<key>Linux</key>
			<false/>

Rev 3326

implement Function Disable

	<key>Devices</key>
	<dict>
		<key>DisableFunctions</key>
		<true/>

For those who knows what is it. RCBA 3418.

 

Rev 3327

check disabled patches, by cecekpawon

If you have many patches in config.plist then you can Enable/Disable then by one click

 

Rev 3328

Same for DSDT patches

			<dict>
				<key>Disable</key>
				<true/>
				<key>Find</key>
				<data>RXh0ZXJuYWw=</data>
				<key>Name</key>
				<string>AppleAHCIPort</string>
				<key>Replace</key>
				<data>SW50ZXJuYWw=</data>
			</dict>

Rev 3329

add switch for string injection by cecekpawon

 

It is added in Clover menu for easy on/off

 

Rev 3330

Don't dump useless OperationRegions

 

Rev 3333

Added support for other Intel CPU.

 

Rev 3334-3336

new GetBiosRegions by Rehabman

 

This resolves some bugs with FixRegion DSDT patch.

 

Rev 3338

Compatibility with recent EDK2, because of changes in Autogen.py build tool.

 

Rev 3348

OsxAptioFixDrv: Align the stack to a 16-byte rather than a 8-byte boundary

patch by Download-Fritz

Assuming resolved some bugs.

 

Rev 3350

Turbo can be disabled

	<key>CPU</key>
	<dict>
		<key>TurboDisable</key>
		<true/>

It can be useful for mobile computers at hot weather.

 

 

Rev 3356

Introduce calculation for ARTFrequency used in ElCapitan and present on Skylake computers.

 

Rev ...-3358

I found many bugs with core count calculation and only in this revision I corrected a reason for this.

It is very old bug, at least 4 years, introduced I didn't remember where and whom.

CPUID_4 can't be used for core count calculations.

 

Rev 3359-3362

Resolve a  SMBIOS patching bug when OEM reused same strings.

 

Rev 3363

I have Clover sources on volume MacHD while work in volume ElCapitan.

This patch permit me to compile Clover from other volume.

 

Rev 3365-3368

Introduce new SMBIOS table type 133 to inject "platform-feature" property into registry. Used by ElCapitan.

	<key>SMBIOS</key>
	<dict>
		<key>PlatformFeature</key>
		<integer>3</integer>

This is integer value that should be same as in real Macs.

 

Rev 3369

Compatibility with Xeon E5 v4


Rev 3372

Don't create empty _DSM method if NoDefault properties set.

patch by cecekpawon

 

Rev 3374

A possibility to not inject ARTFrequency introduced by rev 3356 if calculated value is not good somehow

	<key>CPU</key>
	<dict>
		<key>UseARTFrequency</key>
		<false/>



#16
Zenith432

Zenith432

    InsanelyMac Legend

  • Developers
  • 670 posts
  • Gender:Male

Rev 3471

 

After an investigation of va_args, here's what I found

 

  • The difference between __builtin_va_args and __builtin_ms_va_args is that __builtin_va_args passes va_list by reference (i.e. pointer) from caller to callee when va_list is used as a function parameter.  __builtin_ms_va_args passes va_list by value (which is similar to making an implicit va_copy before passing it.)
  • The C standard allows passing va_list by either value or reference.
  • When va_list is passed by reference, calls to va_arg inside the callee change the caller's va_list.
  • The reason __builtin_va_args was failing with clang builds is due to an error in DevicePathToText.c which passes va_list twice as a parameter without va_copy.
  • I corrected this error, along with other errors in use of va_list I found.
  • As a result, it is now possible to use __builtin_va_args with clang.
  • There is a 2nd issue, which is that __builtin_ms_va_args is intended to allow ms_abi functions to pass their va_list as a parameter when calling sysv_abi functions.  This is not an issue with clang, because clang build uses ms_abi on all functions.  In gcc build, functions declared as EFIAPI are ms_abi - all others are sysv_abi.  So in gcc build, it is necessary to use __builtin_ms_va_args.
  • I set things up so clang build uses __builtin_ms_va_args for Windows64 builds on newer versions known to support these keywords.  On all other clang builds, __builtin_va_args is used.

It is now possible to build Clover with -xcode5 using versions of Xcode prior to 7.3 - as long as DevicePathToText.c is patched from Patches_for_EDK2.

 

Additionally, the problem of GetEfiBootDeviceFromNvram hanging was fixed in rev 3466.  In rev 3470 I added some validation checks to prevent hanging if invalid device paths are stored in nvram.



#17
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 5,824 posts
  • Gender:Male
  • Location:Moscow

Rev 3474 by cecekpawon

Print information line about building Clover options.

 

Rev 3476 

C1E fix for AMD CPU. Noted by Bronya, implemented in OpenSolaris.

 

Several next commits devoted to good compilation with XCODE5 toolchain.

 

Rev 3487 and 3514

Support for DDR4 by Joe van Tunen

 

Rev 3499 and 3518

Fill SMBIOS tables entries with data from MacPro3,1 if not defined by user in the case the model is not known for Clover.

 

Rev 3505

Link Time Optimization can be disabled for xcode5 toolset by a compile-time flag  --no-lto.

It can be needed for older Xcode versions older then 7.3.

It doesn't affect gcc compilation.


Rev 3519 by cecekpawon

            #721            



#18
cecekpawon

cecekpawon

    InsanelyMac Legend

  • Developers
  • 615 posts
  • Gender:Male

*** Rev 3327

 

Added example

 

Spoiler

 

Rev 3372

Originally NoDefaultProperties is to create (which still unknown purposes until now) an empty _DSM on each device injected from Clover. From now, we remove em all & switch this function to "SKIP injecting some default extra/additional properties" by Clover. For example, if user have NoDefaultProperties to TRUE & inject NVIDIA to TRUE, then Clover will SKIP inserting extra "connector-type" into registry. However, you still able to do this by hand with "AddProperties" entries like below:

 

Spoiler

 

Rev 3399

BootDisplay: To fix ugly 2nd stage boot or even black screen before login screen, we add new "BootDisplay" (a shorthand for "@x,AAPL,boot-display") property into config (value range: 0 - [totalports-1]). For years people did this job via D/SSDT / EFI Strings injections (Apple style), but no more. Before, Clover only set this properties to port 0 by default, which may lead problem if your currently active port (connected to display) other than port 0.

VideoPorts: We have now full (NVIDIA, ATI to follow) functionality to parse & set its properties dynamically from amount of display ports by user defined.

Able to inject Intel/Integrated-GPU even its not set to primary in BIOS by using blank FB (find more here).

 

Spoiler

 

Rev 3456

Introduced on 2012 (but seems improperly documented) to set multiple cards fixed properties. Adjust some keys + add more values like: "LoadVBios" & "VideoPorts" for each card (NVIDIA, ATI to follow).

 

Spoiler

 

Rev 3490

More adjustment to batch script (wrote by @apianti, please follow this WIKI for min requirements) to compile Clover under Windows. Tested with VS2012, VS2013 & VS2015 with some additional features:

 

Spoiler

 

Rev 3519

Dynamically to en/disable SSDTs (under ACPI\patched folder) injections via GUI menu (under "Tables dropping ->") / config.plist

 

Spoiler


#19
cecekpawon

cecekpawon

    InsanelyMac Legend

  • Developers
  • 615 posts
  • Gender:Male

Rev 3536

 

Added F1 - Help text in the bottom left corner of GUI. Adjust within theme.plist

<key>Theme</key>
<dict>
  ...
  <key>Components</key>
  <dict>
    <key>Help</key>
    <false/>
    ...
  </dict>
</dict>

Added "System Variables" GUI sub menu. Contain: "BooterConfig" & "CsrActiveConfig".
Set "ExposeSysVariables" to TRUE in Config:SystemParameters to expose more. Current: "MLB", "ROM", "CustomUUID" & "InjectSystemID".

<key>SystemParameters</key>
<dict>
  <key>ExposeSysVariables</key>
  <true/>
  ...
</dict>


#20
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 5,824 posts
  • Gender:Male
  • Location:Moscow

Rev 3537

 

Do you like proportional fonts? Depends on...

Vertical menu looks better with constant width fonts.

Other text with proportional.

So I made questionable change that options menu will switch font to constant width with char width set in Theme.plist.

While Help, About and Boot information will be proportional or no depends on Theme.plist. In this case char width doesn't matter.

		<key>Font</key>
		<dict>
			<key>CharWidth</key>
			<integer>12</integer>
			<key>Path</key>
			<string>Cambria_20pt_Cell_22x25_l-2_ra.png</string>
			<key>Type</key>
			<string>Load</string>
			<key>Proportional</key>
			<true/>
		</dict>







Also tagged with one or more of these keywords: clover, bootloader, changelog


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2016 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy