/* PEI_SMM_ACCESS_PPI and EFI_SMM_ACCESS2_PROTOCOL member functions can rely on the LockState and OpenState fields being up-to-date on entry, and they need to restore the same invariant on exit, if they touch the bits in question. */
VOID GetStates(OUT BOOLEAN *LockState, OUT BOOLEAN *OpenState)
/* PEI_SMM_ACCESS_PPI and EFI_SMM_ACCESS2_PROTOCOL member functions can rely on the LockState and OpenState fields being up-to-date on entry, and they need to restore the same invariant on exit, if they touch the bits in question. */
VOID GetStates(OUT BOOLEAN *LockState, OUT BOOLEAN *OpenState)
{
  UINT8  SmramVal, EsmramcVal;
  SmramVal   = PciRead8 (DRAMC_REGISTER_Q35 (MCH_SMRAM));
  EsmramcVal = PciRead8 (DRAMC_REGISTER_Q35 (MCH_ESMRAMC));
  *LockState = !!(SmramVal & MCH_SMRAM_D_LCK);
  *OpenState = !(EsmramcVal & MCH_ESMRAMC_T_EN);
}