SiFiveU54.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /** @file
  2. SiFive U54 Core library definitions.
  3. Copyright (c) 2019, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
  4. SPDX-License-Identifier: BSD-2-Clause-Patent
  5. **/
  6. #ifndef SIFIVE_U54_CORE_H_
  7. #define SIFIVE_U54_CORE_H_
  8. #include <PiPei.h>
  9. #include <ProcessorSpecificHobData.h>
  10. /**
  11. Function to build core specific information HOB for U54 or E51 core.
  12. @param ParentProcessorGuid Parent processor od this core. ParentProcessorGuid
  13. could be the same as CoreGuid if one processor has
  14. only one core.
  15. @param ParentProcessorUid Unique ID of pysical processor which owns this core.
  16. @param HartId Hart ID of this core.
  17. @param IsBootHart TRUE means this is the boot HART.
  18. @param IsManagementCore TRUE means this is for the E51 management core, not U54
  19. @param GuidHobData Pointer to RISC_V_PROCESSOR_SPECIFIC_HOB_DATA.
  20. @return EFI_SUCCESS The PEIM initialized successfully.
  21. **/
  22. EFI_STATUS
  23. EFIAPI
  24. CreateU54E51CoreProcessorSpecificDataHob (
  25. IN EFI_GUID *ParentProcessorGuid,
  26. IN UINTN ParentProcessorUid,
  27. IN UINTN HartId,
  28. IN BOOLEAN IsBootHart,
  29. IN BOOLEAN IsManagementCore,
  30. OUT RISC_V_PROCESSOR_SPECIFIC_HOB_DATA **GuidHobData
  31. );
  32. /**
  33. Function to build cache related SMBIOS information. RISC-V SMBIOS DXE driver collects
  34. this information and builds SMBIOS Type 7 record.
  35. The caller can adjust the allocated hob data to their needs.
  36. @param ProcessorUid Unique ID of physical processor which owns this core.
  37. @param L1CacheDataHobPtr Pointer to allocated HOB data.
  38. **/
  39. VOID
  40. EFIAPI
  41. CreateU54SmbiosType7L1DataHob (
  42. IN UINTN ProcessorUid,
  43. OUT RISC_V_PROCESSOR_TYPE7_HOB_DATA **L1CacheDataHobPtr
  44. );
  45. /**
  46. Function to build processor related SMBIOS information. RISC-V SMBIOS DXE driver collects
  47. this information and builds SMBIOS Type 4 record.
  48. The caller can adjust the allocated hob data to their needs.
  49. @param ProcessorUid Unique ID of physical processor which owns this core.
  50. @param ProcessorDataHobPtr Pointer to allocated HOB data.
  51. **/
  52. VOID
  53. EFIAPI
  54. CreateU54SmbiosType4DataHob (
  55. IN UINTN ProcessorUid,
  56. OUT RISC_V_PROCESSOR_TYPE4_HOB_DATA **ProcessorDataHobPtr
  57. );
  58. #endif