From 5d446405159e04e3d5ebbf8f69068c8e83919504 Mon Sep 17 00:00:00 2001 From: Junjie Mao Date: Thu, 5 Aug 2021 10:59:06 +0800 Subject: [PATCH] board_inspector: add conversion to hex string from buffer fields Occasionally buffer fields (which are typically integers) are converted to hexadecimal strings for debugging purposes. This patch adds the conversion to suppress interpretation errors of these debugging calls. This patch is added in v3 of the series. Tracked-On: #6287 Signed-off-by: Junjie Mao --- misc/config_tools/board_inspector/acpiparser/aml/datatypes.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/misc/config_tools/board_inspector/acpiparser/aml/datatypes.py b/misc/config_tools/board_inspector/acpiparser/aml/datatypes.py index 99759052b..6b583c253 100644 --- a/misc/config_tools/board_inspector/acpiparser/aml/datatypes.py +++ b/misc/config_tools/board_inspector/acpiparser/aml/datatypes.py @@ -221,6 +221,9 @@ class BufferField(Object): def to_string(self): return f"BufferField({self.__field})" + def to_hex_string(self): + return String(hex(self.get())[2:]) + # DebugObject class Device(Object):