--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!--\r
+Copyright (c) 2006, Intel Corporation\r
+All rights reserved. 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
+<ModuleBuildDescription xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.TianoCore.org/2006/Edk2.0 http://www.TianoCore.org/2006/Edk2.0/SurfaceArea.xsd">\r
+ <MbdHeader>\r
+ <BaseName>MonoStatusCode</BaseName>\r
+ <Guid>1501614E-0E6C-4ef4-8B8F-C276CDFB646F</Guid>\r
+ <Version>0</Version>\r
+ <Description>FIX ME!</Description>\r
+ <Copyright>Copyright (c) 2004-2006, Intel Corporation</Copyright>\r
+ <License>\r
+ All rights reserved. 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
+ </License>\r
+ <Created>2006-03-14 17:04</Created>\r
+ <Modified>2006-03-19 15:17</Modified>\r
+ </MbdHeader>\r
+ <Libraries>\r
+ <Library>PeiReportStatusCodeLib</Library>\r
+ <Library>PeiDxeDebugLibReportStatusCode</Library>\r
+ <Library>BaseLib</Library>\r
+ <Library>PeiMemoryLib</Library>\r
+ <Library>PeiServicesTablePointerLib</Library>\r
+ <Library>PeiHobLib</Library>\r
+ <Library>PeimEntryPoint</Library>\r
+ <Library>EdkMemoryStatusCodeLib</Library>\r
+ <Library>PeiServicesLib</Library>\r
+ </Libraries>\r
+ <BuildOptions ToolChain="MSFT">\r
+ <ImageEntryPoint>_ModuleEntryPoint</ImageEntryPoint>\r
+ </BuildOptions>\r
+</ModuleBuildDescription>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!--\r
+Copyright (c) 2006, Intel Corporation\r
+All rights reserved. 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
+<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.TianoCore.org/2006/Edk2.0 http://www.TianoCore.org/2006/Edk2.0/SurfaceArea.xsd">\r
+ <MsaHeader>\r
+ <BaseName>MonoStatusCode</BaseName>\r
+ <ModuleType>PEIM</ModuleType>\r
+ <ComponentType>PE32_PEIM</ComponentType>\r
+ <Guid>1501614E-0E6C-4ef4-8B8F-C276CDFB646F</Guid>\r
+ <Version>0</Version>\r
+ <Abstract>Component description file for DiskIo module.</Abstract>\r
+ <Description>FIX ME!</Description>\r
+ <Copyright>Copyright (c) 2004-2006, Intel Corporation</Copyright>\r
+ <License>\r
+ All rights reserved. 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
+ </License>\r
+ <Created>2006-03-14 17:04</Created>\r
+ <Updated>2006-03-19 15:17</Updated>\r
+ <Specification>0</Specification>\r
+ </MsaHeader>\r
+ <LibraryClassDefinitions>\r
+ <LibraryClass Usage="ALWAYS_CONSUMED">DebugLib</LibraryClass>\r
+ <LibraryClass Usage="ALWAYS_CONSUMED">PeimEntryPoint</LibraryClass>\r
+ <LibraryClass Usage="ALWAYS_CONSUMED">EdkMemoryStatusCodeLib</LibraryClass>\r
+ <LibraryClass Usage="ALWAYS_CONSUMED">HobLib</LibraryClass>\r
+ </LibraryClassDefinitions>\r
+ <SourceFiles>\r
+ <Filename>MonoStatusCode.dxs</Filename>\r
+ <Filename>MonoStatusCode.c</Filename>\r
+ <Filename>PlatformStatusCode.c</Filename>\r
+ </SourceFiles>\r
+ <Includes>\r
+ <PackageName>MdePkg</PackageName>\r
+ <PackageName>EdkModulePkg</PackageName>\r
+ <PackageName>EdkNt32Pkg</PackageName>\r
+ </Includes>\r
+ <Protocols>\r
+ <Protocol Usage="SOMETIMES_CONSUMED">StatusCode</Protocol>\r
+ </Protocols>\r
+ <Hobs>\r
+ <Hob Usage="SOMETIMES_PRODUCED" HobType="GUID_EXTENSION">\r
+ <Name>TranslateDxeStatusCodeToPeiStatusCode</Name>\r
+ <C_Name>gEfiStatusCodeRuntimeProtocolGuid</C_Name>\r
+ <Guid>0xd2b2b828, 0x826, 0x48a7, 0xb3, 0xdf, 0x98, 0x3c, 0x0, 0x60, 0x24, 0xf0</Guid>\r
+ </Hob>\r
+ </Hobs>\r
+ <PPIs>\r
+ <Ppi Usage="ALWAYS_CONSUMED">StatusCode</Ppi>\r
+ <Ppi Usage="SOMETIMES_CONSUMED">FvFileLoader</Ppi>\r
+ </PPIs>\r
+ <Externs>\r
+ <Extern>\r
+ <ModuleEntryPoint>InstallMonoStatusCode</ModuleEntryPoint>\r
+ </Extern>\r
+ </Externs>\r
+</ModuleSurfaceArea>\r
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-Copyright (c) 2006, Intel Corporation\r
-All rights reserved. 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
-<ModuleBuildDescription xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.TianoCore.org/2006/Edk2.0 http://www.TianoCore.org/2006/Edk2.0/SurfaceArea.xsd">\r
- <MbdHeader>\r
- <BaseName>MonoStatusCode</BaseName>\r
- <Guid>1501614E-0E6C-4ef4-8B8F-C276CDFB646F</Guid>\r
- <Version>0</Version>\r
- <Description>FIX ME!</Description>\r
- <Copyright>Copyright (c) 2004-2006, Intel Corporation</Copyright>\r
- <License>\r
- All rights reserved. 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
- </License>\r
- <Created>2006-03-14 17:04</Created>\r
- <Modified>2006-03-19 15:17</Modified>\r
- </MbdHeader>\r
- <Libraries>\r
- <Library>PeiReportStatusCodeLib</Library>\r
- <Library>PeiDxeDebugLibReportStatusCode</Library>\r
- <Library>BaseLib</Library>\r
- <Library>PeiMemoryLib</Library>\r
- <Library>PeiServicesTablePointerLib</Library>\r
- <Library>PeiHobLib</Library>\r
- <Library>PeimEntryPoint</Library>\r
- <Library>EdkMemoryStatusCodeLib</Library>\r
- <Library>PeiServicesLib</Library>\r
- </Libraries>\r
- <BuildOptions ToolChain="MSFT">\r
- <ImageEntryPoint>_ModuleEntryPoint</ImageEntryPoint>\r
- </BuildOptions>\r
-</ModuleBuildDescription>\r
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-Copyright (c) 2006, Intel Corporation\r
-All rights reserved. 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
-<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.TianoCore.org/2006/Edk2.0 http://www.TianoCore.org/2006/Edk2.0/SurfaceArea.xsd">\r
- <MsaHeader>\r
- <BaseName>MonoStatusCode</BaseName>\r
- <ModuleType>PEIM</ModuleType>\r
- <ComponentType>PE32_PEIM</ComponentType>\r
- <Guid>1501614E-0E6C-4ef4-8B8F-C276CDFB646F</Guid>\r
- <Version>0</Version>\r
- <Abstract>Component description file for DiskIo module.</Abstract>\r
- <Description>FIX ME!</Description>\r
- <Copyright>Copyright (c) 2004-2006, Intel Corporation</Copyright>\r
- <License>\r
- All rights reserved. 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
- </License>\r
- <Created>2006-03-14 17:04</Created>\r
- <Updated>2006-03-19 15:17</Updated>\r
- <Specification>0</Specification>\r
- </MsaHeader>\r
- <LibraryClassDefinitions>\r
- <LibraryClass Usage="ALWAYS_CONSUMED">DebugLib</LibraryClass>\r
- <LibraryClass Usage="ALWAYS_CONSUMED">PeimEntryPoint</LibraryClass>\r
- <LibraryClass Usage="ALWAYS_CONSUMED">EdkMemoryStatusCodeLib</LibraryClass>\r
- <LibraryClass Usage="ALWAYS_CONSUMED">HobLib</LibraryClass>\r
- </LibraryClassDefinitions>\r
- <SourceFiles>\r
- <Filename>..\MonoStatusCode.c</Filename>\r
- <Filename>..\MonoStatusCode.h</Filename>\r
- <Filename>PlatformStatusCode.c</Filename>\r
- <Filename>..\MonoStatusCode.dxs</Filename>\r
- </SourceFiles>\r
- <Includes>\r
- <PackageName>MdePkg</PackageName>\r
- <PackageName>EdkModulePkg</PackageName>\r
- <PackageName>EdkNt32Pkg</PackageName>\r
- </Includes>\r
- <Protocols>\r
- <Protocol Usage="SOMETIMES_CONSUMED">StatusCode</Protocol>\r
- </Protocols>\r
- <Hobs>\r
- <Hob Usage="SOMETIMES_PRODUCED" HobType="GUID_EXTENSION">\r
- <Name>TranslateDxeStatusCodeToPeiStatusCode</Name>\r
- <C_Name>gEfiStatusCodeRuntimeProtocolGuid</C_Name>\r
- <Guid>0xd2b2b828, 0x826, 0x48a7, 0xb3, 0xdf, 0x98, 0x3c, 0x0, 0x60, 0x24, 0xf0</Guid>\r
- </Hob>\r
- </Hobs>\r
- <PPIs>\r
- <Ppi Usage="ALWAYS_CONSUMED">StatusCode</Ppi>\r
- <Ppi Usage="SOMETIMES_CONSUMED">FvFileLoader</Ppi>\r
- </PPIs>\r
- <Externs>\r
- <Extern>\r
- <ModuleEntryPoint>InstallMonoStatusCode</ModuleEntryPoint>\r
- </Extern>\r
- </Externs>\r
-</ModuleSurfaceArea>\r
+++ /dev/null
-/*++\r
-\r
-Copyright (c) 2006, Intel Corporation \r
-All rights reserved. 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
-Module Name:\r
-\r
- PlatformStatusCode.c \r
- \r
-Abstract:\r
-\r
- Contains NT32 specific implementations required to use status codes.\r
-\r
---*/\r
-\r
-#include "../MonoStatusCode.h"\r
-\r
-\r
-BOOLEAN gRunningFromMemory = FALSE;\r
-//\r
-// Platform definitions\r
-//\r
-EFI_PEI_REPORT_STATUS_CODE mSecReportStatusCode = NULL;\r
-\r
-extern EFI_PEI_PROGRESS_CODE_PPI mStatusCodePpi;\r
-\r
-//\r
-// Function implementations\r
-//\r
-EFI_STATUS\r
-EFIAPI\r
-PlatformReportStatusCode (\r
- IN EFI_PEI_SERVICES **PeiServices,\r
- IN EFI_STATUS_CODE_TYPE CodeType,\r
- IN EFI_STATUS_CODE_VALUE Value,\r
- IN UINT32 Instance,\r
- IN EFI_GUID * CallerId,\r
- IN EFI_STATUS_CODE_DATA * Data OPTIONAL\r
- )\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Call all status code listeners in the MonoStatusCode.\r
-\r
-Arguments:\r
-\r
- Same as ReportStatusCode service\r
- \r
-Returns:\r
-\r
- EFI_SUCCESS Always returns success.\r
-\r
---*/\r
-{\r
- if (mSecReportStatusCode != NULL) {\r
- mSecReportStatusCode (PeiServices, CodeType, Value, Instance, CallerId, Data);\r
- }\r
- MemoryReportStatusCode (CodeType, Value, Instance, CallerId, Data);\r
- return EFI_SUCCESS;\r
-}\r
-\r
-VOID\r
-PlatformInitializeStatusCode (\r
- IN EFI_FFS_FILE_HEADER *FfsHeader,\r
- IN EFI_PEI_SERVICES **PeiServices\r
- )\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Initialize the status code listeners. This consists of locating the \r
- listener produced by SecMain.exe.\r
-\r
-Arguments:\r
-\r
- FfsHeader - FV this PEIM was loaded from.\r
- PeiServices - General purpose services available to every PEIM.\r
-\r
-Returns:\r
-\r
- None\r
-\r
---*/\r
-{\r
- EFI_STATUS Status;\r
- EFI_PEI_PROGRESS_CODE_PPI *ReportStatusCodePpi;\r
- EFI_PEI_PPI_DESCRIPTOR *ReportStatusCodeDescriptor;\r
-\r
- //\r
- // Cache the existing status code listener installed by the SEC core.\r
- // We should actually do a heap allocate, install a PPI, etc, but since we\r
- // know that we are running from a DLL, we can use global variables, and\r
- // directly update the status code PPI descriptor\r
- //\r
- //\r
- // Locate SEC status code PPI\r
- //\r
- Status = (*PeiServices)->LocatePpi (\r
- PeiServices,\r
- &gEfiPeiStatusCodePpiGuid,\r
- 0,\r
- &ReportStatusCodeDescriptor,\r
- &ReportStatusCodePpi\r
- );\r
- if (EFI_ERROR (Status)) {\r
- return ;\r
- }\r
-\r
- mSecReportStatusCode = ReportStatusCodePpi->ReportStatusCode;\r
- ReportStatusCodeDescriptor->Ppi = &mStatusCodePpi;\r
-\r
- //\r
- // Always initialize memory status code listener.\r
- //\r
- MemoryStatusCodeInitialize (FfsHeader, PeiServices);\r
-\r
-}\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-InstallMonoStatusCode (\r
- IN EFI_FFS_FILE_HEADER *FfsHeader,\r
- IN EFI_PEI_SERVICES **PeiServices\r
- )\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Install the PEIM. Publish the DXE callback as well.\r
-\r
-Arguments:\r
-\r
- FfsHeader - FV this PEIM was loaded from.\r
- PeiServices - General purpose services available to every PEIM.\r
-\r
-Returns:\r
-\r
- EFI_SUCCESS The function always returns success.\r
-\r
---*/\r
-{\r
- if (!gRunningFromMemory) {\r
- //\r
- // First pass, running from flash, initialize everything\r
- //\r
- InitializeMonoStatusCode (FfsHeader, PeiServices);\r
- } else {\r
- //\r
- // Second pass, running from memory, initialize memory listener and\r
- // publish the DXE listener in a HOB.\r
- //\r
- MemoryStatusCodeInitialize (FfsHeader, PeiServices);\r
- InitializeDxeReportStatusCode (PeiServices);\r
- }\r
-\r
- return EFI_SUCCESS;\r
-}\r
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?><!-- Copyright (c) 2006, Intel Corporation \r
-All rights reserved. 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
-<project basedir="." default="MonoStatusCode"><!--Apply external ANT tasks-->\r
- <taskdef resource="GenBuild.tasks"/>\r
- <taskdef resource="net/sf/antcontrib/antlib.xml"/>\r
- <property environment="env"/>\r
- <property name="WORKSPACE_DIR" value="${env.WORKSPACE}"/>\r
- <import file="${WORKSPACE_DIR}\Tools\Conf\BuildMacro.xml"/><!--MODULE_RELATIVE PATH is relative to PACKAGE_DIR-->\r
- <property name="MODULE_RELATIVE_PATH" value="Pei\MonoStatusCode\Nt32"/>\r
- <property name="MODULE_DIR" value="${PACKAGE_DIR}\${MODULE_RELATIVE_PATH}"/>\r
- <property name="COMMON_FILE" value="${WORKSPACE_DIR}\Tools\Conf\Common.xml"/>\r
- <target name="MonoStatusCode">\r
- <GenBuild baseName="MonoStatusCode" mbdFilename="${MODULE_DIR}\MonoStatusCode.mbd" msaFilename="${MODULE_DIR}\MonoStatusCode.msa"/>\r
- </target>\r
- <target depends="MonoStatusCode_clean" name="clean"/>\r
- <target depends="MonoStatusCode_cleanall" name="cleanall"/>\r
- <target name="MonoStatusCode_clean">\r
- <OutputDirSetup baseName="MonoStatusCode" mbdFilename="${MODULE_DIR}\MonoStatusCode.mbd" msaFilename="${MODULE_DIR}\MonoStatusCode.msa"/>\r
- <if>\r
- <available file="${DEST_DIR_OUTPUT}\MonoStatusCode_build.xml"/>\r
- <then>\r
- <ant antfile="${DEST_DIR_OUTPUT}\MonoStatusCode_build.xml" target="clean"/>\r
- </then>\r
- </if>\r
- <delete dir="${DEST_DIR_OUTPUT}" excludes="*.xml"/>\r
- </target>\r
- <target name="MonoStatusCode_cleanall">\r
- <OutputDirSetup baseName="MonoStatusCode" mbdFilename="${MODULE_DIR}\MonoStatusCode.mbd" msaFilename="${MODULE_DIR}\MonoStatusCode.msa"/>\r
- <if>\r
- <available file="${DEST_DIR_OUTPUT}\MonoStatusCode_build.xml"/>\r
- <then>\r
- <ant antfile="${DEST_DIR_OUTPUT}\MonoStatusCode_build.xml" target="cleanall"/>\r
- </then>\r
- </if>\r
- <delete dir="${DEST_DIR_OUTPUT}"/>\r
- <delete dir="${DEST_DIR_DEBUG}"/>\r
- <delete>\r
- <fileset dir="${BIN_DIR}" includes="**MonoStatusCode*"/>\r
- </delete>\r
- </target>\r
-</project>
\ No newline at end of file
--- /dev/null
+/*++\r
+\r
+Copyright (c) 2006, Intel Corporation \r
+All rights reserved. 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
+Module Name:\r
+\r
+ PlatformStatusCode.c \r
+ \r
+Abstract:\r
+\r
+ Contains NT32 specific implementations required to use status codes.\r
+\r
+--*/\r
+\r
+#include "MonoStatusCode.h"\r
+\r
+\r
+BOOLEAN gRunningFromMemory = FALSE;\r
+//\r
+// Platform definitions\r
+//\r
+EFI_PEI_REPORT_STATUS_CODE mSecReportStatusCode = NULL;\r
+\r
+extern EFI_PEI_PROGRESS_CODE_PPI mStatusCodePpi;\r
+\r
+//\r
+// Function implementations\r
+//\r
+EFI_STATUS\r
+EFIAPI\r
+PlatformReportStatusCode (\r
+ IN EFI_PEI_SERVICES **PeiServices,\r
+ IN EFI_STATUS_CODE_TYPE CodeType,\r
+ IN EFI_STATUS_CODE_VALUE Value,\r
+ IN UINT32 Instance,\r
+ IN EFI_GUID * CallerId,\r
+ IN EFI_STATUS_CODE_DATA * Data OPTIONAL\r
+ )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+ Call all status code listeners in the MonoStatusCode.\r
+\r
+Arguments:\r
+\r
+ Same as ReportStatusCode service\r
+ \r
+Returns:\r
+\r
+ EFI_SUCCESS Always returns success.\r
+\r
+--*/\r
+{\r
+ if (mSecReportStatusCode != NULL) {\r
+ mSecReportStatusCode (PeiServices, CodeType, Value, Instance, CallerId, Data);\r
+ }\r
+ MemoryReportStatusCode (CodeType, Value, Instance, CallerId, Data);\r
+ return EFI_SUCCESS;\r
+}\r
+\r
+VOID\r
+PlatformInitializeStatusCode (\r
+ IN EFI_FFS_FILE_HEADER *FfsHeader,\r
+ IN EFI_PEI_SERVICES **PeiServices\r
+ )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+ Initialize the status code listeners. This consists of locating the \r
+ listener produced by SecMain.exe.\r
+\r
+Arguments:\r
+\r
+ FfsHeader - FV this PEIM was loaded from.\r
+ PeiServices - General purpose services available to every PEIM.\r
+\r
+Returns:\r
+\r
+ None\r
+\r
+--*/\r
+{\r
+ EFI_STATUS Status;\r
+ EFI_PEI_PROGRESS_CODE_PPI *ReportStatusCodePpi;\r
+ EFI_PEI_PPI_DESCRIPTOR *ReportStatusCodeDescriptor;\r
+\r
+ //\r
+ // Cache the existing status code listener installed by the SEC core.\r
+ // We should actually do a heap allocate, install a PPI, etc, but since we\r
+ // know that we are running from a DLL, we can use global variables, and\r
+ // directly update the status code PPI descriptor\r
+ //\r
+ //\r
+ // Locate SEC status code PPI\r
+ //\r
+ Status = (*PeiServices)->LocatePpi (\r
+ PeiServices,\r
+ &gEfiPeiStatusCodePpiGuid,\r
+ 0,\r
+ &ReportStatusCodeDescriptor,\r
+ &ReportStatusCodePpi\r
+ );\r
+ if (EFI_ERROR (Status)) {\r
+ return ;\r
+ }\r
+\r
+ mSecReportStatusCode = ReportStatusCodePpi->ReportStatusCode;\r
+ ReportStatusCodeDescriptor->Ppi = &mStatusCodePpi;\r
+\r
+ //\r
+ // Always initialize memory status code listener.\r
+ //\r
+ MemoryStatusCodeInitialize (FfsHeader, PeiServices);\r
+\r
+}\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+InstallMonoStatusCode (\r
+ IN EFI_FFS_FILE_HEADER *FfsHeader,\r
+ IN EFI_PEI_SERVICES **PeiServices\r
+ )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+ Install the PEIM. Publish the DXE callback as well.\r
+\r
+Arguments:\r
+\r
+ FfsHeader - FV this PEIM was loaded from.\r
+ PeiServices - General purpose services available to every PEIM.\r
+\r
+Returns:\r
+\r
+ EFI_SUCCESS The function always returns success.\r
+\r
+--*/\r
+{\r
+ if (!gRunningFromMemory) {\r
+ //\r
+ // First pass, running from flash, initialize everything\r
+ //\r
+ InitializeMonoStatusCode (FfsHeader, PeiServices);\r
+ } else {\r
+ //\r
+ // Second pass, running from memory, initialize memory listener and\r
+ // publish the DXE listener in a HOB.\r
+ //\r
+ MemoryStatusCodeInitialize (FfsHeader, PeiServices);\r
+ InitializeDxeReportStatusCode (PeiServices);\r
+ }\r
+\r
+ return EFI_SUCCESS;\r
+}\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?><!-- Copyright (c) 2006, Intel Corporation \r
+All rights reserved. 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
+<project basedir="." default="MonoStatusCode"><!--Apply external ANT tasks-->\r
+ <taskdef resource="GenBuild.tasks"/>\r
+ <taskdef resource="net/sf/antcontrib/antlib.xml"/>\r
+ <property environment="env"/>\r
+ <property name="WORKSPACE_DIR" value="${env.WORKSPACE}"/>\r
+ <import file="${WORKSPACE_DIR}\Tools\Conf\BuildMacro.xml"/><!--MODULE_RELATIVE PATH is relative to PACKAGE_DIR-->\r
+ <property name="MODULE_RELATIVE_PATH" value="Pei\MonoStatusCode"/>\r
+ <property name="MODULE_DIR" value="${PACKAGE_DIR}\${MODULE_RELATIVE_PATH}"/>\r
+ <property name="COMMON_FILE" value="${WORKSPACE_DIR}\Tools\Conf\Common.xml"/>\r
+ <target name="MonoStatusCode">\r
+ <GenBuild baseName="MonoStatusCode" mbdFilename="${MODULE_DIR}\MonoStatusCode.mbd" msaFilename="${MODULE_DIR}\MonoStatusCode.msa"/>\r
+ </target>\r
+ <target depends="MonoStatusCode_clean" name="clean"/>\r
+ <target depends="MonoStatusCode_cleanall" name="cleanall"/>\r
+ <target name="MonoStatusCode_clean">\r
+ <OutputDirSetup baseName="MonoStatusCode" mbdFilename="${MODULE_DIR}\MonoStatusCode.mbd" msaFilename="${MODULE_DIR}\MonoStatusCode.msa"/>\r
+ <if>\r
+ <available file="${DEST_DIR_OUTPUT}\MonoStatusCode_build.xml"/>\r
+ <then>\r
+ <ant antfile="${DEST_DIR_OUTPUT}\MonoStatusCode_build.xml" target="clean"/>\r
+ </then>\r
+ </if>\r
+ <delete dir="${DEST_DIR_OUTPUT}" excludes="*.xml"/>\r
+ </target>\r
+ <target name="MonoStatusCode_cleanall">\r
+ <OutputDirSetup baseName="MonoStatusCode" mbdFilename="${MODULE_DIR}\MonoStatusCode.mbd" msaFilename="${MODULE_DIR}\MonoStatusCode.msa"/>\r
+ <if>\r
+ <available file="${DEST_DIR_OUTPUT}\MonoStatusCode_build.xml"/>\r
+ <then>\r
+ <ant antfile="${DEST_DIR_OUTPUT}\MonoStatusCode_build.xml" target="cleanall"/>\r
+ </then>\r
+ </if>\r
+ <delete dir="${DEST_DIR_OUTPUT}"/>\r
+ <delete dir="${DEST_DIR_DEBUG}"/>\r
+ <delete>\r
+ <fileset dir="${BIN_DIR}" includes="**MonoStatusCode*"/>\r
+ </delete>\r
+ </target>\r
+</project>
\ No newline at end of file