PlatformSecLibNull.c 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /** @file
  2. Null instance of Platform Sec Lib.
  3. Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.<BR>
  4. SPDX-License-Identifier: BSD-2-Clause-Patent
  5. **/
  6. #include <PiPei.h>
  7. #include <Library/FspCommonLib.h>
  8. /**
  9. This function check the signature of UPD.
  10. @param[in] ApiIdx Internal index of the FSP API.
  11. @param[in] ApiParam Parameter of the FSP API.
  12. **/
  13. EFI_STATUS
  14. EFIAPI
  15. FspUpdSignatureCheck (
  16. IN UINT32 ApiIdx,
  17. IN VOID *ApiParam
  18. )
  19. {
  20. return EFI_SUCCESS;
  21. }
  22. /**
  23. This function handles FspMultiPhaseSiInitApi.
  24. Starting from FSP 2.4 this function is obsolete and FspMultiPhaseSiInitApiHandlerV2 is the replacement.
  25. @param[in] ApiIdx Internal index of the FSP API.
  26. @param[in] ApiParam Parameter of the FSP API.
  27. **/
  28. EFI_STATUS
  29. EFIAPI
  30. FspMultiPhaseSiInitApiHandler (
  31. IN UINT32 ApiIdx,
  32. IN VOID *ApiParam
  33. )
  34. {
  35. return EFI_SUCCESS;
  36. }
  37. /**
  38. FSP MultiPhase Platform Get Number Of Phases Function.
  39. Allows an FSP binary to dynamically update the number of phases at runtime.
  40. For example, UPD settings could negate the need to enter the multi-phase flow
  41. in certain scenarios. If this function returns FALSE, the default number of phases
  42. provided by PcdMultiPhaseNumberOfPhases will be returned to the bootloader instead.
  43. @param[in] ApiIdx - Internal index of the FSP API.
  44. @param[in] NumberOfPhasesSupported - How many phases are supported by current FSP Component.
  45. @retval TRUE - NumberOfPhases are modified by Platform during runtime.
  46. @retval FALSE - The Default build time NumberOfPhases should be used.
  47. **/
  48. BOOLEAN
  49. EFIAPI
  50. FspMultiPhasePlatformGetNumberOfPhases (
  51. IN UINT8 ApiIdx,
  52. IN OUT UINT32 *NumberOfPhasesSupported
  53. )
  54. {
  55. /* Example for platform runtime controlling
  56. if ((ApiIdx == FspMultiPhaseSiInitApiIndex) && (Feature1Enable == FALSE)) {
  57. *NumberOfPhasesSupported = 0;
  58. return TRUE;
  59. }
  60. return FALSE
  61. */
  62. return FALSE;
  63. }