netkas.org forum
July 23, 2017, 01:41:03 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Information for registering users http://forum.netkas.org/index.php/topic,2246.0.html
 
   Home   Help Search Login Register  
Pages: 1 [2] 3 4 ... 8
  Print  
Author Topic: GFXUtil News & Announcements (v0.71b + src)  (Read 342731 times)
BladeRunner
Newbie

Offline Offline

Posts: 31


« Reply #15 on: January 06, 2008, 08:48:30 PM »

Tips for building hex device path.

for example your devpath in ioreg:
IOACPIPlane:/_SB/PCI0@0/P0P5@1c0001/ethernet@0
How to convert it to hexadecimal efi devicepath?
It easy Smiley
Follow my guide:

1. ROOT PCI BRIDGE node. ACPI Device Path _HID PNP0A03, _UID 0. ACPI name space \_SB\PCI0. Shorthand notation is ACPI(PNP0A03,0)
  • from ioreg: find _SB/PCI0@0 or similar (if there is PCI1@0 or similar then you probably have to change UID part)
  • into efi: 02010c00d041030a00000000 (last 4 bytes are UID, if in system are two dev with same HID then system inc UID, if you want set UID = 1, then change last 4 bytes 01000000)

2. first PCI DEVICE node. Shorthand notation is PCI(1c|1)
  • from ioreg: find _SB/PCI0@0/P0P5@1c0001 or similar
    P0P5@1c0001 -> add leading zeros POP5@001c0001
    POP5@xxxxyyyy
    xxxx - pci device
    yyyy - pci func
  • into efi: 01010600011c (pci node is like that 01-hardware path type, 01-pci device type, 0600 - length, 01 - pci function (1 byte), 1c - pci device (1byte) )

3. second PCI DEVICE node. Shorthand notation is PCI(0|0)
  • from ioreg: find _SB/PCI0@0/P0P5@1c0001/ethernet@0 or similar
    ethernet@0 -> add leading zeros ethernet@00000000
    ethernet@xxxxyyyy
    xxxx - pci device
    yyyy - pci func
  • into efi: 010106000000 (pci node is like that 01-hardware path type, 01-pci device type, 0600 - length, 01 - pci function (1 byte), 1c - pci device (1byte) )

4. Device path end node.
into efi: 7fff0400

5. put these parts together and
from: IOACPIPlane:/_SB/PCI0@0/P0P5@1c0001/ethernet@0
into: 02010c00d041030a0000000001010600011c0101060000007fff0400

Updated for better description:

I wanted to give this a try so I could eliminate the patched IONetworkingFamily.kext but I can't locate any of the search strings you referenced in your guide.  I have an after market PCI 10/100/1000 ethernet card in one of my two PCI slots. The other slot has my Nvidia GFX 5500 video card. Both cards are plugged into a riser card which is inserted into the mother board.  IBM did this to make a low profile system unit.

When I scan the ioreg DeviceTree dump I only see one reference to ethernet which does not appear to be related to the search strings in the guide.

I made a device tree dump using the stock 10.5.1 IONetworkingFamily.kext.  I would appreciate any suggestions on how to proceed. I don't understand how to map what I see to the parts of your guide.

The full devicetree dump is attached below along with an extracted dump which just contains the part of the tree related to the ethernet card.

Thanks. BladeRunner

* BladeRunner-IODeviceTree.txt.gz (13.47 KB - downloaded 146 times.)
* BladeRunner-IODeviceTree.txt.gz (13.47 KB - downloaded 153 times.)
* ioregExtract.rtf (6.57 KB - downloaded 178 times.)
« Last Edit: January 07, 2008, 05:14:31 AM by BladeRunner » Logged

Hacintosh:
CPU: Intel Pentium 4 3.00GHz [SSE3/PAE/HTT]
Codename: Prescott Package: Socket 478 mPGA
RAM: 2.0GB Disk: 307.36GB/1.13TB
Display: GeForce FX 5500 [256 MB/QE/Stock] 1600x1200@60Hz
OS: Mac OS X 10.5.3 (9D34) Kernel: Darwin 9.2.0
Build: i386 Build Date: Tue Feb 26 21:21:24 SCT 2008
mcmatrix
Newbie

Offline Offline

Posts: 46



« Reply #16 on: January 07, 2008, 07:33:36 AM »

Tips for building hex device path.

for example your devpath in ioreg:
IOACPIPlane:/_SB/PCI0@0/P0P5@1c0001/ethernet@0
How to convert it to hexadecimal efi devicepath?
It easy Smiley
Follow my guide:

1. ROOT PCI BRIDGE node. ACPI Device Path _HID PNP0A03, _UID 0. ACPI name space \_SB\PCI0. Shorthand notation is ACPI(PNP0A03,0)
  • from ioreg: find _SB/PCI0@0 or similar (if there is PCI1@0 or similar then you probably have to change UID part)
  • into efi: 02010c00d041030a00000000 (last 4 bytes are UID, if in system are two dev with same HID then system inc UID, if you want set UID = 1, then change last 4 bytes 01000000)

2. first PCI DEVICE node. Shorthand notation is PCI(1c|1)
  • from ioreg: find _SB/PCI0@0/P0P5@1c0001 or similar
    P0P5@1c0001 -> add leading zeros POP5@001c0001
    POP5@xxxxyyyy
    xxxx - pci device
    yyyy - pci func
  • into efi: 01010600011c (pci node is like that 01-hardware path type, 01-pci device type, 0600 - length, 01 - pci function (1 byte), 1c - pci device (1byte) )

3. second PCI DEVICE node. Shorthand notation is PCI(0|0)
  • from ioreg: find _SB/PCI0@0/P0P5@1c0001/ethernet@0 or similar
    ethernet@0 -> add leading zeros ethernet@00000000
    ethernet@xxxxyyyy
    xxxx - pci device
    yyyy - pci func
  • into efi: 010106000000 (pci node is like that 01-hardware path type, 01-pci device type, 0600 - length, 01 - pci function (1 byte), 1c - pci device (1byte) )

4. Device path end node.
into efi: 7fff0400

5. put these parts together and
from: IOACPIPlane:/_SB/PCI0@0/P0P5@1c0001/ethernet@0
into: 02010c00d041030a0000000001010600011c0101060000007fff0400

Updated for better description:

I wanted to give this a try so I could eliminate the patched IONetworkingFamily.kext but I can't locate any of the search strings you referenced in your guide.  I have an after market PCI 10/100/1000 ethernet card in one of my two PCI slots. The other slot has my Nvidia GFX 5500 video card. Both cards are plugged into a riser card which is inserted into the mother board.  IBM did this to make a low profile system unit.

When I scan the ioreg DeviceTree dump I only see one reference to ethernet which does not appear to be related to the search strings in the guide.

I made a device tree dump using the stock 10.5.1 IONetworkingFamily.kext.  I would appreciate any suggestions on how to proceed. I don't understand how to map what I see to the parts of your guide.

The full devicetree dump is attached below along with an extracted dump which just contains the part of the tree related to the ethernet card.

Thanks. BladeRunner

Try these paths: Acpi(PNP0A03,0)/Pci(0x1e,0)/Pci(0,0)/Pci(0,0) or Acpi(PNP0A03,0)/Pci(0x1e,0)/Pci(0,0)

efi shothand notation reference:
http://forum.netkas.org/index.php/topic,64.msg851.html#msg851
« Last Edit: January 07, 2008, 08:14:46 PM by mcmatrix » Logged
BladeRunner
Newbie

Offline Offline

Posts: 31


« Reply #17 on: January 07, 2008, 10:25:06 PM »

Quote
Try these paths: Acpi(PNP0A03,0)/Pci(0x1e,0)/Pci(0,0)/Pci(0,0) or Acpi(PNP0A03,0)/Pci(0x1e,0)/Pci(0,0)

efi shothand notation reference:
http://forum.netkas.org/index.php/topic,64.msg851.html#msg851

I tried using the latest version of gfxutil (0.6b) but it kept crashing using the device paths you suggested. So, I tired the two you gave as examples in the first post. The one which begins "PciRoot(0x0)/P" works and produces a hex output file. The other example, which looks like the two you suggested I try, failed with the following error:

Quote
bash-3.2# ./gfxutil -v -s -n -i xml -o hex ./timeMachine.plist ./timeMachine.hex
GFX Data: filesize=56
GFX Data: numofblocks=1

 Header: blocksize=44
 Header: records=1
UnpackDevicePath: Probably a bogus device path
Assertion failed: (UnpackDevPath != NULL), function ConvertDevicePathToText, file /Users/fox/Desktop/Projects/gfxutil/efidevp.c, line 1039.
Abort trap
bash-3.2#

Both of the strings you suggested for me failed with the same error.

I have attached the input ./timeMachine.plist file. Please tell me if I am using gfxutil incorrectly or the input plist file is bad.

* timeMachine.plist (0.33 KB - downloaded 175 times.)
Logged

Hacintosh:
CPU: Intel Pentium 4 3.00GHz [SSE3/PAE/HTT]
Codename: Prescott Package: Socket 478 mPGA
RAM: 2.0GB Disk: 307.36GB/1.13TB
Display: GeForce FX 5500 [256 MB/QE/Stock] 1600x1200@60Hz
OS: Mac OS X 10.5.3 (9D34) Kernel: Darwin 9.2.0
Build: i386 Build Date: Tue Feb 26 21:21:24 SCT 2008
mcmatrix
Newbie

Offline Offline

Posts: 46



« Reply #18 on: January 08, 2008, 01:34:39 PM »

Quote
Try these paths: Acpi(PNP0A03,0)/Pci(0x1e,0)/Pci(0,0)/Pci(0,0) or Acpi(PNP0A03,0)/Pci(0x1e,0)/Pci(0,0)

efi shothand notation reference:
http://forum.netkas.org/index.php/topic,64.msg851.html#msg851

I tried using the latest version of gfxutil (0.6b) but it kept crashing using the device paths you suggested. So, I tired the two you gave as examples in the first post. The one which begins "PciRoot(0x0)/P" works and produces a hex output file. The other example, which looks like the two you suggested I try, failed with the following error:

Quote
bash-3.2# ./gfxutil -v -s -n -i xml -o hex ./timeMachine.plist ./timeMachine.hex
GFX Data: filesize=56
GFX Data: numofblocks=1

 Header: blocksize=44
 Header: records=1
UnpackDevicePath: Probably a bogus device path
Assertion failed: (UnpackDevPath != NULL), function ConvertDevicePathToText, file /Users/fox/Desktop/Projects/gfxutil/efidevp.c, line 1039.
Abort trap
bash-3.2#

Both of the strings you suggested for me failed with the same error.

I have attached the input ./timeMachine.plist file. Please tell me if I am using gfxutil incorrectly or the input plist file is bad.


New fixed version 0.65b is available!

Your devicepath syntax is a bit wrong:
<key>ACPI(PNP0A03,0)/PCI(1e|0)/PCI(0|0)</key>
gfxutil will accept following syntx
<key>ACPI(PNP0A03,0)/PCI(0x1e,0)/PCI(0,0)</key>

Please try and give feedback!
Logged
BladeRunner
Newbie

Offline Offline

Posts: 31


« Reply #19 on: January 08, 2008, 07:28:07 PM »

I tried the new version - with corrected syntax - and it worked. I used the device path in your previous post and also switched to the new true/false tag. The output below is from that test.  Now I just need to see if it works to fix the TimeMachine problem for me.

Code:
bash-3.2# ./gfxutil -a
./gfxutil Version: 0.65b by McMatrix
bash-3.2# ./gfxutil -v -s -n -i xml -o hex ./timeMachine.plist ./timeMachine.hex
GFX Data: filesize=75
GFX Data: numofblocks=1

 Header: blocksize=63
 Header: records=1
 Header: hex devicepath =<02010c00d041030a0000000001010600001e0101060000007fff0400>
 Header: txt devicepath=PciRoot(0x0)/Pci(0x1e,0x0)/Pci(0x0,0x0)
  Setting: built-in=0x01

By the way, many thanks for the GREAT utility.
Logged

Hacintosh:
CPU: Intel Pentium 4 3.00GHz [SSE3/PAE/HTT]
Codename: Prescott Package: Socket 478 mPGA
RAM: 2.0GB Disk: 307.36GB/1.13TB
Display: GeForce FX 5500 [256 MB/QE/Stock] 1600x1200@60Hz
OS: Mac OS X 10.5.3 (9D34) Kernel: Darwin 9.2.0
Build: i386 Build Date: Tue Feb 26 21:21:24 SCT 2008
bob
Jr. Member
**
Offline Offline

Posts: 61


MacBook Pro 13" touch bar, 2016. eGPU (Windows).


« Reply #20 on: January 09, 2008, 12:36:47 AM »

No luck here... See the acpi-path on the atached img.. for that i,ve used:
   
     ACPI(PNP0A03,0)/PCI(0x1b,0)/PCI(0,0)

But then the tool says:

    Header: txt devicepath=PciRoot(0x0)/Pci(0x1b,0x0)/Pci(0x0,0x0)

Acpi its the same as PciRoot? because dont matter i use ACPI, the tool converts it to PciRoot...

Also i've tested without the Last PCI(0,0) and still the tool convert to PciRoot...


Also, why not use IORegistryExplorer/IODeviceTree format as input?





* Imagen 4.png (82.33 KB, 749x432 - viewed 360 times.)
Logged
krijonk
Newbie

Offline Offline

Posts: 4


« Reply #21 on: January 09, 2008, 07:14:20 AM »

Ok, I have tried reading through this long enough, I just can't seem to get it....

If somebody wants to take a shot at converting this EFI device path to HEX, feel free, it will be much appreciated.


IOACPIPlane:/_SB/PCI0@0/P0P1@1e0000/ethernet@4


-krijonk
Logged
mcmatrix
Newbie

Offline Offline

Posts: 46



« Reply #22 on: January 09, 2008, 08:20:16 AM »

Ok, I have tried reading through this long enough, I just can't seem to get it....

If somebody wants to take a shot at converting this EFI device path to HEX, feel free, it will be much appreciated.


IOACPIPlane:/_SB/PCI0@0/P0P1@1e0000/ethernet@4

-krijonk

Need your full IODeviceTree dump.

ioreg -l -w0 -p IODeviceTree >dump.txt
Logged
mcmatrix
Newbie

Offline Offline

Posts: 46



« Reply #23 on: January 09, 2008, 08:22:34 AM »

No luck here... See the acpi-path on the atached img.. for that i,ve used:
   
     ACPI(PNP0A03,0)/PCI(0x1b,0)/PCI(0,0)

But then the tool says:

    Header: txt devicepath=PciRoot(0x0)/Pci(0x1b,0x0)/Pci(0x0,0x0)

Acpi its the same as PciRoot? because dont matter i use ACPI, the tool converts it to PciRoot...

Also i've tested without the Last PCI(0,0) and still the tool convert to PciRoot...


Also, why not use IORegistryExplorer/IODeviceTree format as input?



ACPI(PNP0A03,0) is yor pciroot!. Pciroot(0x0) is just alias for ACPI(PNP0A03,0).
So this is not a case.

Need your full IODeviceTree dump:

ioreg -l -w0 -p IODeviceTree >dump.txt
Logged
krijonk
Newbie

Offline Offline

Posts: 4


« Reply #24 on: January 09, 2008, 09:24:37 AM »

Here is my IODeviceTree Dump:

I also can't seem to get gfx-string working for 7300GS, even using a reported "working" string from this forum for the EXACT same card i have (Gigabyte 7300GS 128MB).

I appreciate all the help you can offer....

-krijonk

* krijonk-IODeviceTree.txt (87.83 KB - downloaded 159 times.)
Logged
time ed
Jr. Member
**
Offline Offline

Posts: 98



« Reply #25 on: January 09, 2008, 12:43:53 PM »

Here is my IODeviceTree Dump:

Your device path is _SB/PCI0@0/P0P2@10000/Display@0. Shorthand is:
PciRoot(0x1)/Pci(0x1,0x0)/Pci(0x0,0x0)
...so <key> string should be?
02010c00d041030a000000000101060000010101060000007fff04001

Your best bet is to download mcmatrixs' util, convert a working string to xml, edit device path key, then convert back to hex. While you're editing, you should also change device property keys to match those in your IOReg (like NVCAP, address cells, etc..)
Logged
mcmatrix
Newbie

Offline Offline

Posts: 46



« Reply #26 on: January 09, 2008, 12:46:54 PM »

Here is my IODeviceTree Dump:

Your device path is _SB/PCI0@0/P0P2@10000/Display@0. Shorthand is:
PciRoot(0x1)/Pci(0x1,0x0)/Pci(0x0,0x0)
...so <key> string should be?
02010c00d041030a000000000101060000010101060000007fff04001

Your best bet is to download mcmatrixs' util, convert a working string to xml, edit device path key, then convert back to hex. While you're editing, you should also change device property keys to match those in your IOReg (like NVCAP, address cells, etc..)

No his pciroot is pciroot(0x0) because PCI0@0 _UID = 0 Smiley
Logged
time ed
Jr. Member
**
Offline Offline

Posts: 98



« Reply #27 on: January 09, 2008, 01:08:35 PM »

No his pciroot is pciroot(0x0) because PCI0@0 _UID = 0 Smiley

Oh! My bad. But I believe in spite of my fat finger, the <key> string is still correct?

Regards,
t-e
« Last Edit: January 09, 2008, 01:12:04 PM by time ed » Logged
bob
Jr. Member
**
Offline Offline

Posts: 61


MacBook Pro 13" touch bar, 2016. eGPU (Windows).


« Reply #28 on: January 09, 2008, 03:35:51 PM »

here's my dump...



* dump.txt (83.71 KB - downloaded 164 times.)
Logged
time ed
Jr. Member
**
Offline Offline

Posts: 98



« Reply #29 on: January 09, 2008, 03:56:21 PM »

here's my dump...

Device path:
_SB/PCI0@0/PEGP@10000/Display@0

Shorthand
PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)

Key:
02010c00d041030a000000000101060000010101060000007fff04001
Logged
Pages: 1 [2] 3 4 ... 8
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!