From 878ddf1fc3540a715f63594ed22b6929e881afb4 Mon Sep 17 00:00:00 2001 From: bbahnsen Date: Fri, 21 Apr 2006 22:54:32 +0000 Subject: Initial import. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3 6f19259b-4bc3-4df7-8a09-765794883524 --- .../PeiResourcePublicationLib.c | 50 ++++++++++++++++++++++ .../PeiResourcePublicationLib.mbd | 30 +++++++++++++ .../PeiResourcePublicationLib.msa | 45 +++++++++++++++++++ MdePkg/Library/PeiResourcePublicationLib/build.xml | 47 ++++++++++++++++++++ 4 files changed, 172 insertions(+) create mode 100644 MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.c create mode 100644 MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.mbd create mode 100644 MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.msa create mode 100644 MdePkg/Library/PeiResourcePublicationLib/build.xml (limited to 'MdePkg/Library/PeiResourcePublicationLib') diff --git a/MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.c b/MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.c new file mode 100644 index 0000000000..2726c53fc5 --- /dev/null +++ b/MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.c @@ -0,0 +1,50 @@ +/** @file + Resource Publication Library that uses PEI Core Services to publish system memory. + + Copyright (c) 2006, Intel Corporation
+ All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + + Module Name: PeiResourcePublicationLib.c + +**/ + + +/** + + Declares the presence of permanent system memory in the platform. + + Declares that the system memory buffer specified by MemoryBegin and MemoryLength + as permanent memory that may be used for general purpose use by software. + The amount of memory available to software may be less than MemoryLength + if published memory has alignment restrictions. + + @param MemoryBegin The start address of the memory being declared. + @param MemoryLength The number of bytes of memory being declared. + + @retval RETURN_SUCCESS The memory buffer was published. + @retval RETURN_OUT_OF_RESOURCES There are not enough resources to publish the memory buffer + +**/ +RETURN_STATUS +EFIAPI +PublishSystemMemory ( + IN PHYSICAL_ADDRESS MemoryBegin, + IN UINT64 MemoryLength + ) +{ + EFI_STATUS Status; + + ASSERT (MemoryLength > 0); + ASSERT (MemoryLength <= (MAX_ADDRESS - MemoryBegin + 1)); + + Status = PeiCoreInstallPeiMemory (MemoryBegin, MemoryLength); + + return (RETURN_STATUS) Status; +} + diff --git a/MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.mbd b/MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.mbd new file mode 100644 index 0000000000..4271c550ef --- /dev/null +++ b/MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.mbd @@ -0,0 +1,30 @@ + + + + + PeiResourcePublicationLib + e8d6390d-e190-4957-9ab6-d47d51b01336 + 0 + FIX ME! + Copyright (c) 2006, Intel Corporation + + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + + 2006-03-17 09:00 + 2006-03-19 15:17 + + diff --git a/MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.msa b/MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.msa new file mode 100644 index 0000000000..c4c6109680 --- /dev/null +++ b/MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.msa @@ -0,0 +1,45 @@ + + + + + PeiResourcePublicationLib + PEIM + LIBRARY + e8d6390d-e190-4957-9ab6-d47d51b01336 + 0 + Component description file for the entry point to a EFIDXE Drivers + FIX ME! + Copyright (c) 2006, Intel Corporation + + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + + 0 + 2006-03-17 09:00 + 2006-03-19 15:17 + + + ResourcePublicationLib + PeiCoreLib + DebugLib + + + PeiResourcePublicationLib.c + + + MdePkg + + diff --git a/MdePkg/Library/PeiResourcePublicationLib/build.xml b/MdePkg/Library/PeiResourcePublicationLib/build.xml new file mode 100644 index 0000000000..b5ad8581e9 --- /dev/null +++ b/MdePkg/Library/PeiResourcePublicationLib/build.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file -- cgit v1.2.3