]>
Commit | Line | Data |
---|---|---|
56836fe9 | 1 | /** @file\r |
2 | Runtime memory status code worker in DXE.\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: 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 | |
25 | EFI_STATUS\r | |
26 | RtMemoryStatusCodeInitializeWorker (\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 | |
a93763b7 | 37 | sizeof (RUNTIME_MEMORY_STATUSCODE_HEADER) +\r |
38 | PcdGet16 (PcdStatusCodeRuntimeMemorySize) *\r | |
39 | 1024\r | |
56836fe9 | 40 | );\r |
41 | \r | |
42 | ASSERT (NULL != RtMemoryStatusCodeTable);\r | |
43 | \r | |
44 | RtMemoryStatusCodeTable->RecordIndex = 0;\r | |
45 | RtMemoryStatusCodeTable->NumberOfRecords = 0;\r | |
46 | RtMemoryStatusCodeTable->MaxRecordsNumber = \r | |
47 | (PcdGet16 (PcdStatusCodeRuntimeMemorySize) * 1024) / sizeof (MEMORY_STATUSCODE_RECORD);\r | |
48 | \r | |
49 | gDxeStatusCode.RtMemoryStatusCodeTable[PHYSICAL_MODE] = RtMemoryStatusCodeTable;\r | |
50 | return EFI_SUCCESS;\r | |
51 | }\r | |
52 | \r | |
53 | \r | |
54 | /**\r | |
55 | Report status code into runtime memory. If the runtime pool is full, roll back to the \r | |
56 | first record and overwrite it.\r | |
57 | \r | |
58 | @param RtMemoryStatusCodeTable \r | |
59 | Point to Runtime memory table header.\r | |
60 | \r | |
61 | Content-type: text/html ]>