From: "Laszlo Ersek" <lersek@redhat.com>
To: Eric Dong <eric.dong@intel.com>, devel@edk2.groups.io
Cc: Ray Ni <ray.ni@intel.com>, Star Zeng <star.zeng@intel.com>
Subject: Re: [Patch v4 1/6] UefiCpuPkg/RegisterCpuFeaturesLib: Add "Test Then Write" Macros.
Date: Fri, 16 Aug 2019 18:46:30 +0200 [thread overview]
Message-ID: <25943607-ebb0-c8d8-0198-a557314f2fdf@redhat.com> (raw)
In-Reply-To: <20190816035730.3252-2-eric.dong@intel.com>
On 08/16/19 05:57, Eric Dong wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2040
>
> Add below new micros which test the current value before write the new
> value. Only write new value when current value not same as new value.
> CPU_REGISTER_TABLE_TEST_THEN_WRITE32
> CPU_REGISTER_TABLE_TEST_THEN_WRITE64
> CPU_REGISTER_TABLE_TEST_THEN_WRITE_FIELD
>
> Also add below API:
> CpuRegisterTableTestThenWrite
>
> Signed-off-by: Eric Dong <eric.dong@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Star Zeng <star.zeng@intel.com>
> ---
> UefiCpuPkg/Include/AcpiCpuData.h | 3 +-
> .../Include/Library/RegisterCpuFeaturesLib.h | 91 +++++++++++++++++++
> .../RegisterCpuFeaturesLib.c | 44 ++++++++-
> 3 files changed, 134 insertions(+), 4 deletions(-)
>
> diff --git a/UefiCpuPkg/Include/AcpiCpuData.h b/UefiCpuPkg/Include/AcpiCpuData.h
> index b963a2f592..77da5d4455 100644
> --- a/UefiCpuPkg/Include/AcpiCpuData.h
> +++ b/UefiCpuPkg/Include/AcpiCpuData.h
> @@ -78,7 +78,8 @@ typedef struct {
> UINT32 Index; // offset 4 - 7
> UINT8 ValidBitStart; // offset 8
> UINT8 ValidBitLength; // offset 9
> - UINT16 Reserved; // offset 10 - 11
> + BOOLEAN TestThenWrite; // offset 10
> + UINT8 Reserved1; // offset 11
> UINT32 HighIndex; // offset 12-15, only valid for MemoryMapped
> UINT64 Value; // offset 16-23
> } CPU_REGISTER_TABLE_ENTRY;
Acked-by: Laszlo Ersek <lersek@redhat.com>
next prev parent reply other threads:[~2019-08-16 16:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-16 3:57 [Patch v4 0/6] Add "test then write" mechanism Dong, Eric
2019-08-16 3:57 ` [Patch v4 1/6] UefiCpuPkg/RegisterCpuFeaturesLib: Add "Test Then Write" Macros Dong, Eric
2019-08-16 16:46 ` Laszlo Ersek [this message]
2019-08-16 3:57 ` [Patch v4 2/6] UefiCpuPkg/PiSmmCpuDxeSmm: Combine CR read/write action Dong, Eric
2019-08-16 3:57 ` [Patch v4 3/6] UefiCpuPkg/PiSmmCpuDxeSmm: Supports test then write new value logic Dong, Eric
2019-08-16 3:57 ` [Patch v4 4/6] UefiCpuPkg/RegisterCpuFeaturesLib: Combine CR read/write action Dong, Eric
2019-08-16 3:57 ` [Patch v4 5/6] UefiCpuPkg/RegisterCpuFeaturesLib: Supports test then write new value logic Dong, Eric
2019-08-16 3:57 ` [Patch v4 6/6] UefiCpuPkg/CpuCommonFeaturesLib: Use new macros Dong, Eric
2019-08-19 22:57 ` [Patch v4 0/6] Add "test then write" mechanism Ni, Ray
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=25943607-ebb0-c8d8-0198-a557314f2fdf@redhat.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