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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
/** @file
  Declarations required for SMBIOS DXE driver.
 
  Functions declarations and data type declarations required for SMBIOS DXE
  driver of the Arm Reference Design platforms.
 
  Copyright (c) 2021, ARM Limited. All rights reserved.
  SPDX-License-Identifier: BSD-2-Clause-Patent
**/
 
#ifndef SMBIOS_PLATFORM_DXE_H_
#define SMBIOS_PLATFORM_DXE_H_
 
/**
  Install SMBIOS BIOS information Table.
 
  Install the SMBIOS BIOS information (type 0) table for Arm's reference design
  platforms.
 
  @param[in] Smbios   SMBIOS protocol.
 
  @retval EFI_SUCCESS           Record was added.
  @retval EFI_OUT_OF_RESOURCES  Record was not added.
  @retval EFI_ALREADY_STARTED   The SmbiosHandle passed is already in use.
**/
EFI_STATUS
EFIAPI
InstallType0BiosInformation (
  IN     EFI_SMBIOS_PROTOCOL    *Smbios
  );
 
/**
  Install SMBIOS System information Table.
 
  Install the SMBIOS system information (type 1) table for Arm's reference
  design platforms.
 
  @param[in]  Smbios   SMBIOS protocol.
 
  @retval EFI_SUCCESS           Record was added.
  @retval EFI_NOT_FOUND         Unknown product id.
  @retval EFI_OUT_OF_RESOURCES  Record was not added.
  @retval EFI_ALREADY_STARTED   The SmbiosHandle passed is already in use.
**/
EFI_STATUS
EFIAPI
InstallType1SystemInformation (
  IN     EFI_SMBIOS_PROTOCOL    *Smbios
  );
 
/**
  Install SMBIOS System Enclosure Table
 
  Install the SMBIOS System Enclosure (type 3) table for Arm's Reference Design
  platforms.
 
  @param[in]  Smbios   SMBIOS protocol.
 
  @retval EFI_SUCCESS           Record was added.
  @retval EFI_OUT_OF_RESOURCES  Record was not added.
  @retval EFI_ALREADY_STARTED   The SmbiosHandle passed is already in use.
**/
EFI_STATUS
EFIAPI
InstallType3SystemEnclosure (
  IN     EFI_SMBIOS_PROTOCOL    *Smbios
  );
 
/**
  Install SMBIOS Processor information Table
 
  Install the SMBIOS Processor information (type 4) table for Arm's Reference
  Design platforms.
 
  @param[in]  Smbios   SMBIOS protocol.
 
  @retval EFI_SUCCESS           Record was added.
  @retval EFI_NOT_FOUND         Unknown product id.
  @retval EFI_OUT_OF_RESOURCES  Record was not added.
  @retval EFI_ALREADY_STARTED   The SmbiosHandle passed is already in use.
**/
EFI_STATUS
EFIAPI
InstallType4ProcessorInformation (
  IN     EFI_SMBIOS_PROTOCOL    *Smbios
  );
 
/**
  Install SMBIOS Cache information Table
 
  Install the SMBIOS Cache information (type 7) table for Arm's Reference
  Design platforms.
 
  @param[in] Smbios   SMBIOS protocol.
 
  @retval EFI_SUCCESS           Record was added.
  @retval EFI_NOT_FOUND         Unknown product id.
  @retval EFI_OUT_OF_RESOURCES  Record was not added.
  @retval EFI_ALREADY_STARTED   The SmbiosHandle passed is already in use.
**/
EFI_STATUS
EFIAPI
InstallType7CacheInformation (
  IN     EFI_SMBIOS_PROTOCOL    *Smbios
  );
 
/**
  Install SMBIOS physical memory array table.
 
  Install the SMBIOS physical memory array (type 16) table for Arm's Reference
  Design platforms.
 
  @param[in] Smbios   SMBIOS protocol.
 
  @retval EFI_SUCCESS           Record was added.
  @retval EFI_OUT_OF_RESOURCES  Record was not added.
  @retval EFI_ALREADY_STARTED   The SmbiosHandle passed is already in use.
**/
EFI_STATUS
EFIAPI
InstallType16PhysicalMemoryArray (
  IN     EFI_SMBIOS_PROTOCOL    *Smbios
  );
 
 
/**
  Install SMBIOS memory device table.
 
  Install the SMBIOS memory device (type 17) table for RD platforms.
 
  @param[in] Smbios   SMBIOS protocol.
 
  @retval EFI_SUCCESS           Record was added.
  @retval EFI_OUT_OF_RESOURCES  Record was not added.
  @retval EFI_ALREADY_STARTED   The SmbiosHandle passed is already in use.
**/
EFI_STATUS
EFIAPI
InstallType17MemoryDevice (
  IN     EFI_SMBIOS_PROTOCOL    *Smbios
  );
 
/**
  Install SMBIOS memory array mapped address table
 
  Install the SMBIOS memory array mapped address (type 19) table for RD
  platforms.
 
  @param[in] Smbios   SMBIOS protocol.
 
  @retval EFI_SUCCESS           Record was added.
  @retval EFI_OUT_OF_RESOURCES  Record was not added.
  @retval EFI_ALREADY_STARTED   The SmbiosHandle passed is already in use.
**/
EFI_STATUS
EFIAPI
InstallType19MemoryArrayMappedAddress (
  IN     EFI_SMBIOS_PROTOCOL    *Smbios
  );
 
/**
  Install SMBIOS system boot information
 
  Install the SMBIOS system boot information (type 32) table for RD platforms.
 
  @param[in] Smbios   SMBIOS protocol.
 
  @retval EFI_SUCCESS           Record was added.
  @retval EFI_OUT_OF_RESOURCES  Record was not added.
  @retval EFI_ALREADY_STARTED   The SmbiosHandle passed is already in use.
**/
EFI_STATUS
EFIAPI
InstallType32SystemBootInformation (
  IN     EFI_SMBIOS_PROTOCOL    *Smbios
  );
 
typedef enum {
  SMBIOS_HANDLE_ENCLOSURE = 0x1000,
  SMBIOS_HANDLE_CLUSTER1,
  SMBIOS_HANDLE_L1I_CACHE,
  SMBIOS_HANDLE_L1D_CACHE,
  SMBIOS_HANDLE_L2_CACHE,
  SMBIOS_HANDLE_L3_CACHE,
  SMBIOS_HANDLE_L4_CACHE,
  SMBIOS_HANDLE_PHYSICAL_MEMORY,
  SMBIOS_HANDLE_MEMORY_DEVICE0000,  // Chip 0 Bank 0
  SMBIOS_HANDLE_MEMORY_DEVICE0001,  // Chip 0 Bank 1
  SMBIOS_HANDLE_MEMORY_DEVICE0100,  // Chip 1 Bank 0
  SMBIOS_HANDLE_MEMORY_DEVICE0101,  // Chip 1 Bank 1
  SMBIOS_HANDLE_MEMORY_DEVICE0200,  // Chip 2 Bank 0
  SMBIOS_HANDLE_MEMORY_DEVICE0201,  // Chip 2 Bank 1
  SMBIOS_HANDLE_MEMORY_DEVICE0300,  // Chip 3 Bank 0
  SMBIOS_HANDLE_MEMORY_DEVICE0301,  // Chip 3 Bank 1
} SMBIOS_REFRENCE_HANDLES;
 
#endif // SMBIOS_PLATFORM_DXE_H_