UefiCpuPkg/RegisterCpuFeaturesLib: Add "Test Then Write" Macros.
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> Reviewed-by: Ray Ni <ray.ni@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Cc: Star Zeng <star.zeng@intel.com>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user