Commit Graph
687 Commits
Author SHA1 Message Date
Bahadir Balban f4c9ea50bc Added an example test container configuration 2009-10-23 12:32:53 +03:00
Bahadir Balban 8cabfa3e37 Capability sharing test added.
Pagers by default do not share their capabilities with their children.

By using one of CAP_SHARE_SPACE, CAP_SHARE_GROUP or CAP_SHARE_CONTAINER
a pager may now share its capabilities with a collection of threads.
2009-10-23 12:30:30 +03:00
Bora Sahin 4bdbe42850 Linker script is removed from the bare container template.
This is unnecessary because it is autogenerated.
(cherry picked from commit 36e3982b5c769090df00964651f4127ed7c34bd8)
2009-10-23 03:03:57 +03:00
Bora Sahin 2a47e425c4 Test container type is added.
Test container is planned to test codezero microkernel extensively.
With these changes, everything is there to develop a full-featured test suite.
It also exemplifies how a new container type can be added to the system.
(cherry picked from commit f21fa53df421bfc8eeeaa096c89b98beed436c60)
2009-10-23 03:03:14 +03:00
Bahadir Balban 89d49ef495 Lots of fixes, notion of pager hierarchy, fixed tgroup capability checking
Notion of pager hierarchy introduced using the existing but unused
pagerid field.

Thread creation now has two more flags TC_AS_PAGER and TC_SHARE_PAGER.
The former sets creator as pager, the latter sets creator's pager as pager.

Thread group capability sharing now correctly carries shared capabilities
to the thread group leader's tgr_cap_list list, and this list is checked
during capability checking.
2009-10-23 02:36:12 +03:00
Bahadir Balban df776b568f Tests working up to neverending suspend - Will be fixed. 2009-10-22 22:50:50 +03:00
Bahadir Balban 948dd4fa71 Added quick saving of configuration with -s 2009-10-22 16:14:37 +03:00
Bahadir Balban 4f2954af8a Fixed a minor config issue + updated example cml files. 2009-10-22 15:46:58 +03:00
Bahadir Balban 0f9ea9674c Progress on capabilities
Capabilities will be shared among collection of threads. A pager
will have a right to share its own capabilities with its space,
its thread group and its container.

Currently sharing is possible with only all of the caps. Next,
it will be support for cap splitting, granting, and partial sharing
and granting.
2009-10-22 14:04:25 +03:00
Bahadir Balban c6bdd65e48 Minor mods on linux patches 2009-10-21 21:27:41 +03:00
Bahadir Balban 4f5ab576b8 Merge branch 'master' into devel 2009-10-21 20:38:18 +03:00
Bahadir Balban cc2d740900 Neater thread creation flags. 2009-10-21 16:58:10 +03:00
Amit Mahajan 8d38c8ede6 Corrected the PC value for non linux containers. 2009-10-21 17:02:03 +05:30
Amit Mahajan 89a937fc9c Generating LMA for final.elf dynamically 2009-10-21 16:47:56 +05:30
Amit Mahajan 8bb1069553 Adding mechanism to have differnt run and load address for pagers 2009-10-21 16:45:06 +05:30
Amit Mahajan be9b629836 Corrected the way to find config.h's path 2009-10-21 16:42:32 +05:30
Amit Mahajan 93c7a909b1 CPUID and ARCHID taking at runtime from config.h 2009-10-21 16:42:32 +05:30
Amit Mahajan 4bbf9adb86 Passing PHYS_OFFSET as load address of linux elf 2009-10-21 16:42:31 +05:30
Amit Mahajan 084ac1da22 Taking CPUID and ARCHID for linux from build system 2009-10-21 16:42:31 +05:30
Amit Mahajan e264544c00 Taking Linux's Rootfs address from user 2009-10-21 16:42:31 +05:30
Amit Mahajan 86c3a7c176 Added LinuxUpdateParam class for passing parameters to linux 2009-10-21 16:41:28 +05:30
Amit Mahajan 61a0d5b60f Added support for ATAGS for linux kernel 2009-10-21 16:38:57 +05:30
Amit Mahajan 2625d5e871 Encapsulating Linux Image binary in elf 2009-10-21 16:38:57 +05:30
Bahadir Balban 2caf0478d8 Remove missing parse_options reference 2009-10-21 13:25:25 +03:00
Bahadir Balban d2fee25924 Simplified/Cleaned up pager initialization in the kernel 2009-10-20 22:20:37 +03:00
Bahadir Balban 224b531de5 min/max definitions converted to inline functions instead of macros 2009-10-20 21:38:15 +03:00
Bahadir Balban 61e41b5fed Removed memory access permissions from configuration for simplicity
Access permission bits are required eventually but currently are
not a critical concern and yet they complicate configuration. For
sake of simplicity they are removed to be added later on when
absolutely needed.
2009-10-20 21:16:04 +03:00
Bahadir Balban dba6dd0647 Removed parse_options.py which has now moved to configure.py 2009-10-20 20:33:53 +03:00
Bahadir Balban d94054e2b4 Updated example posix cml files 2009-10-20 20:10:35 +03:00
Bahadir Balban 00bfe36dc9 Added example cml2 configuration with 2 posix containers 2009-10-20 20:06:28 +03:00
Bahadir Balban f3edb21fb5 Further enhancements to configuration simplification 2009-10-20 20:05:42 +03:00
Bahadir Balban b85d4202ce Significant cleanup to how configuration files are generated.
Default autogenerated version works. Need to sort out config options
2009-10-20 19:35:02 +03:00
Bahadir Balban a6ed056ea7 Added example cml2 configuration with 2 posix containers 2009-10-20 13:15:54 +03:00
Bahadir Balban 9c06bea41a Changed name of kernel_container to kernel_resources 2009-10-20 13:14:49 +03:00
Bahadir Balban b78859503e Fixed anomaly on memory initialization on mm0.
By this commit, two copies of posix containers can be run!
2009-10-19 22:22:23 +03:00
Bahadir Balban 3660ba9528 Some more minor fixes. 2009-10-19 20:21:23 +03:00
Bahadir Balban 655e135300 Removed zombie test and any verbose printks 2009-10-19 19:45:04 +03:00
Bahadir Balban 62c4249d95 Renamed many thread_* line of calls.
Renamed so that task_* gets a ktcb directly, and thread_* line of
calls make the search for the ktcb.
2009-10-19 19:24:40 +03:00
Bahadir Balban cfa35e4a66 Added support for faulty pagers and their threads to become zombies
Added support for pagers that fault to suspend and become zombies
along with all the threads that they manage. Zombie killing is to
be done at a later time, from this special zombie queue.

The implementation works same as a suspension, with the added action
that the thread is moved to a queue in kernel container.
2009-10-19 18:48:55 +03:00
Bahadir Balban 9177166817 Managed to self-destruct pager.
Issues:
- A page-faulting thread suspends if receives -1 from pager page fault ipc.
  This is fine if pager is about to delete the thread, but it is not if
  it is a buggy pager.
- Need to find a way to completely get rid of suspended pager.
- A method of deleting suspended tasks could remedy both cases above.
2009-10-19 00:33:10 +03:00
Bahadir Balban c3b0399485 Debug commit to be removed 2009-10-18 18:53:31 +03:00
Bahadir Balban c5d2bedc7f Remove memcache verbose print 2009-10-18 16:23:53 +03:00
Bahadir Balban a3a90530df Fixed a few minor issues. 2009-10-18 16:16:32 +03:00
Bahadir Balban 72af4a843a Added userptr access check to exchange_registers 2009-10-18 15:05:56 +03:00
Bahadir Balban 2bd3266498 Removed bits from kernel where pager utcb is set.
Pagers now set their own utcb explicitly via exchange_registers.
exregs accepts calls from active pagers for this purpose only.
2009-10-18 15:01:38 +03:00
Bahadir Balban 7ba7a2e796 Added a simplified ascii_to_int() implementation.
Removed dependency on hard-coded pager id. Pager id is now passed
as an environment string `pagerid' to tasks. Alternatively, this
could take space in the utcb of each task.
2009-10-17 18:48:30 +03:00
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