From 6b80daab0a998b380f296567ab1e1f467e7aaab1 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 20 Feb 2023 18:12:33 +0100 Subject: [PATCH 1/7] maybe this caused the hangup issue? --- linux/ipcore/PdecHandler.cpp | 29 ++++++++++++++++++++++++----- linux/ipcore/PdecHandler.h | 9 ++++++++- mission/tmtc/CfdpTmFunnel.cpp | 6 +++--- 3 files changed, 35 insertions(+), 9 deletions(-) diff --git a/linux/ipcore/PdecHandler.cpp b/linux/ipcore/PdecHandler.cpp index 3244280e..8eb2d00a 100644 --- a/linux/ipcore/PdecHandler.cpp +++ b/linux/ipcore/PdecHandler.cpp @@ -1,6 +1,7 @@ #include "PdecHandler.h" #include +#include #include #include #include @@ -113,7 +114,7 @@ ReturnValue_t PdecHandler::polledOperation() { // Requires reconfiguration and reinitialization of PDEC triggerEvent(INVALID_FAR); state = State::WAIT_FOR_RECOVERY; - return result; + break; } state = State::RUNNING; break; @@ -147,6 +148,9 @@ ReturnValue_t PdecHandler::irqOperation() { uint32_t info = 1; ssize_t nb = 0; int ret = 0; + + interruptWindowCd.resetTimer(); + // Clear interrupts with dummy read before unmasking the interrupt. Use a volatile to prevent // read being optimized away. volatile uint32_t dummy = *(registerBaseAddress + PDEC_PIR_OFFSET); @@ -157,7 +161,7 @@ ReturnValue_t PdecHandler::irqOperation() { readCommandQueue(); switch (state) { case State::INIT: - resetFarStatFlag(); + result = resetFarStatFlag(); if (result != returnvalue::OK) { // Requires reconfiguration and reinitialization of PDEC triggerEvent(INVALID_FAR); @@ -180,9 +184,11 @@ ReturnValue_t PdecHandler::irqOperation() { if (ret == 0) { // No TCs for timeout period checkLocks(); - lockCheckCd.resetTimer(); + genericCheckCd.resetTimer(); + interruptWindowCd.resetTimer(); } else if (ret >= 1) { nb = read(fd, &info, sizeof(info)); + interruptCounter++; if (nb == static_cast(sizeof(info))) { uint32_t pisr = *(registerBaseAddress + PDEC_PISR_OFFSET); if ((pisr & TC_NEW_MASK) == TC_NEW_MASK) { @@ -197,9 +203,19 @@ ReturnValue_t PdecHandler::irqOperation() { CURRENT_FAR = readFar(); checkFrameAna(CURRENT_FAR); } - if (lockCheckCd.hasTimedOut()) { + if (genericCheckCd.hasTimedOut()) { checkLocks(); - lockCheckCd.resetTimer(); + genericCheckCd.resetTimer(); + if (interruptWindowCd.timeOut()) { + if (interruptCounter >= MAX_ALLOWED_IRQS_PER_WINDOW) { + sif::error << "PdecHandler::irqOperation: Possible IRQ storm" << std::endl; + triggerEvent(TOO_MANY_IRQS, MAX_ALLOWED_IRQS_PER_WINDOW); + TaskFactory::delayTask(400); + break; + } + interruptWindowCd.resetTimer(); + interruptCounter = 0; + } } // Clear interrupts with dummy read dummy = *(registerBaseAddress + PDEC_PIR_OFFSET); @@ -215,9 +231,12 @@ ReturnValue_t PdecHandler::irqOperation() { break; } case State::WAIT_FOR_RECOVERY: + TaskFactory::delayTask(400); break; default: + // Should never happen. sif::error << "PdecHandler::performOperation: Invalid state" << std::endl; + TaskFactory::delayTask(400); break; } } diff --git a/linux/ipcore/PdecHandler.h b/linux/ipcore/PdecHandler.h index b514f501..e6da7724 100644 --- a/linux/ipcore/PdecHandler.h +++ b/linux/ipcore/PdecHandler.h @@ -87,6 +87,8 @@ class PdecHandler : public SystemObject, public ExecutableObjectIF, public HasAc static const Event LOST_CARRIER_LOCK_PDEC = MAKE_EVENT(5, severity::INFO); //! [EXPORT] : [COMMENT] Lost bit lock static const Event LOST_BIT_LOCK_PDEC = MAKE_EVENT(6, severity::INFO); + //! [EXPORT] : [COMMENT] Too many IRQs over the time window of one second. P1: Allowed TCs + static constexpr Event TOO_MANY_IRQS = MAKE_EVENT(7, severity::MEDIUM); static constexpr Event POLL_SYSCALL_ERROR_PDEC = event::makeEvent(SUBSYSTEM_ID, 7, severity::MEDIUM); static constexpr Event WRITE_SYSCALL_ERROR_PDEC = @@ -180,6 +182,8 @@ class PdecHandler : public SystemObject, public ExecutableObjectIF, public HasAc // discarded static const uint8_t MAP_CLK_FREQ = 2; + static constexpr uint32_t MAX_ALLOWED_IRQS_PER_WINDOW = 500; + enum class FrameAna_t : uint8_t { ABANDONED_CLTU, FRAME_DIRTY, @@ -206,13 +210,16 @@ class PdecHandler : public SystemObject, public ExecutableObjectIF, public HasAc static uint32_t CURRENT_FAR; - Countdown lockCheckCd = Countdown(IRQ_TIMEOUT_MS); + Countdown genericCheckCd = Countdown(IRQ_TIMEOUT_MS); object_id_t tcDestinationId; AcceptsTelecommandsIF* tcDestination = nullptr; LinuxLibgpioIF* gpioComIF = nullptr; + uint32_t interruptCounter = 0; + Countdown interruptWindowCd = Countdown(1000); + /** * Reset signal is required to hold PDEC in reset state until the configuration has been * written to the appropriate memory space. diff --git a/mission/tmtc/CfdpTmFunnel.cpp b/mission/tmtc/CfdpTmFunnel.cpp index c057295a..e687911f 100644 --- a/mission/tmtc/CfdpTmFunnel.cpp +++ b/mission/tmtc/CfdpTmFunnel.cpp @@ -55,8 +55,7 @@ ReturnValue_t CfdpTmFunnel::handlePacket(TmTcMessage& msg) { } size_t packetLen = 0; uint8_t* serPtr = newPacketData; - result = - spacePacketHeader.serializeBe(&serPtr, &packetLen, spacePacketHeader.getFullPacketLen()); + result = spacePacketHeader.serializeBe(&serPtr, &packetLen, spacePacketHeader.getFullPacketLen()); if (result != returnvalue::OK) { #if FSFW_CPP_OSTREAM_ENABLED == 1 sif::error << "CfdpTmFunnel::handlePacket: Error serializing packet" << std::endl; @@ -83,7 +82,8 @@ ReturnValue_t CfdpTmFunnel::handlePacket(TmTcMessage& msg) { } else { #if FSFW_CPP_OSTREAM_ENABLED == 1 sif::error << "PusTmFunnel::handlePacket: Store too full to create data copy or store " - "error" << std::endl; + "error" + << std::endl; break; #endif } From 9285e13ce51c386bad8720977c3210380a0f0ccf Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 20 Feb 2023 18:17:27 +0100 Subject: [PATCH 2/7] increase allowed IRQs --- linux/ipcore/PdecHandler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/ipcore/PdecHandler.h b/linux/ipcore/PdecHandler.h index e6da7724..c68926cf 100644 --- a/linux/ipcore/PdecHandler.h +++ b/linux/ipcore/PdecHandler.h @@ -182,7 +182,7 @@ class PdecHandler : public SystemObject, public ExecutableObjectIF, public HasAc // discarded static const uint8_t MAP_CLK_FREQ = 2; - static constexpr uint32_t MAX_ALLOWED_IRQS_PER_WINDOW = 500; + static constexpr uint32_t MAX_ALLOWED_IRQS_PER_WINDOW = 800; enum class FrameAna_t : uint8_t { ABANDONED_CLTU, From 803c0b1a3e7b2dbee06d63ac1a3057c1c13a53b9 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 20 Feb 2023 18:35:19 +0100 Subject: [PATCH 3/7] changelog --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71818173..ba982468 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,8 @@ change warranting a new major release: ## Fixed - CFDP Funnel bugfix: CCSDS wrapping was buggy and works properly now. +- PDEC: Some adaptions to prevent task lockups on invalid FAR states. + PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/393 ## Changed @@ -27,6 +29,14 @@ change warranting a new major release: ## Added +- PDEC: Added basic FDIR to limit the number of allowed TC interrupts and to allow complete task + lockups in the case an IRQ is immediately re-raised by the PDEC module. This is done by only + allowing a certain number of handled IRQs (whether they yield a valid TC or not) during + time windows of one second. Right now, 800 IRQs/TCs are allowed per time window. + This time window is reset if a TC reception timeout after 500ms occurs. TBD whether the maximum + allowed number will be a configurable parameter. If the number of occured IRQs is exceeded, + an event is triggered and the task is delayed for 400 ms. + PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/393 - git post checkout hook which initializes and updates the submodules automatically. From bcce945cce5836928d592255024ea3b537e2692d Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 20 Feb 2023 18:36:22 +0100 Subject: [PATCH 4/7] reset counter as well --- linux/ipcore/PdecHandler.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/linux/ipcore/PdecHandler.cpp b/linux/ipcore/PdecHandler.cpp index 8eb2d00a..81801101 100644 --- a/linux/ipcore/PdecHandler.cpp +++ b/linux/ipcore/PdecHandler.cpp @@ -185,6 +185,7 @@ ReturnValue_t PdecHandler::irqOperation() { // No TCs for timeout period checkLocks(); genericCheckCd.resetTimer(); + interruptCounter = 0; interruptWindowCd.resetTimer(); } else if (ret >= 1) { nb = read(fd, &info, sizeof(info)); From 94262a9d04de0b677f5fc8d39f33de65c66e881c Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 20 Feb 2023 18:41:26 +0100 Subject: [PATCH 5/7] common function for irq limiters --- linux/ipcore/PdecHandler.cpp | 11 +++++++---- linux/ipcore/PdecHandler.h | 2 ++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/linux/ipcore/PdecHandler.cpp b/linux/ipcore/PdecHandler.cpp index 81801101..aedfef9f 100644 --- a/linux/ipcore/PdecHandler.cpp +++ b/linux/ipcore/PdecHandler.cpp @@ -185,8 +185,7 @@ ReturnValue_t PdecHandler::irqOperation() { // No TCs for timeout period checkLocks(); genericCheckCd.resetTimer(); - interruptCounter = 0; - interruptWindowCd.resetTimer(); + resetIrqLimiters(); } else if (ret >= 1) { nb = read(fd, &info, sizeof(info)); interruptCounter++; @@ -214,8 +213,7 @@ ReturnValue_t PdecHandler::irqOperation() { TaskFactory::delayTask(400); break; } - interruptWindowCd.resetTimer(); - interruptCounter = 0; + resetIrqLimiters(); } } // Clear interrupts with dummy read @@ -638,6 +636,11 @@ void PdecHandler::printPdecMon() { uint32_t PdecHandler::readFar() { return *(registerBaseAddress + PDEC_FAR_OFFSET); } +void PdecHandler::resetIrqLimiters() { + interruptWindowCd.resetTimer(); + interruptCounter = 0; +} + std::string PdecHandler::getMonStatusString(uint32_t status) { switch (status) { case TC_CHANNEL_INACTIVE: diff --git a/linux/ipcore/PdecHandler.h b/linux/ipcore/PdecHandler.h index c68926cf..5348f120 100644 --- a/linux/ipcore/PdecHandler.h +++ b/linux/ipcore/PdecHandler.h @@ -301,6 +301,8 @@ class PdecHandler : public SystemObject, public ExecutableObjectIF, public HasAc */ void checkLocks(); + void resetIrqLimiters(); + /** * @brief Analyzes the FramAna field (frame analysis data) of a FAR report. * From 60b07035b1ee9c386ee87336dab53a3ccf44621c Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 20 Feb 2023 18:53:56 +0100 Subject: [PATCH 6/7] separate function, code less confusing --- linux/ipcore/PdecHandler.cpp | 124 +++++++++++++++++++---------------- linux/ipcore/PdecHandler.h | 1 + 2 files changed, 67 insertions(+), 58 deletions(-) diff --git a/linux/ipcore/PdecHandler.cpp b/linux/ipcore/PdecHandler.cpp index aedfef9f..5ea85516 100644 --- a/linux/ipcore/PdecHandler.cpp +++ b/linux/ipcore/PdecHandler.cpp @@ -146,8 +146,6 @@ ReturnValue_t PdecHandler::irqOperation() { // Used to unmask IRQ uint32_t info = 1; - ssize_t nb = 0; - int ret = 0; interruptWindowCd.resetTimer(); @@ -171,62 +169,7 @@ ReturnValue_t PdecHandler::irqOperation() { state = State::RUNNING; break; case State::RUNNING: { - nb = write(fd, &info, sizeof(info)); - if (nb != static_cast(sizeof(info))) { - sif::error << "PdecHandler::irqOperation: Unmasking IRQ failed" << std::endl; - triggerEvent(WRITE_SYSCALL_ERROR_PDEC, errno); - close(fd); - state = State::INIT; - return returnvalue::FAILED; - } - struct pollfd fds = {.fd = fd, .events = POLLIN, .revents = 0}; - ret = poll(&fds, 1, IRQ_TIMEOUT_MS); - if (ret == 0) { - // No TCs for timeout period - checkLocks(); - genericCheckCd.resetTimer(); - resetIrqLimiters(); - } else if (ret >= 1) { - nb = read(fd, &info, sizeof(info)); - interruptCounter++; - if (nb == static_cast(sizeof(info))) { - uint32_t pisr = *(registerBaseAddress + PDEC_PISR_OFFSET); - if ((pisr & TC_NEW_MASK) == TC_NEW_MASK) { - // handle TC - handleNewTc(); - } - if ((pisr & TC_ABORT_MASK) == TC_ABORT_MASK) { - tcAbortCounter += 1; - } - if ((pisr & NEW_FAR_MASK) == NEW_FAR_MASK) { - // Read FAR here - CURRENT_FAR = readFar(); - checkFrameAna(CURRENT_FAR); - } - if (genericCheckCd.hasTimedOut()) { - checkLocks(); - genericCheckCd.resetTimer(); - if (interruptWindowCd.timeOut()) { - if (interruptCounter >= MAX_ALLOWED_IRQS_PER_WINDOW) { - sif::error << "PdecHandler::irqOperation: Possible IRQ storm" << std::endl; - triggerEvent(TOO_MANY_IRQS, MAX_ALLOWED_IRQS_PER_WINDOW); - TaskFactory::delayTask(400); - break; - } - resetIrqLimiters(); - } - } - // Clear interrupts with dummy read - dummy = *(registerBaseAddress + PDEC_PIR_OFFSET); - } - } else { - sif::error << "PdecHandler::irqOperation: Poll error with errno " << errno << ": " - << strerror(errno) << std::endl; - triggerEvent(POLL_SYSCALL_ERROR_PDEC, errno); - close(fd); - state = State::INIT; - return returnvalue::FAILED; - } + checkAndHandleIrqs(fd, info); break; } case State::WAIT_FOR_RECOVERY: @@ -244,6 +187,71 @@ ReturnValue_t PdecHandler::irqOperation() { return returnvalue::OK; } +ReturnValue_t PdecHandler::checkAndHandleIrqs(int fd, uint32_t& info) { + ssize_t nb = write(fd, &info, sizeof(info)); + if (nb != static_cast(sizeof(info))) { + sif::error << "PdecHandler::irqOperation: Unmasking IRQ failed" << std::endl; + triggerEvent(WRITE_SYSCALL_ERROR_PDEC, errno); + close(fd); + state = State::INIT; + return returnvalue::FAILED; + } + struct pollfd fds = {.fd = fd, .events = POLLIN, .revents = 0}; + int ret = poll(&fds, 1, IRQ_TIMEOUT_MS); + if (ret == 0) { + // No TCs for timeout period + checkLocks(); + genericCheckCd.resetTimer(); + resetIrqLimiters(); + } else if (ret >= 1) { + // Interrupt handling. + nb = read(fd, &info, sizeof(info)); + interruptCounter++; + if (nb == static_cast(sizeof(info))) { + uint32_t pisr = *(registerBaseAddress + PDEC_PISR_OFFSET); + if ((pisr & TC_NEW_MASK) == TC_NEW_MASK) { + // handle TC + handleNewTc(); + } + if ((pisr & TC_ABORT_MASK) == TC_ABORT_MASK) { + tcAbortCounter += 1; + } + if ((pisr & NEW_FAR_MASK) == NEW_FAR_MASK) { + // Read FAR here + CURRENT_FAR = readFar(); + checkFrameAna(CURRENT_FAR); + } + // Clear interrupts with dummy read. Volatile is important here to prevent + // compiler opitmizations in release builds! + volatile uint32_t dummy = *(registerBaseAddress + PDEC_PIR_OFFSET); + static_cast(dummy); + + if (genericCheckCd.hasTimedOut()) { + checkLocks(); + genericCheckCd.resetTimer(); + if (interruptWindowCd.hasTimedOut()) { + if (interruptCounter >= MAX_ALLOWED_IRQS_PER_WINDOW) { + sif::error << "PdecHandler::irqOperation: Possible IRQ storm" << std::endl; + triggerEvent(TOO_MANY_IRQS, MAX_ALLOWED_IRQS_PER_WINDOW); + resetIrqLimiters(); + TaskFactory::delayTask(400); + return returnvalue::FAILED; + } + resetIrqLimiters(); + } + } + } + } else { + sif::error << "PdecHandler::irqOperation: Poll error with errno " << errno << ": " + << strerror(errno) << std::endl; + triggerEvent(POLL_SYSCALL_ERROR_PDEC, errno); + close(fd); + state = State::INIT; + return returnvalue::FAILED; + } + return returnvalue::OK; +} + void PdecHandler::readCommandQueue(void) { CommandMessage commandMessage; ReturnValue_t result = returnvalue::FAILED; diff --git a/linux/ipcore/PdecHandler.h b/linux/ipcore/PdecHandler.h index 5348f120..51cf750e 100644 --- a/linux/ipcore/PdecHandler.h +++ b/linux/ipcore/PdecHandler.h @@ -266,6 +266,7 @@ class PdecHandler : public SystemObject, public ExecutableObjectIF, public HasAc ReturnValue_t polledOperation(); ReturnValue_t irqOperation(); + ReturnValue_t checkAndHandleIrqs(int fd, uint32_t& info); uint32_t readFar(); From 19d04c0023d84f4df63fbcb32519c648900bc720 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 22 Feb 2023 15:03:07 +0100 Subject: [PATCH 7/7] v1.30.0 --- CHANGELOG.md | 15 ++++++++++----- CMakeLists.txt | 4 ++-- bsp_hosted/fsfwconfig/events/translateEvents.cpp | 9 ++++++--- .../fsfwconfig/objects/translateObjects.cpp | 2 +- generators/bsp_hosted_events.csv | 5 +++-- generators/bsp_q7s_events.csv | 5 +++-- generators/events/translateEvents.cpp | 9 ++++++--- generators/objects/translateObjects.cpp | 2 +- linux/fsfwconfig/events/translateEvents.cpp | 9 ++++++--- linux/fsfwconfig/objects/translateObjects.cpp | 2 +- linux/ipcore/PdecHandler.h | 4 ++-- tmtc | 2 +- 12 files changed, 42 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8fd799e..02840492 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,16 +8,21 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/). The [milestone](https://egit.irs.uni-stuttgart.de/eive/eive-obsw/milestones) list yields a list of all related PRs for each release. -Starting at v2.0.0, the following changes will consitute of a breaking -change warranting a new major release: +Starting at v2.0.0, this project will adhere to semantic versioning and the the following changes +will consitute of a breaking change warranting a new major release: - The TMTC interface changes in any shape of form. -- The behavour of the OBSW changes in a major shape or form relevant - for operations +- The behavour of the OBSW changes in a major shape or form relevant for operations # [unreleased] -## Added +# [v1.30.0] + +eive-tmtc: v2.14.0 + +Event IDs for PDEC handler have changed in a breaking manner. + +## Added and Fixed - PDEC: Added basic FDIR to limit the number of allowed TC interrupts and to allow complete task lockups in the case an IRQ is immediately re-raised by the PDEC module. This is done by only diff --git a/CMakeLists.txt b/CMakeLists.txt index 076c9ae7..44dce9b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,8 +10,8 @@ cmake_minimum_required(VERSION 3.13) set(OBSW_VERSION_MAJOR 1) -set(OBSW_VERSION_MINOR 29) -set(OBSW_VERSION_REVISION 1) +set(OBSW_VERSION_MINOR 30) +set(OBSW_VERSION_REVISION 0) # set(CMAKE_VERBOSE TRUE) diff --git a/bsp_hosted/fsfwconfig/events/translateEvents.cpp b/bsp_hosted/fsfwconfig/events/translateEvents.cpp index 71f28a31..39d4c89a 100644 --- a/bsp_hosted/fsfwconfig/events/translateEvents.cpp +++ b/bsp_hosted/fsfwconfig/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** - * @brief Auto-generated event translation file. Contains 257 translations. + * @brief Auto-generated event translation file. Contains 258 translations. * @details - * Generated on: 2023-02-21 10:44:59 + * Generated on: 2023-02-22 15:00:34 */ #include "translateEvents.h" @@ -151,6 +151,7 @@ const char *CARRIER_LOCK_STRING = "CARRIER_LOCK"; const char *BIT_LOCK_PDEC_STRING = "BIT_LOCK_PDEC"; const char *LOST_CARRIER_LOCK_PDEC_STRING = "LOST_CARRIER_LOCK_PDEC"; const char *LOST_BIT_LOCK_PDEC_STRING = "LOST_BIT_LOCK_PDEC"; +const char *TOO_MANY_IRQS_STRING = "TOO_MANY_IRQS"; const char *POLL_SYSCALL_ERROR_PDEC_STRING = "POLL_SYSCALL_ERROR_PDEC"; const char *WRITE_SYSCALL_ERROR_PDEC_STRING = "WRITE_SYSCALL_ERROR_PDEC"; const char *IMAGE_UPLOAD_FAILED_STRING = "IMAGE_UPLOAD_FAILED"; @@ -553,8 +554,10 @@ const char *translateEvents(Event event) { case (12406): return LOST_BIT_LOCK_PDEC_STRING; case (12407): - return POLL_SYSCALL_ERROR_PDEC_STRING; + return TOO_MANY_IRQS_STRING; case (12408): + return POLL_SYSCALL_ERROR_PDEC_STRING; + case (12409): return WRITE_SYSCALL_ERROR_PDEC_STRING; case (12500): return IMAGE_UPLOAD_FAILED_STRING; diff --git a/bsp_hosted/fsfwconfig/objects/translateObjects.cpp b/bsp_hosted/fsfwconfig/objects/translateObjects.cpp index 08b7ac62..4a9083e3 100644 --- a/bsp_hosted/fsfwconfig/objects/translateObjects.cpp +++ b/bsp_hosted/fsfwconfig/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 148 translations. - * Generated on: 2023-02-21 10:44:59 + * Generated on: 2023-02-22 15:00:34 */ #include "translateObjects.h" diff --git a/generators/bsp_hosted_events.csv b/generators/bsp_hosted_events.csv index 09afd861..f1188b4e 100644 --- a/generators/bsp_hosted_events.csv +++ b/generators/bsp_hosted_events.csv @@ -145,8 +145,9 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path 12404;0x3074;BIT_LOCK_PDEC;INFO;Bit lock detected (data valid);linux/ipcore/PdecHandler.h 12405;0x3075;LOST_CARRIER_LOCK_PDEC;INFO;Lost carrier lock;linux/ipcore/PdecHandler.h 12406;0x3076;LOST_BIT_LOCK_PDEC;INFO;Lost bit lock;linux/ipcore/PdecHandler.h -12407;0x3077;POLL_SYSCALL_ERROR_PDEC;MEDIUM;No description;linux/ipcore/PdecHandler.h -12408;0x3078;WRITE_SYSCALL_ERROR_PDEC;MEDIUM;No description;linux/ipcore/PdecHandler.h +12407;0x3077;TOO_MANY_IRQS;MEDIUM;Too many IRQs over the time window of one second. P1: Allowed TCs;linux/ipcore/PdecHandler.h +12408;0x3078;POLL_SYSCALL_ERROR_PDEC;MEDIUM;No description;linux/ipcore/PdecHandler.h +12409;0x3079;WRITE_SYSCALL_ERROR_PDEC;MEDIUM;No description;linux/ipcore/PdecHandler.h 12500;0x30d4;IMAGE_UPLOAD_FAILED;LOW;Image upload failed;linux/devices/startracker/StrHelper.h 12501;0x30d5;IMAGE_DOWNLOAD_FAILED;LOW;Image download failed;linux/devices/startracker/StrHelper.h 12502;0x30d6;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successfulop;linux/devices/startracker/StrHelper.h diff --git a/generators/bsp_q7s_events.csv b/generators/bsp_q7s_events.csv index 09afd861..f1188b4e 100644 --- a/generators/bsp_q7s_events.csv +++ b/generators/bsp_q7s_events.csv @@ -145,8 +145,9 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path 12404;0x3074;BIT_LOCK_PDEC;INFO;Bit lock detected (data valid);linux/ipcore/PdecHandler.h 12405;0x3075;LOST_CARRIER_LOCK_PDEC;INFO;Lost carrier lock;linux/ipcore/PdecHandler.h 12406;0x3076;LOST_BIT_LOCK_PDEC;INFO;Lost bit lock;linux/ipcore/PdecHandler.h -12407;0x3077;POLL_SYSCALL_ERROR_PDEC;MEDIUM;No description;linux/ipcore/PdecHandler.h -12408;0x3078;WRITE_SYSCALL_ERROR_PDEC;MEDIUM;No description;linux/ipcore/PdecHandler.h +12407;0x3077;TOO_MANY_IRQS;MEDIUM;Too many IRQs over the time window of one second. P1: Allowed TCs;linux/ipcore/PdecHandler.h +12408;0x3078;POLL_SYSCALL_ERROR_PDEC;MEDIUM;No description;linux/ipcore/PdecHandler.h +12409;0x3079;WRITE_SYSCALL_ERROR_PDEC;MEDIUM;No description;linux/ipcore/PdecHandler.h 12500;0x30d4;IMAGE_UPLOAD_FAILED;LOW;Image upload failed;linux/devices/startracker/StrHelper.h 12501;0x30d5;IMAGE_DOWNLOAD_FAILED;LOW;Image download failed;linux/devices/startracker/StrHelper.h 12502;0x30d6;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successfulop;linux/devices/startracker/StrHelper.h diff --git a/generators/events/translateEvents.cpp b/generators/events/translateEvents.cpp index 71f28a31..39d4c89a 100644 --- a/generators/events/translateEvents.cpp +++ b/generators/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** - * @brief Auto-generated event translation file. Contains 257 translations. + * @brief Auto-generated event translation file. Contains 258 translations. * @details - * Generated on: 2023-02-21 10:44:59 + * Generated on: 2023-02-22 15:00:34 */ #include "translateEvents.h" @@ -151,6 +151,7 @@ const char *CARRIER_LOCK_STRING = "CARRIER_LOCK"; const char *BIT_LOCK_PDEC_STRING = "BIT_LOCK_PDEC"; const char *LOST_CARRIER_LOCK_PDEC_STRING = "LOST_CARRIER_LOCK_PDEC"; const char *LOST_BIT_LOCK_PDEC_STRING = "LOST_BIT_LOCK_PDEC"; +const char *TOO_MANY_IRQS_STRING = "TOO_MANY_IRQS"; const char *POLL_SYSCALL_ERROR_PDEC_STRING = "POLL_SYSCALL_ERROR_PDEC"; const char *WRITE_SYSCALL_ERROR_PDEC_STRING = "WRITE_SYSCALL_ERROR_PDEC"; const char *IMAGE_UPLOAD_FAILED_STRING = "IMAGE_UPLOAD_FAILED"; @@ -553,8 +554,10 @@ const char *translateEvents(Event event) { case (12406): return LOST_BIT_LOCK_PDEC_STRING; case (12407): - return POLL_SYSCALL_ERROR_PDEC_STRING; + return TOO_MANY_IRQS_STRING; case (12408): + return POLL_SYSCALL_ERROR_PDEC_STRING; + case (12409): return WRITE_SYSCALL_ERROR_PDEC_STRING; case (12500): return IMAGE_UPLOAD_FAILED_STRING; diff --git a/generators/objects/translateObjects.cpp b/generators/objects/translateObjects.cpp index b8deca09..a5100ae1 100644 --- a/generators/objects/translateObjects.cpp +++ b/generators/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 153 translations. - * Generated on: 2023-02-21 10:44:59 + * Generated on: 2023-02-22 15:00:34 */ #include "translateObjects.h" diff --git a/linux/fsfwconfig/events/translateEvents.cpp b/linux/fsfwconfig/events/translateEvents.cpp index 71f28a31..39d4c89a 100644 --- a/linux/fsfwconfig/events/translateEvents.cpp +++ b/linux/fsfwconfig/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** - * @brief Auto-generated event translation file. Contains 257 translations. + * @brief Auto-generated event translation file. Contains 258 translations. * @details - * Generated on: 2023-02-21 10:44:59 + * Generated on: 2023-02-22 15:00:34 */ #include "translateEvents.h" @@ -151,6 +151,7 @@ const char *CARRIER_LOCK_STRING = "CARRIER_LOCK"; const char *BIT_LOCK_PDEC_STRING = "BIT_LOCK_PDEC"; const char *LOST_CARRIER_LOCK_PDEC_STRING = "LOST_CARRIER_LOCK_PDEC"; const char *LOST_BIT_LOCK_PDEC_STRING = "LOST_BIT_LOCK_PDEC"; +const char *TOO_MANY_IRQS_STRING = "TOO_MANY_IRQS"; const char *POLL_SYSCALL_ERROR_PDEC_STRING = "POLL_SYSCALL_ERROR_PDEC"; const char *WRITE_SYSCALL_ERROR_PDEC_STRING = "WRITE_SYSCALL_ERROR_PDEC"; const char *IMAGE_UPLOAD_FAILED_STRING = "IMAGE_UPLOAD_FAILED"; @@ -553,8 +554,10 @@ const char *translateEvents(Event event) { case (12406): return LOST_BIT_LOCK_PDEC_STRING; case (12407): - return POLL_SYSCALL_ERROR_PDEC_STRING; + return TOO_MANY_IRQS_STRING; case (12408): + return POLL_SYSCALL_ERROR_PDEC_STRING; + case (12409): return WRITE_SYSCALL_ERROR_PDEC_STRING; case (12500): return IMAGE_UPLOAD_FAILED_STRING; diff --git a/linux/fsfwconfig/objects/translateObjects.cpp b/linux/fsfwconfig/objects/translateObjects.cpp index b8deca09..a5100ae1 100644 --- a/linux/fsfwconfig/objects/translateObjects.cpp +++ b/linux/fsfwconfig/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 153 translations. - * Generated on: 2023-02-21 10:44:59 + * Generated on: 2023-02-22 15:00:34 */ #include "translateObjects.h" diff --git a/linux/ipcore/PdecHandler.h b/linux/ipcore/PdecHandler.h index 51cf750e..09093b88 100644 --- a/linux/ipcore/PdecHandler.h +++ b/linux/ipcore/PdecHandler.h @@ -90,9 +90,9 @@ class PdecHandler : public SystemObject, public ExecutableObjectIF, public HasAc //! [EXPORT] : [COMMENT] Too many IRQs over the time window of one second. P1: Allowed TCs static constexpr Event TOO_MANY_IRQS = MAKE_EVENT(7, severity::MEDIUM); static constexpr Event POLL_SYSCALL_ERROR_PDEC = - event::makeEvent(SUBSYSTEM_ID, 7, severity::MEDIUM); - static constexpr Event WRITE_SYSCALL_ERROR_PDEC = event::makeEvent(SUBSYSTEM_ID, 8, severity::MEDIUM); + static constexpr Event WRITE_SYSCALL_ERROR_PDEC = + event::makeEvent(SUBSYSTEM_ID, 9, severity::MEDIUM); private: static const uint8_t INTERFACE_ID = CLASS_ID::PDEC_HANDLER; diff --git a/tmtc b/tmtc index 4ced2d0b..be032ab9 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 4ced2d0b185f9949662c946ca71fe666ac25e411 +Subproject commit be032ab925cab58bc443dd877b8260d291894802