1 
2 /*++
3 
4 Copyright (c)  1999  - 2014, Intel Corporation. All rights reserved
5 
6   This program and the accompanying materials are licensed and made available under
7   the terms and conditions of the BSD License that accompanies this distribution.
8   The full text of the license may be found at
9   http://opensource.org/licenses/bsd-license.php.
10 
11   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 
14 
15 Module Name:
16 
17   MemInfo.h
18 
19 Abstract:
20 
21   This protocol provides the memory information data, such as
22   total physical memory size, memory frequency, memory size
23   of each dimm and rank.
24 
25   This protocol is EFI compatible.
26 
27 --*/
28 
29 #ifndef _MEM_INFO_PROTOCOL_H_
30 #define _MEM_INFO_PROTOCOL_H_
31 
32 //
33 // Define the  protocol GUID
34 //
35 #define MEM_INFO_PROTOCOL_GUID \
36   { \
37     0x6f20f7c8, 0xe5ef, 0x4f21, 0x8d, 0x19, 0xed, 0xc5, 0xf0, 0xc4, 0x96, 0xae \
38   }
39 
40 //
41 // Extern the GUID for protocol users.
42 //
43 extern EFI_GUID                   gMemInfoProtocolGuid;
44 
45 //
46 // Forward reference for ANSI C compatibility
47 //
48 typedef struct _MEM_INFO_PROTOCOL MEM_INFO_PROTOCOL;
49 
50 //
51 // Protocol definitions
52 //
53 
54 #define CH_NUM    2
55 #define DIMM_NUM  1
56 #define RANK_NUM  2
57 
58 #pragma pack(1)
59 typedef struct {
60   UINT32  memSize;
61   UINT8   ddrFreq;
62   UINT8   ddrType;
63   BOOLEAN EccSupport;
64   UINT16  dimmSize[CH_NUM * DIMM_NUM];
65   UINT8   reserved;
66   UINT16   reserved2;
67 } MEMORY_INFO_DATA;
68 #pragma pack()
69 
70 /*++
71 Data definition:
72 
73   memSize         Total physical memory size
74   ddrFreq         DDR Frequency
75   EccSupport      ECC Support
76   dimmSize        Dimm Size
77   DimmExist       Dimm Present or not
78   RankInDimm      No. of ranks in a dimm
79 
80 --*/
81 
82 //
83 // Protocol definition
84 //
85 struct _MEM_INFO_PROTOCOL {
86   MEMORY_INFO_DATA  MemInfoData;
87 };
88 
89 #endif
90