VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/IntelFsp2WrapperPkg/Library/PeiFspWrapperApiTestLib/FspWrapperApiTest.c@ 80924

Last change on this file since 80924 was 80721, checked in by vboxsync, 5 years ago

Devices/EFI/FirmwareNew: Start upgrade process to edk2-stable201908 (compiles on Windows and works to some extent), bugref:4643

  • Property svn:eol-style set to native
File size: 2.0 KB
Line 
1/** @file
2 Provide FSP wrapper API test related function.
3
4 Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7**/
8
9#include <PiPei.h>
10#include <Library/BaseMemoryLib.h>
11#include <Library/DebugLib.h>
12#include <Library/HobLib.h>
13#include <Guid/GuidHobFspEas.h>
14
15/**
16 Test the output of FSP API - FspMemoryInit.
17
18 @param[in] FspmUpdDataPtr Address pointer to the FSP_MEMORY_INIT_PARAMS structure.
19 @param[in] HobListPtr Address of the HobList pointer.
20
21 @return test result on output of FspMemoryInit API.
22**/
23EFI_STATUS
24EFIAPI
25TestFspMemoryInitApiOutput (
26 IN VOID *FspmUpdDataPtr,
27 IN VOID **HobListPtr
28 )
29{
30 DEBUG_CODE_BEGIN ();
31 EFI_PEI_HOB_POINTERS Hob;
32
33 Hob.Raw = (UINT8 *)(*(HobListPtr));
34 while (TRUE) {
35 if (END_OF_HOB_LIST(Hob) == TRUE) {
36 DEBUG((DEBUG_INFO, "gFspBootLoaderTolumHobGuid not Found\n"));
37 break;
38 }
39 if ((CompareGuid (&Hob.ResourceDescriptor->Owner, &gFspBootLoaderTolumHobGuid))) {
40 DEBUG ((DEBUG_INFO, "gFspBootLoaderTolumHobGuid Found\n"));
41 DEBUG ((DEBUG_INFO, "Fill Boot Loader reserved memory range with 0x5A for testing purpose\n"));
42 SetMem ((VOID *)(UINTN)Hob.ResourceDescriptor->PhysicalStart, (UINTN)Hob.ResourceDescriptor->ResourceLength, 0x5A);
43 break;
44 }
45 Hob.Raw = GET_NEXT_HOB (Hob);
46 }
47 DEBUG_CODE_END ();
48
49 return RETURN_SUCCESS;
50}
51
52/**
53 Test the output of FSP API - TempRamExit.
54
55 @param[in] TempRamExitParam Address pointer to the TempRamExit parameters structure.
56
57 @return test result on output of TempRamExit API.
58**/
59EFI_STATUS
60EFIAPI
61TestFspTempRamExitApiOutput (
62 IN VOID *TempRamExitParam
63 )
64{
65 return RETURN_SUCCESS;
66}
67
68/**
69 Test the output of FSP API - FspSiliconInit.
70
71 @param[in] FspsUpdDataPtr Address pointer to the Silicon Init parameters structure.
72
73 @return test result on output of FspSiliconInit API.
74**/
75EFI_STATUS
76EFIAPI
77TestFspSiliconInitApiOutput (
78 IN VOID *FspsUpdDataPtr
79 )
80{
81 return RETURN_SUCCESS;
82}
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette