From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: [edk2-devel] [PATCH v1] UefiCpuPkg/CpuCacheInfoLib: Sort CpuCacheInfo array To: Ni, Ray ,devel@edk2.groups.io From: "Jason Lou" X-Originating-Location: CN (192.102.204.51) X-Originating-Platform: Windows Chrome 92 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Mon, 02 Aug 2021 00:32:37 -0700 References: In-Reply-To: Message-ID: <29198.1627889557443426483@groups.io> Content-Type: multipart/alternative; boundary="Knehbb6aLteogIUdZ1VC" --Knehbb6aLteogIUdZ1VC Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Ray, According to the definitions in SDM, the value of "Core" core type(40H) is= larger than that of "Atom" core type(20H), if array is sorted by core type value from largest to smal= lest, =E2=80=9CCore=E2=80=9D CPU cache info can be placed before "Atom" CPU cache=C2=A0info in the CpuCacheInfo array. No matter how to sort the array by core type value, no issue will occur. The consumer of the array just need use the same sort rule to process the = data of the array. [SDM definition] 1AH EAX Enumerates the native model ID and core type. Bits 31-24: Core type 10H: Reserved 20H: Intel Atom=C2=AE 30H: Reserved 40H: Intel=C2=AE Core=E2=84=A2 --Knehbb6aLteogIUdZ1VC Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
Hi Ray,

According to the definitions in SDM, the value of "= Core" core type(40H) is larger than that of "Atom"
core type(20H), if = array is sorted by core type value from largest to smallest, “Core&rd= quo; CPU cache info
can be placed before "Atom" CPU cache info in= the CpuCacheInfo array.

No matter how to sort the array by core= type value, no issue will occur.
The consumer of the array just need= use the same sort rule to process the data of the array.

[SDM d= efinition]
1AH EAX Enumerates the native model ID and core type.
Bits 31-24: Core type
10H: Reserved
20H: Intel Atom®
30H: Reserved
40H: Intel® Core™
--Knehbb6aLteogIUdZ1VC--