/* This function "opens" SMRAM so that it is visible while not inside of SMM. The function should return EFI_UNSUPPORTED if the hardware does not support hiding of SMRAM. The function should return EFI_DEVICE_ERROR if the SMRAM configuration is locked. */
STATIC EFI_STATUS EFIAPI SmmAccessPeiOpen(IN EFI_PEI_SERVICES **PeiServices, IN PEI_SMM_ACCESS_PPI *This, IN UINTN DescriptorIndex)
/* This function "opens" SMRAM so that it is visible while not inside of SMM. The function should return EFI_UNSUPPORTED if the hardware does not support hiding of SMRAM. The function should return EFI_DEVICE_ERROR if the SMRAM configuration is locked. */
STATIC EFI_STATUS EFIAPI SmmAccessPeiOpen(IN EFI_PEI_SERVICES **PeiServices, IN PEI_SMM_ACCESS_PPI *This, IN UINTN DescriptorIndex)
{
  if (DescriptorIndex >= DescIdxCount) {
    return EFI_INVALID_PARAMETER;
  }
  return SmramAccessOpen (&This->LockState, &This->OpenState);
}