+++ /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
- RtPlatformStatusCode.c \r
- \r
-Abstract:\r
-\r
- Contains NT32 specific implementations required to use status codes.\r
-\r
---*/\r
-\r
-//\r
-// Statements that include other files.\r
-//\r
-#include "Tiano.h"\r
-#include "EfiCommonLib.h"\r
-#include "EfiRuntimeLib.h"\r
-#include "EfiStatusCode.h"\r
-#include "EfiHobLib.h"\r
-#include "RtMemoryStatusCodeLib.h"\r
-#include "BsDataHubStatusCodeLib.h"\r
-\r
-//\r
-// Consumed protocols\r
-//\r
-#include EFI_ARCH_PROTOCOL_CONSUMER (StatusCode)\r
-\r
-//\r
-// GUID definitions\r
-//\r
-#include EFI_GUID_DEFINITION (Hob)\r
-\r
-//\r
-// Globals only work at BootService Time. NOT at Runtime!\r
-//\r
-EFI_REPORT_STATUS_CODE mPeiReportStatusCode;\r
-\r
-//\r
-// Function implementations\r
-//\r
-EFI_STATUS\r
-EFIAPI\r
-RtPlatformReportStatusCode (\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
- RtMemoryReportStatusCode (CodeType, Value, Instance, CallerId, Data);\r
- if (EfiAtRuntime ()) {\r
- //\r
- // For now all we do is post code at runtime\r
- //\r
- return EFI_SUCCESS;\r
- }\r
-\r
- BsDataHubReportStatusCode (CodeType, Value, Instance, CallerId, Data);\r
-\r
- //\r
- // Call back into PEI to get status codes. This is because SecMain contains\r
- // status code that reports to Win32.\r
- //\r
- if (mPeiReportStatusCode != NULL) {\r
- return mPeiReportStatusCode (CodeType, Value, Instance, CallerId, Data);\r
- }\r
-\r
- return EFI_SUCCESS;\r
-}\r
-\r
-VOID\r
-EFIAPI\r
-RtPlatformInitializeStatusCode (\r
- IN EFI_HANDLE ImageHandle,\r
- IN EFI_SYSTEM_TABLE *SystemTable\r
- )\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Initialize the status code listeners.\r
-\r
-Arguments:\r
-\r
- (Standard EFI Image entry - EFI_IMAGE_ENTRY_POINT)\r
-\r
-Returns:\r
-\r
- None\r
-\r
---*/\r
-{\r
- EFI_STATUS Status;\r
- VOID *HobList;\r
- VOID *Pointer;\r
-\r
- RtMemoryInitializeStatusCode (ImageHandle, SystemTable);\r
- BsDataHubInitializeStatusCode (ImageHandle, SystemTable);\r
-\r
- //\r
- // Play any prior status codes to the data hub.\r
- //\r
- PlaybackStatusCodes (BsDataHubReportStatusCode);\r
-\r
- //\r
- // If PEI has a ReportStatusCode callback find it and use it before StdErr\r
- // is connected.\r
- //\r
- mPeiReportStatusCode = NULL;\r
-\r
- Status = EfiLibGetSystemConfigurationTable (&gEfiHobListGuid, &HobList);\r
- if (!EFI_ERROR (Status)) {\r
- Status = GetNextGuidHob (&HobList, &gEfiStatusCodeRuntimeProtocolGuid, &Pointer, NULL);\r
- if (!EFI_ERROR (Status)) {\r
- mPeiReportStatusCode = (EFI_REPORT_STATUS_CODE) (*(UINTN *) Pointer);\r
- }\r
- }\r
-}\r
+++ /dev/null
-## @file\r
-#\r
-# Copyright (c) 2006 - 2010, 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
-# RtPlatformStatusCode.inf\r
-#\r
-# Abstract:\r
-#\r
-# Library selecting the listeners for the platform\r
-#\r
-##\r
-\r
-[defines]\r
-BASE_NAME = RtPlatformStatusCodeLib\r
-COMPONENT_TYPE = LIBRARY\r
-\r
-[sources]\r
- RtPlatformStatusCode.c\r
-\r
-[includes]\r
- $(EDK_SOURCE)/Foundation/Framework\r
- $(EDK_SOURCE)/Foundation\r
- $(EDK_SOURCE)/Foundation/Efi\r
- .\r
- $(EDK_SOURCE)/Sample/Platform/Generic/RuntimeDxe/StatusCode/Lib/Include\r
- $(EDK_SOURCE)/Foundation/Include\r
- $(EDK_SOURCE)/Foundation/Efi/Include\r
- $(EDK_SOURCE)/Foundation/Framework/Include\r
- $(EDK_SOURCE)/Foundation/Include/IndustryStandard\r
- $(EDK_SOURCE)/Foundation/Core/Dxe\r
- $(EDK_SOURCE)/Foundation/Library/Dxe/Include\r
-\r
-[libraries]\r
- HobLib\r
- RtMemoryStatusCodeLib\r
- BsDataHubStatusCodeLib\r
-\r
-[nmake]\r