MemInfo.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /*++
  2. Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved
  3. SPDX-License-Identifier: BSD-2-Clause-Patent
  4. Module Name:
  5. MemInfo.h
  6. Abstract:
  7. This protocol provides the memory information data, such as
  8. total physical memory size, memory frequency, memory size
  9. of each dimm and rank.
  10. This protocol is EFI compatible.
  11. --*/
  12. #ifndef _MEM_INFO_PROTOCOL_H_
  13. #define _MEM_INFO_PROTOCOL_H_
  14. //
  15. // Define the protocol GUID
  16. //
  17. #define MEM_INFO_PROTOCOL_GUID \
  18. { \
  19. 0x6f20f7c8, 0xe5ef, 0x4f21, 0x8d, 0x19, 0xed, 0xc5, 0xf0, 0xc4, 0x96, 0xae \
  20. }
  21. //
  22. // Extern the GUID for protocol users.
  23. //
  24. extern EFI_GUID gMemInfoProtocolGuid;
  25. //
  26. // Forward reference for ANSI C compatibility
  27. //
  28. typedef struct _MEM_INFO_PROTOCOL MEM_INFO_PROTOCOL;
  29. //
  30. // Protocol definitions
  31. //
  32. #define CH_NUM 2
  33. #define DIMM_NUM 1
  34. #define RANK_NUM 2
  35. #pragma pack(1)
  36. typedef struct {
  37. UINT32 memSize;
  38. UINT8 ddrFreq;
  39. UINT8 ddrType;
  40. BOOLEAN EccSupport;
  41. UINT16 dimmSize[CH_NUM * DIMM_NUM];
  42. UINT8 reserved;
  43. UINT16 reserved2;
  44. } MEMORY_INFO_DATA;
  45. #pragma pack()
  46. /*++
  47. Data definition:
  48. memSize Total physical memory size
  49. ddrFreq DDR Frequency
  50. EccSupport ECC Support
  51. dimmSize Dimm Size
  52. DimmExist Dimm Present or not
  53. RankInDimm No. of ranks in a dimm
  54. --*/
  55. //
  56. // Protocol definition
  57. //
  58. struct _MEM_INFO_PROTOCOL {
  59. MEMORY_INFO_DATA MemInfoData;
  60. };
  61. #endif