From: "Dong, Eric" <eric.dong@intel.com>
To: Laszlo Ersek <lersek@redhat.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Ni, Ruiyu" <ruiyu.ni@intel.com>
Subject: Re: [Patch 1/4] UefiCpuPkg/Include/AcpiCpuData.h: Add Semaphore related Information.
Date: Tue, 16 Oct 2018 03:43:26 +0000 [thread overview]
Message-ID: <ED077930C258884BBCB450DB737E66225576B3E0@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <7d4916dc-7d3f-3609-44de-1b9472ad237e@redhat.com>
Hi Laszlo,
> -----Original Message-----
> From: Laszlo Ersek [mailto:lersek@redhat.com]
> Sent: Tuesday, October 16, 2018 12:03 AM
> To: Dong, Eric <eric.dong@intel.com>; edk2-devel@lists.01.org
> Cc: Ni, Ruiyu <ruiyu.ni@intel.com>
> Subject: Re: [Patch 1/4] UefiCpuPkg/Include/AcpiCpuData.h: Add
> Semaphore related Information.
>
> On 10/15/18 04:49, Eric Dong wrote:
> > In order to support semaphore related logic, add new definition for it.
> >
> > Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> > Cc: Laszlo Ersek <lersek@redhat.com>
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Eric Dong <eric.dong@intel.com>
> > ---
> > UefiCpuPkg/Include/AcpiCpuData.h | 23 ++++++++++++++++++++++-
> > 1 file changed, 22 insertions(+), 1 deletion(-)
>
> (1) If it's possible, I suggest moving the (very nice) description from the 0/4
> cover letter to this patch. The cover letter is not captured in the git commit
> history.
>
> I don't insist, but it would be a nice touch, IMO.
Code change for this patch can't show all the information for the description. I add this description in 3/4 change.
But this change is the first one for this serial, I think it's ok to add description here. Will add it in V2 change.
>
> >
> > diff --git a/UefiCpuPkg/Include/AcpiCpuData.h
> > b/UefiCpuPkg/Include/AcpiCpuData.h
> > index 9e51145c08..b3cf2f664a 100644
> > --- a/UefiCpuPkg/Include/AcpiCpuData.h
> > +++ b/UefiCpuPkg/Include/AcpiCpuData.h
> > @@ -15,6 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF
> ANY KIND, EITHER EXPRESS OR IMPLIED.
> > #ifndef _ACPI_CPU_DATA_H_
> > #define _ACPI_CPU_DATA_H_
> >
> > +#include <Protocol/MpService.h>
> > +
> > //
> > // Register types in register table
> > //
> > @@ -22,9 +24,20 @@ typedef enum {
> > Msr,
> > ControlRegister,
> > MemoryMapped,
> > - CacheControl
> > + CacheControl,
> > + Semaphore
> > } REGISTER_TYPE;
> >
> > +//
> > +// CPU information.
> > +//
> > +typedef struct {
> > + UINT32 PackageCount; // Packages in this CPU.
>
> (2) Is it possible to have multiple packages in a single CPU? If not, then please
> clean up the comment.
>
> Did you perhaps mean "number of sockets in the system"?
Yes, I means sockets in the system, i think socket == package. Just like below definition in MdePkg\Include\Protocol\MpService.h file, it use package instead of socket.
///
/// Structure that describes the pyhiscal location of a logical CPU.
///
typedef struct {
///
/// Zero-based physical package number that identifies the cartridge of the processor.
///
UINT32 Package;
///
/// Zero-based physical core number within package of the processor.
///
UINT32 Core;
///
/// Zero-based logical thread number within core of the processor.
///
UINT32 Thread;
} EFI_CPU_PHYSICAL_LOCATION;
>
> > + UINT32 CoreCount; // Max Core count in the packages.
> > + UINT32 ThreadCount; // MAx thread count in the cores.
>
> (3) The word "MAx" should be "Max", I think.
Yes, will update it in next version.
>
> > + UINT32 *ValidCoresInPackages; // Valid cores in each package.
>
> (4) Is it possible to document the structure of this array (?) in some detail?
> Other parts of "UefiCpuPkg/Include/AcpiCpuData.h" are very well
> documented.
Yes, will add description in next version.
>
> > +} CPU_STATUS_INFORMATION;
> > +
> > //
> > // Element of register table entry
> > //
> > @@ -147,6 +160,14 @@ typedef struct {
> > // provided.
> > //
> > UINT32 ApMachineCheckHandlerSize;
> > + //
> > + // CPU information which is required when set the register table.
> > + //
> > + CPU_STATUS_INFORMATION CpuStatus;
> > + //
> > + // Location info for each ap.
>
> (5) This header file spells "AP" in upper case elsewhere.
Ok, will update it in next version
>
> > + //
> > + EFI_CPU_PHYSICAL_LOCATION *ApLocation;
>
> (6) Is this supposed to be an array? If so, what is the structure of the array?
> What is the size?
Yes, it's point to an array. Will add comments in this definition in next version.
>
> (7) This is the first field in ACPI_CPU_DATA that has pointer type.
> Other pointers are represented as EFI_PHYSICAL_ADDRESS.
>
> What justifies this difference?
Yes, here I should use EFI_PHYSICAL_ADDRESS instead of pointer type. Will update it in my next change.
> > } ACPI_CPU_DATA;
> >
> > #endif
> >
>
> (8) "UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c" will zero-fill the new fields.
> Is that safe?
It's not safe, I missed code change in CpuS3DataDxe, it should keep these data if OldAcpiCpuData already exist. Will update it in the next version.
>
> Thanks
> Laszlo
next prev parent reply other threads:[~2018-10-16 3:43 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-15 2:49 [Patch 0/4] Fix performance issue caused by Set MSR task Eric Dong
2018-10-15 2:49 ` [Patch 1/4] UefiCpuPkg/Include/AcpiCpuData.h: Add Semaphore related Information Eric Dong
2018-10-15 16:02 ` Laszlo Ersek
2018-10-16 3:43 ` Dong, Eric [this message]
2018-10-16 2:27 ` Ni, Ruiyu
2018-10-16 5:25 ` Dong, Eric
2018-10-15 2:49 ` [Patch 2/4] UefiCpuPkg/RegisterCpuFeaturesLib.h: Add new dependence types Eric Dong
2018-10-15 2:49 ` [Patch 3/4] UefiCpuPkg/RegisterCpuFeaturesLib: Add logic to support semaphore type Eric Dong
2018-10-16 3:05 ` Ni, Ruiyu
2018-10-16 7:43 ` Dong, Eric
2018-10-15 2:49 ` [Patch 4/4] UefiCpuPkg/PiSmmCpuDxeSmm: " Eric Dong
2018-10-15 17:13 ` Laszlo Ersek
2018-10-16 14:44 ` Dong, Eric
2018-10-16 3:16 ` Ni, Ruiyu
2018-10-16 23:52 ` Dong, Eric
2018-10-15 15:51 ` [Patch 0/4] Fix performance issue caused by Set MSR task Laszlo Ersek
2018-10-16 1:39 ` Dong, Eric
2018-10-17 11:42 ` Laszlo Ersek
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=ED077930C258884BBCB450DB737E66225576B3E0@shsmsx102.ccr.corp.intel.com \
--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