]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | Runtime memory status code worker in DXE.\r | |
3 | \r | |
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 | |
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 | |
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 | Content-type: text/html ]>