From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0617.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe45::617]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9B13681DF3 for ; Fri, 28 Oct 2016 10:08:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=2ou78rD4uEDHegxSppUcb+eZj8hPJspyh2bfMa32l/4=; b=bTPzf0ihLjAlkaXaRk2dlEw5GYZVRz2kDKq4V6f+69BIAvRLFEh0CuGNA8WmwmqU3LuJyWM1t9vjEiHoGtKHvqOq/f4C4z7FXE01bZBWLm6oJJAPzxx6kAvnIgl8//5MPvav51iA2iC+ZwPaT/XyR2GYZTL5Q6tqRp6DZPGCFu0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=leo.duran@amd.com; Received: from leduran-Precision-WorkStation-T5400.amd.com (165.204.77.1) by CY4PR12MB1238.namprd12.prod.outlook.com (10.168.167.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.679.12; Fri, 28 Oct 2016 17:08:16 +0000 From: Leo Duran To: CC: , , , , Leo Duran Date: Fri, 28 Oct 2016 12:08:06 -0500 Message-ID: <1477674486-18380-1-git-send-email-leo.duran@amd.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: CY4PR21CA0018.namprd21.prod.outlook.com (10.172.122.156) To CY4PR12MB1238.namprd12.prod.outlook.com (10.168.167.13) X-MS-Office365-Filtering-Correlation-Id: 36fc7283-6cf3-4b42-056a-08d3ff550297 X-Microsoft-Exchange-Diagnostics: 1; CY4PR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W7Q04obrSceNBVmNqMTaXVeS2R5O6yoIfL+d8EOBBymkqscGUPvr8QDnz4nvqpOpI6lg2k7siQ2AEIYSiryo6nO6WU7h4SZ1ys9Dd4u0ynZTXe; 20:e5pvWyOl/HaJTIWgcpklWGSm8T6XhroMIodEYlN7JXeab438sPh651v0z4xl0Bz1GK4fiqmQzmB6stlR2TFt4aHjCbxCTmSgVrGUP9ClXokSOhZZ+14d1fCz+ABNMSgFNsnLMJYw83FYZv0CpRzbVQaNqHqkU0hrYvt/aABGksS76S+i9tMusan1bQ77pZAb4Pp+oSt2D9WQt/4pZItlb9mhDe/b9uAMy5IBPT5UA5GDk6/4sH0wx22z+BfFmgaLa0iZ1s89i7ejnl3OvJSrkNYKThldXNjMH1qk0r8H62dKMgMDq+6lJsfiu8r5kwOiVq5xHLkuQL96ePeFLExo+l4fxOuSOIrYY+r/O0oEdXTIzme/Lyc0c9HYffoB43nefF9REtEkV2o+tQ1y0Q64QPSaUK3k4X0PyDViONfcJBwhFddB958rwxdN1CXkTU5IWRaLRpOFfZxtAPVzYbVSQlLFUKDlEEZTKOIg+9zYa18CIbrZJPu9jEudkj+WFgE8 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(143289334528602)(166708455590820)(192374486261705)(767451399110)(42262312472803)(63843785518722)(211171220733660)(31960201722614)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:CY4PR12MB1238; BCL:0; PCL:0; RULEID:; SRVR:CY4PR12MB1238; X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1238; 4:FhG0ThUxYKyrAhhBMvFIt7g86iJx5xJuvvdyLTHaCW8u1Z1rEzEI7NeLyZ7z9hs+yuhgmT3PZYRueZqNkm1SwP7dx8nrPHc3PECQwBU7su4VQdbLpmmYF0BrhnCRJ6eZAbhlRwflYqVo0s6sMnhM7VGcsHwEM6dHH4QWt0TQ6TdQ2hjdjZzpRRFH6zA/3SC+qspmFu5hPW9+xU7paLDC7WSSPZuC08vGWhpOffMj8SUBsNVg8jy78tK6B9gtfANOyq5nyHMmL9BYeFk+2Ju4LnxFDIRzORNoYLsJZK3IbmBGYD4FyQjk9N1VTQ3qBCH9DrlKlTsQPf69aCc3a7F/qvX2QwfsLDmvYArIgL02QplCpHJiGWqIg2OdkWa7I1eZl+NOg2RK9bMH6PFo/ENmNc83sruUBo20BcioawAOEtB+EXWZwiW+8Blu2Q1A4BDj+5aZEM4kr5uCgPFAJWB92QAn3VkGzu0cxLInQabEFCuishzndKVHqHGciRxaRZ6mmKWNWIJQPObjq7wcfrkt08mIEn4NN5dLDCX7yKTRWtpXvYApbgPddiOjhzhLupy+JM0ZwodNxisuD55ULpuFyzUcaLSnZ6TkLmtVeCkSsff9GlhPQEY7Pj/1VACCyjMX4ABKdNW/3r+b1mbw0W7zkjidN4dIJoxSjxY+uGsYmgPwy2G/Bbv9vcm5mDXCJs9664zUlLsU8VA+N9y5QXTE1DkhA0Gv5Ts1bjLz7nH9Y9E= X-Forefront-PRVS: 0109D382B0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(199003)(189002)(2906002)(86362001)(4326007)(575784001)(50986999)(101416001)(47776003)(8676002)(66066001)(48376002)(81166006)(50466002)(1720100001)(68736007)(81156014)(36756003)(6666003)(15975445007)(19580395003)(19580405001)(5660300001)(77096005)(5003940100001)(33646002)(3846002)(42186005)(586003)(53416004)(6116002)(2351001)(229853001)(92566002)(105586002)(106356001)(189998001)(97736004)(305945005)(6916009)(110136003)(50226002)(7846002)(7736002)(19627235001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR12MB1238; H:leduran-Precision-WorkStation-T5400.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii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oGO7TcFNzvGpA0C51fhCmpVM1SWf4C9rZ8jjiLh8Jgekc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1238; 7:MOgEwkddJeb8zmayf60wKX0AZeZ9KXwR7tgp1ejSCehACUJlvLJErVu2D+wwgqN26vNpYpimCUUmv0Lmcp46Lm9hvtq0hrhbNcbqT392uw58uOgcECzHlI1JWJdYrpaiKWvsOYCzuiGsUlfAEjbiKDSqNcqXAEPIx/8y0YbxvT18KytG0nMjlzQoHGVjnyjonF6tpQh3TNGKEZ2GmEzTZyRA2v+C7ibMxFcDmAtb1uSbWwvk5zZjgpJxfHepcdAOao/WX3ssWTsSqjn9cCSO6Q8d04k7Nm/6RdOhx7rWX362HB6SoW/yWJqeOnaXyWu5Yf9aj8LjmTTQiH+oJ+RDgjKi7IEIPzN6g04SoYgd2X0=; 20:BFLbXozX0+2A9Ed8r7S5l0efkqIaKjTgfHuKAiFGz7+8ElLimwLCEiRx8xSY/+z7KQWOwPMkVGDgwWPoaBzUuVrQ/OECBo8zzKOtuu+yNuSlnDoK0ESegM0DGcAefd+BoRbs+o4Lip3jZi0bliLa8BtpNCE/RyCEQmxzmH7JQAlVPJIFg7dCTh9gXs+oXDdauLNDaCNqeLHMQnAY0lVnS9EjaC+QHa6GXn9thOZP+LShEXbRcreQWu3bOwF6KdbS X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2016 17:08:16.7364 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1238 Subject: [PATCH] UefiCpuPkg: Move GetProcessorLocation() to LocalApicLib library X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Oct 2016 17:08:18 -0000 Content-Type: text/plain 1) Remove SmmGetProcessorLocation() from PiSmmCpuDxeSmm driver. 2) Remove ExtractProcessorLocation() from MpInitLib library. 3) Add GetProcessorLocation() to BaseXApicLib and BaseXApicX2ApicLib. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Leo Duran --- Maintainers.txt | 240 --------------------- UefiCpuPkg/Include/Library/LocalApicLib.h | 18 ++ UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c | 130 +++++++++++ .../BaseXApicX2ApicLib/BaseXApicX2ApicLib.c | 130 +++++++++++ UefiCpuPkg/Library/MpInitLib/MpLib.c | 128 +---------- UefiCpuPkg/PiSmmCpuDxeSmm/CpuService.c | 121 +---------- 6 files changed, 280 insertions(+), 487 deletions(-) delete mode 100644 Maintainers.txt mode change 100644 => 100755 UefiCpuPkg/Include/Library/LocalApicLib.h mode change 100644 => 100755 UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c mode change 100644 => 100755 UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c mode change 100644 => 100755 UefiCpuPkg/Library/MpInitLib/MpLib.c mode change 100644 => 100755 UefiCpuPkg/PiSmmCpuDxeSmm/CpuService.c diff --git a/Maintainers.txt b/Maintainers.txt deleted file mode 100644 index 94d3380..0000000 --- a/Maintainers.txt +++ /dev/null @@ -1,240 +0,0 @@ -EDK II Maintainers -================== - -This file provides information about the primary maintainers for -EDK II. - -In general, you should not privately email the maintainer. You should -email the edk2-devel list, but you can also Cc the maintainer. - -Descriptions of section entries: - - L: Mailing list that is relevant to this area (default is edk2-devel) - Patches and questions should be sent to the email list. - M: Cc address for patches and questions (ie, the package maintainer) - W: Web-page with status/info - T: SCM tree type and location. Type is one of: git, svn. - S: Status, one of the following: - Supported: Someone is actually paid to look after this. - Maintained: Someone actually looks after it. - Odd Fixes: It has a maintainer but they don't have time to do - much other than throw the odd patch in. See below. - Orphan: No current maintainer [but maybe you could take the - role as you write your new code]. - Obsolete: Old code. Something tagged obsolete generally means - it has been replaced by a better system and you - should be using that. - -EDK II ------- -W: http://www.tianocore.org/edk2/ -L: https://lists.sourceforge.net/lists/listinfo/edk2-devel -T: git - https://github.com/tianocore/edk2.git -T: git (mirror) - https://bitbucket.org/tianocore/edk2.git -T: git (mirror) - http://git.code.sf.net/p/tianocore/edk2 -T: svn (read-only, deprecated) - https://svn.code.sf.net/p/edk2/code/trunk/edk2 - -Responsible Disclosure, Reporting Security Issues -------------------------------------------------- -W: https://github.com/tianocore/tianocore.github.io/wiki/Security - -EDK II Releases: ----------------- -UDK2014 -W: http://www.tianocore.org/udk2014/ -S: Supported - -EDK II Packages: ----------------- -AppPkg -W: https://github.com/tianocore/tianocore.github.io/wiki/AppPkg -M: Daryl McDaniel -M: Jaben Carsey - -ArmPkg -W: https://github.com/tianocore/tianocore.github.io/wiki/ArmPkg -M: Leif Lindholm -M: Ard Biesheuvel - -ArmPlatformPkg -W: https://github.com/tianocore/tianocore.github.io/wiki/ArmPlatformPkg -M: Leif Lindholm -M: Ard Biesheuvel - -ArmVirtPkg -W: https://github.com/tianocore/tianocore.github.io/wiki/ArmVirtPkg -M: Laszlo Ersek -M: Ard Biesheuvel - -BaseTools -W: https://github.com/tianocore/tianocore.github.io/wiki/BaseTools -M: Yonghong Zhu -M: Liming Gao - -BeagleBoardPkg -W: https://github.com/tianocore/tianocore.github.io/wiki/BeagleBoardPkg -M: Leif Lindholm -M: Ard Biesheuvel - -CorebootModulePkg, CorebootPayloadPkg -W: https://github.com/tianocore/tianocore.github.io/wiki/Coreboot_UEFI_payload -M: Maurice Ma -M: Prince Agyeman -S: Maintained - -CryptoPkg -W: https://github.com/tianocore/tianocore.github.io/wiki/CryptoPkg -M: Qin Long -M: Ting Ye - -DuetPkg -W: https://github.com/tianocore/tianocore.github.io/wiki/DuetPkg -M: Ruiyu Ni - -EdkCompatibilityPkg -W: https://github.com/tianocore/tianocore.github.io/wiki/EdkCompatibilityPkg -M: Liming Gao - -EdkShellPkg, EdkShellBinPkg -W: https://github.com/tianocore/tianocore.github.io/wiki/EdkShellPkg -M: Ruiyu Ni -T: svn - https://svn.code.sf.net/p/efi-shell/code/trunk/Shell/ -S: Obsolete (Use ShellPkg & ShellBinPkg instead) - -EmbeddedPkg -W: https://github.com/tianocore/tianocore.github.io/wiki/EmbeddedPkg -M: Leif Lindholm -M: Ard Biesheuvel - -EmulatorPkg -W: https://github.com/tianocore/tianocore.github.io/wiki/EmulatorPkg -M: Jordan Justen -M: Andrew Fish -S: Maintained - -FatPkg, FatBinPkg -W: https://github.com/tianocore/tianocore.github.io/wiki/Edk2-fat-driver -M: Ruiyu Ni -T: svn - https://svn.code.sf.net/p/edk2-fatdriver2/code/trunk/EnhancedFat -T: git - https://github.com/tianocore/edk2-FatPkg.git - -IntelFrameworkModulePkg -W: https://github.com/tianocore/tianocore.github.io/wiki/IntelFrameworkModulePkg -M: Jeff Fan - -IntelFrameworkPkg -W: https://github.com/tianocore/tianocore.github.io/wiki/IntelFrameworkPkg -M: Michael D Kinney -M: Jeff Fan - -IntelFsp2Pkg -W: https://github.com/tianocore/tianocore.github.io/wiki/IntelFsp2Pkg -M: Jiewen Yao -M: Giri P Mudusuru - -IntelFsp2WrapperPkg -W: https://github.com/tianocore/tianocore.github.io/wiki/IntelFsp2WrapperPkg -M: Jiewen Yao -M: Giri P Mudusuru - -IntelFspPkg -W: https://github.com/tianocore/tianocore.github.io/wiki/IntelFspPkg -M: Jiewen Yao - -IntelFspWrapperPkg -W: https://github.com/tianocore/tianocore.github.io/wiki/IntelFspWrapperPkg -M: Jiewen Yao - -IntelSiliconPkg -W: https://github.com/tianocore/tianocore.github.io/wiki/IntelSiliconPkg -M: Jiewen Yao -M: Giri P Mudusuru - -MdeModulePkg -W: https://github.com/tianocore/tianocore.github.io/wiki/MdeModulePkg -M: Feng Tian -M: Star Zeng - -MdePkg -W: https://github.com/tianocore/tianocore.github.io/wiki/MdePkg -M: Michael D Kinney -M: Liming Gao - -NetworkPkg -W: https://github.com/tianocore/tianocore.github.io/wiki/NetworkPkg -M: Siyuan Fu -M: Jiaxin Wu - -Nt32Pkg -W: https://github.com/tianocore/tianocore.github.io/wiki/Nt32Pkg -M: Ruiyu Ni - -Omap35xxPkg -W: https://github.com/tianocore/tianocore.github.io/wiki/Omap35xxPkg -M: Leif Lindholm -M: Ard Biesheuvel - -OptionRomPkg -W: https://github.com/tianocore/tianocore.github.io/wiki/OptionRomPkg -M: Ruiyu Ni - -OvmfPkg -W: http://www.tianocore.org/ovmf/ -M: Jordan Justen -M: Laszlo Ersek -S: Maintained - -PcAtChipsetPkg -W: https://github.com/tianocore/tianocore.github.io/wiki/PcAtChipsetPkg -M: Ruiyu Ni - -PerformancePkg -W: https://github.com/tianocore/tianocore.github.io/wiki/PerformancePkg -M: Daryl McDaniel -M: Jaben Carsey - -QuarkPlatformPkg, QuarkSocPkg -M: Michael D Kinney -M: Kelly Steele - -SecurityPkg -W: https://github.com/tianocore/tianocore.github.io/wiki/SecurityPkg -M: Chao Zhang - -ShellBinPkg -W: https://github.com/tianocore/tianocore.github.io/wiki/ShellPkg -M: Jaben Carsey (Ia32/X64) -M: Ruiyu Ni (Ia32/X64) -M: Leif Lindholm (ARM/AArch64) -M: Ard Biesheuvel (ARM/AArch64) - -ShellPkg -W: https://github.com/tianocore/tianocore.github.io/wiki/ShellPkg -M: Jaben Carsey -M: Ruiyu Ni - -SourceLevelDebugPkg -W: https://github.com/tianocore/tianocore.github.io/wiki/SourceLevelDebugPkg -M: Jeff Fan -M: Hao Wu - -StdLib, StdLibPrivateInternalFiles -W: https://github.com/tianocore/tianocore.github.io/wiki/StdLib -M: Daryl McDaniel -M: Jaben Carsey - -UefiCpuPkg -W: https://github.com/tianocore/tianocore.github.io/wiki/UefiCpuPkg -M: Jeff Fan - -UnixPkg -W: https://github.com/tianocore/tianocore.github.io/wiki/UnixPkg -S: Obsolete (Use EmulatorPkg instead) - -Vlv2DeviceRefCodePkg -M: David Wei -M: Mang Guo - -Vlv2TbltDevicePkg -M: David Wei -M: Mang Guo diff --git a/UefiCpuPkg/Include/Library/LocalApicLib.h b/UefiCpuPkg/Include/Library/LocalApicLib.h old mode 100644 new mode 100755 index cd4e613..4abf64c --- a/UefiCpuPkg/Include/Library/LocalApicLib.h +++ b/UefiCpuPkg/Include/Library/LocalApicLib.h @@ -21,6 +21,9 @@ #define LOCAL_APIC_MODE_XAPIC 0x1 ///< xAPIC mode. #define LOCAL_APIC_MODE_X2APIC 0x2 ///< x2APIC mode. +#include +#include + /** Retrieve the base address of local APIC. @@ -410,6 +413,21 @@ GetApicMsiValue ( IN BOOLEAN LevelTriggered, IN BOOLEAN AssertionLevel ); + +/** +Get Package ID/Core ID/Thread ID of a processor. + +The algorithm assumes the target system has symmetry across physical package boundaries +with respect to the number of logical processors per package, number of cores per package. + +@param InitialApicId Must be the initial APIC ID of the target logical processor. +@param Location Returns the processor location information. +**/ +VOID +GetProcessorLocation( + IN UINT32 InitialApicId, + OUT EFI_CPU_PHYSICAL_LOCATION *Location +); #endif diff --git a/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c b/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c old mode 100644 new mode 100755 index 8d0fb02..219f99f --- a/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c +++ b/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c @@ -941,3 +941,133 @@ GetApicMsiValue ( } return MsiData.Uint64; } + +/** +Get Package ID/Core ID/Thread ID of a processor. + +The algorithm assumes the target system has symmetry across physical package boundaries +with respect to the number of logical processors per package, number of cores per package. + +@param InitialApicId Must be the initial APIC ID of the target logical processor. +@param Location Returns the processor location information. +**/ +VOID +GetProcessorLocation( +IN UINT32 InitialApicId, +OUT EFI_CPU_PHYSICAL_LOCATION *Location +) +{ + BOOLEAN TopologyLeafSupported; + UINTN ThreadBits; + UINTN CoreBits; + CPUID_VERSION_INFO_EBX VersionInfoEbx; + CPUID_VERSION_INFO_EDX VersionInfoEdx; + CPUID_CACHE_PARAMS_EAX CacheParamsEax; + CPUID_EXTENDED_TOPOLOGY_EAX ExtendedTopologyEax; + CPUID_EXTENDED_TOPOLOGY_EBX ExtendedTopologyEbx; + CPUID_EXTENDED_TOPOLOGY_ECX ExtendedTopologyEcx; + UINT32 MaxCpuIdIndex; + UINT32 SubIndex; + UINTN LevelType; + UINT32 MaxLogicProcessorsPerPackage; + UINT32 MaxCoresPerPackage; + + // + // Check if the processor is capable of supporting more than one logical processor. + // + AsmCpuid(CPUID_VERSION_INFO, NULL, NULL, NULL, &VersionInfoEdx.Uint32); + if (VersionInfoEdx.Bits.HTT == 0) { + Location->Thread = 0; + Location->Core = 0; + Location->Package = 0; + return; + } + + ThreadBits = 0; + CoreBits = 0; + + // + // Assume three-level mapping of APIC ID: Package:Core:SMT. + // + + TopologyLeafSupported = FALSE; + // + // Get the max index of basic CPUID + // + AsmCpuid(CPUID_SIGNATURE, &MaxCpuIdIndex, NULL, NULL, NULL); + + // + // If the extended topology enumeration leaf is available, it + // is the preferred mechanism for enumerating topology. + // + if (MaxCpuIdIndex >= CPUID_EXTENDED_TOPOLOGY) { + AsmCpuidEx( + CPUID_EXTENDED_TOPOLOGY, + 0, + &ExtendedTopologyEax.Uint32, + &ExtendedTopologyEbx.Uint32, + &ExtendedTopologyEcx.Uint32, + NULL + ); + // + // If CPUID.(EAX=0BH, ECX=0H):EBX returns zero and maximum input value for + // basic CPUID information is greater than 0BH, then CPUID.0BH leaf is not + // supported on that processor. + // + if (ExtendedTopologyEbx.Uint32 != 0) { + TopologyLeafSupported = TRUE; + + // + // Sub-leaf index 0 (ECX= 0 as input) provides enumeration parameters to extract + // the SMT sub-field of x2APIC ID. + // + LevelType = ExtendedTopologyEcx.Bits.LevelType; + ASSERT(LevelType == CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_SMT); + ThreadBits = ExtendedTopologyEax.Bits.ApicIdShift; + + // + // Software must not assume any "level type" encoding + // value to be related to any sub-leaf index, except sub-leaf 0. + // + SubIndex = 1; + do { + AsmCpuidEx( + CPUID_EXTENDED_TOPOLOGY, + SubIndex, + &ExtendedTopologyEax.Uint32, + NULL, + &ExtendedTopologyEcx.Uint32, + NULL + ); + LevelType = ExtendedTopologyEcx.Bits.LevelType; + if (LevelType == CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_CORE) { + CoreBits = ExtendedTopologyEax.Bits.ApicIdShift - ThreadBits; + break; + } + SubIndex++; + } while (LevelType != CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_INVALID); + } + } + + if (!TopologyLeafSupported) { + AsmCpuid(CPUID_VERSION_INFO, NULL, &VersionInfoEbx.Uint32, NULL, NULL); + MaxLogicProcessorsPerPackage = VersionInfoEbx.Bits.MaximumAddressableIdsForLogicalProcessors; + if (MaxCpuIdIndex >= CPUID_CACHE_PARAMS) { + AsmCpuidEx(CPUID_CACHE_PARAMS, 0, &CacheParamsEax.Uint32, NULL, NULL, NULL); + MaxCoresPerPackage = CacheParamsEax.Bits.MaximumAddressableIdsForLogicalProcessors + 1; + } + else { + // + // Must be a single-core processor. + // + MaxCoresPerPackage = 1; + } + + ThreadBits = (UINTN)(HighBitSet32(MaxLogicProcessorsPerPackage / MaxCoresPerPackage - 1) + 1); + CoreBits = (UINTN)(HighBitSet32(MaxCoresPerPackage - 1) + 1); + } + + Location->Thread = InitialApicId & ((1 << ThreadBits) - 1); + Location->Core = (InitialApicId >> ThreadBits) & ((1 << CoreBits) - 1); + Location->Package = (InitialApicId >> (ThreadBits + CoreBits)); +} diff --git a/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c b/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c old mode 100644 new mode 100755 index 4c42696..16395a3 --- a/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c +++ b/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c @@ -1036,3 +1036,133 @@ GetApicMsiValue ( } return MsiData.Uint64; } + +/** +Get Package ID/Core ID/Thread ID of a processor. + +The algorithm assumes the target system has symmetry across physical package boundaries +with respect to the number of logical processors per package, number of cores per package. + +@param InitialApicId Must be the initial APIC ID of the target logical processor. +@param Location Returns the processor location information. +**/ +VOID +GetProcessorLocation( +IN UINT32 InitialApicId, +OUT EFI_CPU_PHYSICAL_LOCATION *Location +) +{ + BOOLEAN TopologyLeafSupported; + UINTN ThreadBits; + UINTN CoreBits; + CPUID_VERSION_INFO_EBX VersionInfoEbx; + CPUID_VERSION_INFO_EDX VersionInfoEdx; + CPUID_CACHE_PARAMS_EAX CacheParamsEax; + CPUID_EXTENDED_TOPOLOGY_EAX ExtendedTopologyEax; + CPUID_EXTENDED_TOPOLOGY_EBX ExtendedTopologyEbx; + CPUID_EXTENDED_TOPOLOGY_ECX ExtendedTopologyEcx; + UINT32 MaxCpuIdIndex; + UINT32 SubIndex; + UINTN LevelType; + UINT32 MaxLogicProcessorsPerPackage; + UINT32 MaxCoresPerPackage; + + // + // Check if the processor is capable of supporting more than one logical processor. + // + AsmCpuid(CPUID_VERSION_INFO, NULL, NULL, NULL, &VersionInfoEdx.Uint32); + if (VersionInfoEdx.Bits.HTT == 0) { + Location->Thread = 0; + Location->Core = 0; + Location->Package = 0; + return; + } + + ThreadBits = 0; + CoreBits = 0; + + // + // Assume three-level mapping of APIC ID: Package:Core:SMT. + // + + TopologyLeafSupported = FALSE; + // + // Get the max index of basic CPUID + // + AsmCpuid(CPUID_SIGNATURE, &MaxCpuIdIndex, NULL, NULL, NULL); + + // + // If the extended topology enumeration leaf is available, it + // is the preferred mechanism for enumerating topology. + // + if (MaxCpuIdIndex >= CPUID_EXTENDED_TOPOLOGY) { + AsmCpuidEx( + CPUID_EXTENDED_TOPOLOGY, + 0, + &ExtendedTopologyEax.Uint32, + &ExtendedTopologyEbx.Uint32, + &ExtendedTopologyEcx.Uint32, + NULL + ); + // + // If CPUID.(EAX=0BH, ECX=0H):EBX returns zero and maximum input value for + // basic CPUID information is greater than 0BH, then CPUID.0BH leaf is not + // supported on that processor. + // + if (ExtendedTopologyEbx.Uint32 != 0) { + TopologyLeafSupported = TRUE; + + // + // Sub-leaf index 0 (ECX= 0 as input) provides enumeration parameters to extract + // the SMT sub-field of x2APIC ID. + // + LevelType = ExtendedTopologyEcx.Bits.LevelType; + ASSERT(LevelType == CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_SMT); + ThreadBits = ExtendedTopologyEax.Bits.ApicIdShift; + + // + // Software must not assume any "level type" encoding + // value to be related to any sub-leaf index, except sub-leaf 0. + // + SubIndex = 1; + do { + AsmCpuidEx( + CPUID_EXTENDED_TOPOLOGY, + SubIndex, + &ExtendedTopologyEax.Uint32, + NULL, + &ExtendedTopologyEcx.Uint32, + NULL + ); + LevelType = ExtendedTopologyEcx.Bits.LevelType; + if (LevelType == CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_CORE) { + CoreBits = ExtendedTopologyEax.Bits.ApicIdShift - ThreadBits; + break; + } + SubIndex++; + } while (LevelType != CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_INVALID); + } + } + + if (!TopologyLeafSupported) { + AsmCpuid(CPUID_VERSION_INFO, NULL, &VersionInfoEbx.Uint32, NULL, NULL); + MaxLogicProcessorsPerPackage = VersionInfoEbx.Bits.MaximumAddressableIdsForLogicalProcessors; + if (MaxCpuIdIndex >= CPUID_CACHE_PARAMS) { + AsmCpuidEx(CPUID_CACHE_PARAMS, 0, &CacheParamsEax.Uint32, NULL, NULL, NULL); + MaxCoresPerPackage = CacheParamsEax.Bits.MaximumAddressableIdsForLogicalProcessors + 1; + } + else { + // + // Must be a single-core processor. + // + MaxCoresPerPackage = 1; + } + + ThreadBits = (UINTN)(HighBitSet32(MaxLogicProcessorsPerPackage / MaxCoresPerPackage - 1) + 1); + CoreBits = (UINTN)(HighBitSet32(MaxCoresPerPackage - 1) + 1); + } + + Location->Thread = InitialApicId & ((1 << ThreadBits) - 1); + Location->Core = (InitialApicId >> ThreadBits) & ((1 << CoreBits) - 1); + Location->Package = (InitialApicId >> (ThreadBits + CoreBits)); +} diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpInitLib/MpLib.c old mode 100644 new mode 100755 index c3fe721..f3380bb --- a/UefiCpuPkg/Library/MpInitLib/MpLib.c +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c @@ -58,132 +58,6 @@ IsBspExecuteDisableEnabled ( } /** - Get CPU Package/Core/Thread location information. - - @param[in] InitialApicId CPU APIC ID - @param[out] Location Pointer to CPU location information -**/ -VOID -ExtractProcessorLocation ( - IN UINT32 InitialApicId, - OUT EFI_CPU_PHYSICAL_LOCATION *Location - ) -{ - BOOLEAN TopologyLeafSupported; - UINTN ThreadBits; - UINTN CoreBits; - CPUID_VERSION_INFO_EBX VersionInfoEbx; - CPUID_VERSION_INFO_EDX VersionInfoEdx; - CPUID_CACHE_PARAMS_EAX CacheParamsEax; - CPUID_EXTENDED_TOPOLOGY_EAX ExtendedTopologyEax; - CPUID_EXTENDED_TOPOLOGY_EBX ExtendedTopologyEbx; - CPUID_EXTENDED_TOPOLOGY_ECX ExtendedTopologyEcx; - UINT32 MaxCpuIdIndex; - UINT32 SubIndex; - UINTN LevelType; - UINT32 MaxLogicProcessorsPerPackage; - UINT32 MaxCoresPerPackage; - - // - // Check if the processor is capable of supporting more than one logical processor. - // - AsmCpuid (CPUID_VERSION_INFO, NULL, NULL, NULL, &VersionInfoEdx.Uint32); - if (VersionInfoEdx.Bits.HTT == 0) { - Location->Thread = 0; - Location->Core = 0; - Location->Package = 0; - return; - } - - ThreadBits = 0; - CoreBits = 0; - - // - // Assume three-level mapping of APIC ID: Package:Core:SMT. - // - - TopologyLeafSupported = FALSE; - // - // Get the max index of basic CPUID - // - AsmCpuid (CPUID_SIGNATURE, &MaxCpuIdIndex, NULL, NULL, NULL); - - // - // If the extended topology enumeration leaf is available, it - // is the preferred mechanism for enumerating topology. - // - if (MaxCpuIdIndex >= CPUID_EXTENDED_TOPOLOGY) { - AsmCpuidEx ( - CPUID_EXTENDED_TOPOLOGY, - 0, - &ExtendedTopologyEax.Uint32, - &ExtendedTopologyEbx.Uint32, - &ExtendedTopologyEcx.Uint32, - NULL - ); - // - // If CPUID.(EAX=0BH, ECX=0H):EBX returns zero and maximum input value for - // basic CPUID information is greater than 0BH, then CPUID.0BH leaf is not - // supported on that processor. - // - if (ExtendedTopologyEbx.Uint32 != 0) { - TopologyLeafSupported = TRUE; - - // - // Sub-leaf index 0 (ECX= 0 as input) provides enumeration parameters to extract - // the SMT sub-field of x2APIC ID. - // - LevelType = ExtendedTopologyEcx.Bits.LevelType; - ASSERT (LevelType == CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_SMT); - ThreadBits = ExtendedTopologyEax.Bits.ApicIdShift; - - // - // Software must not assume any "level type" encoding - // value to be related to any sub-leaf index, except sub-leaf 0. - // - SubIndex = 1; - do { - AsmCpuidEx ( - CPUID_EXTENDED_TOPOLOGY, - SubIndex, - &ExtendedTopologyEax.Uint32, - NULL, - &ExtendedTopologyEcx.Uint32, - NULL - ); - LevelType = ExtendedTopologyEcx.Bits.LevelType; - if (LevelType == CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_CORE) { - CoreBits = ExtendedTopologyEax.Bits.ApicIdShift - ThreadBits; - break; - } - SubIndex++; - } while (LevelType != CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_INVALID); - } - } - - if (!TopologyLeafSupported) { - AsmCpuid (CPUID_VERSION_INFO, NULL, &VersionInfoEbx.Uint32, NULL, NULL); - MaxLogicProcessorsPerPackage = VersionInfoEbx.Bits.MaximumAddressableIdsForLogicalProcessors; - if (MaxCpuIdIndex >= CPUID_CACHE_PARAMS) { - AsmCpuidEx (CPUID_CACHE_PARAMS, 0, &CacheParamsEax.Uint32, NULL, NULL, NULL); - MaxCoresPerPackage = CacheParamsEax.Bits.MaximumAddressableIdsForLogicalProcessors + 1; - } else { - // - // Must be a single-core processor. - // - MaxCoresPerPackage = 1; - } - - ThreadBits = (UINTN) (HighBitSet32 (MaxLogicProcessorsPerPackage / MaxCoresPerPackage - 1) + 1); - CoreBits = (UINTN) (HighBitSet32 (MaxCoresPerPackage - 1) + 1); - } - - Location->Thread = InitialApicId & ((1 << ThreadBits) - 1); - Location->Core = (InitialApicId >> ThreadBits) & ((1 << CoreBits) - 1); - Location->Package = (InitialApicId >> (ThreadBits + CoreBits)); -} - -/** Worker function for SwitchBSP(). Worker function for SwitchBSP(), assigned to the AP which is intended @@ -1451,7 +1325,7 @@ MpInitLibGetProcessorInfo ( // // Get processor location information // - ExtractProcessorLocation (CpuMpData->CpuData[ProcessorNumber].ApicId, &ProcessorInfoBuffer->Location); + GetProcessorLocation (CpuMpData->CpuData[ProcessorNumber].ApicId, &ProcessorInfoBuffer->Location); if (HealthData != NULL) { HealthData->Uint32 = CpuMpData->CpuData[ProcessorNumber].Health; diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/CpuService.c b/UefiCpuPkg/PiSmmCpuDxeSmm/CpuService.c old mode 100644 new mode 100755 index 40f2a17..67cd0a0 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/CpuService.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/CpuService.c @@ -27,125 +27,6 @@ EFI_SMM_CPU_SERVICE_PROTOCOL mSmmCpuService = { }; /** - Get Package ID/Core ID/Thread ID of a processor. - - APIC ID must be an initial APIC ID. - - The algorithm below assumes the target system has symmetry across physical package boundaries - with respect to the number of logical processors per package, number of cores per package. - - @param ApicId APIC ID of the target logical processor. - @param Location Returns the processor location information. -**/ -VOID -SmmGetProcessorLocation ( - IN UINT32 ApicId, - OUT EFI_CPU_PHYSICAL_LOCATION *Location - ) -{ - UINTN ThreadBits; - UINTN CoreBits; - UINT32 RegEax; - UINT32 RegEbx; - UINT32 RegEcx; - UINT32 RegEdx; - UINT32 MaxCpuIdIndex; - UINT32 SubIndex; - UINTN LevelType; - UINT32 MaxLogicProcessorsPerPackage; - UINT32 MaxCoresPerPackage; - BOOLEAN TopologyLeafSupported; - - ASSERT (Location != NULL); - - ThreadBits = 0; - CoreBits = 0; - TopologyLeafSupported = FALSE; - - // - // Check if the processor is capable of supporting more than one logical processor. - // - AsmCpuid (CPUID_VERSION_INFO, NULL, NULL, NULL, &RegEdx); - ASSERT ((RegEdx & BIT28) != 0); - - // - // Assume three-level mapping of APIC ID: Package:Core:SMT. - // - - // - // Get the max index of basic CPUID - // - AsmCpuid (CPUID_SIGNATURE, &MaxCpuIdIndex, NULL, NULL, NULL); - - // - // If the extended topology enumeration leaf is available, it - // is the preferred mechanism for enumerating topology. - // - if (MaxCpuIdIndex >= CPUID_EXTENDED_TOPOLOGY) { - AsmCpuidEx (CPUID_EXTENDED_TOPOLOGY, 0, &RegEax, &RegEbx, &RegEcx, NULL); - // - // If CPUID.(EAX=0BH, ECX=0H):EBX returns zero and maximum input value for - // basic CPUID information is greater than 0BH, then CPUID.0BH leaf is not - // supported on that processor. - // - if ((RegEbx & 0xffff) != 0) { - TopologyLeafSupported = TRUE; - - // - // Sub-leaf index 0 (ECX= 0 as input) provides enumeration parameters to extract - // the SMT sub-field of x2APIC ID. - // - LevelType = (RegEcx >> 8) & 0xff; - ASSERT (LevelType == CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_SMT); - if ((RegEbx & 0xffff) > 1 ) { - ThreadBits = RegEax & 0x1f; - } else { - // - // HT is not supported - // - ThreadBits = 0; - } - - // - // Software must not assume any "level type" encoding - // value to be related to any sub-leaf index, except sub-leaf 0. - // - SubIndex = 1; - do { - AsmCpuidEx (CPUID_EXTENDED_TOPOLOGY, SubIndex, &RegEax, NULL, &RegEcx, NULL); - LevelType = (RegEcx >> 8) & 0xff; - if (LevelType == CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_CORE) { - CoreBits = (RegEax & 0x1f) - ThreadBits; - break; - } - SubIndex++; - } while (LevelType != CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_INVALID); - } - } - - if (!TopologyLeafSupported) { - AsmCpuid (CPUID_VERSION_INFO, NULL, &RegEbx, NULL, NULL); - MaxLogicProcessorsPerPackage = (RegEbx >> 16) & 0xff; - if (MaxCpuIdIndex >= CPUID_CACHE_PARAMS) { - AsmCpuidEx (CPUID_CACHE_PARAMS, 0, &RegEax, NULL, NULL, NULL); - MaxCoresPerPackage = (RegEax >> 26) + 1; - } else { - // - // Must be a single-core processor. - // - MaxCoresPerPackage = 1; - } - - ThreadBits = (UINTN) (HighBitSet32 (MaxLogicProcessorsPerPackage / MaxCoresPerPackage - 1) + 1); - CoreBits = (UINTN) (HighBitSet32 (MaxCoresPerPackage - 1) + 1); - } - - Location->Thread = ApicId & ~((-1) << ThreadBits); - Location->Core = (ApicId >> ThreadBits) & ~((-1) << CoreBits); - Location->Package = (ApicId >> (ThreadBits+ CoreBits)); -} - -/** Gets processor information on the requested processor at the instant this call is made. @param[in] This A pointer to the EFI_SMM_CPU_SERVICE_PROTOCOL instance. @@ -280,7 +161,7 @@ SmmAddProcessor ( gSmmCpuPrivate->ProcessorInfo[Index].ProcessorId == INVALID_APIC_ID) { gSmmCpuPrivate->ProcessorInfo[Index].ProcessorId = ProcessorId; gSmmCpuPrivate->ProcessorInfo[Index].StatusFlag = 0; - SmmGetProcessorLocation ((UINT32)ProcessorId, &gSmmCpuPrivate->ProcessorInfo[Index].Location); + GetProcessorLocation ((UINT32)ProcessorId, &gSmmCpuPrivate->ProcessorInfo[Index].Location); *ProcessorNumber = Index; gSmmCpuPrivate->Operation[Index] = SmmCpuAdd; -- 1.9.1