--- /dev/null
+/** @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.<BR>
+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.
+
+**/
+
+
+#ifndef __SEC_DISPATCH_TABLE_LIB_H__
+#define __SEC_DISPATCH_TABLE_LIB_H__
+
+/**
+ 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
+ );
+
+
+#endif
--- /dev/null
+/** @file\r
+ Allows an override of the SEC SEC PPI Dispatch Table. This allows \r
+ customized PPIs to be passed into the PEI Core.\r
+\r
+Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>\r
+This program and the accompanying materials \r
+are licensed and made available under the terms and conditions of the BSD License \r
+which accompanies this distribution. The full text of the license may be found at \r
+http://opensource.org/licenses/bsd-license.php \r
+ \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+\r
+--*/\r
+\r
+#include <PiPei.h>\r
+\r
+/**\r
+ Allow an override of the Sec PPI Dispatch Table. This table contains PPIs passed\r
+ up from SEC to PEI. This function is responcible for allocating space for the \r
+ overridden table.\r
+\r
+\r
+ @param OriginalTable SECs default PPI dispatch table\r
+\r
+ @return OriginalTable or override of the table\r
+\r
+**/\r
+EFI_PEI_PPI_DESCRIPTOR *\r
+EFIAPI\r
+OverrideDispatchTable (\r
+ IN CONST EFI_PEI_PPI_DESCRIPTOR *OriginalTable\r
+ )\r
+{\r
+ return (EFI_PEI_PPI_DESCRIPTOR *)OriginalTable;\r
+}\r
--- /dev/null
+## @file\r
+# A library to produce the global variable 'gUnix'\r
+#\r
+# This library contains a single global variable 'gUnix' along with a constructor to initialize that global.\r
+# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+#\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+#\r
+##\r
+\r
+[Defines]\r
+ INF_VERSION = 0x00010005\r
+ BASE_NAME = NullSecDispatchTableLib\r
+ FILE_GUID = D9F3D6F5-97C4-469A-848B-03F742FCCEA3\r
+ MODULE_TYPE = BASE\r
+ VERSION_STRING = 1.0\r
+ LIBRARY_CLASS = SecDispatchTableLib \r
+\r
+#\r
+# The following information is for reference only and not required by the build tools.\r
+#\r
+# VALID_ARCHITECTURES = IA32 X64 IPF EBC\r
+#\r
+\r
+[Sources]\r
+ SecDispatchTableLib.c\r
+\r
+\r
+[Packages]\r
+ MdePkg/MdePkg.dec\r
+ UnixPkg/UnixPkg.dec\r
+\r
+[LibraryClasses]\r
+ BaseLib\r
+\r
+\r
EFI_PHYSICAL_ADDRESS PeiImageAddress;
EFI_SEC_PEI_HAND_OFF *SecCoreData;
UINTN PeiStackSize;
+ EFI_PEI_PPI_DESCRIPTOR *DispatchTable;
//
// Compute Top Of Memory for Stack and PEI Core Allocations
return ;
}
+ //
+ // Allow an override for extra PPIs to be passed up to PEI
+ // This is an easy way to enable OS specific customizations
+ //
+ DispatchTable = OverrideDispatchTable (&gPrivateDispatchTable[0]);
+
//
// Transfer control to the PEI Core
//
PeiSwitchStacks (
(SWITCH_STACK_ENTRY_POINT) (UINTN) PeiCoreEntryPoint,
SecCoreData,
- (VOID *) (UINTN) ((EFI_PEI_PPI_DESCRIPTOR *) &gPrivateDispatchTable),
+ (VOID *)DispatchTable,
NULL,
TopOfStack
);
#include <Library/PcdLib.h>\r
#include <Library/DebugLib.h>\r
#include <Library/ReportStatusCodeLib.h>\r
+#include <Library/SecDispatchTableLib.h>\r
+\r
\r
#define STACK_SIZE 0x20000 \r
\r
BaseLib\r
PeCoffLib\r
ReportStatusCodeLib\r
+ SecDispatchTableLib\r
\r
\r
[Ppis]\r
DebugLib|IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf\r
PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf\r
DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf\r
+ SecDispatchTableLib|UnixPkg/Library/SecDispatchTableLib/SecDispatchTableLib.inf\r
\r
[LibraryClasses.common.USER_DEFINED]\r
DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf\r
DebugLib|IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf\r
PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf\r
DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf\r
+ SecDispatchTableLib|UnixPkg/Library/SecDispatchTableLib/SecDispatchTableLib.inf\r
\r
[LibraryClasses.common.USER_DEFINED]\r
DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf\r