https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
		
			
				
	
	
		
			64 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			64 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
| /** @file
 | |
|   Report Status Code Handler PEIM which produces general handlers and hook them
 | |
|   onto the PEI status code router.
 | |
| 
 | |
|   Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
 | |
|   SPDX-License-Identifier: BSD-2-Clause-Patent
 | |
| 
 | |
| **/
 | |
| 
 | |
| #include "StatusCodeHandlerPei.h"
 | |
| 
 | |
| /**
 | |
|   Entry point of Status Code PEIM.
 | |
| 
 | |
|   This function is the entry point of this Status Code PEIM.
 | |
|   It initializes supported status code devices according to PCD settings,
 | |
|   and installs Status Code PPI.
 | |
| 
 | |
|   @param  FileHandle  Handle of the file being invoked.
 | |
|   @param  PeiServices Describes the list of possible PEI Services.
 | |
| 
 | |
|   @retval EFI_SUCESS  The entry point of DXE IPL PEIM executes successfully.
 | |
| 
 | |
| **/
 | |
| EFI_STATUS
 | |
| EFIAPI
 | |
| StatusCodeHandlerPeiEntry (
 | |
|   IN       EFI_PEI_FILE_HANDLE  FileHandle,
 | |
|   IN CONST EFI_PEI_SERVICES     **PeiServices
 | |
|   )
 | |
| {
 | |
|   EFI_STATUS                  Status;
 | |
|   EFI_PEI_RSC_HANDLER_PPI     *RscHandlerPpi;
 | |
| 
 | |
|   Status = PeiServicesLocatePpi (
 | |
|              &gEfiPeiRscHandlerPpiGuid,
 | |
|              0,
 | |
|              NULL,
 | |
|              (VOID **) &RscHandlerPpi
 | |
|              );
 | |
|   ASSERT_EFI_ERROR (Status);
 | |
| 
 | |
|   //
 | |
|   // Dispatch initialization request to sub-statuscode-devices.
 | |
|   // If enable UseSerial, then initialize serial port.
 | |
|   // if enable UseMemory, then initialize memory status code worker.
 | |
|   //
 | |
|   if (FeaturePcdGet (PcdStatusCodeUseSerial)) {
 | |
|     Status = SerialPortInitialize();
 | |
|     ASSERT_EFI_ERROR (Status);
 | |
|     Status = RscHandlerPpi->Register (SerialStatusCodeReportWorker);
 | |
|     ASSERT_EFI_ERROR (Status);
 | |
|   }
 | |
|   if (FeaturePcdGet (PcdStatusCodeUseMemory)) {
 | |
|     Status = MemoryStatusCodeInitializeWorker ();
 | |
|     ASSERT_EFI_ERROR (Status);
 | |
|     Status = RscHandlerPpi->Register (MemoryStatusCodeReportWorker);
 | |
|     ASSERT_EFI_ERROR (Status);
 | |
|   }
 | |
| 
 | |
|   return EFI_SUCCESS;
 | |
| }
 | |
| 
 |