RasImcS3Data.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /** @file
  2. RAS IMC S3 Data Load PPI
  3. @copyright
  4. Copyright 2021 Intel Corporation.
  5. SPDX-License-Identifier: BSD-2-Clause-Patent
  6. **/
  7. #ifndef _RAS_IMC_S3_DATA_H_
  8. #define _RAS_IMC_S3_DATA_H_
  9. #include <Uefi/UefiBaseType.h>
  10. typedef struct _RAS_IMC_S3_DATA_PPI RAS_IMC_S3_DATA_PPI;
  11. /**
  12. Retrieves data for S3 saved memory RAS features from non-volatile storage.
  13. If the Data buffer is too small to hold the contents of the NVS data,
  14. the error EFI_BUFFER_TOO_SMALL is returned and DataSize is set to the
  15. required buffer size to obtain the data.
  16. @param[in] This A pointer to this instance of the RAS_IMC_S3_DATA_PPI.
  17. @param[in, out] DataSize On entry, points to the size in bytes of the Data buffer.
  18. On return, points to the size of the data returned in Data.
  19. @param[out] Data Points to the buffer which will hold the returned data.
  20. @retval EFI_SUCCESS The NVS data was read successfully.
  21. @retval EFI_NOT_FOUND The NVS data does not exist.
  22. @retval EFI_BUFFER_TOO_SMALL The DataSize is too small for the NVS data.
  23. DataSize is updated with the size required for
  24. the NVS data.
  25. @retval EFI_INVALID_PARAMETER DataSize or Data is NULL.
  26. @retval EFI_DEVICE_ERROR The NVS data could not be retrieved because of a device error.
  27. @retval EFI_UNSUPPORTED This platform does not support the save/restore of S3 memory data
  28. **/
  29. typedef
  30. EFI_STATUS
  31. (EFIAPI *RAS_IMC_S3_DATA_PPI_GET_IMC_S3_RAS_DATA) (
  32. IN CONST RAS_IMC_S3_DATA_PPI *This,
  33. IN OUT UINT32 *DataSize,
  34. OUT VOID *Data
  35. );
  36. /**
  37. RAS IMC S3 Data PPI
  38. **/
  39. struct _RAS_IMC_S3_DATA_PPI {
  40. /**
  41. Retrieves data for S3 saved memory RAS features from non-volatile storage.
  42. **/
  43. RAS_IMC_S3_DATA_PPI_GET_IMC_S3_RAS_DATA GetImcS3RasData;
  44. };
  45. extern EFI_GUID gRasImcS3DataPpiGuid;
  46. #endif // _RAS_IMC_S3_DATA_H_