Jump to content
Welcome to InsanelyMac Forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

  • Announcements

    • Allan

      Forum Rules   04/13/2018

      Hello folks! As some things are being fixed, we'll keep you updated. Per hour the Forum Rules don't have a dedicated "Tab", so here is the place that we have our Rules back. New Users Lounge > [READ] - InsanelyMac Forum Rules - The InsanelyMac Staff Team. 
Andy Vandijck

Various Hardware Info tools for OS X

11 posts in this topic

Recommended Posts

I ported a number of tools to Mac OS X for getting some hardware info on some machines.

- ectool: Tool to get info from the Embedded Controller

- flashrom: You know this one ;)

- ethtool: Tool to get info from the ethernet adapters / WiFI cards (mostly done)

- ich_descriptors_tool: Tool to get south bridge info

- ifdtool: Tool to get info from UEFI BIOS

- inteltool: Tool for Intel CPU info

- lspci: PCI Info

- mptable: Tool to get multiprocessor description table

- msrtool: Tool for MSR info

- nvramtool: Tool for NVRAM info

- osxpmem: Tool for getting OS X memory data

- probe, video: Tool for checking Intel GPUs

- setpci: Tool for setting PCI data

- superiotool: Tool for probing SuperIO chip

- testvideobios: Tool for forcing load of a custom (video) BIOS ROM

 

2 kexts:

- DirectHW.kext: Direct HW communication driver

- pmem.kext: Direct memory access driver, this creates /dev/pmem

 

Enjoy :D

 

I also collected some info on a real MacBook Pro.

Also my laptop dump from some of the apps is attached ;)

hw_tools.zip

LaptopDump.zip

MBP81INFO.zip

Share this post


Link to post
Share on other sites

Thanks to Andy posting pmem.kext because I have now been able to do something I wanted to do for a while and that’s put a script together to dump the ACPI tables directly from memory. I only put it together in the last 24 hours or so, so it’s not perfect and it may not work for everyone. 

 
The script doesn’t deal with ACPI_recl (reclaimable) regions so it may fail to find the RSDP pointer. It fails on my iMac so for now I uncomment line #282 and force a larger block size of memory to read and then it works.
 
There may well be other error checks which haven’t be dealt with properly too, but for now it works as an example of reading memory directly from within OS X.
 
I’ve tested it on 10.9 and 10.10 DP5.
 
The script requires a memory map to work from. I have been using the FirmwareMemoryMap.txt file from DarwinDumper’s Firmware Memory Map option.
 
Usage is:
./dumpACPIfromMem.sh
or
./dumpACPIfromMem.sh /path/to/FirmwareMemoryMap.txt

 
ps. @Andy - I hope you don’t mind me posting this here but I thought this would show a good example for the kext.
 
EDIT: I forgot to mention that this dumps the native tables from BIOS and not the tables injected by the boot loader.
 
EDIT2: I will work to improve the script to make it dump more as I see it currently does not get all the SSDT tables as you'd see from using Linux or Clover (F4) from GUI.  Done.
 
 
EDIT: Attachment removed.
The script has now matured sufficiently to the point where I wish to see results from other hardware. I have moved this request to the DarwinDumper thread as that is where I eventually wish this script to a part of.

Share this post


Link to post
Share on other sites

EDIT: I forgot to mention that this dumps the native tables from BIOS and not the tables injected by the boot loader.

 

some 'bootloaders' also update the legacy regions for ACPI and DMI so the correct tables will be dumped.

Share this post


Link to post
Share on other sites

Thanks for the note bs0d. I currently have the option of booting using Chameleon, Clover or Ozmosis so I'll check this evening using the updated version of the script that I've just added to the above post.

I do quite like the option of being able to dump native tables though..

Share this post


Link to post
Share on other sites

Thanks for the note bs0d. I currently have the option of booting using Chameleon, Clover or Ozmosis so I'll check this evening using the updated version of the script that I've just added to the above post.

I do quite like the option of being able to dump native tables though..

@blackosx good luck bro i will try your next update :)

Share this post


Link to post
Share on other sites
I’ve managed to grab some time to test v0.35 of my script on OS X 10.9.4 booted using three different loaders. I’ve run the script twice, first time taking the first RSDP pointer found in memory, and then second time taking the last RSDP pointer found in memory.
 
EDIT: Revised to include tables from all RSDP pointers found (not just first and last)
 
Ozmosis
Only valid pointers found in whole scan were:
---------------------------------------------------------------
RSD PTR #1 : Revision=02 | RSDT Address=cab84028 | XSDT Address=00000000cab84070 | XSDT Length=36
RSD PTR #1 : Revision=02 | RSDT Address=cabb1028 | XSDT Address=00000000cabb1060 | XSDT Length=36
RSD PTR #1 : Revision=02 | RSDT Address=cabbf028 | XSDT Address=00000000cabbf070 | XSDT Length=36
RSD PTR #2 : Revision=02 | RSDT Address=cabc0028 | XSDT Address=00000000cabc0070 | XSDT Length=36
---------------------------------------------------------------
Get first RSDP pointer
=====================
Found Table: XSDT at 00000000cab84070 | Length: 100 | Table ID: A M I
Number of tables in XSDT = 8
Found Table: FACP at 00000000cab8fc68 | Length: 244 | Table ID: A M I
Found Table: APIC at 00000000cab8fd60 | Length: 146 | Table ID: A M I
Found Table: MCFG at 00000000cab8fdf8 | Length: 60 | Table ID: A M I
Found Table: HPET at 00000000cab8fe38 | Length: 56 | Table ID: A M I
Found Table: SSDT at 00000000cab8fe70 | Length: 877 | Table ID: SataTabl
Found Table: SSDT at 00000000cab901e0 | Length: 2474 | Table ID: Cpu0Ist
Found Table: SSDT at 00000000cab90b90 | Length: 2706 | Table ID: CpuPm
Found Table: DMAR at 00000000cab91628 | Length: 176 | Table ID: SNB 
Found Table: DSDT at 00000000cab84168 | Length: 47866 | Table ID: A M I
Found extra SSDT tables
01e95018 points to zero data
Found Table: SSDT at ca8eda98 | Length: 771 | Table ID: ApIst
Found Table: SSDT at ca8ec018 | Length: 2107 | Table ID: Cpu0Cst
Found Table: SSDT at ca8eec18 | Length: 281 | Table ID: ApCst
Get second RSDP pointer
=====================
Found Table: XSDT at 00000000cabb1060 | Length: 60 | Table ID: A M I
Number of tables in XSDT = 3
Found Table: FACP at 00000000cabbcc28 | Length: 244 | Table ID: A M I
Found Table: APIC at 00000000cabbcd20 | Length: 146 | Table ID: A M I
Found Table: MCFG at 00000000cabbcdb8 | Length: 60 | Table ID: A M I
Found Table: DSDT at 00000000cabb1128 | Length: 47866 | Table ID: A M I
Get third RSDP pointer
=====================
Found Table: XSDT at 00000000cabbf070 | Length: 92 | Table ID: A M I
Number of tables in XSDT = 7
Limiting length to 1MB
Found Table: -ext at 00000000cabc10c8 | Length: 1048576 | Table ID: PL,curre
00000000cabc11c0 points to zero data
Limiting length to 1MB
Found Table: (?? at 00000000cabc1258 | Length: 1048576 | Table ID: ????
Limiting length to 1MB
Found Table: ? at 00000000cabc1298 | Length: 1048576 | Table ID: ?
Limiting length to 1MB
Found Table:  at 00000000cabc12d0 | Length: 1048576 | Table ID: ??rT_0
00000000cabc1640 points to zero data
Found Table: FACP at 00000000cabc20d8 | Length: 244 | Table ID: Notebook
Found Table: DSDT at 00000000cabc0168 | Length: 8041 | Table ID: Notebook
Get last RSDP pointer
=====================
Found Table: XSDT at 00000000cabc0070 | Length: 100 | Table ID: Notebook
Number of tables in XSDT = 8
Found Table: FACP at 00000000cabc20d8 | Length: 244 | Table ID: Notebook
Found Table: APIC at 00000000cabc21d0 | Length: 146 | Table ID: Notebook
Found Table: MCFG at 00000000cabc2268 | Length: 60 | Table ID: Notebook
Found Table: HPET at 00000000cabc22a8 | Length: 56 | Table ID: Notebook
Found Table: SSDT at 00000000cabc22e0 | Length: 877 | Table ID: SataTabl
skipping table with address 0000000000000000
Found Table: SSDT at 00000000cabc2700 | Length: 908 | Table ID: CpuPm
Found Table: SLIC at 00000000cabc2a90 | Length: 374 | Table ID: Notebook
Found Table: DSDT at 00000000cabc0168 | Length: 8041 | Table ID: Notebook
 
Chameleon (DropSSDT = Yes)
 
Only valid pointers found in whole scan were:
---------------------------------------------------------------
RSD PTR #1 : Revision=02 | RSDT Address=cab84028 | XSDT Address=00000000cab84070 | XSDT Length=36
RSD PTR #2 : Revision=02 | RSDT Address=cabb1028 | XSDT Address=00000000cabb1060 | XSDT Length=36
---------------------------------------------------------------
Get first RSDP pointer
=====================
Found Table: XSDT at 00000000cab84070 | Length: 100 | Table ID: A M I
Number of tables in XSDT = 8
Found Table: FACP at 00000000cab8fc68 | Length: 244 | Table ID: A M I
Found Table: APIC at 00000000cab8fd60 | Length: 146 | Table ID: A M I
Found Table: MCFG at 00000000cab8fdf8 | Length: 60 | Table ID: A M I
Found Table: HPET at 00000000cab8fe38 | Length: 56 | Table ID: A M I
Found Table: SSDT at 00000000cab8fe70 | Length: 877 | Table ID: SataTabl
Found Table: SSDT at 00000000cab901e0 | Length: 2474 | Table ID: Cpu0Ist
Found Table: SSDT at 00000000cab90b90 | Length: 2706 | Table ID: CpuPm
Found Table: DMAR at 00000000cab91628 | Length: 176 | Table ID: SNB 
Found Table: DSDT at 00000000cab84168 | Length: 47866 | Table ID: A M I
Found extra SSDT tables
Limiting length to 1MB
Found Table: p{N
                 at 01e95018 | Length: 1048576 | Table ID: 
Found Table: SSDT at ca8eda98 | Length: 771 | Table ID: ApIst
Found Table: SSDT at ca8ec018 | Length: 2107 | Table ID: Cpu0Cst
Found Table: SSDT at ca8eec18 | Length: 281 | Table ID: ApCst
Get last RSDP pointer
=====================
Found Table: XSDT at 00000000cabb1060 | Length: 60 | Table ID: A M I
Number of tables in XSDT = 3
Found Table: FACP at 00000000cabbcc28 | Length: 244 | Table ID: A M I
Found Table: APIC at 00000000cabbcd20 | Length: 146 | Table ID: A M I
Found Table: MCFG at 00000000cabbcdb8 | Length: 60 | Table ID: A M I
Found Table: DSDT at 00000000cabb1128 | Length: 47866 | Table ID: A M I
 
Clover EFI
Only valid pointers found in whole scan were:
---------------------------------------------------------------
RSD PTR #1 : Revision=02 | RSDT Address=00000000 | XSDT Address=000000001ff69000 | XSDT Length=36
RSD PTR #2 : Revision=02 | RSDT Address=cabb1028 | XSDT Address=00000000cabb1060 | XSDT Length=36
---------------------------------------------------------------
Get first RSD pointer
=====================
Found Table: XSDT at 000000001ff69000 | Length: 108 | Table ID: A M I
Number of tables in XSDT = 9
Found Table: FACP at 000000001ff68000 | Length: 244 | Table ID: A M I
Found Table: APIC at 00000000cab8fd60 | Length: 146 | Table ID: A M I
Found Table: MCFG at 00000000cab8fdf8 | Length: 60 | Table ID: A M I
Found Table: HPET at 00000000cab8fe38 | Length: 56 | Table ID: A M I
Found Table: SSDT at 000000001ff63000 | Length: 877 | Table ID: SataTabl
Found Table: SSDT at 000000001ff61000 | Length: 2474 | Table ID: Cpu0Ist
Found Table: SSDT at 000000001ff5f000 | Length: 2706 | Table ID: CpuPm
Found Table: DMAR at 00000000cab91628 | Length: 176 | Table ID: SNB 
Found Table: SSDT at 000000001ff5e000 | Length: 1549 | Table ID: CpuPm
Found Table: FACS at 00000000cabbdf80 | Length: 64
Found Table: DSDT at 000000001ff65000 | Length: 8041 | Table ID: A M I
Get last RSD pointer
=====================
Found Table: XSDT at 00000000cabb1060 | Length: 60 | Table ID: A M I
Number of tables in XSDT = 3
Found Table: FACP at 00000000cabbcc28 | Length: 244 | Table ID: A M I
Found Table: APIC at 00000000cabbcd20 | Length: 146 | Table ID: A M I
Found Table: MCFG at 00000000cabbcdb8 | Length: 60 | Table ID: A M I
Found Table: DSDT at 00000000cabb1128 | Length: 47866 | Table ID: A M I
EDIT:
So with all three loaders it's possible to retrieve both original BIOS tables and injected tables. 

As far as I know, Ozmosis does not give me the option of dropping SSDT tables, instead I guess intelligently deciding which tables to drop?

Share this post


Link to post
Share on other sites

Perhaps it's a stupid question, but I have to ask...

 

Can testvideobios load EFI part of the ROM on real Mac?

Or is this only possible in EFI shell?

 

I'm trying to mod D700 EFI part to work with regular 7970/280X and it would be great if there would be a possibility to test EFI ROMs without a need of flashing the card every time.

So far modded EFI driver is crashing Mac Pro EFI in early booting stage. I must use old 32-bit MP to recover the card every time, because computer refuses to boot even DOS as long card is installed, even along second GPU with good EFI on it.

 

Thank you in advance for your answer.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.



×