diff --git a/README b/README index e94a14f..11421ac 100644 --- a/README +++ b/README @@ -77,7 +77,7 @@ The current 'Toy' release is distributed under GNU General Public License Version 3 and this version only. Any next version will be released in the same license, but there are intentions to keep the project in a dual-licensed manner. In any case, the project source code will always be released as open source as -in the OSI definition, and with copyleft clauses. +in the OSI definition. The third party source code under the directories loader/ tools/ libs/c libs/elf have their own copyright and licenses, separate from this project. All third @@ -116,25 +116,28 @@ There ones that are well established, but Codezero will contrast them by providing an alternative that will follow the open source development principles more closely. Many embedded software projects still use older development methods and the right open source methodology would prove favorable in the -fast-paced nature of development. +fast-paced nature of embedded software development. Finally, POSIX compliance is only a step, or a temporary aim for the Codezero microkernel. It is not limited to the goal of just complying with POSIX, which has been done many times by other operating systems. There are new ideas in literature that would improve systems software but aren't implemented either because they have no existing users or may break compatibility (e.g. some are -presented in Plan 9). Existing kernels tend to oppose major design overhauls, -which limits their innovation capability for this kind of experimentation. As -well as practising realistic development strategies such as POSIX compliance, -Codezero project aims to keep up with the latest OS literature and provide the -opportunity to incorporate the latest ideas in OS technology. +presented in Plan 9). For example file abstractions could be used more +liberally to cover data exchange and control of devices, services and network +communication. Existing kernels already have established methods of doing such +operations and they would oppose major design overhauls, which limits their +innovation capability for this kind of experimentation. As well as practising +realistic development strategies such as POSIX compliance, Codezero project aims +to keep up with the latest OS literature and provide the opportunity to +incorporate the latest ideas in OS technology. Can you summarise all this? Why should I use Codezero, again? Codezero is an operating system that targets embedded systems. It supports the most fundamental posix calls and it implements modern features such as -demand-paging and virtual filesystem layer. Different from other posix-like +demand-paging and virtual filesystem layer. Different from most other posix-like systems, it is based on a microkernel design. It has a cleanly separated set of services, it is small and well-focused. Its design is carefully thought out, so it's not just a mock-up implementation of the existing POSIX API. Its source diff --git a/tasks/fs0/src/syscalls.c b/tasks/fs0/src/syscalls.c index a8cb21b..f5c6c50 100644 --- a/tasks/fs0/src/syscalls.c +++ b/tasks/fs0/src/syscalls.c @@ -87,12 +87,6 @@ struct vnode *vfs_create(struct tcb *task, struct pathdata *pdata, * - Is it already open? * - Allocate a copy of path string since lookup destroys it * - Check flags and mode. - * - * TODO: - * - All return paths should return by destroying pdata. - * - Need another pdata for vfs_create since first lookup destroys it. - * - Or perhaps we check O_CREAT first, and do lookup once, without the - * last path component which is to be created. */ int sys_open(l4id_t sender, const char *pathname, int flags, unsigned int mode) { diff --git a/tasks/mm0/src/file.c b/tasks/mm0/src/file.c index 61a86da..f053d7d 100644 --- a/tasks/mm0/src/file.c +++ b/tasks/mm0/src/file.c @@ -28,7 +28,7 @@ int vfs_read(unsigned long vnum, unsigned long file_offset, write_mr(L4SYS_ARG2, npages); write_mr(L4SYS_ARG3, (u32)pagebuf); - if ((err = l4_sendrecv(VFS_TID, VFS_TID, L4_IPC_TAG_READ)) < 0) { + if ((err = l4_sendrecv(VFS_TID, VFS_TID, L4_IPC_TAG_PAGER_READ)) < 0) { printf("%s: L4 IPC Error: %d.\n", __FUNCTION__, err); return err; } @@ -52,7 +52,7 @@ int vfs_write(unsigned long vnum, unsigned long file_offset, write_mr(L4SYS_ARG2, npages); write_mr(L4SYS_ARG3, (u32)pagebuf); - if ((err = l4_sendrecv(VFS_TID, VFS_TID, L4_IPC_TAG_WRITE)) < 0) { + if ((err = l4_sendrecv(VFS_TID, VFS_TID, L4_IPC_TAG_PAGER_WRITE)) < 0) { printf("%s: L4 IPC Error: %d.\n", __FUNCTION__, err); return err; } @@ -266,6 +266,14 @@ int sys_read(l4id_t sender, int fd, void *buf, int count) return 0; } +/* + * TODO: + * Page in those writeable pages. + * Update them, + * Then page them out. + * + * If they're new, fs0 should allocate those pages accordingly. + */ int sys_write(l4id_t sender, int fd, void *buf, int count) { BUG();