[MemoryInitPeiLib] Reason for splitting the Memory resource descriptor HOB

Pankaj Bansal

Hi Ard/Leif et al.,

I am looking into the code for declaring available system memory (RAM) from PI phase to DXE phase.
I am not able to understand this piece of code and comments :


Why do we need to split the Memory resource descriptor ?
Moreover, this doesn't affect the system because the GCD service coalesces the adjacent entries in GCD memory map:


This would render the splitting of Memory resource descriptor of no use.
Why can't we just declare the FV region as Memory allocation Hob without splitting ?

Pankaj Bansal

Join discuss@edk2.groups.io to automatically receive all group messages.