diff --git a/repos/base-nova/include/nova/syscall-generic.h b/repos/base-nova/include/nova/syscall-generic.h index 13240f663d..7739047b0f 100644 --- a/repos/base-nova/include/nova/syscall-generic.h +++ b/repos/base-nova/include/nova/syscall-generic.h @@ -66,9 +66,11 @@ namespace Nova { NOVA_ASSIGN_GSI = 0xe, NOVA_PD_CTRL = 0xf, NOVA_YIELD = 0x10, - NOVA_CREATE_CELL= 0x11, + NOVA_MXINIT = 0x11, NOVA_ALLOC_CORES= 0x12, NOVA_CORE_ALLOC = 0x13, + NOVA_CREATE_CELL= 0x14, + NOVA_CELL_CTRL = 0x15, }; /** @@ -281,6 +283,15 @@ namespace Nova { HPC_READ = 10U, }; + /** + * Cell operations + */ + enum Cell_op + { + SHRINK = 0, + GROW = 1, + }; + /** * Pd operations */ diff --git a/repos/base-nova/include/spec/64bit/nova/syscalls.h b/repos/base-nova/include/spec/64bit/nova/syscalls.h index bd17a4d308..9626fbab3f 100644 --- a/repos/base-nova/include/spec/64bit/nova/syscalls.h +++ b/repos/base-nova/include/spec/64bit/nova/syscalls.h @@ -449,7 +449,7 @@ namespace Nova { ALWAYS_INLINE inline uint8_t mxinit(mword_t rip, mword_t id, mword_t channel) { - return syscall_2(NOVA_CREATE_CELL, 0, id, rip, channel); + return syscall_2(NOVA_MXINIT, 0, id, rip, channel); } ALWAYS_INLINE @@ -463,5 +463,23 @@ namespace Nova { { return syscall_5(NOVA_CORE_ALLOC, 0, 0, allocation, allocation); } + + ALWAYS_INLINE + inline uint8_t create_cell(mword_t pd, mword_t prio, mword_t start, mword_t end) + { + return syscall_2(NOVA_CREATE_CELL, static_cast(prio), pd, start, end); + } + + ALWAYS_INLINE + inline uint8_t grow_cell(mword_t pd, mword_t start, mword_t end) + { + return syscall_2(NOVA_CELL_CTRL, Cell_op::GROW, pd, start, end); + } + + ALWAYS_INLINE + inline uint8_t shrink_cell(mword_t pd, mword_t start, mword_t end) + { + return syscall_2(NOVA_CELL_CTRL, Cell_op::SHRINK, pd, start, end); + } } #endif /* _INCLUDE__SPEC__64BIT__NOVA__SYSCALLS_H_ */