From 249383cf15342d386e7cf832191653e8232b0a3d Mon Sep 17 00:00:00 2001 From: andrewfish Date: Thu, 16 Sep 2010 20:23:33 +0000 Subject: Added SecDispatchTable library to allow custom PPIs to be passed up to into PEI Core. This will allow platform specific libraries to do thinks like map hardware devices directly into the emulator. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10882 6f19259b-4bc3-4df7-8a09-765794883524 --- .../SecDispatchTableLib/SecDispatchTableLib.c | 36 +++++++++++++++++++ .../SecDispatchTableLib/SecDispatchTableLib.inf | 42 ++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 UnixPkg/Library/SecDispatchTableLib/SecDispatchTableLib.c create mode 100644 UnixPkg/Library/SecDispatchTableLib/SecDispatchTableLib.inf (limited to 'UnixPkg/Library') diff --git a/UnixPkg/Library/SecDispatchTableLib/SecDispatchTableLib.c b/UnixPkg/Library/SecDispatchTableLib/SecDispatchTableLib.c new file mode 100644 index 0000000000..da3d182f1e --- /dev/null +++ b/UnixPkg/Library/SecDispatchTableLib/SecDispatchTableLib.c @@ -0,0 +1,36 @@ +/** @file + Allows an override of the SEC SEC PPI Dispatch Table. This allows + customized PPIs to be passed into the PEI Core. + +Copyright (c) 2008 - 2010, Apple Inc. 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. + +--*/ + +#include + +/** + Allow an override of the Sec PPI Dispatch Table. This table contains PPIs passed + up from SEC to PEI. This function is responcible for allocating space for the + overridden table. + + + @param OriginalTable SECs default PPI dispatch table + + @return OriginalTable or override of the table + +**/ +EFI_PEI_PPI_DESCRIPTOR * +EFIAPI +OverrideDispatchTable ( + IN CONST EFI_PEI_PPI_DESCRIPTOR *OriginalTable + ) +{ + return (EFI_PEI_PPI_DESCRIPTOR *)OriginalTable; +} diff --git a/UnixPkg/Library/SecDispatchTableLib/SecDispatchTableLib.inf b/UnixPkg/Library/SecDispatchTableLib/SecDispatchTableLib.inf new file mode 100644 index 0000000000..858a14012d --- /dev/null +++ b/UnixPkg/Library/SecDispatchTableLib/SecDispatchTableLib.inf @@ -0,0 +1,42 @@ +## @file +# A library to produce the global variable 'gUnix' +# +# This library contains a single global variable 'gUnix' along with a constructor to initialize that global. +# Copyright (c) 2006 - 2010, 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. +# +# +## + +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = NullSecDispatchTableLib + FILE_GUID = D9F3D6F5-97C4-469A-848B-03F742FCCEA3 + MODULE_TYPE = BASE + VERSION_STRING = 1.0 + LIBRARY_CLASS = SecDispatchTableLib + +# +# The following information is for reference only and not required by the build tools. +# +# VALID_ARCHITECTURES = IA32 X64 IPF EBC +# + +[Sources] + SecDispatchTableLib.c + + +[Packages] + MdePkg/MdePkg.dec + UnixPkg/UnixPkg.dec + +[LibraryClasses] + BaseLib + + -- cgit v1.2.3