summaryrefslogtreecommitdiff
path: root/EdkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCode.c
diff options
context:
space:
mode:
authoryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2006-07-21 14:25:43 +0000
committeryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2006-07-21 14:25:43 +0000
commit56836fe92b0a7284bc2e964065e00ad867145826 (patch)
tree6528bf8403b71144f6c7e33a2b51d305b032b1a8 /EdkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCode.c
parent3f566587aea64bb986866c7f69a6b82891bf59db (diff)
downloadedk2-platforms-56836fe92b0a7284bc2e964065e00ad867145826.tar.xz
1) Check in Pei/Dxe status code;
2) OemHookStatusCodeLib and SerialPortLib class and null instance; 3) Remove all referenced code from EdkModulePkg,EdkNt32Pkg. 4) Add Nt32OemHookStatusCodeLib. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1067 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCode.c')
-rw-r--r--EdkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCode.c172
1 files changed, 0 insertions, 172 deletions
diff --git a/EdkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCode.c b/EdkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCode.c
deleted file mode 100644
index 13b6426beb..0000000000
--- a/EdkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCode.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/*++
-
-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:
-
- StatusCode.c
-
-Abstract:
-
- Status Code Architectural Protocol implementation as defined in Tiano
- Architecture Specification.
-
- This driver also depends on the DataHub, and will log all status code info
- to the DataHub. Fatal Errors are Printed to Standard Error (StdErr) and not
- logged to the data hub (If you crash what good is the data in the data hub).
-
- This driver has limited functionality at runtime and will not log to Data Hub
- at runtime.
-
- Notes:
- This driver assumes the following ReportStatusCode strategy:
- PEI -> uses PeiReportStatusCode
- DXE IPL -> uses PeiReportStatusCode
- early DXE -> uses PeiReportStatusCode via HOB
- DXE -> This driver
- RT -> This driver
-
---*/
-
-#include "StatusCode.h"
-
-EFI_LOCK mStatusCodeLock;
-BOOLEAN mStatusCodeFlag = FALSE;
-
-//
-// Function implemenations
-//
-
-
-EFI_STATUS
-EFIAPI
-StatusCodeReportStatusCode (
- IN EFI_STATUS_CODE_TYPE CodeType,
- IN EFI_STATUS_CODE_VALUE Value,
- IN UINT32 Instance,
- IN EFI_GUID *CallerId,
- IN EFI_STATUS_CODE_DATA *Data OPTIONAL
- )
-/*++
-
-Routine Description:
-
- Calls into the platform library which dispatches the platform specific
- listeners. For NT environments we still call back into PEI because the
- ReportStatusCode functionality requires Win32 services and is built into
- the SecMain.exe utility.
-
-Arguments:
-
- (See Tiano Runtime Specification)
-
-Returns:
-
- None
-
---*/
-{
- EFI_STATUS Status;
-
- //
- // Acquire the lock required to update mStatusCodeFlag
- //
- Status = EfiAcquireLockOrFail (&mStatusCodeLock);
- if (EFI_ERROR (Status)) {
- //
- // Check for reentrancy of the lock
- //
- return EFI_DEVICE_ERROR;
- }
- //
- // Check to see if we are already in the middle of a ReportStatusCode()
- //
- if (mStatusCodeFlag) {
- EfiReleaseLock (&mStatusCodeLock);
- return EFI_DEVICE_ERROR;
- }
- //
- // Set the flag to show we are in the middle of a ReportStatusCode()
- //
- mStatusCodeFlag = TRUE;
-
- //
- // Release the lock for updating mStatusCodeFlag
- //
- EfiReleaseLock (&mStatusCodeLock);
-
- //
- // Go do the work required to report a status code
- //
- RtPlatformReportStatusCode (CodeType, Value, Instance, CallerId, Data);
-
- //
- // Acquire the lock required to update mStatusCodeFlag
- //
- Status = EfiAcquireLockOrFail (&mStatusCodeLock);
- if (EFI_ERROR (Status)) {
- //
- // Check for reentrancy of the lock
- //
- return EFI_DEVICE_ERROR;
- }
- //
- // Clear the flag to show we are no longer in the middle of a ReportStatusCode()
- //
- mStatusCodeFlag = FALSE;
-
- //
- // Release the lock for updating mStatusCodeFlag
- //
- EfiReleaseLock (&mStatusCodeLock);
-
- return EFI_SUCCESS;
-}
-//
-// Protocol instance, there can be only one.
-//
-EFI_STATUS
-InitializeStatusCode (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
- )
-/*++
-
-Routine Description:
-
- Install Driver to produce Report Status Code Arch Protocol
-
-Arguments:
-
- (Standard EFI Image entry - EFI_IMAGE_ENTRY_POINT)
-
-Returns:
-
- EFI_SUCCESS - Logging Hub protocol installed
- Other - No protocol installed, unload driver.
-
---*/
-{
-
- EfiInitializeLock (&mStatusCodeLock, EFI_TPL_HIGH_LEVEL);
-
- //
- // Call the platform hook to initialize the different listeners.
- //
- RtPlatformStatusCodeInitialize ();
-
- //
- // Register a protocol that EfiUtilityLib can use to implement DEBUG () and ASSERT ()
- // Macros.
- //
- InstallStatusCodeDebugAssert ();
-
- return EFI_SUCCESS;
-}