diff options
author | Matthew Barth <msbarth@us.ibm.com> | 2011-09-09 16:46:39 -0500 |
---|---|---|
committer | MATTHEW S. BARTH <msbarth@us.ibm.com> | 2011-09-14 11:25:18 -0500 |
commit | b06c8727c809ec10aafe8fad0b929626f9d50987 (patch) | |
tree | a23543920d2826749bb125ebe6cfa22ad9b36446 /src/kernel/syscall.C | |
parent | 4b2a8bf042e96d8181929e92d9b241f65280a93c (diff) | |
download | talos-hostboot-b06c8727c809ec10aafe8fad0b929626f9d50987.tar.gz talos-hostboot-b06c8727c809ec10aafe8fad0b929626f9d50987.zip |
Remove page by given TYPE system call
Change-Id: Iffdd97a75944abbd52dbc72d3aa1394b771fd371
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/333
Tested-by: Jenkins Server
Reviewed-by: MATTHEW S. BARTH <msbarth@us.ibm.com>
Diffstat (limited to 'src/kernel/syscall.C')
-rw-r--r-- | src/kernel/syscall.C | 80 |
1 files changed, 47 insertions, 33 deletions
diff --git a/src/kernel/syscall.C b/src/kernel/syscall.C index af84cc173..0e3395d9e 100644 --- a/src/kernel/syscall.C +++ b/src/kernel/syscall.C @@ -81,41 +81,42 @@ namespace Systemcalls void CpuCoreType(task_t *t); void CpuDDLevel(task_t *t); void MmAllocBlock(task_t *t); + void MmRemovePages(task_t *t); syscall syscalls[] = - { - &TaskYield, // TASK_YIELD - &TaskStart, // TASK_START - &TaskEnd, // TASK_END - &TaskMigrateToMaster, // TASK_MIGRATE_TO_MASTER - - &MsgQCreate, // MSGQ_CREATE - &MsgQDestroy, // MSGQ_DESTROY - &MsgQRegisterRoot, // MSGQ_REGISTER_ROOT - &MsgQResolveRoot, // MSGQ_RESOLVE_ROOT - - &MsgSend, // MSG_SEND - &MsgSendRecv, // MSG_SENDRECV - &MsgRespond, // MSG_RESPOND - &MsgWait, // MSG_WAIT - - &MmioMap, // MMIO_MAP - &MmioUnmap, // MMIO_UNMAP - &DevMap, // DEV_MAP - &DevUnmap, // DEV_UNMAP - - &TimeNanosleep, // TIME_NANOSLEEP - - &FutexWait, // FUTEX_WAIT - &FutexWake, // FUTEX_WAKE - - &Shutdown, // MISC_SHUTDOWN - - &CpuCoreType, // MISC_CPUCORETYPE - &CpuDDLevel, // MISC_CPUDDLEVEL - - &MmAllocBlock, // MM_ALLOC_BLOCK - }; + { + &TaskYield, // TASK_YIELD + &TaskStart, // TASK_START + &TaskEnd, // TASK_END + &TaskMigrateToMaster, // TASK_MIGRATE_TO_MASTER + + &MsgQCreate, // MSGQ_CREATE + &MsgQDestroy, // MSGQ_DESTROY + &MsgQRegisterRoot, // MSGQ_REGISTER_ROOT + &MsgQResolveRoot, // MSGQ_RESOLVE_ROOT + + &MsgSend, // MSG_SEND + &MsgSendRecv, // MSG_SENDRECV + &MsgRespond, // MSG_RESPOND + &MsgWait, // MSG_WAIT + + &MmioMap, // MMIO_MAP + &MmioUnmap, // MMIO_UNMAP + &DevMap, // DEV_MAP + &DevUnmap, // DEV_UNMAP + + &TimeNanosleep, // TIME_NANOSLEEP + + &FutexWait, // FUTEX_WAIT + &FutexWake, // FUTEX_WAKE + + &Shutdown, // MISC_SHUTDOWN + &CpuCoreType, // MISC_CPUCORETYPE + &CpuDDLevel, // MISC_CPUDDLEVEL + + &MmAllocBlock, // MM_ALLOC_BLOCK + &MmRemovePages, // MM_REMOVE_PAGES + }; }; extern "C" @@ -506,4 +507,17 @@ namespace Systemcalls TASK_SETRTN(t, VmmManager::mmAllocBlock(mq,va,size)); } + /** + * Remove pages from virtual memory + * @param[in] t: The task used to remove pages + */ + void MmRemovePages(task_t* t) + { + PAGE_REMOVAL_OPS oper = (PAGE_REMOVAL_OPS)TASK_GETARG0(t); + void* vaddr = (void*)TASK_GETARG1(t); + uint64_t size = (uint64_t)TASK_GETARG2(t); + + TASK_SETRTN(t, VmmManager::mmRemovePages(oper,vaddr,size)); + } + }; |