Skip to content

fw16: fix invalid GPU read lengths#339

Merged
JohnAZoidberg merged 3 commits into
mainfrom
pr-fw16.fix_gpu_descriptor_read_size_correct
May 15, 2026
Merged

fw16: fix invalid GPU read lengths#339
JohnAZoidberg merged 3 commits into
mainfrom
pr-fw16.fix_gpu_descriptor_read_size_correct

Conversation

@kiram9
Copy link
Copy Markdown
Member

@kiram9 kiram9 commented May 15, 2026

  1. This fixes an invalid read length that was truncating reads from the GPU descriptor EEPROM as the length is header+descriptor.

  2. This also fixes an issue on windows, where the i2c read will return extra bytes, so we just truncate the extra bytes to the expected response length.

This fixes an invalid read length that was truncating reads from the GPU
descriptor EEPROM as the length is header+descriptor

Signed-off-by: Kieran Levin <ktl@frame.work>
@kiram9 kiram9 requested a review from JohnAZoidberg May 15, 2026 00:47
@kiram9 kiram9 changed the title fw16: fix invalid length read length WIP fw16: fix invalid length read length May 15, 2026
@JohnAZoidberg JohnAZoidberg requested a review from Copilot May 15, 2026 00:49
Copy link
Copy Markdown

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 attempts to fix GPU descriptor EEPROM reads so the full header plus descriptor payload is read instead of only the descriptor payload length.

Changes:

  • Updates GPU descriptor read length calculation to include header.length.
  • Keeps descriptor magic validation before reading the full descriptor.

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

));
}
self.read_ec_gpu_chunk(0x00, header.descriptor_length as u16)
self.read_ec_gpu_chunk(0x00, (header.descriptor_length + header.length) as u16)
));
}
self.read_ec_gpu_chunk(0x00, header.descriptor_length as u16)
self.read_ec_gpu_chunk(0x00, (header.descriptor_length + header.length) as u16)
kiram9 added 2 commits May 14, 2026 21:45
Signed-off-by: Kieran Levin <ktl@frame.work>
i2c verification was failing due to on windows there are additional
bytes in the response from send_command. So truncate the extra bytes to
the request size

Signed-off-by: Kieran Levin <ktl@frame.work>
@kiram9 kiram9 requested a review from TapFW May 15, 2026 08:22
@kiram9 kiram9 changed the title WIP fw16: fix invalid length read length fw16: fix invalid GPU read lengths May 15, 2026
@JohnAZoidberg
Copy link
Copy Markdown
Member

Better than before

@JohnAZoidberg JohnAZoidberg merged commit d060e85 into main May 15, 2026
11 checks passed
@JohnAZoidberg JohnAZoidberg deleted the pr-fw16.fix_gpu_descriptor_read_size_correct branch May 15, 2026 11:31
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