From 4a8096998de2df347c29d0162b3040c1fdc9ac62 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 25 Oct 2022 18:21:48 +0200 Subject: [PATCH 1/2] added two todos and new uio file names --- bsp_q7s/boardconfig/busConf.h | 8 ++++---- linux/obc/PdecHandler.cpp | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bsp_q7s/boardconfig/busConf.h b/bsp_q7s/boardconfig/busConf.h index 4ccdc78d..529c0264 100644 --- a/bsp_q7s/boardconfig/busConf.h +++ b/bsp_q7s/boardconfig/busConf.h @@ -17,10 +17,10 @@ static constexpr char UART_SYRLINKS_DEV[] = "/dev/ul-syrlinks"; static constexpr char UART_STAR_TRACKER_DEV[] = "/dev/ul-str"; static constexpr char UART_SCEX_DEV[] = "/dev/ttyS-SCEX"; -static constexpr char UIO_PDEC_REGISTERS[] = "/dev/uio0"; -static constexpr char UIO_PTME[] = "/dev/uio1"; -static constexpr char UIO_PDEC_CONFIG_MEMORY[] = "/dev/uio2"; -static constexpr char UIO_PDEC_RAM[] = "/dev/uio3"; +static constexpr char UIO_PDEC_REGISTERS[] = "/dev/uio_pdec_regs"; +static constexpr char UIO_PTME[] = "/dev/uio_ptme"; +static constexpr char UIO_PDEC_CONFIG_MEMORY[] = "/dev/uio_pdec_cfg_mem"; +static constexpr char UIO_PDEC_RAM[] = "/dev/pdec_ram"; static constexpr int MAP_ID_PTME_CONFIG = 3; namespace uiomapids { diff --git a/linux/obc/PdecHandler.cpp b/linux/obc/PdecHandler.cpp index 6199853f..c009d8a6 100644 --- a/linux/obc/PdecHandler.cpp +++ b/linux/obc/PdecHandler.cpp @@ -88,6 +88,7 @@ void PdecHandler::writePdecConfig() { // Configure all MAP IDs as invalid for (int idx = 0; idx <= MAX_MAP_ADDR; idx += 4) { + // TODO: adding 1 / 4 results in + 0. Check correctness *(memoryBaseAddress + MAP_ADDR_LUT_OFFSET + idx + 1 / 4) = NO_DESTINATION << 24 | NO_DESTINATION << 16 | NO_DESTINATION << 8 | NO_DESTINATION; } @@ -99,6 +100,7 @@ void PdecHandler::writePdecConfig() { // Write map id clock frequencies for (int idx = 0; idx <= MAX_MAP_ADDR; idx += 4) { + // TODO: adding 1 / 4 results in + 0. Check correctness *(memoryBaseAddress + MAP_CLK_FREQ_OFFSET + idx / 4) = MAP_CLK_FREQ << 24 | MAP_CLK_FREQ << 16 | MAP_CLK_FREQ << 8 | MAP_CLK_FREQ; } From 921f4138884c71cf3b6459565e978adf8280d33d Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 27 Oct 2022 08:53:03 +0200 Subject: [PATCH 2/2] small bugfix --- linux/obc/PdecHandler.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/linux/obc/PdecHandler.cpp b/linux/obc/PdecHandler.cpp index c009d8a6..ebd17957 100644 --- a/linux/obc/PdecHandler.cpp +++ b/linux/obc/PdecHandler.cpp @@ -88,8 +88,7 @@ void PdecHandler::writePdecConfig() { // Configure all MAP IDs as invalid for (int idx = 0; idx <= MAX_MAP_ADDR; idx += 4) { - // TODO: adding 1 / 4 results in + 0. Check correctness - *(memoryBaseAddress + MAP_ADDR_LUT_OFFSET + idx + 1 / 4) = + *(memoryBaseAddress + MAP_ADDR_LUT_OFFSET + idx / 4) = NO_DESTINATION << 24 | NO_DESTINATION << 16 | NO_DESTINATION << 8 | NO_DESTINATION; } @@ -100,7 +99,6 @@ void PdecHandler::writePdecConfig() { // Write map id clock frequencies for (int idx = 0; idx <= MAX_MAP_ADDR; idx += 4) { - // TODO: adding 1 / 4 results in + 0. Check correctness *(memoryBaseAddress + MAP_CLK_FREQ_OFFSET + idx / 4) = MAP_CLK_FREQ << 24 | MAP_CLK_FREQ << 16 | MAP_CLK_FREQ << 8 | MAP_CLK_FREQ; }