Commit Graph

613 Commits

Author SHA1 Message Date
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
68d3aa4212 Changed ncontainers type to int from string. 2009-10-05 22:41:29 +03:00
Bahadir Balban
8919c4bfa5 CML2 suppress bug caused number of containers to be misconfigured.
Now worked around.

CML2 seems to forget supressing derived symbols that are derived from
suppressed symbols. (Expected behaviour) This caused the configuration parser
to recognize the illegally visible symbols to be from those containers.

Now worked around by adding the extra check for CONFIG_CONTAINERS have been parsed.

A real solution requires fixing CML2 symbol visibility function.
2009-10-05 22:33:29 +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
ed9199a972 Added parsing of memory region capability bits. 2009-10-03 15:34:39 +03:00
Bahadir Balban
b2f508c8b7 Added the accidentally missing defaults for virt/phys mem capabilities 2009-10-02 20:36:16 +03:00
Bahadir Balban
f3bca7ba00 Created a way to generate 0 and 1's while retaining Yes and No in CML
CML boolean type compiles into #define and #undefs.
This is not useful for capabilities since a value of 0 or 1 can be
used automatically for setting or unsetting bits in permission words.

Meanwhile using an integer type with 0 - 1 range has a worse usability
experience than the boolean Y, N.

Also moved parsing of container.template.cml to newer Python argument
parsing format.
2009-10-02 20:03:25 +03:00
Bahadir Balban
d3b96ca646 Moved kernel autogeneration function to a meaningful directory
Als updated parse options to save oldconfig file when -r option is used.
2009-10-02 15:22:52 +03:00
Bahadir Balban
3602b5a785 Uppercase and description fixes 2009-10-01 19:54:27 +03:00
Bahadir Balban
17f7207996 Moved VIRTMEM PHYSMEM start/end symbols into relevant capabilities menu. 2009-10-01 19:34:26 +03:00
Bahadir Balban
e6439517e9 Introducing virtual/physical memory permission capabilities. Half-way done. 2009-10-01 19:09:08 +03:00
Bahadir Balban
f6e759c3f0 Changed container configuration parameter DIRNAME to NAME
Dirname was not a precise description as the name did not always
get used as a directory name.
2009-10-01 17:04:17 +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
6aec4ac53b The very first pager's space area is added to the address space list. 2009-10-01 15:51:58 +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
5eae7dc07b Added __init__.py required for tools.pyelf to be recognized as a module 2009-10-01 10:58:59 +03:00
Bahadir Balban
08facabc99 Added the forgotten pyelf libraries 2009-10-01 10:53:41 +03:00
Bahadir Balban
5ec000fb34 Added libmem which was forgotten 2009-10-01 10:52:07 +03:00
Bahadir Balban
b642fc5cd3 Updated container configuration cml for posix container 2009-10-01 00:21:21 +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
d661924860 Updated number of args to cml generator template. 2009-09-28 14:49:50 +03:00
Bahadir Balban
2f2e448667 Removed TEXT_OFFSET parameter from linux configuration
This parameter does not significantly pose a restriction on configuration.
It can be adjusted depending on phys_offset. Therefore we don't maintain it.
2009-09-28 14:13:16 +03:00
Bahadir Balban
fb1de576cb Fixed hexadecimal conversions where output has the most significant bit as 1
If hex converted had a 1 in the MSB, an L was appended to the number.
The conversion routine removes this.
2009-09-28 14:04:19 +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
bd448babaa Moved scheduler from containers back to being a global.
It makes more sense to have a scheduler (or runqueue pair) per-cpu
rather than per-container. This provides more flexible global scheduling
policy that is also simpler due to all scheduling details being controlled
from a single point.
2009-09-27 13:50:48 +03:00
Bahadir Balban
fa6629800f Coding style changes in kernel startup 2009-09-27 11:47:40 +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
aae84b5eb3 Fixed updating of reconfigured bare projects
Reconfigured bare projects now update with config data
correctly. A path issue was fixed.
2009-09-26 21:52:29 +03:00
Bahadir Balban
b6676b9acd Fixed loader for kernel loading
Fix for the error that kernel start address wasn't passed
correctly and kernel wasn't started.
2009-09-26 21:18:19 +03:00