- 
                Notifications
    
You must be signed in to change notification settings  - Fork 162
 
MdeModulePkg/Variable: Move RT cache buffer allocation to DXE #1519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release/202502
Are you sure you want to change the base?
MdeModulePkg/Variable: Move RT cache buffer allocation to DXE #1519
Conversation
| 
           I was originally planning to take this straight to edk2, but it's needed here now. I'll add   | 
    
          Codecov Report❌ Patch coverage is  
 Additional details and impacted files@@                Coverage Diff                @@
##             release/202502    #1519   +/-   ##
=================================================
  Coverage                  ?    1.55%           
=================================================
  Files                     ?      636           
  Lines                     ?   233935           
  Branches                  ?      370           
=================================================
  Hits                      ?     3649           
  Misses                    ?   230273           
  Partials                  ?       13           
 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
  | 
    
f2b15aa    to
    16ac2d6      
    Compare
  
    
          
 Done -   | 
    
        
          
                MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c
              
                Outdated
          
            Show resolved
            Hide resolved
        
      Commit `d8f513de3e3ef228af7e6facf0ad3e35c3224032` added runtime memory allocation to VariablePei. That will cause runtime memory bucket fragmentation affecting hibernate stability as these runtime allocations are separate from the main runtime memory type bucket allocation made by the DXE Core. To preserve the existing functionality but allow the runtime buffer to come from the DXE bucket, the allocations in PEI are changed to boot services data allocations and the contents are moved to the runtime memory buffers (and those pages unblocked to MM) in the DXE variable driver after the bucket has been allocated by the DXE core. Signed-off-by: Michael Kubacki <[email protected]>
…lure If a RT data buffer fails to be allocated or unblocked, clean up the RT cache state by (1) freeing any allocated buffers and (2) resetting the buffer addresses back to zero to indicate the RT cache is not available. Signed-off-by: Michael Kubacki <[email protected]>
16ac2d6    to
    a88d506      
    Compare
  
    
Description
Commit
d8f513de3e3ef228af7e6facf0ad3e35c3224032(an edk2 commit) added runtime memory allocation to VariablePei. That will cause runtime memory bucket fragmentation affecting hibernate stability as these runtime allocations are separate from the main runtime memory type bucket allocation made by the DXE Core.To preserve the existing functionality but allow the runtime buffer to come from the DXE bucket, the allocations in PEI are changed to boot services data allocations and the contents are moved to the runtime memory buffers (and those pages unblocked to MM) in the DXE variable driver after the bucket has been allocated by the DXE core.
How This Was Tested
Integration Instructions