Merge branch 'main' into soc-calculator
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
This commit is contained in:
commit
654d9b1536
@ -16,6 +16,15 @@ will consitute of a breaking change warranting a new major release:
|
||||
|
||||
# [unreleased]
|
||||
|
||||
# [v6.6.0] 2023-09-18
|
||||
|
||||
## Changed
|
||||
|
||||
- Changed the memory initialized for the PDEC Config Memory and the PDEC RAM by using `mmap`
|
||||
directly and ignoring UIO. This makes the OBSW compatible to a device tree update, where those
|
||||
memory segments are marked reserved and are thus not properly accessible through the UIO API
|
||||
anymore. This change should be downwards compatible to older device trees.
|
||||
|
||||
# [v6.5.1] 2023-09-12
|
||||
|
||||
- Bumped `eive-tmtc` to v5.5.0.
|
||||
|
@ -10,8 +10,8 @@
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
set(OBSW_VERSION_MAJOR 6)
|
||||
set(OBSW_VERSION_MINOR 5)
|
||||
set(OBSW_VERSION_REVISION 1)
|
||||
set(OBSW_VERSION_MINOR 6)
|
||||
set(OBSW_VERSION_REVISION 0)
|
||||
|
||||
# set(CMAKE_VERBOSE TRUE)
|
||||
|
||||
|
@ -53,23 +53,30 @@ ReturnValue_t PdecHandler::initialize() {
|
||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||
}
|
||||
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
|
||||
UioMapper regMapper(uioNames.registers);
|
||||
result = regMapper.getMappedAdress(®isterBaseAddress, UioMapper::Permissions::READ_WRITE);
|
||||
ReturnValue_t result =
|
||||
regMapper.getMappedAdress(®isterBaseAddress, UioMapper::Permissions::READ_WRITE);
|
||||
if (result != returnvalue::OK) {
|
||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||
}
|
||||
UioMapper configMemMapper(uioNames.configMemory);
|
||||
result = configMemMapper.getMappedAdress(&memoryBaseAddress, UioMapper::Permissions::READ_WRITE);
|
||||
if (result != returnvalue::OK) {
|
||||
|
||||
int fd = 0;
|
||||
if ((fd = open("/dev/mem", O_RDWR | O_SYNC)) == -1) {
|
||||
sif::error << "PdecHandler::initialize: Opening /dev/mem failed" << std::endl;
|
||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||
} else {
|
||||
};
|
||||
memoryBaseAddress = static_cast<uint32_t*>(
|
||||
mmap(0, PDEC_CFG_MEM_SIZE, static_cast<int>(UioMapper::Permissions::READ_WRITE), MAP_SHARED,
|
||||
fd, PDEC_CFG_MEM_PHY_ADDR));
|
||||
if (memoryBaseAddress == nullptr) {
|
||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||
}
|
||||
pdecConfig.setMemoryBaseAddress(memoryBaseAddress);
|
||||
}
|
||||
UioMapper ramMapper(uioNames.ramMemory);
|
||||
result = ramMapper.getMappedAdress(&ramBaseAddress, UioMapper::Permissions::READ_WRITE);
|
||||
if (result != returnvalue::OK) {
|
||||
|
||||
ramBaseAddress = static_cast<uint32_t*>(mmap(0, PDEC_RAM_SIZE,
|
||||
static_cast<int>(UioMapper::Permissions::READ_WRITE),
|
||||
MAP_SHARED, fd, PDEC_RAM_PHY_ADDR));
|
||||
if (ramBaseAddress == nullptr) {
|
||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||
}
|
||||
|
||||
|
@ -51,6 +51,10 @@ class PdecHandler : public SystemObject,
|
||||
public ReceivesParameterMessagesIF {
|
||||
public:
|
||||
static constexpr dur_millis_t IRQ_TIMEOUT_MS = 500;
|
||||
static constexpr uint32_t PDEC_CFG_MEM_SIZE = 0x1000;
|
||||
static constexpr uint32_t PDEC_CFG_MEM_PHY_ADDR = 0x24000000;
|
||||
static constexpr uint32_t PDEC_RAM_SIZE = 0x10000;
|
||||
static constexpr uint32_t PDEC_RAM_PHY_ADDR = 0x26000000;
|
||||
|
||||
enum class Modes { POLLED, IRQ };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user