platform/x86: intel_pmt_crashlog: Fix incorrect macros

commit d4dc4bf282 upstream.

Fixes off-by-one bugs in the macro assignments for the crashlog control
bits. Was initially tested on emulation but bug revealed after testing on
silicon.

Fixes: 5ef9998c96 ("platform/x86: Intel PMT Crashlog capability driver")
Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Link: https://lore.kernel.org/r/20210317024455.3071477-2-david.e.box@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Chen Zhuo <sagazchen@tencent.com>
Signed-off-by: Xinghui Li <korantli@tencent.com>
This commit is contained in:
David E. Box 2021-03-16 19:44:55 -07:00 committed by Jianping Liu
parent c010d4b695
commit 2158c8a725
1 changed files with 6 additions and 7 deletions

View File

@ -23,18 +23,17 @@
#define CRASH_TYPE_OOBMSM 1
/* Control Flags */
#define CRASHLOG_FLAG_DISABLE BIT(27)
#define CRASHLOG_FLAG_DISABLE BIT(28)
/*
* Bits 28 and 29 control the state of bit 31.
* Bits 29 and 30 control the state of bit 31.
*
* Bit 28 will clear bit 31, if set, allowing a new crashlog to be captured.
* Bit 29 will immediately trigger a crashlog to be generated, setting bit 31.
* Bit 30 is read-only and reserved as 0.
* Bit 29 will clear bit 31, if set, allowing a new crashlog to be captured.
* Bit 30 will immediately trigger a crashlog to be generated, setting bit 31.
* Bit 31 is the read-only status with a 1 indicating log is complete.
*/
#define CRASHLOG_FLAG_TRIGGER_CLEAR BIT(28)
#define CRASHLOG_FLAG_TRIGGER_EXECUTE BIT(29)
#define CRASHLOG_FLAG_TRIGGER_CLEAR BIT(29)
#define CRASHLOG_FLAG_TRIGGER_EXECUTE BIT(30)
#define CRASHLOG_FLAG_TRIGGER_COMPLETE BIT(31)
#define CRASHLOG_FLAG_TRIGGER_MASK GENMASK(31, 28)