Skip to content

Commit

Permalink
WhitleySiliconPkg: Add definitions used in ACPI subsystem
Browse files Browse the repository at this point in the history
Needed to convert FvLateOpenBoard ACPI binary drivers to open source.

Cc: Nate DeSimone <[email protected]>
Cc: Chasel Chiu <[email protected]>
Signed-off-by: Isaac Oram <[email protected]>
Reviewed-by: Nate DeSimone <[email protected]>
  • Loading branch information
iworam committed Mar 11, 2022
1 parent e04fc0b commit 4aa086d
Show file tree
Hide file tree
Showing 24 changed files with 1,784 additions and 68 deletions.
3 changes: 3 additions & 0 deletions Silicon/Intel/WhitleySiliconPkg/CpRcPkg.dec
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@
gRcSimBiosIdFileGuid = { 0xf0c51ad5, 0x44f0, 0x4622, { 0x95, 0x15, 0xe2, 0x7, 0x71, 0xf0, 0xe0, 0xf2 }}
gSystemTopologyGuid = { 0x743e5992, 0xf2a0, 0x4c9f, { 0xa5, 0xf5, 0x3b, 0x24, 0xad, 0xe8, 0x7f, 0x4d }}

[Protocols]
gEfiCpuCsrAccessGuid = { 0x0067835f, 0x9a50, 0x433a, { 0x8c, 0xbb, 0x85, 0x20, 0x78, 0x19, 0x78, 0x14 }}

[PPIs]
## Include/Ppi/MemorySetupPolicyPpi.h
gMemoryPolicyPpiGuid = { 0x731b6dbc, 0x18ac, 0x4cc3, { 0x9e, 0xe2, 0x9e, 0x5f, 0x33, 0x39, 0x68, 0x81 }}
Expand Down
7 changes: 7 additions & 0 deletions Silicon/Intel/WhitleySiliconPkg/Cpu/Include/CpuDataStruct.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,11 @@
//
#define CONFIG_TDP_TOTAL_LEVEL 5

typedef struct {
UINT32 RegEax;
UINT32 RegEbx;
UINT32 RegEcx;
UINT32 RegEdx;
} EFI_CPUID_REGISTER;

#endif
82 changes: 82 additions & 0 deletions Silicon/Intel/WhitleySiliconPkg/Cpu/Include/Library/CpuConfigLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,88 @@
#define C0_ENABLE 0x00
#define C6_ENABLE 0x03

//
// Structure for collected CPUID data.
//
typedef struct {
EFI_CPUID_REGISTER *CpuIdLeaf;
UINTN NumberOfBasicCpuidLeafs;
UINTN NumberOfExtendedCpuidLeafs;
UINTN NumberOfCacheAndTlbCpuidLeafs;
UINTN NumberOfDeterministicCacheParametersCpuidLeafs;
UINTN NumberOfExtendedTopologyEnumerationLeafs;
} CPU_CPUID_DATA;

typedef struct {
UINTN Ratio;
UINTN Vid;
UINTN Power;
UINTN TransitionLatency;
UINTN BusMasterLatency;
} FVID_ENTRY;

typedef struct {
VOID *MicrocodeData;
UINTN MicrocodeSize;
UINT32 ProcessorId;
} MICROCODE_INFO;

//
// Miscellaneous processor data
//
typedef struct {
//
// Local Apic Data
//
UINT32 InitialApicID; ///< Initial APIC ID
UINT32 ApicID; ///< Current APIC ID
EFI_PHYSICAL_ADDRESS ApicBase;
UINT32 ApicVersion;
//
// Frequency data
//
UINTN IntendedFsbFrequency;
UINTN ActualFsbFrequency;
UINTN MaxCoreToBusRatio;
UINTN MinCoreToBusRatio;
UINTN MaxTurboRatio;
UINTN PackageTdp;
UINTN NumberOfPStates;
FVID_ENTRY *FvidTable;
UINTN GreaterNumberOfPStates; // Greater Than 16 p-state support
FVID_ENTRY *GreaterFvidTable; // Greater Than 16 p-state support
//
// Other data
//
UINT32 MicrocodeRevision;
UINT64 EnabledThreadCountMsr;
MICROCODE_INFO MicrocodeInfo;
UINT64 MiscEnablesMsr;
} CPU_MISC_DATA;

//
// Structure for all collected processor data
//
typedef struct {
CPU_CPUID_DATA CpuidData;
EFI_CPU_PHYSICAL_LOCATION ProcessorLocation;
CPU_MISC_DATA CpuMiscData;
UINT8 PackageIdBitOffset;
BOOLEAN PackageBsp;
} CPU_COLLECTED_DATA;

//
// Definition of Processor Configuration Context Buffer
//
typedef struct {
UINTN NumberOfProcessors;
UINTN BspNumber;
CPU_COLLECTED_DATA *CollectedDataBuffer;
CPU_REGISTER_TABLE *PreSmmInitRegisterTable;
CPU_REGISTER_TABLE *RegisterTable;
BOOLEAN RegisterTableSaved;
} CPU_CONFIG_CONTEXT_BUFFER;

//
// Structure conveying socket ID configuration information.
//
Expand Down
3 changes: 3 additions & 0 deletions Silicon/Intel/WhitleySiliconPkg/Include/BackCompatible.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

#define R_ACPI_LV2 0x14

#define R_IOPORT_CMOS_STANDARD_INDEX 0x70
#define R_IOPORT_CMOS_STANDARD_DATA 0x71

#define R_IOPORT_CMOS_UPPER_INDEX 0x72
#define R_IOPORT_CMOS_UPPER_DATA 0x73

Expand Down
Loading

0 comments on commit 4aa086d

Please sign in to comment.