Healthy NVRAM normal behaviour on 4,1->5,1 machines | MacRumors Forums
source link: https://forums.macrumors.com/threads/healthy-nvram-normal-behaviour-on-4-1-5-1-machines.2333460/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
MP 1,1-5,1 Healthy NVRAM normal behaviour on 4,1->5,1 machines
Dec 13, 2021
Reactions: bernuli
amstel78
macrumors 6502
Aug 12, 2018
This is what I'm seeing after tonight's ROM dump. I'll need to reflash with a pristine ROM as it's been a while. That said, my 5,1 has all of its DIMM slots populated and is running OpenCore.
Reactions: spacedcadet and Macschrauber
crjackson2134
macrumors 601
Dayo
macrumors 68000
Dec 21, 2018
1,532
It from what appears to be an account created recently, apparently specifically for the purpose below:And the point of this thread is?
They might well be right, I can't say, but hiding behind a sock puppet account strips all credibility away.contradict @tsialex.
Best stick with the credible party IMO.
Reactions: crjackson2134, prefuse07 and Fastsavage
Fastsavage
macrumors regular
Jun 28, 2011
We all know that with computers you see new errors and faults every day… always something the same but different.
My vote is with experience.
Reactions: prefuse07
Dec 13, 2021
The amount of free space is actually changing at every reboot, this is the little "secret" nobody will tell.The amount of free space left in your screenshot above is dangerously low.
Here is the free space after the next reboot. Now it looks great, right?
Dec 13, 2021
My experience is now based on analyzing hundreds of dumps from dozens of 5,1 and 4,1->5,1 machines.My vote is with experience.
8 reboots (and 8 dumps) before, the 1st VSS store free space was reported the same:
KeesMacPro
macrumors 65816
Nov 7, 2019
1,453
I'm curious about the way you're analyzing these dumps.My experience is now based on analyzing hundreds of dumps from dozens of 5,1 and 4,1->5,1 machines.
I suppose you're not only running the Macschrauber's dumper and looking at the amount of free space...
Dec 13, 2021
UEFITool NE is a great tool and most of the results won't go public. Binwalk is also a great tool, but is not the beginning and the end of all things.I'm curious about the way you're analyzing these dumps
The screenshots from Macschrauber's dumper are easier to understand for everybody, this is why I include them in these posts.
I have some very interesting results from a 5,1 mid-2010 machine and I will write about them within a few days.
amstel78
macrumors 6502
Aug 12, 2018
The amount of free space changing on the SPI flash after each reboot is normal behavior, as far as I understand. This can be affected by the garbage collection routine. The problem arises when certain operations require many variables to be stored in the flash ROM (such as during an OS update), and there's not enough available space remaining. With your first screenshot showing less than 4k bytes, what happens if that does not free up after a reboot during an OS update? I assume it could lead to corruption elsewhere in the ROM.The amount of free space is actually changing at every reboot, this is the little "secret" nobody will tell.
Dec 13, 2021
I don't know what happens if does not free up. What I know for sure is it does free up every time, this is what I'm writing about.With your first screenshot showing less than 4k bytes, what happens if that does not free up after a reboot during an OS update?
After every reboot, the free space decreases with something between 7000 and 8000 Bytes. And when the remaining free space of the 1st VSS store is less than that (at the 8th reboot for this particular machine) it does free up. This is how the NVRAM really works, this is the point.
The other point is the machine won't free up more space if it "believes" that more space is not needed (between the 4th and the 5th reboot, let's say).
Dec 13, 2021
This is what I used to believe a few months ago. That 5,1 mid-2010 machine mentioned above helped me learn a few things.The problem arises when certain operations require many variables to be stored in the flash ROM (such as during an OS update), and there's not enough available space remaining.
amstel78
macrumors 6502
Aug 12, 2018
Interesting. Well, I myself don't know too much about the inner workings of the SPI flash ROM, but I am concerned about it from a longevity perspective. I'm interested to read more about the behavior you posited above, as this is the first time I've heard about there being a specific, repeatable pattern to ROM memory management.After every reboot, the free space decreases with something between 7000 and 8000 Bytes. And when the remaining free space of the 1st VSS store is less than that (at the 8th reboot for this particular machine) it does free up. This is how the NVRAM really works, this is the point.
Dec 13, 2021
Same here. In my case, I'm concerned about the longevity perspective of dozens of 4,1->5,1 machines, so I ended up doing this research. One of the interesting results is that the SST25VF032B from the 4,1 machines actually seems to generate less problems than the MX25L3205D from the mid-2010 machines.I am concerned about it from a longevity perspective.
Dayo
macrumors 68000
Dec 21, 2018
1,532
So what happens if you are running an update that needs to store large data and you are on the 6th or 7th reboot of the garbage collection cycle for instance? Are you saying the firmware will realise it needs more space in advance and trigger the garbage collection even though it would only have ordinarily done this on the 8th reboot?This is what I used to believe a few months ago.
I suppose what you are pointing out is not generally known and I get your point that it hasn't perhaps been explained as it perhaps should have.
An important point that should be stressed, but perhaps hasn't enough, is that you should always do a triple NVRAM reset to force garbage collection BEFORE running any update.
There hasn't been a lot of focus on this but this is how the NVRAM works.this is the first time I've heard about there being a specific, repeatable pattern to ROM memory management.
There is one example where it is set out:
Mac OS 11.3 has broken support for older Mac Pros
forums.macrumors.com
Reactions: prefuse07 and amstel78
Dec 13, 2021
I'm not saying the firmware will realise anything, I will tell everybody exactly what happened. Was nothing dramatic.So what happens if you are running an update that needs to store large data and you are on the 6th or 7th reboot of the garbage collection cycle for instance? Are you saying the firmware will realise it needs more space in advance and trigger the garbage collection even though it would only have ordinarily done this on the 8th reboot?
Dayo
macrumors 68000
Dec 21, 2018
1,532
We wait with bated breath!I will tell everybody exactly what happened.
Reactions: crjackson2134 and Fastsavage
amstel78
macrumors 6502
Aug 12, 2018
Thanks. I just figured the garbage collector would run after each reboot, or if a set threshold was reached. I didn't realize it would take up to 8 reboot cycles for the memory to be dumped.There hasn't been a lot of focus on this but this is how the NVRAM works.
There is one example where it is set out:Mac OS 11.3 has broken support for older Mac Pros
I ran the tests again, this time I took care to set Startup Disk from the prefpane to the Big Sur 11.3 Disk. I restarted more than 20 times, this time logging the nvram free space thru a complete nvram circle (from filled to full to garbage collection to the same filled situation) and it...forums.macrumors.com
Dayo
macrumors 68000
Dec 21, 2018
1,532
Seems to vary. Was the 10th reboot in the linked example.I didn't realize it would take up to 8 reboot cycles for the memory to be dumped.
Main point is that you would not ordinarily know where things are in terms of free space or what payload size needs to go into the NVRAM. If things are not in your favour, you can expect to get an overrun and ultimately, a brick.
This is of course unless we actually ever get to see the mentioned "nothing dramatic" outcome at some point.
Reactions: amstel78
Fastsavage
macrumors regular
Jun 28, 2011
Can I ask the purpose of analysing hundreds of dumps - are you looking to solve the issue of bricking or ??My experience is now based on analyzing hundreds of dumps from dozens of 5,1 and 4,1->5,1 machines.
Dec 13, 2021
You can say that too, but mostly I'd like to know what I'm doing, whatever I'm doing.are you looking to solve the issue of bricking
Fastsavage
macrumors regular
Jun 28, 2011
OK - so i don't mean to be rude, but what are you doing?You can say that too, but mostly I'd like to know what I'm doing, whatever I'm doing.
Macschrauber
macrumors 68000
And yes, we know the NVram gets filled up until almost full. After full the garbage collection will run. This will take about 12 reboots from almost empty to full, see the screenshots Dayo posted the link for.
A Dual machine with lots of Ram and 8 Memory slots filled up have bigger nvram "packets" as a Single CPU machine with just 2 Ram slots populated. There are some more variables filling the nvram like stored wifi networks and much more. So it depends how much reboots it takes to get the garbage collection run.
@tsialex investigated and posted loads of details. His investigation and his help made me able to start writing my dumper as I wanted a tool for our CMPs.
Plus I wanted people to take more care about the boot rom and to make backups.
Macschrauber
macrumors 68000
I have also about 300 dumps and use them for mass tests if I add a feature to the bash script behind the dumper.
If you want to use it for tests you can either extract the test_nvram bash script or use it like (example is for the mounted .dmg)
. /Volumes/Macschrauber\'s\ CMP\ Rom\ Dump/RomDump\ Macschrauber.app/Contents/Resources/test_nvram ~/ck.bin
serial from firmware: CK2xxxx
MP51.88Z.0089.B00.1806081708
25 Memory Configs (ok)
2 xml (ok)
0 iCloud Tokkens (ok)
0 Microsoft Certificates (ok)
2 BluetoothActiveControllerInfos (ok)
2 BluetoothInternalControllerInfos (ok)
2 current-network (ok)
9 AAPL Path Properties (ok)
Length of 2nd VSS Store is wrong (FF FF FF FF)
7616 Bytes free space of 65472
Dec 13, 2021
VSS2 is not empty, it stays at 57813 Bytes of free space during the entire cycle of 8 reboots:I don't see the notification about VSS2 being empty after triggered garbage collection.
The next reboot cleaned the 1st VSS completely:
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK