-
Notifications
You must be signed in to change notification settings - Fork 21
refactor: correct GetFlogSize to read UINT32 #1136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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.Sizefield fromuint16touint32to 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.
sudhir-intc
left a comment
There was a problem hiding this 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"
Hi, updated Linux GUID to match Windows standard format. Breaking down Linux bytes: a7 e5 2e 08 25 7c 0a 47 96 43 0c 06 f0 46 6e a1 First 4 bytes reversed: a7e52e08 → 082EE5A7 ✓ |
rsdmike
left a comment
There was a problem hiding this 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.
97c2517 to
e8f0275
Compare
Uh oh!
There was an error while loading. Please reload this page.