Commit Graph

62 Commits

Author SHA1 Message Date
Bahadir Balban
0cd5091132 Moved user buffer access functions to user.c 2009-10-13 19:11:14 +03:00
Bahadir Balban
38ac9052c0 Few minor fixes 2009-10-13 13:51:30 +03:00
Bahadir Balban
c37b9030fd Fixed a bug with returned fd from sys_open 2009-10-13 13:31:22 +03:00
Bahadir Balban
a249105969 Integrated vm_files with vnodes. execve is not working as expected. 2009-10-13 11:33:25 +03:00
Bahadir Balban
f54747a208 All posix tests running as before. 2009-10-10 00:23:13 +03:00
Bahadir Balban
13c7a6476d Fixed a c library issue with wrong valued SEEK_SET SEEK_CUR ... 2009-10-09 16:53:37 +03:00
Bahadir Balban
d39ffc6acd Fixed utcb updating issue that was a significant burden.
Any thread that touches a utcb inside the kernel now properly checks
whether the utcb is mapped on its owner, and whether the mapped physical
address matches that of the current thread's tables. If not the tables
are updated.

This way, even though page tables become incoherent on utcb address
change situations (such as fork() exit(), execve()) they get updated
as they are referenced.

Since mappings are added only conditionally, caches are flushed only
when an update is necessary.
2009-10-09 16:45:10 +03:00
Bahadir Balban
7e38e70f93 Added conditional configuration flag -c to build.py 2009-10-08 19:07:59 +03:00
Bahadir Balban
d888267f58 Fixed the error that dirent structure was not matching userland structure. 2009-10-08 18:37:43 +03:00
Bahadir Balban
4966b2bea9 Fixed a reference to VFS_TID 2009-10-08 17:50:44 +03:00
Bahadir Balban
2192b22677 Added a filesystem index value for each superblock 2009-10-08 17:00:00 +03:00
Bahadir Balban
72c6ca1ed0 Added an extended ipc return library function. 2009-10-08 15:35:54 +03:00
Bahadir Balban
cb561ab262 Removed all references th shared page from libposix
Added UTCB functions for full ipc that copy buffer or string payloads
in secondary message registers.

Some posix syscalls now use these utcb functions to copy pathnames.
2009-10-07 22:59:34 +03:00
Bahadir Balban
96cd0949b6 Correct placement of arguments and environment on stack.
int main(int argc, char *argv[])

style main function works now on Codezero/POSIX.
2009-10-07 19:17:24 +03:00
Bahadir Balban
8a55a80c23 Fixed lots of issues with mm0 initialization, final one was an oversized do_munmap.
test0 now successfully runs its beginning.
test0 SConscript has a dependency problem.

Issues to be investigated:
- vm_file and vnodes need to be merged fully in all functions.
- libposix shared page references need to be removed.
- Any references to VFS_TID, PAGER_TID need to be removed.
2009-10-06 21:12:45 +03:00
Bahadir Balban
ea9c399dda Progress on executing test0 from memfs file as an elf.
Elf is recognised OK, but somehow section table is not read correctly.
2009-10-06 18:30:36 +03:00
Bahadir Balban
965f2f9456 Brought mm0 initialization up to init_execve()
Changes:
It is now possible to use do_mmap() from within mm0.

- pager_new_virtual()/delete_virtual() return addresses that are
  disjoint from find_unmapped_area() used by mmap() interface for
  anonymous or not-fixed areas.
- find_unmapped_area() now uses task->map_start task->map_end instead
  of task->start and task->end. task->start/end are still valid task
  space addresses for mmap(), but finding a new address is limited to
  map_start/map_end.

- We have both interfaces because mmap() is only useful for backed-files.
  When the pager needs to access a user memory range for example, that is
  not backed by a file and thus we need to use pager_new_virtual() instead
  of mmap() for mapping.
2009-10-06 14:15:33 +03:00
Bahadir Balban
56ceed0786 Cleaned up MM0 linker script 2009-10-06 11:30:30 +03:00
Bahadir Balban
999cddd2c8 posix container: sys_write fails on validating pager's buffer as a user buffer.
It might be a good idea to simply use mmap() from inside the pager and prefault it
as a conventional way of mapping internal buffers. Will be investigated.

- This would open the way that all internal buffer mapping is
  done in a standard way
- Standard syscalls would be possible to use from within the pager.
2009-10-05 21:56:55 +03:00
Bahadir Balban
a6c7ac7766 Fixed mmap'ing of pager address space
An anonymous never-to-be-faulted VMA is created for mm0's task region
that is already mapped.
2009-10-05 19:05:56 +03:00
Bahadir Balban
114a59351f Some style fixes. 2009-10-05 16:48:54 +03:00
Bahadir Balban
6b5d4b26c2 Changes to mm0 initialization. mm0 building.
Changed mm0 initialization.
Removed all cruft about boot-specific task setup and initialization,
mm0 now builds with new changes.
2009-10-05 16:40:51 +03:00
Bahadir Balban
da5f4dcff3 Changes in merged posix pager mm0 initialization.
- Moved rootfs from being embedded to mm0 image to being an independent image.
- MM0 boots up to start_init_process with updated boot convention.
2009-10-05 13:25:32 +03:00
Bahadir Balban
f8bcd7a546 Merged fs0 to mm0 for simpler progress on posix api.
mm0 and all other posix dependents are building ok.
2009-10-04 17:34:19 +03:00
Bahadir Balban
12aec8d777 Merge branch 'linux' of git://www.b-labs.co.uk/home/bora/web/git/codezero into bora 2009-10-01 16:24:07 +03:00
Bora Sahin
afaa1d03a8 A few changes to allow development on conts/test directory.
Now, bare containers get their files from conts/bare_src instead of conts/test.
test directory will be used for the next generation test programs.
Also bare_src is tracked by git now with a minor mod to .gitignore.
2009-10-01 15:43:46 +03:00
Bahadir Balban
4b235a9920 Fixed an error with mm0 where server naming wasn't matched from bootdesc 2009-10-01 13:29:35 +03:00
Bahadir Balban
e5cde20ca9 Fixed a fault with posix tasks not getting their LMA correctly 2009-10-01 13:13:27 +03:00
Bahadir Balban
70a3bb35f5 Linux readme should be in linux repo 2009-10-01 11:26:28 +03:00
Bahadir Balban
4db35ff350 Added container information for sources such as linux and posix 2009-10-01 11:24:25 +03:00
Bahadir Balban
5ec000fb34 Added libmem which was forgotten 2009-10-01 10:52:07 +03:00
Bahadir Balban
b24fa0772f Removed .sconsigns that got in. 2009-09-30 23:53:57 +03:00
Bahadir Balban
1a8b993ace Updated a warning + removed .elf from intermediate bootdesc elf file
container packer picks up files with .elf extentions. Therefore intermediate
files must not have .elf extentions, since they're not meant to go to the final
executable.
	modified:   conts/posix/bootdesc/SConscript
	modified:   conts/posix/libposix/stat.c
2009-09-30 23:49:24 +03:00
Bahadir Balban
7ca634450b Added inclusion of test_exec binary to test0 2009-09-30 23:45:19 +03:00
Bahadir Balban
4e7d8ddc25 Integrated building of posix images as a container
Issues:
Some intermediate .elf files should not go into final container image.
Perhaps those will be built with different or no extension
2009-09-30 19:04:35 +03:00
Bahadir Balban
748d6734c3 We now have a correctly compiling (but untested) posix container build. 2009-09-30 18:37:51 +03:00
Bahadir Balban
73225a0119 Bootdesc building working 2009-09-30 16:31:34 +03:00
Bahadir Balban
1aa31bc9d5 We have all posix programs getting compiled.
A lot of hassles on standard c library, mock-up libc, and libposix
headers taken from uClibc clashing has been worked around.

Next:
 - Linker scripts need fixing and adjusting.
 - Bootdesc needs to be generated.
 - Per-container compilation scripts need connecting.
2009-09-29 23:06:29 +03:00
Bahadir Balban
f0bb0a4657 Added posix code 2009-09-29 21:55:59 +03:00
Bahadir Balban
54272ccb63 Mods to userspace library building 2009-09-29 21:55:20 +03:00
Bahadir Balban
1c2eaae8b3 Created container.h and added more comprehensive hello world
Added a per-container container.h that inclues useful definitions.
Hello world now is in a separate file not to modify main too often.
hello world now prints container name and id.
2009-09-27 18:35:38 +03:00
Bahadir Balban
6dc68c1776 Force rebuild of bare containers when their linker script changes.
Small change but useful since linker address configuration changes
should force relinking of container executables.
2009-09-26 22:12:11 +03:00
Bahadir Balban
2da7b16412 Moved all crt0.S to .text.head 2009-09-21 20:26:01 +03:00
Bahadir Balban
6b582be876 Fixed bare container linking issue on libgcc not finding definition of `raise' 2009-09-21 20:04:07 +03:00
Bahadir Balban
c49dd29a41 Missing libc added back 2009-09-21 14:30:19 +03:00
Bahadir Balban
3b08ce304d Merge branch 'linux' of ssh://www.b-labs.co.uk/git/codezero into linux 2009-09-21 14:25:48 +03:00
Bahadir Balban
73653bdc27 Added missing SConstruct.userlibs 2009-09-21 14:25:10 +03:00
Bahadir Balban
f34be923e9 Removed files that doesn't belong to this repo 2009-09-21 13:46:15 +03:00
Bahadir Balban
b2c93979ba Packing of bare container done. 2009-09-19 20:53:29 +03:00
Bahadir Balban
19a84b02da Test program for bare repos now links with libl4 and libc.
The userspace bare libc has been re-added to the repo.
2009-09-19 12:30:37 +03:00