Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ASFW.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1440,6 +1440,7 @@
B6092FC4D28C8CBE1F474D4B /* AVCHandler.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AVCHandler.cpp; sourceTree = "<group>"; };
B67D7B85C0AE7742A87A96D8 /* DiceLockWatch.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = DiceLockWatch.hpp; sourceTree = "<group>"; };
B68AF53D0E4DFFFEFFB6C111 /* AVCUnit.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AVCUnit.cpp; sourceTree = "<group>"; };
B6A28B6568BD16B3A7F638BD /* LoginStateMachine.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = LoginStateMachine.hpp; sourceTree = "<group>"; };
B6CB2AFAEB80414349FBF935 /* net.asfw.driver.dext */ = {isa = PBXFileReference; explicitFileType = "wrapper.driver-extension"; includeInIndex = 0; path = net.asfw.driver.dext; sourceTree = BUILT_PRODUCTS_DIR; };
B6EABCE6198C5B339B48E9CA /* DiceDiagnosticsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DiceDiagnosticsTests.swift; sourceTree = "<group>"; };
B6FC8F89D537351E9BA9D735 /* ControllerConfig.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ControllerConfig.cpp; sourceTree = "<group>"; };
Expand Down Expand Up @@ -3190,6 +3191,7 @@
651E702CFD124214444CEFCC /* ISessionScheduler.hpp */,
50A11F405110ACE28D722447 /* LoginSession.cpp */,
E7BA855FF45BC36F50C20752 /* LoginSession.hpp */,
B6A28B6568BD16B3A7F638BD /* LoginStateMachine.hpp */,
36A97E74ED2EB18E06BCF26F /* SessionRegistry.cpp */,
FA21FB623DC8076A7D6A6ACE /* SessionRegistry.hpp */,
);
Expand Down
1 change: 1 addition & 0 deletions ASFWDriver/Protocols/SBP2/SBP2WireFormats.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ struct StatusBlock {
uint32_t status[6]{}; // Up to 24 additional bytes of status

static constexpr uint32_t kMaxSize = 32; // header (8) + max status (24)
static constexpr uint8_t kRespRequestComplete = 0; // Apple kFWSBP2RequestComplete

// Bit positions cross-validated with Linux sbp2.c STATUS_GET_* macros
// (quadlet bits 31:30 src, 29:28 resp, 27 dead, 26:24 len → byte 0 above).
Expand Down
7 changes: 4 additions & 3 deletions ASFWDriver/Protocols/SBP2/Session/CommandExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,13 +416,14 @@ bool CommandExecutor::SubmitTaskManagement(SBP2ManagementORB::Function function,
if (!IsSupportedTaskManagementFunction(function)) {
return false;
}
if (session_.State() != LoginState::LoggedIn || managementORB_) {
const LoginSnapshot snap = session_.Snapshot();
if (snap.state != LoginState::LoggedIn || !snap.loginID || managementORB_) {
return false;
}

auto orb = std::make_unique<SBP2ManagementORB>(bus_, busInfo_, addrSpaceMgr_, owner_);
orb->SetFunction(function);
orb->SetLoginID(session_.LoginID());
orb->SetLoginID(*snap.loginID);
orb->SetManagementAgentOffset(session_.TargetInfo().managementAgentOffset);
// Grace beyond the advertised management timeout: a target can post status
// a hair past its own Unit_Characteristics timeout (observed on the LS-9000,
Expand All @@ -432,7 +433,7 @@ bool CommandExecutor::SubmitTaskManagement(SBP2ManagementORB::Function function,
// headroom instead. Not a model-specific value.
orb->SetTimeout(session_.TargetInfo().managementTimeoutMs + kManagementTimeoutGraceMs);
orb->SetScheduler(&scheduler_);
orb->SetTargetNode(session_.Generation(), session_.TargetInfo().targetNodeId);
orb->SetTargetNode(snap.generation, session_.TargetInfo().targetNodeId);

const SBP2ManagementORB* submittedORB = orb.get();
const std::weak_ptr<int> weak = lifetimeToken_;
Expand Down
Loading