]> git.proxmox.com Git - mirror_edk2.git/blame - EdkModulePkg/Universal/StatusCode/Dxe/RtMemoryStatusCodeWorker.c
Fix bug which define different PCD with same token number in EdkModulePkg.spd.
[mirror_edk2.git] / EdkModulePkg / Universal / StatusCode / Dxe / RtMemoryStatusCodeWorker.c
Content-type: text/html ]> git.proxmox.com Git - mirror_edk2.git/blame - EdkModulePkg/Universal/StatusCode/Dxe/RtMemoryStatusCodeWorker.c


500 - Internal Server Error

Malformed UTF-8 character (fatal) at (eval 6) line 1, <$fd> line 128.
CommitLineData
56836fe9 1/** @file\r
2 Runtime memory status code worker in DXE.\r
3\r
4Copyright (c) 2006, Intel Corporation. All rights reserved. \r
5This software and associated documentation (if any) is furnished\r
6under a license and may only be used or copied in accordance\r
7with the terms of the license. Except as permitted by such\r
8license, no part of this software or documentation may be\r
9reproduced, stored in a retrieval system, or transmitted in any\r
10form or by any means without the express written consent of\r
11Intel Corporation.\r
12\r
13 Module Name: RtMemoryStatusCodeWorker.c\r
14\r
15**/\r
16\r
17#include "DxeStatusCode.h"\r
18\r
19/**\r
20 Initialize runtime memory status code.\r
21 \r
22 @return The function always return EFI_SUCCESS\r
23\r
24**/\r
25EFI_STATUS\r
26RtMemoryStatusCodeInitializeWorker (\r
27 VOID\r
28 )\r
29{\r
30 RUNTIME_MEMORY_STATUSCODE_HEADER *RtMemoryStatusCodeTable;\r
31\r
32 //\r
33 // Allocate runtime memory status code pool.\r
34 //\r
35 RtMemoryStatusCodeTable = \r
36 (RUNTIME_MEMORY_STATUSCODE_HEADER *) AllocatePool (\r
37 sizeof (RUNTIME_MEMORY_STATUSCODE_HEADER) + PcdGet16 (PcdStatusCodeRuntimeMemorySize) * 1024\r
38 );\r
39\r
40 ASSERT (NULL != RtMemoryStatusCodeTable);\r
41\r
42 RtMemoryStatusCodeTable->RecordIndex = 0;\r
43 RtMemoryStatusCodeTable->NumberOfRecords = 0;\r
44 RtMemoryStatusCodeTable->MaxRecordsNumber = \r
45 (PcdGet16 (PcdStatusCodeRuntimeMemorySize) * 1024) / sizeof (MEMORY_STATUSCODE_RECORD);\r
46\r
47 gDxeStatusCode.RtMemoryStatusCodeTable[PHYSICAL_MODE] = RtMemoryStatusCodeTable;\r
48 return EFI_SUCCESS;\r
49}\r
50\r
51\r
52/**\r
53 Report status code into runtime memory. If the runtime pool is full, roll back to the \r
54 first record and overwrite it.\r
55 \r
56 @param RtMemoryStatusCodeTable \r
57 Point to Runtime memory table header.\r
58\r
59