Skip to contentSkip to conversation

monitor/intel: Add decoding of Intel Read Version event fields

PATCH In review Kiran K 2 participants 2 messages Jul 16, 2024 Bluetooth drivers

lore
Share & tools
lore

Kiran K

author
#0 lore raw

PATCH 1/1 monitor/intel: Add decoding of Intel Read Version event fields

Add decoding of Image type, Firmware SHA1 and Firmware ID fields.

snoop traces:

< HCI Command: Intel Read Version (0x3f|0x0005) plen 1

        Requested Type:
          All Supported Types(0xff)
Quoted 1 line

HCI Event: Command Complete (0x0e) plen 126

      Intel Read Version (0x3f|0x0005) ncmd 32
        Status: Success (0x00)
        CNVi TOP(16): 0x01080900
        CNVr TOP(17): 0x02001910
        CNVi BT(18): 0x001e3700
        CNVr OTP(21): 0x0432
        Device Rev ID(22): 0x0000
        USB VID(23): 0x8087
        USB PID(24): 0x0037
        Image Type(28): Intermediate loader(0x02)
        Time Stamp(29): 24-27
        Build Type(30): 0x03
        Build Num(31): 0x00010060
        OTP Patch Version(39): 0x00
        Secure Boot(40): Enabled(1)
        Key From Header(41): Disabled(0)
        OTP Lock(42): Disabled(0)
        API Lock(43): Enabled(1)
        Debug Lock(44): Disabled(0)
        Minimum FW(45): 1-10.2014
        Limited CCE(46): Disabled(0)
        SBE Type(47): 0x01
        OTP BDADDR: DC:97:BA:54:1F:72 (OUI DC-97-BA)
        Unlocked State(49): Disabled(0)
        Firmware SHA1(50): 0xe4a9801b
        Unknown Type(51):
        00 00 00 00
        Unknown Type(54):
        02
        Unknown Type(56):
        01
        Unknown Type(57):
        01 00
        Unknown Type(58):
        05 00
        Firmware ID(80): usb
---
 monitor/intel.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
monitor/intel.c +11 -0
index 0de864d8a41e..dbfd06317bea 100644
@@ -205,6 +205,9 @@ static void print_version_tlv_img_type(const struct intel_version_tlv *tlv,
 	case 0x01:
 		str = "Bootloader";
 		break;
+	case 0x02:
+		str = "Intermediate loader";
+		break;
 	case 0x03:
 		str = "Firmware";
 		break;
@@ -252,6 +255,12 @@ static void print_version_tlv_mfg(const struct intel_version_tlv *tlv,
 						bt_compidtostr(mfg_id), mfg_id);
 }
 
+static void print_version_tlv_fw_id(const struct intel_version_tlv *tlv,
+				    const char *type_str)
+{
+	print_field("%s(%u): %s", type_str, tlv->type, tlv->val);
+}
+
 static const struct intel_version_tlv_desc {
 	uint8_t type;
 	const char *type_str;
@@ -291,6 +300,8 @@ static const struct intel_version_tlv_desc {
 	{ 47, "SBE Type", print_version_tlv_u8 },
 	{ 48, "OTP BDADDR", print_version_tlv_otp_bdaddr },
 	{ 49, "Unlocked State", print_version_tlv_enabled },
+	{ 50, "Firmware SHA1", print_version_tlv_u32},
+	{ 80, "Firmware ID", print_version_tlv_fw_id},
 	{ 0, NULL, NULL },
 };
 
Signature · 1 line
2.40.1
#1 lore raw

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=871704

---Test result---

Test Summary:

CheckPatch                    PASS      0.48 seconds
GitLint                       PASS      0.33 seconds
BuildEll                      PASS      24.67 seconds
BluezMake                     PASS      1642.17 seconds
MakeCheck                     PASS      13.41 seconds
MakeDistcheck                 PASS      180.34 seconds
CheckValgrind                 PASS      253.05 seconds
CheckSmatch                   PASS      354.59 seconds
bluezmakeextell               PASS      119.96 seconds
IncrementalBuild              PASS      1444.64 seconds
ScanBuild                     PASS      999.47 seconds

---
Regards,
Linux Bluetooth