Skip to content

Conversation

@sinchubhat
Copy link
Contributor

@sinchubhat sinchubhat commented Feb 2, 2026

  • Changed FlogSize from uint16 (2 bytes) to uint32 (4 bytes) to match Intel HOTHAM specification.
  • Cleaned up Windows trace logs.
  • Updated Linux GUID to match Windows standard format.

@sinchubhat sinchubhat requested a review from Copilot February 2, 2026 04:31
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR corrects the GetFlogSize function to properly read UINT32 values (4 bytes) instead of UINT16 values (2 bytes) to align with the Intel HOTHAM specification. It also refactors error message handling on Linux and reduces verbose trace logging on Windows.

Changes:

  • Updated GetFlogSizeResponse.Size field from uint16 to uint32 to match spec
  • Modified response parsing logic to read 4 bytes instead of 2 bytes for the size field
  • Refactored duplicate error message strings into constants on Linux
  • Removed excessive trace logging statements on Windows

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
pkg/hotham/types.go Changed Size field from uint16 to uint32 to match HOTHAM spec
pkg/hotham/commands.go Updated response parsing to read 4-byte uint32 instead of 2-byte uint16, adjusted buffer size expectations from 6 to 8 bytes
pkg/heci/windows.go Added protocolVersion field to Driver struct and cleaned up verbose trace logs
pkg/heci/linux.go Refactored duplicate error message strings into reusable constants

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

@sudhir-intc sudhir-intc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, please check this one difference in the way guid is being printed on windows and linux

time="2026-02-05T09:37:01+05:30" level=trace msg="InitHOTHAM: Connected to HOTHAM GUID: {082EE5A7-7C25-470A-9643-0C06F0466EA1}, Buffer size: 8196, Protocol version: 0"
time="2026-02-05T09:30:02+05:30" level=trace msg="InitHOTHAM: Connected to HOTHAM GUID: a7e52e08257c0a4796430c06f0466ea1, Buffer size: 8196, Protocol version: 0"

@sinchubhat
Copy link
Contributor Author

sinchubhat commented Feb 5, 2026

LGTM, please check this one difference in the way guid is being printed on windows and linux

time="2026-02-05T09:37:01+05:30" level=trace msg="InitHOTHAM: Connected to HOTHAM GUID: {082EE5A7-7C25-470A-9643-0C06F0466EA1}, Buffer size: 8196, Protocol version: 0"
time="2026-02-05T09:30:02+05:30" level=trace msg="InitHOTHAM: Connected to HOTHAM GUID: a7e52e08257c0a4796430c06f0466ea1, Buffer size: 8196, Protocol version: 0"

Hi, updated Linux GUID to match Windows standard format.
Earlier:
Windows Format:
{082EE5A7-7C25-470A-9643-0C06F0466EA1}
Standard Windows GUID format with braces and hyphens.
Linux Format:
a7e52e08257c0a4796430c06f0466ea1
Raw hex byte array

Breaking down Linux bytes: a7 e5 2e 08 25 7c 0a 47 96 43 0c 06 f0 46 6e a1
Reading with proper GUID byte ordering:

First 4 bytes reversed: a7e52e08 → 082EE5A7 ✓
Next 2 bytes reversed: 257c → 7C25 ✓
Next 2 bytes reversed: 0a47 → 470A ✓
Last 8 bytes as-is: 96430c06f0466ea1 → 9643-0C06F0466EA1 ✓
Result: {082EE5A7-7C25-470A-9643-0C06F0466EA1} - Same GUID!

@sinchubhat sinchubhat marked this pull request as ready for review February 5, 2026 04:35
Copy link
Member

@rsdmike rsdmike left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please squash your commits and use refactor for commit. Thanks!

- Changed FlogSize from uint16 (2 bytes) to uint32 (4 bytes) to match Intel HOTHAM specification.
- Cleaned up Windows trace logs.
- Updated Linux GUID to match Windows standard format.
@sinchubhat sinchubhat changed the title fix: correct GetFlogSize to read UINT32 refactor: correct GetFlogSize to read UINT32 Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants