IioCfgUpdateDxe.c 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. /** @file
  2. IIO Config Update.
  3. @copyright
  4. Copyright 2018 - 2021 Intel Corporation. <BR>
  5. Copyright (c) 2021, American Megatrends International LLC. <BR>
  6. SPDX-License-Identifier: BSD-2-Clause-Patent
  7. **/
  8. #include "IioCfgUpdateDxe.h"
  9. EFI_STATUS
  10. UpdateJunctionCityIioConfig (
  11. IN IIO_GLOBALS *IioGlobalData
  12. )
  13. {
  14. return EFI_SUCCESS;
  15. }
  16. PLATFORM_IIO_CONFIG_UPDATE_TABLE TypeJunctionCityIioConfigTable =
  17. {
  18. PLATFORM_IIO_CONFIG_UPDATE_SIGNATURE,
  19. PLATFORM_IIO_CONFIG_UPDATE_VERSION,
  20. IioBifurcationTable,
  21. sizeof(IioBifurcationTable),
  22. UpdateJunctionCityIioConfig,
  23. IioSlotTable,
  24. sizeof(IioSlotTable)
  25. };
  26. /**
  27. The Driver Entry Point.
  28. The function is the driver Entry point.
  29. @param ImageHandle A handle for the image that is initializing this driver
  30. @param SystemTable A pointer to the EFI system table
  31. @retval EFI_SUCCESS: Driver initialized successfully
  32. @retval EFI_LOAD_ERROR: Failed to Initialize or has been loaded
  33. @retval EFI_OUT_OF_RESOURCES Could not allocate needed resources
  34. **/
  35. EFI_STATUS
  36. EFIAPI
  37. IioCfgUpdateEntry (
  38. IN EFI_HANDLE ImageHandle,
  39. IN EFI_SYSTEM_TABLE *SystemTable
  40. )
  41. {
  42. EFI_STATUS Status;
  43. UBA_CONFIG_DATABASE_PROTOCOL *UbaConfigProtocol = NULL;
  44. DEBUG((DEBUG_INFO, "UBA:IioCfgUpdate-TypeJunctionCity\n"));
  45. Status = gBS->LocateProtocol (
  46. &gUbaConfigDatabaseProtocolGuid,
  47. NULL,
  48. &UbaConfigProtocol
  49. );
  50. if (EFI_ERROR(Status)) {
  51. return Status;
  52. }
  53. Status = UbaConfigProtocol->AddData (
  54. UbaConfigProtocol,
  55. &gPlatformIioConfigDataDxeGuid,
  56. &TypeJunctionCityIioConfigTable,
  57. sizeof(TypeJunctionCityIioConfigTable)
  58. );
  59. Status = UbaConfigProtocol->AddData (
  60. UbaConfigProtocol,
  61. &gPlatformIioConfigDataDxeGuid_1,
  62. &TypeJunctionCityIioConfigTable,
  63. sizeof(TypeJunctionCityIioConfigTable)
  64. );
  65. Status = UbaConfigProtocol->AddData (
  66. UbaConfigProtocol,
  67. &gPlatformIioConfigDataDxeGuid_2,
  68. &TypeJunctionCityIioConfigTable,
  69. sizeof(TypeJunctionCityIioConfigTable)
  70. );
  71. Status = UbaConfigProtocol->AddData (
  72. UbaConfigProtocol,
  73. &gPlatformIioConfigDataDxeGuid_3,
  74. &TypeJunctionCityIioConfigTable,
  75. sizeof(TypeJunctionCityIioConfigTable)
  76. );
  77. if (EFI_ERROR(Status)) {
  78. return Status;
  79. }
  80. return Status;
  81. }