diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/include/kernel/devicesegment.H | 19 | ||||
-rw-r--r-- | src/include/kernel/syscalls.H | 5 | ||||
-rw-r--r-- | src/include/kernel/vmmmgr.H | 3 | ||||
-rw-r--r-- | src/include/sys/mmio.h | 9 | ||||
-rw-r--r-- | src/kernel/devicesegment.C | 55 | ||||
-rw-r--r-- | src/kernel/syscall.C | 19 | ||||
-rw-r--r-- | src/kernel/vmmmgr.C | 17 | ||||
-rw-r--r-- | src/lib/syscall_mmio.C | 10 | ||||
-rw-r--r-- | src/usr/testcore/kernel/segmenttest.H | 14 |
9 files changed, 1 insertions, 150 deletions
diff --git a/src/include/kernel/devicesegment.H b/src/include/kernel/devicesegment.H index 97d04743a..c60619705 100644 --- a/src/include/kernel/devicesegment.H +++ b/src/include/kernel/devicesegment.H @@ -58,15 +58,6 @@ class DeviceSegment : public Segment */ bool handlePageFault(task_t* i_task, uint64_t i_addr); - /** - * @brief DEPRECATED - */ - static void* mmioMap(void* ra, size_t pages); - - /** - * @brief DEPRECATED - */ - static int mmioUnmap(void* ea, size_t pages); /** * @brief Map a device into the device segment(2TB) @@ -110,16 +101,6 @@ class DeviceSegment : public Segment void _init(); /** - * @brief DEPRECATED - */ - void* _mmioMap(void* ra, size_t pages); - - /** - * @brief DEPRECATED - */ - int _mmioUnmap(void* ea, size_t pages); - - /** * @brief Map a device into the device segment(2TB) * @param ra[in] - Void pointer to real address to be mapped in * @param i_devDataSize[in] - Size of device segment block diff --git a/src/include/kernel/syscalls.H b/src/include/kernel/syscalls.H index 553fbf158..856666d74 100644 --- a/src/include/kernel/syscalls.H +++ b/src/include/kernel/syscalls.H @@ -69,11 +69,6 @@ namespace Systemcalls MSG_RESPOND, /** msg_wait() */ MSG_WAIT, - - /** mmio_map() */ - MMIO_MAP, - /** mmio_unmap() */ - MMIO_UNMAP, /** dev_map() */ DEV_MAP, /** dev_unmap() */ diff --git a/src/include/kernel/vmmmgr.H b/src/include/kernel/vmmmgr.H index 6e41ddb34..845066229 100644 --- a/src/include/kernel/vmmmgr.H +++ b/src/include/kernel/vmmmgr.H @@ -85,9 +85,6 @@ class VmmManager */ static bool pteMiss(task_t* t, uint64_t effAddr); - static void* mmioMap(void*, size_t); - static int mmioUnmap(void*, size_t); - /** * @brief Map a device into the device segment(2TB) * @param ra[in] - Void pointer to real address to be mapped in diff --git a/src/include/sys/mmio.h b/src/include/sys/mmio.h index 59254b976..740b080c2 100644 --- a/src/include/sys/mmio.h +++ b/src/include/sys/mmio.h @@ -42,15 +42,6 @@ enum SEG_DATA_SIZES }; /** - * @brief DEPRECATED - */ -void* mmio_map(void* ra, size_t pages); -/** - * @brief DEPRECATED - */ -int mmio_unmap(void* ea, size_t pages); - -/** * @brief System call to map a device into the device segment(2TB) * @param ra[in] - Void pointer to real address to be mapped in * @param i_devDataSize[in] - Size of device segment block diff --git a/src/kernel/devicesegment.C b/src/kernel/devicesegment.C index 7fb4803dd..479183d4c 100644 --- a/src/kernel/devicesegment.C +++ b/src/kernel/devicesegment.C @@ -40,22 +40,6 @@ void DeviceSegment::init() } /** - * @brief DEPRECATED - */ -void* DeviceSegment::mmioMap(void* ra, size_t pages) -{ - return Singleton<DeviceSegment>::instance()._mmioMap(ra, pages); -} - -/** - * @brief DEPRECATED - */ -int DeviceSegment::mmioUnmap(void* ea, size_t pages) -{ - return Singleton<DeviceSegment>::instance()._mmioUnmap(ea, pages); -} - -/** * STATIC * @brief Map a device into the device segment(2TB) */ @@ -115,45 +99,6 @@ bool DeviceSegment::handlePageFault(task_t* i_task, uint64_t i_addr) return true; } -/** - * @brief DEPRECATED - */ -void* DeviceSegment::_mmioMap(void* ra, size_t pages) -{ - for (size_t i = 0; i < MMIO_MAP_DEVICES; i++) - { - if (0 == iv_mmioMap[i].addr) - { - iv_mmioMap[i].size = THIRTYTWO_GB; - iv_mmioMap[i].addr = reinterpret_cast<uint64_t>(ra); - return reinterpret_cast<void*>(i * - ((1ull << SLBE_s) / MMIO_MAP_DEVICES) + - this->getBaseAddress()); - } - } - - return NULL; -} - -/** - * @brief DEPRECATED - */ -int DeviceSegment::_mmioUnmap(void* ea, size_t pages) -{ - uint64_t segment_ea = reinterpret_cast<uint64_t>(ea) - - this->getBaseAddress(); - size_t idx = segment_ea / ((1ull << SLBE_s) / MMIO_MAP_DEVICES); - if (0 != iv_mmioMap[idx].addr) - { - PageTableManager::delRangePN(iv_mmioMap[idx].addr / PAGESIZE, - iv_mmioMap[idx].addr / PAGESIZE + - pages); - iv_mmioMap[idx].addr = 0; - return 0; - } - - return -EINVAL; -} /** * @brief Map a device into the device segment(2TB) diff --git a/src/kernel/syscall.C b/src/kernel/syscall.C index b38c5e031..013ffc78c 100644 --- a/src/kernel/syscall.C +++ b/src/kernel/syscall.C @@ -113,9 +113,6 @@ namespace Systemcalls &MsgSendRecv, // MSG_SENDRECV &MsgRespond, // MSG_RESPOND &MsgWait, // MSG_WAIT - - &MmioMap, // MMIO_MAP - &MmioUnmap, // MMIO_UNMAP &DevMap, // DEV_MAP &DevUnmap, // DEV_UNMAP @@ -414,22 +411,6 @@ namespace Systemcalls mq->lock.unlock(); } - void MmioMap(task_t* t) - { - void* ra = (void*)TASK_GETARG0(t); - size_t pages = TASK_GETARG1(t); - - TASK_SETRTN(t, (uint64_t) VmmManager::mmioMap(ra,pages)); - } - - void MmioUnmap(task_t* t) - { - void* ea = (void*)TASK_GETARG0(t); - size_t pages = TASK_GETARG1(t); - - TASK_SETRTN(t, VmmManager::mmioUnmap(ea,pages)); - } - /** * Map a device into virtual memory * @param[in] t: The task used to map a device diff --git a/src/kernel/vmmmgr.C b/src/kernel/vmmmgr.C index 5550b9ed5..b0fe28415 100644 --- a/src/kernel/vmmmgr.C +++ b/src/kernel/vmmmgr.C @@ -82,23 +82,6 @@ void VmmManager::flushPageTable( void ) Singleton<VmmManager>::instance()._flushPageTable(); } -/** - * STATIC - * @brief DEPRECATED - */ -void* VmmManager::mmioMap(void* ra, size_t pages) -{ - return DeviceSegment::mmioMap(ra, pages); -} - -/** - * STATIC - * @brief DEPRECATED - */ -int VmmManager::mmioUnmap(void* ea, size_t pages) -{ - return DeviceSegment::mmioUnmap(ea, pages); -} /** * STATIC diff --git a/src/lib/syscall_mmio.C b/src/lib/syscall_mmio.C index 182bd374f..a875e560b 100644 --- a/src/lib/syscall_mmio.C +++ b/src/lib/syscall_mmio.C @@ -29,16 +29,6 @@ using namespace Systemcalls; -void* mmio_map(void* ra, size_t pages) -{ - return _syscall2(MMIO_MAP, ra, (void*)pages); -} - -int mmio_unmap(void* ea, size_t pages) -{ - return (int64_t) _syscall2(MMIO_UNMAP, ea, (void*)pages); -} - void* mmio_dev_map(void *ra, SEG_DATA_SIZES i_devDataSize) { return _syscall2(DEV_MAP, ra, (void*)i_devDataSize); diff --git a/src/usr/testcore/kernel/segmenttest.H b/src/usr/testcore/kernel/segmenttest.H index d98e3c7b1..effa34e2e 100644 --- a/src/usr/testcore/kernel/segmenttest.H +++ b/src/usr/testcore/kernel/segmenttest.H @@ -42,19 +42,6 @@ class segmenttest: public CxxTest::TestSuite { int rc = 0; uint64_t ra = 2*1024*1024; - printkd("Map Device @ ra = 0x%lX using mmio_map\n",ra); - uint64_t* virtAddrMMIO = static_cast<uint64_t*> - (mmio_map(reinterpret_cast<void*>(ra), 1)); - if (virtAddrMMIO == NULL) - { - TS_FAIL("Failed to map using mmio_map\n"); - } - printkd("Unmap Device @ va = %p using mmio_unmap\n",virtAddrMMIO); - rc = mmio_unmap(reinterpret_cast<void*>(virtAddrMMIO), 1); - if (rc != 0) - { - TS_FAIL("Failed to unmap using mmio_unmap\n"); - } printkd("Map Device @ ra = 0x%lX using dev_map\n",ra); uint64_t* virtAddrDEV = static_cast<uint64_t*> @@ -63,6 +50,7 @@ class segmenttest: public CxxTest::TestSuite { TS_FAIL("Failed to map using mmio_dev_map\n"); } + printkd("Unmap Device @ va = %p using dev_unmap\n",virtAddrDEV); rc = mmio_dev_unmap(reinterpret_cast<void*>(virtAddrDEV)); if (rc != 0) |