Commit Graph

374 Commits

Author SHA1 Message Date
Russel Winder
a14ff1be5c Rearrange include path and linker script specification so as to get a successful compile.
Link not yet successful since physical_base.lds is not yet made.
2009-08-05 10:23:00 +01:00
Russel Winder
02d3c9f07c Correct the include path so that task compilation succeeds. 2009-08-05 10:06:39 +01:00
Russel Winder
a1dfd0b876 Change to shorter all lowercase targets for SCons command line invocation. 2009-08-05 09:28:20 +01:00
Russel Winder
7cf85c4428 Remove a few redundant paths from the include path. 2009-08-05 07:44:05 +01:00
Russel Winder
162941c645 Add some comments and TODOs. Update the help text. 2009-08-05 07:32:26 +01:00
Russel Winder
b3f4ea2169 Add zeroth draft SCons files for the tasks themselves. 2009-08-05 06:33:24 +01:00
Russel Winder
376fb32d48 Change the way tasks and task libraries are processed. 2009-08-05 06:32:58 +01:00
Russel Winder
e7820903d9 Add in the task support libraries. 2009-08-02 13:46:07 +01:00
Russel Winder
26b3ea58a6 Ensure all the library compilation depends on the configuration files. 2009-08-02 11:35:21 +01:00
Russel Winder
27c0c50728 Make a start on building the tasks. 2009-08-01 18:14:34 +01:00
Russel Winder
9b2ff087d0 Add in all the amendments and new files needed to get the kernel building. 2009-08-01 17:50:59 +01:00
Russel Winder
ce8d060d21 Change the way in which the CML2 configuration is handled to separate it out from the build. 2009-08-01 12:40:45 +01:00
Russel Winder
238e05fd5d The Elf library doesn't actually depend on the baremetal library since there is no link phase, remove the dependency. 2009-08-01 08:41:30 +01:00
Russel Winder
a79206f8d9 First pass at processing the CML2 configuration. 2009-07-31 18:35:30 +01:00
Russel Winder
198022b4d4 Correct the copyright notices, B Labs Ltd is the copyright holder. 2009-07-28 18:40:37 +01:00
Russel Winder
6875ce4347 Trivial reformatting. 2009-07-28 16:58:20 +01:00
Russel Winder
82ba62a78f Add compilation of the Elf code. 2009-07-28 16:49:16 +01:00
Russel Winder
083d9e7864 Correct the mode line syntax. 2009-07-28 16:33:02 +01:00
Russel Winder
7936ee6775 Add in creation of the c libraries. 2009-07-28 16:31:51 +01:00
Russel Winder
988f1137c3 Add Emacs backup files to the ignore list. 2009-07-28 16:29:07 +01:00
Russel Winder
175ec0fd34 Remove the build driver shell scripts pending starting a new build system. 2009-07-28 14:47:52 +01:00
Russel Winder
d40c76de84 Remove all the SCons files pending starting a new build system. 2009-07-28 14:47:00 +01:00
Bahadir Balban
ba1cc0c6bc Updated LICENSE/README files, removed unused code from tasks. 2009-06-15 14:58:41 +03:00
Bahadir Balban
0dd8918ae5 Remove all references to ARM registers in system call arguments. 2009-06-10 17:30:02 +03:00
Bahadir Balban
6de090a365 Added word replace tool 2009-06-10 16:32:04 +03:00
Bahadir Balban
4e43d09325 wait_on_prepare and wait_on_prepared_wait with preemption considered 2009-06-10 15:48:34 +03:00
Bahadir Balban
7ef479733f Fix to l4_mutex_control for the unexpected sleeping with mutex held
when preemption occurs after call to wait_on_prepare
2009-06-10 15:41:30 +03:00
Bahadir Balban
6b3ddadcf5 Cleaned up code for userspace mutexes.
- Issues: wait_on_prepare and wait_on_prepared_wait use cases
  are erroneous because they may sleep with mutex_control_lock
  taken if preemption occurs.
2009-06-10 14:37:23 +03:00
Bahadir Balban
056fcab125 Updated script to run qemu and insight 2009-06-09 22:11:08 +03:00
Bahadir Balban
ea5c0bff45 Removed unused files from other projects. 2009-06-08 17:35:01 +03:00
Bahadir Balban
49d47abe97 Evaluated license issues, made some other enhancements. 2009-06-08 17:00:21 +03:00
Bahadir Balban
f285337bba container_of() reimplemented. 2009-06-08 14:35:12 +03:00
Bahadir Balban
276b4643c6 Removed linux linked list dependency. 2009-06-02 13:19:17 +03:00
Bahadir Balban
4757f46f71 Minor comment fixes. 2009-06-02 10:26:21 +03:00
Bahadir Balban
6c78f149e5 Comments for libl4 userspace mutex implementation has been updated. 2009-06-01 16:36:59 +03:00
Bahadir Balban
968f6b4d56 Removed a few minor dependencies on linux C library headers that I forgot in the past. 2009-06-01 16:11:11 +03:00
Bahadir Balban
13d469f659 Removed all unecessary prints from the mutex test and the kernel
- removed (%d) Sleeping print from contended kernel mutexes.
- removed (%d) Waiting print from WAIT_EVENT used by the pager for suspending tasks.
- removed prints from the mutex_control syscall and user mutex test.
2009-06-01 16:02:10 +03:00
Bahadir Balban
5a616d1eb5 Simplified l4_mutex test, in that the test now updates a variable by thread
switching instead of updating a whole page.
2009-06-01 15:51:54 +03:00
Bahadir Balban
78a5ec9d6d Enhanced execve test error handling 2009-06-01 15:33:36 +03:00
Bahadir Balban
3b9cda968d Added mutex locking to kmalloc/kfree. 2009-06-01 15:18:44 +03:00
Bahadir Balban
1de77f1b93 Merge branch 'devel' into fix-kmalloc 2009-06-01 15:08:28 +03:00
Bahadir Balban
87eae2c941 Verbose error reporting on execve test. 2009-06-01 15:07:24 +03:00
Bahadir Balban
4206c6e3fc An extra mutex_unlock has been removed 2009-06-01 15:06:07 +03:00
Bahadir Balban
53f54f2328 Modified kmalloc to cater for dynamic memory allocation on a previously allocated size 2009-06-01 14:48:26 +03:00
Bahadir Balban
33200c92df Mutex implementation almost working.
- Fixed a wrong instruction in mutex.S user library
- Added support for blocking lock/unlock
- Divided waiting into wait_on_prepare and wait_on_prepared_wait
  so that mutex_control lock is released after getting in the waitqueue.
- Declaring waitqueue on the stack should be done outside wait_on_prepare

Issues:
- Tests can be simplified for atomic data access instead of producer/consumer.
- kmalloc variable sized memory caches are not freed properly. Currently only the
  last slot can be freed, occupied correctly. it should be done in any slot, i.e.
  1, 2, 3, 4 instead of just 5.
- Need to add a mutex to kmalloc.
2009-06-01 14:11:40 +03:00
Bahadir Balban
2bd26ce684 Added mmap support for MAP_SHARED + MAP_ANONYMOUS
mmap() with MAP_ANON | MAP_SHARED is used for creating shared
memory mappings that can be shared among a process and its descendants
(think fork())

Currently shmget/at creates shared virtual files on the fly and calls
do_mmap to create anonymous shared mappings. Now sys_mmap uses this
interface to create virtual files on the fly and call do_mmap on those
files.

In the future a common shared virtual file creation method should be
added and commonly used by both interfaces.
2009-05-31 15:55:16 +03:00
Bahadir Balban
d0652fcb21 Updated mutextest - it is not yet there, we need semaphores 2009-05-31 14:18:19 +03:00
Bahadir Balban
ce79aa2b73 Mutex test progress
- Mutex test added. Forked tasks demonstrate produce/consumer using a
  shared mmap'ed page.
- Added l4lib assembler syscall
- Added forgotten SWI to mutex control offset in syscall page.
- Added mutex head initialization
- Contended child successfully sleeps in a waitqueue.

Issues:
- Somehow the child's produced page buffer is altered at about [4020] offset.
  Parent fails to validate buffer therefore.
- Need to add syncing to test so that parent does not unlock and lock again
  before child has a chance to lock buffer and produce.
2009-05-30 16:46:30 +03:00
Bahadir Balban
b11d4c4607 Added mutex_control syscall for userspace mutexes.
- Compiles and Codezero runs as normal without touching mutex implementation
- Mutex implementation needs testing.

The mutex control syscall allows userspace programs to declare any virtual
address as a mutex lock and ask for help from the kernel syscall
for resolving locking contentions.
2009-05-29 15:34:04 +03:00
Bahadir Balban
ab9e036cb7 Updated test pass/fail print messages for test0 2009-05-28 13:23:44 +03:00