Commit Graph

35 Commits

Author SHA1 Message Date
Bahadir Balban
09bd001e1a Added sys_mkdir and memfs_vnode_mkdir() functions. Untested but all implemented. 2008-02-15 17:32:41 +00:00
Bahadir Balban
5de93f707c Fixed lookup return value. Now using generic_lookup directy, i.e.
not through a vnode, because it really isn't fs-specific.
2008-02-15 12:22:07 +00:00
Bahadir Balban
7bbc21d105 Another minor fix in lookup.c 2008-02-14 21:32:39 +00:00
Bahadir Balban
329dc53982 FS0 compiles with the changes, also caught an unparanthesised double-statement
if clause in lookup.c
2008-02-14 21:23:49 +00:00
Bahadir Balban
b54a0f78e8 minor commit just to be able to push 2008-02-14 19:55:10 +00:00
Bahadir Balban
1b387a1704 Implemented vfs_lookup_byvnum() close to what it should look like. 2008-02-14 15:46:30 +00:00
Bahadir Balban
d3b6817887 Some more additional changes in same places. 2008-02-14 15:13:08 +00:00
Bahadir Balban
a989e1f774 sys_readdir and memfs_readdir closer to targeted look and feel.
We now have a single dirbuf of size PAGE_SIZE kept on the vnode. This is
to be used for directory contents only. The reason it's kept on FS0 is
because the contents are modified by calls such as mkdir or create, and otherwise
these would have been handled by mm0 on the page cache buffers, which wouldn't work.
2008-02-14 14:37:56 +00:00
Bahadir Balban
2440b5be61 Some efforts to adding better support for readdir 2008-02-14 12:08:21 +00:00
Bahadir Balban
60cce15a4d Some preliminary efforts to reading directory contents in fs0.
Need to still decide whether content buffers are provided by mm0,
whether need to return them back to mm0, and the read count.
	modified:   tasks/fs0/src/memfs/vnode.c
	modified:   tasks/fs0/src/syscalls.c
2008-02-13 00:24:57 +00:00
Bahadir Balban
7f9380cc78 Errno is set by the posix calls read/write/open/close etc. rather than their l4_xxx equivalent.
mmap.c is the only one not done yet.
2008-02-12 19:17:19 +00:00
Bahadir Balban
193430d226 Added test code for testing of directory listing.
Added system call prototypes and posix glue for reading a directory.

TODO:
FS0 should implement the L4_IPC_TAG_READDIR ipc call.
2008-02-12 19:09:46 +00:00
Bahadir Balban
86dfd6a753 Changed name of utcb get function to match with general name conventions in syslib.h 2008-02-11 11:50:19 +00:00
Bahadir Balban
dce3a9a47c Merged some libl4 utcb headers, moved mr defs to kernel message.h
Headers 3 headers related to message registers and utcbs are now merged under
utcb.h in libl4. Some message register definitions used by the kernel are now
moved into kernel's glue/message.h. This avoids the duplication of same
definitions. Also the total number of mregs are now determined by arch-specific
kernel header, which is good.
2008-02-11 11:45:21 +00:00
Bahadir Balban
e0492d672f Kernel inspects and sets sender id instead of userspace.
Modified ipc handling so that from now on the kernel inspects and sets
the sender id if the receiver is receiving from L4_ANYTHREAD. This posed
a security problem since the receiver could not trust the sender for
sender information.
2008-02-11 11:11:17 +00:00
Bahadir Balban
0c7d2bbfd1 swapped write_mr() arguments.
write_mr() now works as write_mr(mr_offset, mr_val), which makes sense.
2008-02-09 15:57:44 +00:00
Bahadir Balban
57420942ba Removed unnecessary printks, fixed few minor issues. 2008-02-09 15:48:10 +00:00
Bahadir Balban
ba0e3ada21 Few more fixes.
Boot files and tasks are now initialised together. Theads can ask for particular
space and thread ids, if they're unused. This enables us to get predefined ids for
known tasks such as the VFS task.

Fixes to README
Other minor fixes.
2008-02-09 14:24:49 +00:00
Bahadir Balban
f29c18ec09 Fixed various errors with ipc message passing.
Previously we had changed the method of setting the ipc tag from l4_ipc() call
argument to being passed as a message register.

- This change was not reflected in l4_ipc() signature as it still had a 3rd argument,
  even though ignored.

- l4_set_sender and _set_tag had their arguments wrong way around.
- Previously 5 mrs were passed onto utcb instead of 6, relying on the fact that
  l4_ipc tag argument was being passed in r3 directly, this wasnt true anymore
  with new convention, but wasn't catered for.

TODO:
- MM0 shouldn't really allocate tids itself, but use ones supplied by C0.
- Sender tid shouldn't really passed by the sender task, but rather by C0. Otherwise
  security can be easily breached by user tasks pretending to be other tasks. This
  would also save us a message register.
2008-02-06 12:26:31 +00:00
Bahadir Balban
4f2e1d3e94 Fixed various minor issues.
Tag setting before ipc via l4 libraries don't seem to work, whereas
c0 internally generated ipcs do it correctly.
2008-02-05 18:30:11 +00:00
Bahadir Balban
3a07ae70fd Rearranged devzero. More bugs to fix. 2008-02-05 01:21:55 +00:00
Bahadir Balban
b725d09eff Added some forgotten files.
new file:   tasks/fs0/include/memfs/file.h
	new file:   tasks/fs0/include/stat.h
	new file:   tasks/fs0/include/vfs.h
2008-02-04 23:44:28 +00:00
Bahadir Balban
70d5ff33cd This patch adds ipc_sendrecv() and opens the way for client/server communication.
ipc_sendrecv() replaces ipc_sendwait() which was flawed. See ipc_sendrecv() for
how client/server communication works. Tested with page faults where the kernel
does an ipc_sendrecv() to faulty thread's pager and the pager successfully handles
the request, and returns back the result, which effectively restarts the faulty
thread.
2008-02-04 21:03:51 +00:00
Bahadir Balban
13ee470a33 Mark the next bug to fix. 2008-02-04 19:40:23 +00:00
Bahadir Balban
ca5229ff88 Fixed the problem that mm0 would read registers from actual MR0
instead of MR_UNUSED_START.
2008-02-04 19:35:13 +00:00
Bahadir Balban
938672f7c9 Changed the virt-to-phys debug breakpoint name to break_virtual
Changed l4id_t type to integer to recognise negative id values like L4_ANYTHREAD.
Added an extremely simple script that cleans and builds everything in right order.

Increased boot pmds by one:
This is due to the fact that if the 1MB initial allocation area of the kernel is
not 1MB-aligned, it is ought to be mapped from the middle of one MB to next,
which requires 2 pmds.

	modified:   .gdbinit
	modified:   README
	new file:   buildall.sh
	modified:   include/l4/arch/arm/types.h
	modified:   include/l4/generic/scheduler.h
	modified:   loader/kernel.S
	modified:   loader/main.c
	modified:   loader/mylink.lds
	modified:   loader/start.axf.S
	modified:   src/glue/arm/init.c
	modified:   src/glue/arm/memory.c
	modified:   tasks/fs0/src/bdev.c
	modified:   tasks/mm0/include/kdata.h
	modified:   tasks/mm0/include/vm_area.h
	modified:   tasks/mm0/src/init.c
	modified:   tasks/mm0/src/task.c
	modified:   tools/ksym_to_lds.py
	modified:   tools/l4-qemu
2008-02-04 16:44:11 +00:00
Bahadir Balban
cab2e8bdd3 Finished adding untested bare functionality vfs
Finished adding untested shm syscalls.
Finished adding untested l4 send/recv helpers

Everything compiles. Now going to fix lots of bugs ;-)
2008-02-03 17:42:38 +00:00
Bahadir Balban
05e9028e90 Some more minor changes. 2008-01-22 13:26:19 +00:00
Bahadir Balban
adf54578f8 Improvising on disk layout of simple unix-like filesystem.
modified:   tasks/fs0/include/fs.h
	new file:   tasks/fs0/src/simplefs/sfslayout.h
2008-01-18 15:20:46 +00:00
Bahadir Balban
66abb3d7f8 Added a public domain malloc temporarily.
More changes to fs0, still improvising.
2008-01-16 18:12:20 +00:00
Bahadir Balban
c921197e69 A first step in writing a dynamically created bootfs for boot images. 2008-01-16 01:37:24 +00:00
Bahadir Balban
6bb5b45212 FS0 compiles now, with a mock-up rootfs.
Having progress on vfs slowly but surely ;-)
2008-01-15 00:34:10 +00:00
Bahadir Balban
efd797c678 Added two gitignore files to git. 2008-01-14 13:36:47 +00:00
Bahadir Balban
7a388f22b7 Removed all ignorable files from git.
Previously python hex() would put an extra 'L' after printing out the
value and this would be trimmed in readelf.py. Now it doesn't seem to
do that so the lsd of the number was trimmed. This patch fixes that.
2008-01-14 12:23:40 +00:00
Bahadir Balban
e2b791a3d8 Initial commit 2008-01-13 13:53:52 +00:00