Jump to content

Different solutions


Andy Vandijck
 Share

925 posts in this topic

Recommended Posts

Can I use this to overcome the pixel clock limit.  I was reading someone said that there 144hz monitor at 1440p was being used with a Mac (ASUS PG278Q) and the newer drivers where allowing them to set 120hz in OSX with 1440p.  I currently have a monitor that can do 120hz @ 1440p in windows.  I'm wondering if I inject that EDID from the Asus monitor, if it will allow me to overcome the current pixel clock limit.  Right now I can only get switchresX to do 82hz at 1440p.

 

How is your monitor connected? DP or Duallik-DVI ?

 

 

@Andy

Hi, ive tested now GTF, calculated everything but it doesn't work :-( 

 

Seems like OS X supports HiDPI in Settings Panel only with 16:10 Displays but not with 16:9...

So i have to leave with RetinaDisplayMenu...

 

Dunno where i need to modify files in OS X to add support for my screen...

Cheers :-)

Link to comment
Share on other sites

Hi Andy,

 

Probably a silly question but can this be run on a intel i7 based mac? if not what needs to be changed to enable it to run?

 

Thanks for the help and sorry if its a dumb Question but I've been playing around with it and havent been able to get it to run as im on a i7 mac and keep getting this error:

 

d: warning: ignoring file Makefile, file was built for unsupported file format ( 0x43 0x43 0x3D 0x67 0x63 0x63 0x0A 0x43 0x46 0x4C 0x41 0x47 0x53 0x3D 0x2D 0x61 ) which is not the architecture being linked (x86_64): Makefile

Undefined symbols for architecture x86_64:

  "_main", referenced from:

     implicit entry/start for main executable

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

Link to comment
Share on other sites

How is your monitor connected? DP or Duallik-DVI ?

 

 

@Andy

Hi, ive tested now GTF, calculated everything but it doesn't work :-( 

 

Seems like OS X supports HiDPI in Settings Panel only with 16:10 Displays but not with 16:9...

So i have to leave with RetinaDisplayMenu...

 

Dunno where i need to modify files in OS X to add support for my screen...

Cheers :-)

It's a QNIX only has DL-DVI

Link to comment
Share on other sites

Ok.

After I obviously hurt some feelings of some developers (see https://pikeralpha.wordpress.com/2014/09/26/lzvn-take-ii/), here is a modified version of the routine, with 1. no copyright at all, and 2. mention of the work of Pike and Andy.

 

 

and one more thing:

 1. I don't claim ANY SINGLE COPYRIGHT on this code

 2. I converted the code in C in ~5-6 hours during a lazy Sunday where I wanted to experiment a bit

 3. I found out that my conversion _seems to work_, therefore, I published it here, and sent it to ErmaC for integrating in Chameleon too.

 

If I hurt some feelings of you guys, my apologies.


Great job!
Is it possible for you to create a diff against the source please.
Thanks

 

The routine itself is the exact same code that has been integrated in the latest Chameleon release.

The only other modification is in the boot2/drivers.c file, where the function is called with its correct parameters (this too simple to be published here :-p )

lzvn.c.zip

Link to comment
Share on other sites

Hi Guys, I want to thanks you all, Pike, Andy and MinusZwei.

In any case this is now in Chameleon...and this is cool!

No????

 

Micky

 

EDIT

I think I've figured out who is the Developper who did import lzvn decode on Pacifist.app ... but I do not tell to anyone ;)

(looks for only one "like this" for this) 

  • Like 1
Link to comment
Share on other sites

Excellent work guys! The both of you, Andy and MinusZwei (see PM).

 

Note: What I did was to stand up for the work done by Andy and to publish a warning about putting copyrights in files that are not yours. That's all ;)

 

Next time I will change my Xcode settings to not put _any_ copyright at all...

...or write a small script that removes any single comment.

 

(Real programmers can understand source code without the need for comments, or? ;-) )

Link to comment
Share on other sites

Next time I will change my Xcode settings to not put _any_ copyright at all...

...or write a small script that removes any single comment.

 

(Real programmers can understand source code without the need for comments, or? ;-) )

true but they will know us for a long time now...

Chameleon mod and build: not hard...

Chameleon WORKING build with latest Xcode (under Mavericks no less): a real pain, no success...

I've uploaded the patch (thus enabling after apply to almost any Chameleon I think full boot of both LZSS and LZVN compressed kernel caches.

But my state if the art Xcide tools (very newest) with only bloody clang available as compiler: some I can build, patch is OK and pretty universal for Chameleon after more changes.

However: when I try to boot a Chameleon built with latest Apple tools (tried Chimera, only one that actually compiled with clang) after legacy MBR then PBR, then direct reset...

 

 * Working latest diff patch attached, with required code changes, seems to everywhere be in drivers.c in i386/boot2 with adding of function definition in boot.h, also adding the required lzvndec.o definition in the Makefile under the same folder... patch should do all this *

Chimera_Chameleon_LZVN.diff.zip

Link to comment
Share on other sites

i don't think that its possible, you will get artifacts... what is the benefit of 120z or 144hz in OS X?

 

There are no 3D games or support...

 

i don't think that its possible, you will get artifacts... what is the benefit of 120z or 144hz in OS X?

 

There are no 3D games or support...

 

Smother animations and scrolling in browsers, even 82hz is much better than 60hz.

Link to comment
Share on other sites

Hey Guys, what about a lzvn compression tool? can be built by you all? ...we need this too ^_^

 

Micky

It's planned.

From the beginning I planned once we got the C code for decompression working (and thanks to MinusZwei for great job of C conversion) we got this I planned to look how the compression code works.

I allready looked in on the functioning of both routines and you know what is the funny part?

It seems to be the same as the LZSS compress and decompress functions used by Apple (for reference, look in kext_tools sources of Apple.

Meaning compression actually looks like this:

int lzvn_decompress(u_int8_t *dst, u_int32_t dstlen, u_int8_t *src, u_int32_t srclen);

Studying the assembly code of what seems to be the compression routine I saw that the compression code adds to EAX/RAX not only the source pointer address but also the total size to this register.

Meaning:

This works thus also analog to the LZSS compress function...

After some thinking I fount out that; total_compressed_lzvn_size = (retval - dst).

meaning that our "return" register EAX/RAX gets at some point the address of the destination pointer and is increased with the bytes moved out in dst.

If all ok, the eventual return value thus does contain the end of the data pointer address...

Thus compressed size = ...

LZVN newly compressed size should probably be determined like this:

// GAS syntax, System V calling convention in example...

//- ASM - 1 -
_calc_new_compressed size:
push %r8      // Store away old r8 value
mov %rsi, %r8 // r8 = return value of compression algo
dec %rdi, %r8 // r8 = r8 - dst
mov %r8, %rax // return value = r8
pop %r8       // Restore back old r8 value
ret           // Done, return from call
//+ ASM + 1 +

In this case thus that means that for determining the newly compressed total output size is actually this:
int calc_new_compressed_size(u_int8¨_t *dst, u_int8_t *dstend)
{
    int retval = (int)(dstend - dst); // Calculate size begin on end and begin pointers

    return retval;
} 

 Meaning thus that the LZVN compression code works linke the LZSS compression code qua function:

u_int8_t *lzvn_compress(u_int8_t *dst, u_int32_t dstlen, u_int8_t *src, u_int32_t srclen);

I will do more tests with this compression function and attempt to use it (hopefully with success)...

I am confident we can now get the full set...

 

Once I have succesfully duplicated and used the compression code  finally I hope MinusZwei will use his great ASM->C magic to make our LZVN compression and decompression library complete...

  • Like 2
Link to comment
Share on other sites

It's planned.

.....

Meaning thus that the LZVN compression code works linke the LZSS compression code qua function:

u_int8_t *lzvn_compress(u_int8_t *dst, u_int32_t dstlen, u_int8_t *src, u_int32_t srclen);

I will do more tests with this compression function and attempt to use it (hopefully with success)...

I am confident we can now get the full set...

 

Once I have succesfully duplicated and used the compression code  finally I hope MinusZwei will use his great ASM->C magic to make our LZVN compression and decompression library complete...

Ok, from the top of my superb ability I have to say one thing: 

I did not understand anything, but it seems cool!  :lol:

:hysterical: 

 

 
Good work guys  :)
Link to comment
Share on other sites

Ok, from the top of my superb ability I have to say one thing: 

I did not understand anything, but it seems cool!  :lol:

 

:hysterical: 

 

 

Good work guys  :)

They are going to add a compression function so that you can compress and decompress LZVN files. Edited by ErmaC
edited
Link to comment
Share on other sites

I've extracted the LZVN compression code from kextcache.

Needs study and work for truly determining the calling types and orders used (nonstandard and nonconform, definitely not System V calling convention, ...)

 

I could use some people taking a peek... (MinusZwei?)

 

It consists of 3 functions...

The main call to encode that actually moves around registers and then does the actual call to the next function ... the "real" lzvn compression routine...

 

The last one seems to return (in 32-bit no less) a certain size in it return value, included also...

 

I also included a kernel cache maker tool for recompressing a decompressed kernel cache (source only, work in progress).

 

It works just fine now and can allready with "./test -lzss infile outfile" specified make an LZSS compressed kernelcache (which works fine).

 

I have also updated majorly the sources (and corrected the mistakes of decompkernelcache).

 

I even took the time to implement an inline assembly function for OSSwapInt32 for MSVC (X86 only, thx MS...)

 

Post of the new version of decompkernelcache when all versions are built.

It should now also build without a doubt on Linux and so... ;)

Test_LZVN_Compress_incomplete.zip

  • Like 3
Link to comment
Share on other sites

I ported and updated the secure boot tools from Linux.

This means we have tools to make signature lists, sign the signature lists, sign EFI files, ...

I updated also most tools (for example the signature list signer in order to be able to sign multi-signature databases) to work optimal and properly in OS X.

Recently I updated the sources for libuuid (1.0.3) and openssl (1.0.1i) so that it builds against the latest versions.

I built 32 and 64 bit versions.

Also included is my bioskeydump tool to dump PK, KEK, DB and DBX files and also their signature if they are signed.

Everything is compiled to run very fast (-O3).

Source is included.

Built results and Clovers signing certificate are included under Build.

 

Enjoy :D

 

@Slice: You might want to include these in Clover to sign the EFI files in the CloverPackage dir, I also included a recursive script and this can be slightly adapted to run sbsign from another directory.

This cloversign.sh script can sign any file you feed to it directly (even multiple files).

 

EDIT: New version V3 for Yosemite built with Apple optimisations.

ZLIB 1.2.8 58 with apple extensions, libuuid-1.0.3 with Xcode build project, OpenSSL 1.0.1j 52 with apple extensions and GMP 6.0.0 are used as renewed libraries in the installer.

The uuid library now has an Xcode project and is built with full optimisations on same as the ZLIB and OpenSSL parts.

Package build script is included in the Makefile under src/pkg.

One make installer command in this folder will generate and installer package automatically but you would have to edit the Makefile for changing the installer package signing identity.

Installer package included with Apple dev cert signed binaries and package.

All works optimal and fast, build flags are -g0 -arch x86_64 -Ofast which means no debugging, 64-bit intel and fastest possible code.

Enjoy this enormously fast release. :D

 

EDIT2:

Added a github repo.

https://github.com/andyvand/sbsigntool_osx

sbsigntool-0.6-Clover_R2.zip

sbsigntool-0.6-R3-installer.zip

sbsigntool-0.6-Clover_R3.zip

  • Like 9
Link to comment
Share on other sites

awesome, i have no words :-)


I have PK, KEK, DB and DBX, Dumped from my Laptop, how do i sign Clover? sbsign somehow doesn't work for me, but maybe im doing something wrong, so thats why i ask you for an example...

 

I can update my PK, KEK, DB, and DBX in the laptop too, directly in the bios from a file... if that helps...

Link to comment
Share on other sites

awesome, i have no words :-)

I have PK, KEK, DB and DBX, Dumped from my Laptop, how do i sign Clover? sbsign somehow doesn't work for me, but maybe im doing something wrong, so thats why i ask you for an example...

 

I can update my PK, KEK, DB, and DBX in the laptop too, directly in the bios from a file... if that helps...

sbsign is used to sign .efi files.

You can sign them using:

sbsign --key /path/to/something.rsa --cert /path/to/something.pem --output new_efi_file.efi old_efi_file.efi.

 

For appending Clover's certificate's to your BIOS keys, look in the package.

I included my custom PK, KEK, DB and DBX files and also the Clover-key.rsa and Clover-cert.pem files you need to sign the binaries.

You can just use my bioskeydump tools to look at the contents.

sbsiglist can make a new entry file (.siglist) containing a certificate.

You can then just append that to your database by concatenating it in the database.

NOTE: The type of certificate needed to make a signature list need to be in .der format.

My KEK contains Clover's exchange certificate, my DB contains Clover's certificate (with what it is signed) and PK is a self-signed Clover platform key.

These you can update thus in the BIOS.

PK: No mods, just use mine

KEK: Append Clover exchange certificate

DB: Append Clover signing certificate

Then use your BIOS menu to install these keys, after signing Clover and boot.efi of Apple you should have secure boot...

NOTE2: In order to be able to edit boot.efi in /System/Library/CoreServices you need to first unlock it using Terminal...

sudo chflags nouchg /System/Library/CoreServices/boot.efi

Should do the trick nicely (if you look then in the Finder, the lock item will be gone...)

Have fun :D

  • Like 1
Link to comment
Share on other sites

Where is the DBX File? :-)

Not included.

I have no modules to block...

DBX = Unauthorized Database and is used for preventing certain drivers (signed with the certs included in the DBX) from loading.

Link to comment
Share on other sites

 Share

×
×
  • Create New...