]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Include/Guid/MemoryStatusCodeRecord.h
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Include / Guid / MemoryStatusCodeRecord.h
1 /** @file
2 GUID used to identify status code records HOB that originate from the PEI status code.
3
4 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
5 (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8 **/
9
10 #ifndef __MEMORY_STATUS_CODE_RECORD_H__
11 #define __MEMORY_STATUS_CODE_RECORD_H__
12
13 ///
14 /// Global ID used to identify GUIDed HOBs that start with a structure of type
15 /// MEMORY_STATUSCODE_PACKET_HEADER, followed by an array of structures of type
16 /// MEMORY_STATUSCODE_RECORD. These GUIDed HOBs record all the information
17 /// passed into the ReportStatusCode() service of PEI Services Table.
18 ///
19 /// <pre>
20 /// Memory status code records packet structure :
21 /// +---------------+----------+----------+-----+----------+-----+----------+
22 /// | Packet Header | Record 1 | Record 2 | ... + Record n | ... | Record m |
23 /// +---------------+----------+----------+-----+----------+-----+----------+
24 /// ^ ^ ^
25 /// +--------- RecordIndex -----------+ |
26 /// +---------------- MaxRecordsNumber----------------------+
27 /// </pre>
28 ///
29 #define MEMORY_STATUS_CODE_RECORD_GUID \
30 { \
31 0x60cc026, 0x4c0d, 0x4dda, {0x8f, 0x41, 0x59, 0x5f, 0xef, 0x0, 0xa5, 0x2} \
32 }
33
34 ///
35 /// A header structure that is followed by an array of records that contain the
36 /// parameters passed into the ReportStatusCode() service in the PEI Services Table.
37 ///
38 typedef struct {
39 ///
40 /// Index of the packet.
41 ///
42 UINT16 PacketIndex;
43 ///
44 /// The number of active records in the packet.
45 ///
46 UINT16 RecordIndex;
47 ///
48 /// The maximum number of records that the packet can store.
49 ///
50 UINT32 MaxRecordsNumber;
51 } MEMORY_STATUSCODE_PACKET_HEADER;
52
53 ///
54 /// A header structure that is followed by an array of records that contain the
55 /// parameters passed into the ReportStatusCode() service in the DXE Services Table.
56 ///
57 typedef struct {
58 ///
59 /// The index pointing to the last recored being stored.
60 ///
61 UINT32 RecordIndex;
62 ///
63 /// The number of records being stored.
64 ///
65 UINT32 NumberOfRecords;
66 ///
67 /// The maximum number of records that can be stored.
68 ///
69 UINT32 MaxRecordsNumber;
70 } RUNTIME_MEMORY_STATUSCODE_HEADER;
71
72 ///
73 /// A structure that contains the parameters passed into the ReportStatusCode()
74 /// service in the PEI Services Table.
75 ///
76 typedef struct {
77 ///
78 /// Status Code type to be reported.
79 ///
80 EFI_STATUS_CODE_TYPE CodeType;
81
82 ///
83 /// An operation, plus value information about the class and subclass, used to
84 /// classify the hardware and software entity.
85 ///
86 EFI_STATUS_CODE_VALUE Value;
87
88 ///
89 /// The enumeration of a hardware or software entity within
90 /// the system. Valid instance numbers start with the number 1.
91 ///
92 UINT32 Instance;
93 } MEMORY_STATUSCODE_RECORD;
94
95 extern EFI_GUID gMemoryStatusCodeRecordGuid;
96
97 #endif