From: "Gerd Hoffmann" <kraxel@redhat.com>
To: Laszlo Ersek <lersek@redhat.com>
Cc: devel@edk2.groups.io, Rahul Kumar <rahul1.kumar@intel.com>,
Ray Ni <ray.ni@intel.com>, Eric Dong <eric.dong@intel.com>,
Oliver Steffen <osteffen@redhat.com>
Subject: Re: [edk2-devel] [PATCH 1/1] UefiCpuPkg/BaseXApicX2ApicLib: fix CPUID_V2_EXTENDED_TOPOLOGY detection
Date: Tue, 17 Oct 2023 11:12:50 +0200 [thread overview]
Message-ID: <6hjo6bytkxi7cjinpdjggwri2bkci3vom6smryvvdlcewjpuxc@lw72dvlc2euv> (raw)
In-Reply-To: <96d0233f-035d-628a-f2d4-c8456937650a@redhat.com>
Hi,
> This is a terrible *organization* bug in the Intel SDM.
[ ... ]
> So, keep scrolling... a whopping 14 pages later, on page 850, we find:
>
> INPUT EAX = 1FH: Returns V2 Extended Topology Information
>
> When CPUID executes with EAX set to 1FH, the processor returns
> information about extended topology enumeration data. Software
> must detect the presence of CPUID leaf 1FH by verifying (a) the
> highest leaf index supported by CPUID is >= 1FH, and (b)
> CPUID.1FH:EBX[15:0] reports a non-zero value. See Table 3-8.
Wow. Thanks for finding that well hidden reference.
An almost identical worded paragraph exists for "INPUT EAX = 0BH:
Returns Extended Topology Information".
> The patch is mostly good, but the commit message can be improved. We
> shouldn't base the reasoning on the existent EBX check in
> GetProcessorLocationByApicId(). Instead, we should quote this specific
> passage from the SDM.
Sure.
I didn't notice all the notes at the bottom of the table, so that
comment plus the fact that the 0x0b and 0x1f leafs are modeled in
a very similar way was the best reference I had at hand.
> Furthermore, it's not the "ExtendedTopologyEbx.Uint32" union field that
> we should compare against zero; we should compare
> "ExtendedTopologyEbx.Bits.LogicalProcessors" -- that's what the spec says.
OK.
take care,
Gerd
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109668): https://edk2.groups.io/g/devel/message/109668
Mute This Topic: https://groups.io/mt/101893551/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
prev parent reply other threads:[~2023-10-17 9:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-11 10:06 [edk2-devel] [PATCH 1/1] UefiCpuPkg/BaseXApicX2ApicLib: fix CPUID_V2_EXTENDED_TOPOLOGY detection Gerd Hoffmann
2023-10-13 20:12 ` Laszlo Ersek
2023-10-17 9:12 ` Gerd Hoffmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6hjo6bytkxi7cjinpdjggwri2bkci3vom6smryvvdlcewjpuxc@lw72dvlc2euv \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox