Skip to content
Snippets Groups Projects
Commit c8c09bb0 authored by Ezekiel Dohmen's avatar Ezekiel Dohmen
Browse files

mapping segment

parent 3df54145
No related branches found
No related tags found
3 merge requests!439RCG 5.0 release fro deb 10,!415Cdsrfm to use new dolphin interface,!411Userspace dolphin daemon, netlink dolphin setup for real time models
......@@ -110,6 +110,15 @@ DOLPHIN_ERROR_CODES Dolphin_SISCI_Resource::connect_mc_segment(unsigned segment_
return DOLPHIN_ERROR_SEGMENT_SETUP_ERROR;
}
/* Map local segment to user space - this is the address to read back data from the reflective memory region */
volatile void * readAddr = SCIMapLocalSegment(_local_segment, &_local_map, 0, segment_size, NULL, NO_FLAGS, &error);
if (error == SCI_ERR_OK) {
spdlog::info("Local segment (id=0x{:x}) is mapped to user space at 0x{:x}", segment_id, (unsigned long)readAddr);
} else {
spdlog::error("SCIMapLocalSegment failed - Error code 0x{:x}", error);
return DOLPHIN_ERROR_SEGMENT_SETUP_ERROR;
}
// Set the segment available
SCISetSegmentAvailable(_local_segment, _local_adapter_num, NO_FLAGS, &error);
if (error != SCI_ERR_OK) {
......@@ -199,6 +208,7 @@ void Dolphin_SISCI_Resource::clean_up_segment()
{
SCIDisconnectSegment(_remote_segment, NO_FLAGS, &error);
SCIUnmapSegment(_local_map, NO_FLAGS, &error);
SCISetSegmentUnavailable(_local_segment, _local_adapter_num, NO_FLAGS, &error);
SCIRemoveSegment(_local_segment, NO_FLAGS, &error);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment