mirror of
https://github.com/chipsec/chipsec
synced 2026-06-08 13:31:00 +00:00
Update is_supported() in spectre_v2.py
Signed-off-by: Frinzell, Aaron <aaron.frinzell@intel.com>
This commit is contained in:
committed by
Nathaniel Mitchell
parent
8c0b3f2870
commit
a26b2bb614
@@ -136,7 +136,14 @@ class spectre_v2(BaseModule):
|
||||
BaseModule.__init__(self)
|
||||
|
||||
def is_supported(self):
|
||||
return True
|
||||
if self.cs.is_register_defined('IA32_ARCH_CAPABILITIES'):
|
||||
if self.cs.is_register_defined('IA32_SPEC_CTRL'):
|
||||
return True
|
||||
self.logger.log_important('IA32_SPEC_CTRL register not defined for platform. Skipping module.')
|
||||
else:
|
||||
self.logger.log_important('IA32_ARCH_CAPABILITIES register not defined for platform. Skipping module.')
|
||||
self.res = ModuleResult.NOTAPPLICABLE
|
||||
return False
|
||||
|
||||
def check_spectre_mitigations(self):
|
||||
try:
|
||||
@@ -165,10 +172,6 @@ class spectre_v2(BaseModule):
|
||||
else:
|
||||
self.logger.log_bad("CPU doesn't support STIBP")
|
||||
|
||||
if not self.cs.is_register_defined('IA32_ARCH_CAPABILITIES') or not self.cs.is_register_defined('IA32_SPEC_CTRL'):
|
||||
self.logger.log_error("Couldn't find definition of required MSRs")
|
||||
return ModuleResult.ERROR
|
||||
|
||||
if arch_cap_supported:
|
||||
ibrs_enh_supported = True
|
||||
self.logger.log("[*] Checking enhanced IBRS support in IA32_ARCH_CAPABILITIES...")
|
||||
|
||||
Reference in New Issue
Block a user