Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: 025a95b7edfbb6ca11356ab87a300db443bd105b
      
https://github.com/tianocore/edk2/commit/025a95b7edfbb6ca11356ab87a300db443bd105b
  Author: Dun Tan <[email protected]>
  Date:   2024-06-17 (Mon, 17 Jun 2024)

  Changed paths:
    A MdeModulePkg/Include/Guid/VariableRuntimeCacheInfo.h
    M MdeModulePkg/MdeModulePkg.dec

  Log Message:
  -----------
  MdeModulePkg:Add new gEdkiiVariableRuntimeCacheInfoHobGuid

This commit defines VARIABLE_RUNTIME_CACHE_INFO HOB.
The HOB is used to store the address and size of the
buffer that will be used for variable runtime service
when the PcdEnableVariableRuntimeCache is TRUE.

In following patches, when PcdEnableVariableRuntimeCache
is TRUE, VariablePei module will install a callback of
gEfiPeiMemoryDiscoveredPpiGuid to allocate needed buffer
for different type cache, unblock the buffer and build HOB.
Then VariableSmmRuntimeDxe driver will consume the
gEdkiiVariableRuntimeCacheInfoHobGuid to initialize the
variable runtime cache related content.

Signed-off-by: Dun Tan <[email protected]>


  Commit: d8f513de3e3ef228af7e6facf0ad3e35c3224032
      
https://github.com/tianocore/edk2/commit/d8f513de3e3ef228af7e6facf0ad3e35c3224032
  Author: Dun Tan <[email protected]>
  Date:   2024-06-17 (Mon, 17 Jun 2024)

  Changed paths:
    M MdeModulePkg/Universal/Variable/Pei/Variable.c
    M MdeModulePkg/Universal/Variable/Pei/Variable.h
    M MdeModulePkg/Universal/Variable/Pei/VariablePei.inf

  Log Message:
  -----------
  MdeModulePkg:Create gEdkiiVariableRuntimeCacheInfoHobGuid

Install the callback of gEfiPeiMemoryDiscoveredPpiGuid
to create gEdkiiVariableRuntimeCacheInfoHobGuid in
VariablePei module. When PcdEnableVariableRuntimeCache
is TRUE, the callback will be installed to allocate
the needed buffer for different type variable runtime
cache, unblock the buffer and build this HOB. Then the
runtime cache buffer address and size will be saved in
the HOB content.

Signed-off-by: Dun Tan <[email protected]>


  Commit: 645d9f6f8d221802dc9cdf22b05139b593817507
      
https://github.com/tianocore/edk2/commit/645d9f6f8d221802dc9cdf22b05139b593817507
  Author: Dun Tan <[email protected]>
  Date:   2024-06-17 (Mon, 17 Jun 2024)

  Changed paths:
    M MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c

  Log Message:
  -----------
  MdeModulePkg:Remove unnecessary global variables

Remove the two unnecessary global variables and
replace them by two local variables:
  mVariableRuntimeNvCacheBufferSize
  mVariableRuntimeVolatileCacheBufferSize

Signed-off-by: Dun Tan <[email protected]>


  Commit: c1c2e474a23ab134f93266815a1b4c147b0e9b48
      
https://github.com/tianocore/edk2/commit/c1c2e474a23ab134f93266815a1b4c147b0e9b48
  Author: Dun Tan <[email protected]>
  Date:   2024-06-17 (Mon, 17 Jun 2024)

  Changed paths:
    M MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c

  Log Message:
  -----------
  MdeModulePkg:Remove unneed FreePages for RuntimeHobCacheBuffer

Remove unneed FreePages() for RuntimeHobCacheBuffer which is
allocated in PEI phase.
So the global variable mVariableRuntimeHobCacheBufferSize
also can be removed.

Signed-off-by: Dun Tan <[email protected]>


  Commit: 689f415a494b859453c5ebec7aa8c94d310a0b25
      
https://github.com/tianocore/edk2/commit/689f415a494b859453c5ebec7aa8c94d310a0b25
  Author: Dun Tan <[email protected]>
  Date:   2024-06-17 (Mon, 17 Jun 2024)

  Changed paths:
    M MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c
    M MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf

  Log Message:
  -----------
  MdeModulePkg:Consume gEdkiiVariableRuntimeCacheInfoHobGuid

Consume gEdkiiVariableRuntimeCacheInfoHobGuid in

VariableSmmRuntimeDxe driver to initialize the following

variable cache related buffer:
  *mVariableRuntimeHobCacheBuffer
  *mVariableRuntimeNvCacheBuffer
  *mVariableRuntimeVolatileCacheBuffer
  *mVariableRuntimeCachePendingUpdate
  *mVariableRuntimeCacheReadLock
  *mHobFlushComplete

The code to to allocate 
and unblock the buffer for
different type cache in VariableSmmRuntimeDxe is also
removed in this commit.

Signed-off-by: Dun Tan <[email protected]>


  Commit: 92974e3d189156f46c8f78390eec33d3e0e0c26e
      
https://github.com/tianocore/edk2/commit/92974e3d189156f46c8f78390eec33d3e0e0c26e
  Author: Dun Tan <[email protected]>
  Date:   2024-06-17 (Mon, 17 Jun 2024)

  Changed paths:
    M MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c
    M MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf

  Log Message:
  -----------
  MdeModulePkg:Remove the usage of PcdEnableVariableRuntimeCache

Remove the usage of PcdEnableVariableRuntimeCache. We can
use the existence of gEdkiiVariableRuntimeCacheInfoHobGuid
to indicate if variable runtime cache is enabled or not.

Signed-off-by: Dun Tan <[email protected]>


  Commit: 081df0ec203346e8fb711478c95d222f70a522eb
      
https://github.com/tianocore/edk2/commit/081df0ec203346e8fb711478c95d222f70a522eb
  Author: Dun Tan <[email protected]>
  Date:   2024-06-17 (Mon, 17 Jun 2024)

  Changed paths:
    M MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c

  Log Message:
  -----------
  MdeModulePkg: Refine InitVariableCache()

Refine the code logic in InitVariableCache().
In this commit, three times calling of
InitVariableCache() for different type cache are
merged into one calling. This commit is to make
the code looks cleaner and doesn't change any
code functionality.

Signed-off-by: Dun Tan <[email protected]>


  Commit: 128513afcdfa77e94c9637e643898e61c8218e34
      
https://github.com/tianocore/edk2/commit/128513afcdfa77e94c9637e643898e61c8218e34
  Author: Dun Tan <[email protected]>
  Date:   2024-06-17 (Mon, 17 Jun 2024)

  Changed paths:
    M MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c

  Log Message:
  -----------
  MdeModulePkg:Add global variable mVariableRtCacheInfo

Add global variable mVariableRtCacheInfo to save the
content in gEdkiiVariableRuntimeCacheInfoHobGuid. With
this new global variable, 7 global variables can be
removed.

Signed-off-by: Dun Tan <[email protected]>


Compare: https://github.com/tianocore/edk2/compare/9fc61309bf56...128513afcdfa

To unsubscribe from these emails, change your notification settings at 
https://github.com/tianocore/edk2/settings/notifications


_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to