mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-12 09:54:36 +01:00
mulpiprocessor support
Signed-off-by: SergeySlice <sergey.slice@gmail.com>
This commit is contained in:
parent
734e32c709
commit
ee4d7a61b8
@ -136,10 +136,11 @@
|
||||
PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatformHookLibNull.inf
|
||||
|
||||
#SerialPortLib|PcAtChipsetPkg/Library/SerialIoLib/SerialIoLib.inf
|
||||
MtrrLib|CloverEFI/UefiCpuPkg/Library/MtrrLib/MtrrLib.inf
|
||||
MtrrLib|UefiCpuPkg/Library/MtrrLib/MtrrLib.inf
|
||||
IoApicLib|PcAtChipsetPkg/Library/BaseIoApicLib/BaseIoApicLib.inf
|
||||
LocalApicLib|CloverEFI/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf
|
||||
LocalApicLib|UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf
|
||||
#LocalApicLib|CloverEFI/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf
|
||||
MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
|
||||
|
||||
#
|
||||
# To save size, use NULL library for DebugLib and ReportStatusCodeLib.
|
||||
@ -621,7 +622,7 @@
|
||||
#MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
|
||||
CloverEFI/UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
|
||||
#UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
|
||||
#UefiCpuPkg/CpuDxe/CpuDxe.inf
|
||||
UefiCpuPkg/CpuDxe/CpuDxe.inf
|
||||
CloverEFI/CpuDxe/Cpu.inf
|
||||
PcAtChipsetPkg/8259InterruptControllerDxe/8259.inf {
|
||||
<PcdsFixedAtBuild>
|
||||
|
@ -96,6 +96,46 @@ typedef struct {
|
||||
UINT32 Thread;
|
||||
} EFI_CPU_PHYSICAL_LOCATION;
|
||||
|
||||
///
|
||||
/// Structure that defines the 6-level physical location of the processor
|
||||
///
|
||||
typedef struct {
|
||||
///
|
||||
/// Package Zero-based physical package number that identifies the cartridge of the processor.
|
||||
///
|
||||
UINT32 Package;
|
||||
///
|
||||
/// Module Zero-based physical module number within package of the processor.
|
||||
///
|
||||
UINT32 Module;
|
||||
///
|
||||
/// Tile Zero-based physical tile number within module of the processor.
|
||||
///
|
||||
UINT32 Tile;
|
||||
///
|
||||
/// Die Zero-based physical die number within tile of the processor.
|
||||
///
|
||||
UINT32 Die;
|
||||
///
|
||||
/// Core Zero-based physical core number within die of the processor.
|
||||
///
|
||||
UINT32 Core;
|
||||
///
|
||||
/// Thread Zero-based logical thread number within core of the processor.
|
||||
///
|
||||
UINT32 Thread;
|
||||
} EFI_CPU_PHYSICAL_LOCATION2;
|
||||
|
||||
typedef union {
|
||||
/// The 6-level physical location of the processor, including the
|
||||
/// physical package number that identifies the cartridge, the physical
|
||||
/// module number within package, the physical tile number within the module,
|
||||
/// the physical die number within the tile, the physical core number within
|
||||
/// package, and logical thread number within core.
|
||||
EFI_CPU_PHYSICAL_LOCATION2 Location2;
|
||||
} EXTENDED_PROCESSOR_INFORMATION;
|
||||
|
||||
|
||||
///
|
||||
/// Structure that describes information about a logical CPU.
|
||||
///
|
||||
@ -132,6 +172,10 @@ typedef struct {
|
||||
/// logical thread number within core.
|
||||
///
|
||||
EFI_CPU_PHYSICAL_LOCATION Location;
|
||||
///
|
||||
/// The extended information of the processor. This field is filled only when
|
||||
/// CPU_V2_EXTENDED_TOPOLOGY is set in parameter ProcessorNumber.
|
||||
EXTENDED_PROCESSOR_INFORMATION ExtendedInformation;
|
||||
} EFI_PROCESSOR_INFORMATION;
|
||||
|
||||
/**
|
||||
|
@ -1211,7 +1211,7 @@ InitializeCpu (
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
InitializeMpSupport ();
|
||||
Status = InitializeMpSupport ();
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
@ -810,7 +810,7 @@ InitializeMpExceptionHandlers (
|
||||
Initialize Multi-processor support.
|
||||
|
||||
**/
|
||||
VOID
|
||||
EFI_STATUS
|
||||
InitializeMpSupport (
|
||||
VOID
|
||||
)
|
||||
@ -823,7 +823,7 @@ InitializeMpSupport (
|
||||
// Wakeup APs to do initialization
|
||||
//
|
||||
Status = MpInitLibInitialize ();
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
return Status;
|
||||
|
||||
MpInitLibGetNumberOfProcessors (&NumberOfProcessors, &NumberOfEnabledProcessors);
|
||||
mNumberOfProcessors = NumberOfProcessors;
|
||||
@ -844,6 +844,6 @@ InitializeMpSupport (
|
||||
&gEfiMpServiceProtocolGuid, &mMpServicesTemplate,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
Initialize Multi-processor support.
|
||||
|
||||
**/
|
||||
VOID
|
||||
EFI_STATUS
|
||||
InitializeMpSupport (
|
||||
VOID
|
||||
);
|
||||
|
@ -1930,7 +1930,7 @@ MpInitLibGetProcessorInfo (
|
||||
&ProcessorInfoBuffer->Location.Thread
|
||||
);
|
||||
|
||||
if ((OriginalProcessorNumber & CPU_V2_EXTENDED_TOPOLOGY) != 0) {
|
||||
if ((OriginalProcessorNumber & CPUID_V2_EXTENDED_TOPOLOGY) != 0) {
|
||||
GetProcessorLocation2ByApicId (
|
||||
CpuInfoInHob[ProcessorNumber].ApicId,
|
||||
&ProcessorInfoBuffer->ExtendedInformation.Location2.Package,
|
||||
|
Loading…
Reference in New Issue
Block a user