]> git.proxmox.com Git - mirror_edk2.git/blame - EdkModulePkg/Universal/StatusCode/Pei/MemoryStausCodeWorker.c
Change license of following files from Intel Copy Right to BSD-license.
[mirror_edk2.git] / EdkModulePkg / Universal / StatusCode / Pei / MemoryStausCodeWorker.c
Content-type: text/html ]> git.proxmox.com Git - mirror_edk2.git/blame - EdkModulePkg/Universal/StatusCode/Pei/MemoryStausCodeWorker.c


500 - Internal Server Error

Malformed UTF-8 character (fatal) at (eval 6) line 1, <$fd> line 173.
CommitLineData
56836fe9 1/** @file\r
2 Memory status code worker in PEI.\r
3\r
161c26a7 4 Copyright (c) 2006, Intel Corporation \r
5 All rights reserved. This program and the accompanying materials \r
6 are licensed and made available under the terms and conditions of the BSD License \r
7 which accompanies this distribution. The full text of the license may be found at \r
8 http://opensource.org/licenses/bsd-license.php \r
9 \r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
56836fe9 12\r
13 Module Name: MemoryStatusCodeWorker.c\r
14\r
15**/\r
16\r
17/**\r
18 Create one memory status code GUID'ed HOB, use PacketIndex \r
19 to identify the packet.\r
20\r
21 @param PacketIndex Index of records packet. \r
22 \r
23 @return The function always return EFI_SUCCESS\r
24\r
25**/\r
26MEMORY_STATUSCODE_PACKET_HEADER *\r
27CreateMemoryStatusCodePacket (\r
28 UINT16 PacketIndex\r
29 )\r
30{\r
31 MEMORY_STATUSCODE_PACKET_HEADER *PacketHeader;\r
32\r
33 //\r
34 // Build GUID'ed HOB with PCD defined size.\r
35 //\r
36 PacketHeader =\r
37 (MEMORY_STATUSCODE_PACKET_HEADER *) BuildGuidHob (\r
38 &gMemoryStatusCodeRecordGuid, \r
39 (PcdGet16 (PcdStatusCodeMemorySize) * 1024) + sizeof (MEMORY_STATUSCODE_PACKET_HEADER));\r
40 ASSERT (PacketHeader != NULL);\r
41\r
42 PacketHeader->MaxRecordsNumber = (PcdGet16 (PcdStatusCodeMemorySize) * 1024)/ sizeof (MEMORY_STATUSCODE_RECORD);\r
43 PacketHeader->PacketIndex = PacketIndex;\r
44 PacketHeader->RecordIndex = 0;\r
45\r
46 return PacketHeader;\r
47}\r
48\r
49\r
50\r
51/**\r
52 Initialize memory status code.\r
53 Create one GUID'ed HOB with PCD defined size. If create required size \r
54 GUID'ed HOB failed, then ASSERT().\r
55 \r
56 @return The function always return EFI_SUCCESS\r
57\r
58**/\r
59EFI_STATUS\r
60MemoryStatusCodeInitializeWorker (\r
61 VOID\r
62 )\r
63{\r
64 //\r
65 // Create first memory status code GUID'ed HOB.\r
66 //\r
67 CreateMemoryStatusCodePacket (0);\r
68\r
69 return EFI_SUCCESS;\r
70}\r
71\r
72\r
73/**\r
74 Report status code into GUID'ed HOB..\r
75 \r
76