Jump to content

[80% Solved] Iris Xe iGPU on Tiger Lake successfully loaded ICLLP Frambuffer and VRAM also recognizes 1536MB! + However, some issues.


shl628
747 posts in this topic

Recommended Posts

14 hours ago, Mastachief said:

Compile nblue, added latest hookcase to /L/E

Added sle kexts to S/L/E after breaking system seal including bundles.

Enable the tglframebuffer in nblue info.plist, I nulled the others....20241030_202812.thumb.jpg.02d9035fa7bb47b7d433d920527f9f86.jpg

Same

Link to comment
Share on other sites

hookcase doesnt use lilu and other functions work (like readreg, etc).

 

but you might have solved a random nblue start() error. i've disabled this extra calls that aren't used

image.png.83b2e94d33f296f8198bc7e5a3f19e7a.png

 

Link to comment
Share on other sites

that kp is cause icl code is for ventura. but 
in 
if (kextG11FB.loadIndex == index) {
 
you can try changing PANIC_COND to SYSLOG_COND 
 
this are for testing system icl
 
its a bad idea but might work.
 
you should try iclLE or tglLE - no need patches as theyre from DTK
 
kp on paches should have this log line
"nblue","Failed to route symbols"
when u reboot to mac os
 
gonna test other icl as i was checking tgl production
 
k so sys icl works on ventura but i forgot i'm using an old release. anyway only 1 patch is ative. possible kp on other os x versions are on function calls.
 
iclLE passed the test
 
tglLE production i changed nothing so should be fine. passed test
 
only possible thing to watch is void NBlue::processPatcher(KernelPatcher &patcher)
mem detection might be broken for you or someting else in there
 
your kext setup seems fine
 
as for nblue info.plist
to disable a kext in nlbue just use a empty id on the frame you dont wanna use
fill it with card ids otherwise (only 1 frame can be active)
other ways of disabling might not work
this is disabled
image.png.dd3476edfc62c399e4accba603458f17.png
 
this is enabled
image.png.6b810702a3091c501cc99a20b7fda7be.png
 
as for the kexts installed in /L/E or /S/L/E i set a invalid 0x12348086 so os x dont load them. nblue is ment todo it not os x by itself
Don't you need to change the xxxxx to apple along when adding the PCI id's or replacing the 0x12348086?
Link to comment
Share on other sites

2 hours ago, jalavoui said:

hookcase doesnt use lilu and other functions work (like readreg, etc).

ok, and? these functions are called as soon as the kext gets loaded. what you're trying to do would be the equivalent of escaping from JavaScript Sandbox to hijack the JavaScript Sandbox initialisation function; it's already been called long before you get a chance to actually hijack it.

Link to comment
Share on other sites

visual you misunderstood what i sayd.

 

check this code at tgl framebufer production version - the call is probeportmode() returned from hookcase.

it always crashes after returning from hookcase - kernel panic at 0x0005a40d

i tryed making probeportmode() to return 1 to check with simple value and still crashes

Capturadeecra2024-10-31as22_17_37.png.0655cb6e9f2cf4ae09d6ff3eb724f692.png

 

i look at the code and because of the kp i just patched it to avoid using hookcase()

Capturadeecra2024-10-31as22_23_24.png.76e8e0c85ff68bc1b00ca91577ff14b9.png

so you agree this is not lilu related ?

what else can it be?

 

2nd panic related with probeportmode() also here (also patched to avoid kp)

Capturadeecra2024-10-31as22_42_32.png.19fd6582748a824c3a9758449786d006.png

 

i consider this small bugs but atm they are preventing the driver to load correctly

 

anyway this can be related with this patch in nblue

i just can't get rid of this "validation" hack

image.png.cd37a4798f32998813b05064caebc053.png

 

can you unscramble this part of code ? i need to know what is happening here cause it is related with probeportmode() code

image.thumb.png.4a3cefaf6c50da79e32e99aa0999a293.png

 

icl as a similiat china code that i can't decompile better

image.thumb.png.e99fb5b4286d2883c2b7de755e27b102.png

Edited by jalavoui
Link to comment
Share on other sites

I was talking about __GLOBAL__sub_I_AppleIntelOSInfoList.cpp.

On 10/30/2024 at 9:59 PM, jalavoui said:

 

this is the function that allows changing some setings. seems disabled in production version as lilu patches don't work

image.thumb.png.92170ecefe3e005aa2e582d57baede6f.png

 

image.thumb.png.ea3a51fa8fe3b51bb8351f64888806ff.png

14 hours ago, jalavoui said:

anyway this can be related with this patch in nblue

i just can't get rid of this "validation" hack

image.png.cd37a4798f32998813b05064caebc053.png

The "this" pointer in C++ can't be null. Something else is going wrong here.

Link to comment
Share on other sites

yep that was my idea. i think the value that is passed is wrong

 

looking at a working log from the web there seems tobe some call to agdc to ativate port

 

image.png.bc118bb1d1abb10abd834e7438205719.png

 

that's why i asked you to unscramble some of the code

 

tgl as a ADD ECX,-0x3 while icl driver uses ADD ECX,-0x2 - this might matter

this is a simple issue idk why i'm taking so long to solve it

image.thumb.png.94275cb754f1e9cc5985b203a0a3a3e9.png

 

hmmm dam tgl

image.thumb.png.e045ba7edac4234d3799c08b9b5ed77b.png

 

so goal is this

image.png.1df6995eb80cd3804b0ecfb54e916861.png

Edited by jalavoui
Link to comment
Share on other sites

just splited the code of tgl for debug and production versions. to enable/disable the patches in nblue just use the //PANIC_COND(!LookupPatchPlus

 

x.log.zip

 

so this will enable debug version

Capturadeecr2024-11-01s15_51_08.thumb.png.9c4ac90313ee74b61a3bf4b123b11a9c.pngCapturadeecr2024-11-01s15_51_00.thumb.png.8da2bda7cc07c7308be3029f871ddcea.png

 

otherway around for production version patches

 

prod version seems to have less code maybe cause of isDSCSupported() i.e., DSC displays

Edited by jalavoui
Link to comment
Share on other sites

that was cause of a kp with tgl production version. will check later

 

atm this kp at this address is very strange

image.thumb.png.cb5a92d37fd60ed60b565335008bb6c6.png

 

image.thumb.png.be9f324e239d1d020c24db2877de7690.png

 

i think tgl doesnt like me

 

i'm playing with debug version atm and

IOReturn AppleIntelBaseController::hwSetupDSBMemory()

is fine. gonna test production version also

 

gonna upload hookcase with removed return 0 b4 i forget doing it

 

meanwhile

before any call to register32 this always kp. so i'll just the powerwell patches and ignore probeportmode()

 

 

image.thumb.png.8b0615431b944970e61b3de18d61fdcf.png

Edited by jalavoui
Link to comment
Share on other sites

well if i keep coding like this....

 

image.thumb.png.98c54e8f2d0109be8643e89cf46fcc84.png

 

next crash is before the readreg (highlighted). making the transcoderoffet() return zero won't allow the call to readreg to proceed

 

image.thumb.png.5ca4512a202250483103ca4f7db0f7d5.png

image.png

 

from here i'll have to aplly bypass patchs and ofc it avoids kp but don't really fix the issues

anyway at this stage, and forward the code depends on port reading values

Edited by jalavoui
Link to comment
Share on other sites

debug version as agdc code that was removed from production

this kp is from trying to disabled agdc calls on debug version

 

image.thumb.png.e6a6199d3d2b17b56e7fc87dcde5bf84.png

 

ffff @$%&! this

 

updated nblue for both tgl - the reg validation helped a bit

 

next step

 

check AppleIntelFramebuffer::enableController(void) for port reading values as they are used on readreg32

e.g the offset depends on var8 - wrong values and the code fails

image.png.f159c36581664e6590d7857364c7b28a.png

Edited by jalavoui
Link to comment
Share on other sites

2 hours ago, jalavoui said:

e.g the offset depends on var8 - wrong values and the code fails

image.png.f159c36581664e6590d7857364c7b28a.png

I think found the issue, they forgot to do this->fRegAccessManager = controller->fRegAccessManager.
0x4a40 is the offset in AppleIntelFramebuffer
add the missing code in AppleIntelFramebuffer::init ( __ZN21AppleIntelFramebuffer4initEP31AppleIntelFramebufferControllerj )
fn AppleIntelFramebuffer::init(this: *mut AppleIntelFramebuffer, controller: *mut AppleIntelFramebufferController, arg3: u32) -> bool
getMember(this, 0x4A40) = getMember(controller, 0xC40);

Link to comment
Share on other sites

hmmm result from production with only 

 

this are port count 9 to 3 patch (f2p)

powerwell patches to probeportmode() (13p and 13pb)

and getHPDState() address patch (f19)

 

zero functions patched only this 1 active

image.thumb.png.c3098544b8e1bebcc5c1a7ce7338e5a0.png

 

forgot the stolen mem patch. is also active (ported from wg code as production complains of low stolen memory)

image.thumb.png.02ab7970269fcb0a47d333210c1a041d.png

 

image.png.6db4b5dfbbe21df3bc68eae8da84b7c4.png

 

image.thumb.png.bbf11574aa4dfdebe84c1a8839f41bf2.png

 

gonna try something

Edited by jalavoui
Link to comment
Share on other sites

Same issue again but with AppleIntelPlane
image.thumb.png.52682245bbdb68ace8c125f509f785ad.png

Doesn't even pass the controller to this one, you'll need to store the controller this pointer by wrapping AppleIntelFramebufferController::start ( __ZN31AppleIntelFramebufferController5startEP9IOService ) then before calling org storing the this pointer somewhere. Then in AppleIntelPlane::init ( __ZN15AppleIntelPlane4initE9IGPlaneID ) store fRegAccessManager from the controller into offset 0x90 in the this pointer of the plane

These drivers really are unfinished and it shows.

 

Link to comment
Share on other sites

yep the production version seems to lack code. that's why i also look at debug version but maybe same {censored}

 

i kinda doubt they be so lazy to make the code break at such early stage

 

gonna recheck again where it starts failing

 

sadly if you have the hardware i bet you will find the issue in 1 day

 

i know the very 1st panic is at powerwell::init with that call to probeportmode() gonna ignore it for now

 

k so with this the 1st kp is same as posted here

image.png.c727357d3393bf7107348ce30083478c.png

 

intel ports are tricky. this tgl as 9 connectors. the f2p patch only allows first 3 tobe used

image.thumb.png.49d59b10ad83277ca8acfa73b350f25c.png

 

 

Edited by jalavoui
Link to comment
Share on other sites

8 minutes ago, jalavoui said:

yep the production version seems to lack code. that's why i also look at debug version but maybe same {censored}

Nope, the opposite. I just inspected the diags version, and it seems has the same issue with missing assignments for the register access manager. It likely just breaks earlier.

14 minutes ago, jalavoui said:

i kinda doubt they be so lazy to make the code break at such early stage

Sounds to me more like they stopped working on the driver in the middle of development of Big Sur, likely after failing to negotiate with Intel or deciding to dump Intel for ARM.

Link to comment
Share on other sites

×
×
  • Create New...