Skip to content

Commit 9641f05

Browse files
Joel FernandesGnurou
authored andcommitted
gpu: nova-core: sequencer: Implement basic core operations
These opcodes implement various falcon-related boot operations: reset, start, wait-for-halt. Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Message-ID: <20251114195552.739371-11-joelagnelf@nvidia.com>
1 parent e386680 commit 9641f05

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

drivers/gpu/nova-core/gsp/sequencer.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ pub(crate) enum GspSeqCmd {
7676
RegPoll(fw::RegPollPayload),
7777
DelayUs(fw::DelayUsPayload),
7878
RegStore(fw::RegStorePayload),
79+
CoreReset,
80+
CoreStart,
81+
CoreWaitForHalt,
7982
}
8083

8184
impl GspSeqCmd {
@@ -110,6 +113,9 @@ impl GspSeqCmd {
110113
let size = opcode_size + size_of_val(&payload);
111114
(GspSeqCmd::RegStore(payload), size)
112115
}
116+
fw::SeqBufOpcode::CoreReset => (GspSeqCmd::CoreReset, opcode_size),
117+
fw::SeqBufOpcode::CoreStart => (GspSeqCmd::CoreStart, opcode_size),
118+
fw::SeqBufOpcode::CoreWaitForHalt => (GspSeqCmd::CoreWaitForHalt, opcode_size),
113119
_ => return Err(EINVAL),
114120
};
115121

@@ -214,6 +220,19 @@ impl GspSeqCmdRunner for GspSeqCmd {
214220
GspSeqCmd::RegPoll(cmd) => cmd.run(seq),
215221
GspSeqCmd::DelayUs(cmd) => cmd.run(seq),
216222
GspSeqCmd::RegStore(cmd) => cmd.run(seq),
223+
GspSeqCmd::CoreReset => {
224+
seq.gsp_falcon.reset(seq.bar)?;
225+
seq.gsp_falcon.dma_reset(seq.bar);
226+
Ok(())
227+
}
228+
GspSeqCmd::CoreStart => {
229+
seq.gsp_falcon.start(seq.bar)?;
230+
Ok(())
231+
}
232+
GspSeqCmd::CoreWaitForHalt => {
233+
seq.gsp_falcon.wait_till_halted(seq.bar)?;
234+
Ok(())
235+
}
217236
}
218237
}
219238
}

0 commit comments

Comments
 (0)