ProjectOSX

Welcome Guest!

Returning User? Login here.

Want membership privileges? Register here.

 
Start a new topic Add Reply
> Strange Thing In Appleintelhdgraphicsfb.kext...pls Shed Some Light, I am getting nuts
iostres
post Aug 25 2011, 05:05 PM
Post #1
Hi!

I have an idea of writing a framebuffer driver for IntelHDGraphics card and I took a peek at apple driver for the same card which does something really strange. This is it:

loc_9C3E:
mov [esi+54h], eax ;; saves result from PCIDevMem = PCIdev->mapDeviceMemoryWithRegister(kIOPCIConfigBaseAddress0, kIOMapInhibitCache);
mov eax, [eax]
mov eax, [eax+94h]
mov [esp], edi
call eax
mov [esi+58h], eax ;; saves result to variable this->some_var;

what happens after first line is not clear to me - does it really tries to execute a command in PCIDevMem + 94h or I am interpreting it wrong??

Later it uses variable (esi+58h) as a base register to read data from MMIO.

If somebody could shed some light on this - it would be great.

BR,
iostres

This post has been edited by iostres: Aug 25 2011, 05:06 PM
iostres
post Aug 25 2011, 09:13 PM
Post #2
QUOTE (iostres @ Aug 25 2011, 05:05 PM) *
Hi!

I have an idea of writing a framebuffer driver for IntelHDGraphics card and I took a peek at apple driver for the same card which does something really strange. This is it:

loc_9C3E:
mov [esi+54h], eax ;; saves result from PCIDevMem = PCIdev->mapDeviceMemoryWithRegister(kIOPCIConfigBaseAddress0, kIOMapInhibitCache);
mov eax, [eax]
mov eax, [eax+94h]
mov [esp], edi
call eax
mov [esi+58h], eax ;; saves result to variable this->some_var;

what happens after first line is not clear to me - does it really tries to execute a command in PCIDevMem + 94h or I am interpreting it wrong??

Later it uses variable (esi+58h) as a base register to read data from MMIO.

If somebody could shed some light on this - it would be great.

BR,
iostres


SOLVED: It was a call to getVirtualAddress();

Add Reply Start a new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: