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.d...@intel.com>
> Cc: Ray Ni <ray...@intel.com>
> Cc: Laszlo Ersek <ler...@redhat.com>
> Cc: Star Zeng <star.z...@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 <ler...@redhat.com>

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#45829): https://edk2.groups.io/g/devel/message/45829
Mute This Topic: https://groups.io/mt/32894958/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to