Skip to content

Commit

Permalink
Add check to see if reg is defined in txt_cmd
Browse files Browse the repository at this point in the history
Signed-off-by: Nathaniel Mitchell <[email protected]>
  • Loading branch information
npmitche committed Sep 25, 2024
1 parent c69509a commit c97a8ac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions chipsec/utilcmd/txt_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ def txt_dump(self):

def _log_register(self, reg_name):
"""Log the content of a register with lines starting with [CHIPSEC]"""
if not self.cs.register.is_defined(reg_name):
return
reg_def = self.cs.register.get_def(reg_name)
value = self.cs.register.read(reg_name)
desc = reg_def["desc"]
Expand Down

0 comments on commit c97a8ac

Please sign in to comment.