Commit Graph

641 Commits

Author SHA1 Message Date
Bahadir Balban
d19c5c26fd Removed hard-coded area definitions from kernel 2009-10-17 13:42:49 +03:00
Bahadir Balban
fc95d95454 Made necessary changes to make test0 link at an adjustable address 2009-10-17 13:24:26 +03:00
Bahadir Balban
6df923c34d Merge branch 'master' into linux 2009-10-15 21:08:02 +03:00
Bahadir Balban
e28e2f486a Changed all pager hardcoded value assumptions, too.
Not tested.
2009-10-15 20:43:19 +03:00
Bahadir Balban
e9afbbaad9 Replaced all hard-coded values for UTCB, SHM, TASK region assumptions.
Not tested.
Not replaced pager run-area values.
2009-10-15 20:35:41 +03:00
Bahadir Balban
6982e96d1f Some cleanups on last commit 2009-10-15 20:24:01 +03:00
Bahadir Balban
e762f4162c Merge branch 'master' into master-diverged 2009-10-15 20:15:26 +03:00
Bahadir Balban
bbe81c5d52 Merge branch 'master' into linux 2009-10-15 20:11:46 +03:00
Bahadir Balban
381405ee8e Incorporated means to specify shared memory, task address space and utcb regions to posix container 2009-10-15 20:10:08 +03:00
Bahadir Balban
b08e27b4bf Added an example posix cml2 configuration 2009-10-14 22:25:40 +03:00
Bahadir Balban
9d900a9956 Cleanup to execve functions 2009-10-14 15:21:33 +03:00
Bahadir Balban
281116fbc7 Merged read/write cache pages as copy_cache_pages() 2009-10-14 15:01:12 +03:00
Bahadir Balban
3a3204986e read_cache_pages() also working copied from write_cache_pages()
- Need to remove old versions
- Need to merge the two.
- Need to investigate occasional page fault on NMOP sequence. (resembles an error ipc_extended test)
  Could be related to new page cache read/write routines.
2009-10-14 01:48:05 +03:00
Bahadir Balban
ee2bf8e7f3 Write cache pages seems to work OK. 2009-10-14 00:36:01 +03:00
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
a8a4b5ce6c Removed unnecessary print messages from few build scripts 2009-10-09 00:58:07 +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
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