Skip to content

Add Support for SM8975 and 64bit PBL v3 for sahara mode - #30

Open
LittlenineEnnea wants to merge 2 commits into
strongtz:mainfrom
LittlenineEnnea:main
Open

LittlenineEnnea wants to merge 2 commits into
strongtz:mainfrom
LittlenineEnnea:main

Conversation

@LittlenineEnnea

Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Littlenine <LittlenineEnnea@gmail.com>
Signed-off-by: Littlenine <LittlenineEnnea@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Protocol state validation, HELLO negotiation, descriptor selection, and textual report validation have correctness issues.

4 open findings
What changed in this PR

Adds SM8975-oriented Sahara v3 support, including 64-bit multi-image transfers, textual CMD10 parsing, USB endpoint discovery, and device reconnection.

Changes:

  • Adds multi-image Sahara transfer and reconnection handling.
  • Supports textual v3 chip reports and dynamic USB bulk endpoints.
  • Expands diagnostics and automated tests.
File Description
QCEDL.NET/​Transport/​LibUsbTransport.cs Discovers and logs USB endpoints.
QCEDL.NET/​Layers/​PBL/​Sahara/​QualcommSaharaV3ChipInfo.cs Parses textual CMD10 reports.
QCEDL.NET/​Layers/​PBL/​Sahara/​QualcommSaharaMultiImage.cs Implements multi-image transfers.
QCEDL.NET/​Layers/​PBL/​Sahara/​QualcommSahara.cs Routes XML configurations to multi-image mode.
QCEDL.NET/​Layers/​PBL/​Sahara/​Command/​Execute.cs Logs raw CMD10 responses.
QCEDL.NET/​ChipInfo/​HardwareID.cs Promotes hardware information logs.
QCEDL.NET.Tests/​QualcommSaharaV3ChipInfoTests.cs Tests textual and unaligned payload parsing.
QCEDL.NET.Tests/​QualcommSaharaMultiImageTests.cs Tests multi-stage transfer behavior.
QCEDL.CLI/​Core/​EdlManager.cs Adds reconnection and re-enumeration polling.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +328 to +333
if (_servedImageIds.Count > 0 && _servedImageIds[^1] == FirehoseProgrammerImageId)
{
LibraryLogger.Debug(
$"Image id {FirehoseProgrammerImageId} transferred; leaving the Sahara protocol.");
return true;
}
{
var payload = new byte[0x28];
ByteOperations.WriteUInt32(payload, 0x00, protocolVersion);
ByteOperations.WriteUInt32(payload, 0x04, protocolVersion);
Comment on lines +183 to +190
uint Field(string key)
{
return fields.TryGetValue(key, out var value) ? value : 0;
}

uint? OptionalField(string key)
{
return fields.TryGetValue(key, out var value) ? value : null;
Comment on lines +223 to +226
foreach (var configuration in _device!.Info.Configurations)
{
foreach (var usbInterface in configuration.Interfaces)
{
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.

2 participants