]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.c
remove some comments introduced by tools.
[mirror_edk2.git] / MdePkg / Library / PeiResourcePublicationLib / PeiResourcePublicationLib.c
CommitLineData
e386b444 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
e386b444 13**/\r
14\r
15\r
16//\r
c7d265a9 17// The package level header files this module uses\r
e386b444 18//\r
c7d265a9 19#include <PiPei.h>\r
20//\r
21// The protocols, PPI and GUID defintions for this module\r
22//\r
23//\r
24// The Library classes this module consumes\r
25//\r
26#include <Library/ResourcePublicationLib.h>\r
27#include <Library/PeiServicesLib.h>\r
28#include <Library/DebugLib.h>\r
29\r
e386b444 30\r
31/**\r
32 \r
33 Declares the presence of permanent system memory in the platform.\r
34\r
35 Declares that the system memory buffer specified by MemoryBegin and MemoryLength\r
36 as permanent memory that may be used for general purpose use by software.\r
37 The amount of memory available to software may be less than MemoryLength\r
38 if published memory has alignment restrictions. \r
39\r
40 @param MemoryBegin The start address of the memory being declared.\r
41 @param MemoryLength The number of bytes of memory being declared.\r
42\r
43 @retval RETURN_SUCCESS The memory buffer was published.\r
44 @retval RETURN_OUT_OF_RESOURCES There are not enough resources to publish the memory buffer\r
45\r
46**/\r
47RETURN_STATUS\r
48EFIAPI\r
49PublishSystemMemory (\r
50 IN PHYSICAL_ADDRESS MemoryBegin,\r
51 IN UINT64 MemoryLength\r
52 )\r
53{\r
54 EFI_STATUS Status;\r
55\r
56 ASSERT (MemoryLength > 0);\r
57 ASSERT (MemoryLength <= (MAX_ADDRESS - MemoryBegin + 1));\r
58\r
59 Status = PeiServicesInstallPeiMemory (MemoryBegin, MemoryLength);\r
60 \r
61 return (RETURN_STATUS) Status;\r
62}\r
63\r