From a56294f9de513cca8e460613491f5775b2744cbc Mon Sep 17 00:00:00 2001 From: occheung Date: Thu, 5 Sep 2024 11:56:43 +0800 Subject: [PATCH] satman coremgmt: impl config erase --- artiq/firmware/satman/main.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/artiq/firmware/satman/main.rs b/artiq/firmware/satman/main.rs index 1647c7955..3909ce6d3 100644 --- a/artiq/firmware/satman/main.rs +++ b/artiq/firmware/satman/main.rs @@ -580,6 +580,15 @@ fn process_aux_packet(dmamgr: &mut DmaManager, analyzer: &mut Analyzer, kernelmg drtioaux::send(0, &drtioaux::Packet::CoreMgmtReply { succeeded }) } + drtioaux::Packet::CoreMgmtConfigEraseRequest { destination: _destination } => { + forward!(router, _routing_table, _destination, *rank, *self_destination, _repeaters, &packet); + + let succeeded = config::erase() + .map_err(|err| warn!("error on erasing config: {:?}", err)) + .is_ok(); + + drtioaux::send(0, &drtioaux::Packet::CoreMgmtReply { succeeded }) + } drtioaux::Packet::CoreMgmtRebootRequest { destination: _destination } => { forward!(router, _routing_table, _destination, *rank, *self_destination, _repeaters, &packet);