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