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