user$ test_nvram -help
test_nvram_shell_script 17-Sep-2023
takes *.bin, *.rom, *.vol, *.fd and one or more of these arguments:
-help this text
-force don't check filesize and type
-shortserial truncate the serial number
-nointro do not show version and filename
-condense_gfxutil do not show the full path for Bootvars
-DontCheckVolumes do not mount or check volumes for bootvar decoding
-showvars show all NVRAM variables
-mtccounts1 show deleted MTC counts
-mtccounts2 show MTC count of VSS2
-mtccounts12 show all MTC counts
-showall show MTC (VSS1 deleted, VSS2) and all NVRAM variables
-showlbsn show LBSN, hwc, son
-showbathealth show battery-health variables condensed
-showfullbathealth show battery-health variables (gives a hughe report)
-rename ask to rename the given file by machine, serial, firmware, additions
-forcerename same as -rename but don't ask
-simulaterename same as -forcerename but just write out the new filename
_________________________________________________________________________________________________
without giving a file:
-dump dump the firmware with flashrom or eficheck to a file
-SST25VF032B use this flash chip (MacPro 4,1 2009)
-MX25L3205D use this flash chip (MacPro 5,1 2010-2011)
-MX25L3206E use this flash chip (MacPro 5,1 2012)
-chip='yourflash' use this flash chip, quotate it
-chip=auto let flashrom detect the chip, if possible
-chip=eficheck use eficheck if machine is capable
-scanvss run Syncretic's scanvss to analyse the NVRAM streams, ~2006 to ~2012 Macs only
for arguments quote like:
'-scanvss -v' ...show variable values
'-scanvss -g' ...show hex GUIDs
'-scanvss -D' ...hide deleted variables
'-scanvss -d' ...show header details
'-scanvss -V1' ...show only VSS1
'-scanvss -V2' ...show only VSS2
'-scanvss -a' ...show everything, same as -v -g -d
-freespace read this machine's NVRAM with scanvss and just print free space of VSS1
###########################################
user$ test_nvram -freespace
Apparent free space in VSS1: 27668 bytes
###########################################
user$ test_nvram -dump
no spi-flash type given, but found MP51. Assuming MX25L3205D from experience
...Requesting load of /users/user/Library/Application Support/Macschrauber/DirectHW.kext.
/users/user/Library/Application Support/Macschrauber/DirectHW.kext loaded successfully (or already loaded).
doing flashrom097r1711 -p internal:laptop=this_is_not_a_laptop -c MX25L3205D/MX25L3208D -r /users/user/Downloads/18.09.2023_21-33-13_MX25L3205D_dump.bin -o /users/user/Downloads/18.09.2023_21-33-13_MX25L3205D_dump.log
...reading /users/user/Downloads/18.09.2023_21-33-13_MX25L3205D_dump.bin with Flashrom
...Flashrom was executed and gave no error
...com.coresystems.DirectHW unloaded and personalities removed.
.../users/user/Downloads/18.09.2023_21-33-13_MX25L3205D_dump.bin was created
.../users/user/Downloads/18.09.2023_21-33-13_MX25L3205D_dump.log was created
===================================================
test_nvram_shell_script 17-Sep-2023 by Macschrauber
scanning: /users/user/Downloads/18.09.2023_21-33-13_MX25L3205D_dump.bin
Firmware 144.0.0.0.0 (latest) built on Fri Apr 12 12:43:00 2019
Bios Version: MP51.88Z.F000.B00.1904121248
(U)efi version: 1.10
MP51, Serial from firmware: CKxxxxxxxxEUG
LBSN: J50xxxxxxxxBH9A BD: 10xxxx10xxxx
hwc: EUG son: 000xxxxxxxxx96
EnableGop 1.3 EFI module identified
CRC32 checksums: ok
Bootblock of 144.0.0.0.0 (rebuilt firmware)
Base_21 hardware descriptor
Boot000x is EFI\OC\OpenCore.efi (LauncherOption: Full)
OCLP: 0.6.9 | -allow_fv | MacPro5,1
fmm-computer-name: MacPro51 (2)
boot-args: keepsyms=1 debug=0x100 -lilubetaall -btlfxallowanyaddr ipc_control_port_options=0 -nokcmismatchpanic -disable_sidecar_mac -lilubetaall
BootOrder: 1:Boot0080
Boot0001: OpenCore |EFI|disk1s1 (SATA DVD Bay B (Lower):SAMSUNG 470 Series SSD)|EFI|PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x1,0x0,0x0)/HD(1,GPT,53A70A2A-B1A7-4368-A858-870B8D9807CC,0x28,0x64000)/EFI\OC\OpenCore.efi
Boot0080: |Apple_APFS|disk0s2 (PCI-Express Internal:Samsung SSD 970 EVO Plus 500GB)|PciRoot(0x0)/Pci(0x7,0x0)/Pci(0x0,0x0)/Msg(34,010000000025385291504418)/HD(2,GPT,7D2C57B3-FF74-4E5A-83B9-CA26ED30F50F,0x64028,0x3A321FE0)/VenMedia(BE74FCF7-0B7C-49F3-9147-01F4042E6842,A4AEE393BBBE594BB7CF61C455EDEE09)/\31F61C0A-1EAA-4D9B-BDD4-9786D5D5A009\System\Library\CoreServices\boot.efi
Boot0080 is MacOs 10.14.6, label: Mojave
BootFFFF: |Apple_APFS|disk0s2 (PCI-Express Internal:Samsung SSD 970 EVO Plus 500GB)|PciRoot(0x0)/Pci(0x7,0x0)/Pci(0x0,0x0)/Msg(34,010000000025385291504418)/HD(2,GPT,7D2C57B3-FF74-4E5A-83B9-CA26ED30F50F,0x64028,0x3A321FE0)/VenMedia(BE74FCF7-0B7C-49F3-9147-01F4042E6842,A4AEE393BBBE594BB7CF61C455EDEE09)/\31F61C0A-1EAA-4D9B-BDD4-9786D5D5A009\System\Library\CoreServices\boot.efi
BootFFFF is MacOs 10.14.6, label: Mojave
6 boots since last garbage collection, MTC counter: 12 - 18
VSS1 VSS2
7 (1 active) 1 Memory Configs g (ok)
7 (1 active) 0 Memory Configs h (ok)
1 (1 active) 0 Memory Configs i (ok)
1 (1 active) 0 Memory Configs j (ok)
0 0 Microsoft certificates (ok)
1 (1 active) 1 BluetoothActiveControllerInfos (ok)
1 (1 active) 1 BluetoothInternalControllerInfos (ok)
1 (1 active) 1 current-network (ok)
1 (1 active) 1 NVRAM PathProperties0000 (ok)
27668 bytes free space of 65464
VSS1 (Formatted) (Healthy), found 67 variables (42 valid, 25 deleted)
VSS2 (Formatted) (Healthy), found 40 variables (40 valid)
...renamed: 18.09.2023_21-33-13_MX25L3205D_dump.bin to MP51_144.0.0.0.0_CKxxxxxxxxEUG_EnableGop_1.3_18.09.2023_21-33-13.bin
...renamed: /users/user/Downloads/18.09.2023_21-33-13_MX25L3205D_dump.log to /users/user/Downloads/MP51_144.0.0.0.0_CKxxxxxxxxEUG_EnableGop_1.3_18.09.2023_21-33-13.log
###########################################
user$ test_nvram -dump -chip:eficheck
...reading /users/user/Downloads/23.07.2023_18-22-32_eficheck_dump.bin
Password:
.../users/user/Downloads/23.07.2023_18-22-32_eficheck_dump.bin was created
===================================================
test_nvram_shell_script 23-Jul-2023 by Macschrauber
scanning: /users/user/Downloads/23.07.2023_18-22-32_eficheck_dump.bin
8MB file detected, analysing in progress
Firmware 478.0.0.0.0 built on Fri Jan 13 17:47:58 PST 2023
Bios Version: MBA61.88Z.F000.B00.2301131747
MBA62, Serial from firmware: C17xxxxxxxxxx
hwc: G085 son: MD760D/
CRC32 checksums: ok
Base_18 hardware descriptor
fmm-computer-name: MacBook Air from user
BootOrder: 1:Boot0080
Boot0080: \7AFD3F6D-2719-4CA3-B821-FA9B4D74770B\System\Library\CoreServices\boot.efi
Boot0082: \7AFD3F6D-2719-4CA3-B821-FA9B4D74770B\System\Library\CoreServices\boot.efi
BootFFFF: \pDZ\A20E739E-78F6-3924-A686-272E77E54C35\System\Library\CoreServices\boot.efi
15 boots since last garbage collection, MTC counter: 86 - 101
VSS1 VSS2
1 (1 active) 1 (1 active) Memory Configs g
1 (1 active) 1 (1 active) Memory Configs h
1 (1 active) 1 (1 active) Kernel Panic dumps type A: Pointer type (ok)
0 0 Microsoft certificates (ok)
26 (1 active) 42 (1 active) Boot PathProperties0000 (ok)
11 (1 active) 12 (1 active) NVRAM PathProperties0000 (ok)
VSS1: found 177 variables (47 valid, 130 deleted)
VSS2: found 264 variables (50 valid, 214 deleted)
17785 bytes free space of 65456 in VSS1
416 bytes free space of 65456 in VSS2
...renamed: 23.07.2023_18-22-32_eficheck_dump.bin to MBA62_478.0.0.0.0_C17xxxxxxxx_23.07.2023_18-22-32.bin
###########################################
user$ test_nvram bbs.bin -showall
===================================================
test_nvram_shell_script 17-Sep-2023 by Macschrauber
scanning: bbs.bin
Firmware 144.0.0.0.0 (latest)
Bios Version: MP51.88Z.F000.B00.1904121248
LBSN: C0xxxxxxxxxxxCVKAA BD: 10xxxx10xxxx
Serial from firmware: No_Fsys_found_by_UEFIExtract
ssn previous: H00270ZF20H (refurbished machine or backplane)
This is from a refurbished backplane without a serial number but a ssnp (H00270ZF20H) what needs to be serialised!
hwc: 20H son: .Z0G100AC
CRC32 checksums: ok
Crossflash 4.1->5.1 (bootblock of MP51.007F.B03)
Base_20 hardware descriptor
Boot000x is EFI\OC\OpenCore.efi (LauncherOption: Full)
fmm-computer-name: Stuart’s Mac Pro
MTC count (VSS1, normal): 346
MTC count (VSS2, normal): 344
MTC counts (VSS1, deleted) (1): 344
MTC counts (VSS1, deleted) (2): 345
boot-args: agdpmod=pikera enable-gva-support shikigva=80 unfairgva=1 mbasd=1 -no_compat_check no32exec=0
BootOrder: 1:Boot0001, 2:Boot0080
Boot0001: OpenCore PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x1,0x0,0x0)/HD(1,GPT,608F00FD-AD4A-44C4-8189-17339728BC73,0x28,0x64000)/EFI\OC\OpenCore.efi
Boot0080: PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x1,0x0,0x0)/HD(1,GPT,608F00FD-AD4A-44C4-8189-17339728BC73,0x28,0x64000)/\EFI\BOOT\BOOTX64.efi
BootFFFF: PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x1,0x0,0x0)/HD(1,GPT,608F00FD-AD4A-44C4-8189-17339728BC73,0x28,0x64000)/\EFI\BOOT\BOOTX64.efi
OCBtOrder: 1:OCBt0080
OCBt0080: Mac OS X PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x1,0x0,0x0)/HD(1,GPT,608F00FD-AD4A-44C4-8189-17339728BC73,0x28,0x64000)
2 boots since last garbage collection, MTC counter: 344 - 346
VSS1 VSS2
3 (1 active) 1 Memory Configs g (ok)
3 (1 active) 1 Memory Configs h (ok)
3 (1 active) 1 Memory Configs i (ok)
1 (1 active) 1 Memory Configs j (ok)
1 (1 active) 1 Kernel Panic dumps type A: Pointer type
1 1 fmm-mobileme-token-FMM (ok)
0 0 Microsoft certificates (ok)
1 (1 active) 1 BluetoothActiveControllerInfos (ok)
1 (1 active) 1 BluetoothInternalControllerInfos (ok)
1 (0 active) 1 Boot PathProperties0000 (ok)
2 (1 active) 1 NVRAM PathProperties0000 (ok)
2 (2 active) 2 Boot00xx variables
1 (1 active) 1 OCbt00xx variables
34024 bytes free space of 65464
VSS1 (Formatted) (Healthy), found 69 variables (55 valid, 14 deleted)
VSS2 (Formatted) (Healthy), found 56 variables (56 valid)
---------------------
all variables in VSS1:
1 (ACPI Variable):AcpiGlobalVariable (Normal)
1 (Apple Backup Boot Variable):Boot0080 (Normal)
1 (Apple Backup Boot Variable):BootOrder (Normal)
1 (Apple Boot Variable):AAPL,PanicInfoLog (Normal)
1 (Apple Boot Variable):EFIBluetoothDelay (Normal)
1 (Apple Boot Variable):ForceDisplayRotationInEFI (Normal)
1 (Apple Boot Variable):GPUROM (Normal)
...
...
1 62bf9b1c-8568-48ee-85dc-dd3057660863:boot-feature-usage (Normal)
---------------------
1 (Apple Boot Variable):AAPL,PathProperties0000 (DELETED)
1 (Apple NVRAM Variable):AAPL,PathProperties0000 (DELETED)
2 (Apple NVRAM Variable):DefaultBackgroundColor (DELETED)
2 (EFI Global):MemoryConfig (DELETED)
2 (EFI Global):MemoryConfih (DELETED)
2 (EFI Global):MemoryConfii (DELETED)
2 (EFI Global):_AGP_DISABLED (DELETED)
2 (MTC variable):MTC (DELETED)
---------------------
all variables in VSS2:
1 (ACPI Variable):AcpiGlobalVariable (Normal)
...
...
1 24a6edcb-ebb6-490b-a455-fc9e8fab5366:BluetoothUHEDevices (Normal)
1 62bf9b1c-8568-48ee-85dc-dd3057660863:boot-feature-usage (Normal)
###########################################
test_nvram bbs.bin '-scanvss -a'
...Requesting load of /users/user/Library/Application Support/Macschrauber/DirectHW.kext.
/users/user/Library/Application Support/Macschrauber/DirectHW.kext loaded successfully (or already loaded).
(Reading the FlashROM may take several seconds...)
ScanVSS v0.17, Copyright 2022 Syncretic. All Rights Reserved.
This program comes without any warranty of suitability for any purpose.
-- Found 2 VSS structures.
-- Parsing VSS structures from local flash.
----------------
Signature: 53535624 (Valid)
Size: 0000ffb8 (65464)
Format: 5a (Formatted)
State: fe (Healthy)
Unk16[0]: fe (Normal)
Unk16[1]: 01
Unk32: 00000000
----------------
--------
Variable: 8be4df61-93ca-11d2-aa0d-00e098032b8c:MemoryConfii (EFI Global)
StartID: 55aa (Valid)
State: 7f (Normal)
Unknown8: 00
Attr: 00000003 (NON_VOLATILE, BOOT_SERVICE_ACCESS)
NameSize: 26
DataSize: 1990
DataType: looks like Binary
Data:
00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
...
...
00000100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000007a0: 01 00 00 00 01 01 11 01 01 00 a4 01 00 00 00 00 ................
000007b0: 00 00 10 01 20 01 01 00 a6 01 00 00 00 00 01 00 .... ...........
000007c0: 00 00 11 01 21 01 ....!.
--------
--------
Variable: 8be4df61-93ca-11d2-aa0d-00e098032b8c:MemoryConfij (EFI Global)
StartID: 55aa (Valid)
State: 7f (Normal)
Unknown8: 00
Attr: 00000003 (NON_VOLATILE, BOOT_SERVICE_ACCESS)
NameSize: 26
DataSize: 38
DataType: looks like Binary
Data:
00000000: 01 00 a8 01 00 00 00 00 00 00 20 01 ff ff 01 00 .......... .....
00000010: aa 01 00 00 00 00 01 00 34 35 00 00 3a 00 3a 00 ........45..:.:.
00000020: 10 00 20 00 00 00 .. ...
--------
--------
...
...
###########################################
user$ test_nvram bbs.bin -rename
===================================================
test_nvram_shell_script 17-Sep-2023 by Macschrauber
scanning: bbs.bin
Firmware 144.0.0.0.0 (latest)
...
...
34024 bytes free space of 65464
VSS1 (Formatted) (Healthy), found 69 variables (55 valid, 14 deleted)
VSS2 (Formatted) (Healthy), found 56 variables (56 valid)
rename bbs.bin to MP51_144.0.0.0.0_no_serial_crossflash.bin (1 yes, 0 no) ?