]>
Commit | Line | Data |
---|---|---|
878ddf1f | 1 | /** @file\r |
2 | Resource Publication Library that uses PEI Core Services to publish system memory.\r | |
3 | \r | |
4 | Copyright (c) 2006, Intel Corporation<BR>\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: PeiResourcePublicationLib.c\r | |
14 | \r | |
15 | **/\r | |
16 | \r | |
17 | \r | |
18 | /**\r | |
19 | \r | |
20 | Declares the presence of permanent system memory in the platform.\r | |
21 | \r | |
22 | Declares that the system memory buffer specified by MemoryBegin and MemoryLength\r | |
23 | as permanent memory that may be used for general purpose use by software.\r | |
24 | The amount of memory available to software may be less than MemoryLength\r | |
25 | if published memory has alignment restrictions. \r | |
26 | \r | |
27 | @param MemoryBegin The start address of the memory being declared.\r | |
28 | @param MemoryLength The number of bytes of memory being declared.\r | |
29 | \r | |
30 | @retval RETURN_SUCCESS The memory buffer was published.\r | |
31 | @retval RETURN_OUT_OF_RESOURCES There are not enough resources to publish the memory buffer\r | |
32 | \r | |
33 | **/\r | |
34 | RETURN_STATUS\r | |
35 | EFIAPI\r | |
36 | PublishSystemMemory (\r | |
37 | IN PHYSICAL_ADDRESS MemoryBegin,\r | |
38 | IN UINT64 MemoryLength\r | |
39 | )\r | |
40 | {\r | |
41 | EFI_STATUS Status;\r | |
42 | \r | |
43 | ASSERT (MemoryLength > 0);\r | |
44 | ASSERT (MemoryLength <= (MAX_ADDRESS - MemoryBegin + 1));\r | |
45 | \r | |
84a99d48 | 46 | Status = PeiServicesInstallPeiMemory (MemoryBegin, MemoryLength);\r |
878ddf1f | 47 | \r |
48 | return (RETURN_STATUS) Status;\r | |
49 | }\r | |
50 | \r |