VlvPolicy.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /*++
  2. Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved
  3. SPDX-License-Identifier: BSD-2-Clause-Patent
  4. Module Name:
  5. VlvPolicy.h
  6. Abstract:
  7. Interface definition details between ValleyView MRC and platform drivers during PEI phase.
  8. --*/
  9. #ifndef _VLV_POLICY_PPI_H_
  10. #define _VLV_POLICY_PPI_H_
  11. //
  12. // MRC Policy provided by platform for PEI phase {7D84B2C2-22A1-4372-B12C-EBB232D3A6A3}
  13. //
  14. #define VLV_POLICY_PPI_GUID \
  15. { \
  16. 0x7D84B2C2, 0x22A1, 0x4372, 0xB1, 0x2C, 0xEB, 0xB2, 0x32, 0xD3, 0xA6, 0xA3 \
  17. }
  18. //
  19. // Extern the GUID for protocol users.
  20. //
  21. extern EFI_GUID gVlvPolicyPpiGuid;
  22. //
  23. // PPI revision number
  24. // Any backwards compatible changes to this PPI will result in an update in the revision number
  25. // Major changes will require publication of a new PPI
  26. //
  27. #define MRC_PLATFORM_POLICY_PPI_REVISION 1
  28. #ifndef MAX_SOCKETS
  29. #define MAX_SOCKETS 4
  30. #endif
  31. #define S3_TIMING_DATA_LEN 9
  32. #define S3_READ_TRAINING_DATA_LEN 16
  33. #define S3_WRITE_TRAINING_DATA_LEN 12
  34. #ifndef S3_RESTORE_DATA_LEN
  35. #define S3_RESTORE_DATA_LEN (S3_TIMING_DATA_LEN + S3_READ_TRAINING_DATA_LEN + S3_WRITE_TRAINING_DATA_LEN)
  36. #endif // S3_RESTORE_DATA_LEN
  37. #pragma pack(1)
  38. //
  39. // MRC Platform Data Structure
  40. //
  41. typedef struct {
  42. UINT8 SpdAddressTable[MAX_SOCKETS];
  43. UINT8 TSonDimmSmbusAddress[MAX_SOCKETS];
  44. UINT16 SmbusBar;
  45. UINT32 IchRcba;
  46. UINT32 WdbBaseAddress; // Write Data Buffer area (WC caching mode)
  47. UINT32 WdbRegionSize;
  48. UINT32 SmBusAddress;
  49. UINT8 UserBd;
  50. UINT8 PlatformType;
  51. UINT8 FastBoot;
  52. UINT8 DynSR;
  53. } VLV_PLATFORM_DATA;
  54. typedef struct {
  55. UINT16 MmioSize;
  56. UINT16 GttSize;
  57. UINT8 IgdDvmt50PreAlloc;
  58. UINT8 PrimaryDisplay;
  59. UINT8 PAVPMode;
  60. UINT8 ApertureSize;
  61. } GT_CONFIGURATION;
  62. typedef struct {
  63. UINT8 EccSupport;
  64. UINT16 DdrFreqLimit;
  65. UINT8 MaxTolud;
  66. } MEMORY_CONFIGURATION;
  67. //
  68. // MRC Platform Policiy PPI
  69. //
  70. typedef struct _VLV_POLICY_PPI {
  71. UINT8 Revision;
  72. VLV_PLATFORM_DATA PlatformData;
  73. GT_CONFIGURATION GtConfig;
  74. MEMORY_CONFIGURATION MemConfig;
  75. VOID *S3DataPtr; // was called MRC_PARAMS_SAVE_RESTORE
  76. UINT8 ISPEn; //ISP (IUNIT) Device Enabled
  77. UINT8 ISPPciDevConfig; //ISP (IUNIT) Device Config: 0->B0/D2/F0 for Window OS, 1->B0D3/F0 for Linux OS
  78. } VLV_POLICY_PPI;
  79. #pragma pack()
  80. #endif // _VLV_POLICY_PPI_H_