Commit Graph

192 Commits

Author SHA1 Message Date
Amit Mahajan
988ea49c26 Basic codezero support for clcd device capability added.
1. We are not making a new clcd service container, as we dont want to keep
separate container for each device, ultimately we will have one
container managing all devices.

2. CLCD driver needs to be added.
2010-03-30 22:31:35 +05:30
Amit Mahajan
2b340c9f2f 1. Old pending files cleaned from public repo. 2. Thread_create routines removed from timer_service and kmi_service. 3. Sconstruct of libdev updated. 2010-03-30 16:17:22 +05:30
Amit Mahajan
92645be6ff KMI patch for devel branch on bahadir's repo.
Important points:
----------------
1. Works fine for pb926 + qemu.

2. Scan code logic for kryboard is not complete.
We just have generic keys and shift working.

3. Mouse scancodes are collected but not decoded.

4. Right now we are doing enable_irq(), just before we go for waiting
again for new irqs. This is not correct but we had latency issues.
This needs to be fixed immediately.

5. Also it seems like the notify_clot count should be an atomic
variable. Needs to be discussed.
2010-03-30 16:17:15 +05:30
Bahadir Balban
74b5963fcb Kernel updates since December 2009 2010-03-25 01:12:40 +02:00
Bahadir Balban
27c0c34e3d Irqs are working. Scheduler modified to come back from no tasks.
- Userspace irq handling for timer.
- If no runnable task is left. scheduler busy loops in user context
  of last runnable task until a new task becomes runnable.
2009-12-14 11:48:40 +02:00
Bahadir Balban
d85ccdb3fe Fixed few more anomalies with threaded irqs.
There is a bug that causes the sleeping irq
thread to never wake up. Investigating.
2009-12-13 20:35:04 +02:00
Bahadir Balban
c7069a8e8e Fixed minor issues on capability list sharing. 2009-12-13 18:02:47 +02:00
Bahadir Balban
41b7176a58 2 posix containers tested with changes. Inline assemblers fixed.
Inline assembler for irq disabling had no output variables defined.
2009-12-12 01:54:39 +02:00
Bahadir Balban
32c0bb3a76 Converted all wait/wakeup runqueue lock/unlock paths to irq versions.
Irqs can now touch runqueues and do async wakeups. This necessitated
that we implement all wake up wait and runqueue locking work with irqs.

All this, assumes that in an SMP setup we may have cross-cpu wake ups,
runqueue manipulation. If we later decide that we only wake up threads
in the current container, (and lock containers to cpus) we won't really
need spinlocks, or irq disabling anymore. The current set up might be
trivially less responsive, but is more flexible.
2009-12-12 01:20:14 +02:00
Bahadir Balban
b1614191b3 Reverted all changes - userspace devices mapped at initialization.
This is much simpler, no device map/unmap maintenance at run-time,
no lazy device mapping etc.
2009-12-11 19:27:46 +02:00
Bahadir Balban
59af5d3794 Made changes to map devices dynamically upon irq registration.
All will be reverted since mapping devices statically is much simpler.
2009-12-11 19:02:10 +02:00
Amit Mahajan
8d2571cd1f Capability print functions shifted to l4lib and various capability.h
cleaned
2009-12-08 13:02:48 +05:30
Bahadir Balban
2908c40816 Undefined instruction handling/ipc revised, tests added, cleaned up. 2009-12-04 15:22:56 +02:00
Bahadir Balban
7628cc1e1d Merge branch 'rebase' of git://git.l4dev.org/~amit/codezero into amit
Conflicts:
	conts/baremetal/timer_service/main.c
2009-12-04 00:41:51 +02:00
Bahadir Balban
5b783f4e2e Update to manual pages.
Introduced an ENOMAP error code for l4_unmap.
2009-12-04 00:30:25 +02:00
Amit Mahajan
3d2b87d488 CLCD added as new capability, code note added yet 2009-12-04 00:54:23 +05:30
Bahadir Balban
2c93de65bf Removed 2 arguments from l4_capability_control
l4_capability_control works well for almost all system calls
using a buffer pointer to the capability that it operates on.

Only for sharing/granting of capability lists, it is yet to be
decided how to provide a grant target id.
2009-12-02 16:47:05 +02:00
Bahadir Balban
ae16df6307 Removed CAP_SHARE_ALL and CAP_GRANT_ALL flags. Currently not used.
The API for sharing and granting of all capabilities has not
settled yet, therefore removed.
2009-12-02 16:27:42 +02:00
Bahadir Balban
d210678085 Removed irq notification slots. - To be revised with a better implementation 2009-12-02 16:03:09 +02:00
Bahadir Balban
c9fc6d9341 Reorganized a few header file comments 2009-12-02 15:31:02 +02:00
Bahadir Balban
52775d0d2f Added means to add correct irq values to capabilities 2009-12-02 00:05:10 +02:00
Bahadir Balban
346d79c0cd Changes to platform device handling, irqs, userspace device configuration
Revised irq handling and device address naming on internal devices.
2009-11-29 18:11:08 +02:00
Bahadir Balban
2d4e64f795 Merge branch 'rebase' of git://www.b-labs.co.uk/~amit/codezero into amit-devel 2009-11-29 12:37:08 +02:00
Bahadir Balban
307b52f6d2 Added api/irq.h 2009-11-29 12:36:43 +02:00
Amit Mahajan
16b984510f PBA8 platform removed 2009-11-29 11:50:02 +05:30
Amit Mahajan
bc4a233adb Removed AB926 platform 2009-11-29 11:50:02 +05:30
Amit Mahajan
0707376a54 Added start/end/size attributes for devices in caps.py instead of
resource.c
2009-11-29 11:50:02 +05:30
Amit Mahajan
b48f817bd8 Timer Code tested 2009-11-29 11:45:48 +05:30
Amit Mahajan
b53cc73747 Testing Inter container IPC for UART service 2009-11-29 11:45:47 +05:30
Bahadir Balban
6e40a2b601 Preliminary irq registration call + irq capability checking
Need to add irqctrl capabilities and irq bits to device memory
caps.

Also need to initialize irq field of devmem caps.
2009-11-28 19:13:23 +02:00
Bahadir Balban
b5e6c66426 UTCB update
Added 8 notify slots of 1 byte each. These will be notification
slots for irqs and other threads.

Also now userspace refers to kernel's utcb definition, so they're
in sync.
2009-11-24 14:45:43 +02:00
Bahadir Balban
e0c40ece5d Added a new irq_control system call
This is currently an empty call. It will be used for registering,
receiving and releasing irqs.
2009-11-23 16:46:51 +02:00
Bahadir Balban
b994083e27 Added a new uattr word to capabilities.
The new word is for irq numbers.
2009-11-23 14:37:37 +02:00
Bahadir Balban
1f32e0ce0e Removed comments for fixed issues 2009-11-23 13:32:07 +02:00
Bahadir Balban
877b2cedc7 Integrated libl4thread with libl4. Added device number to device caps.
A 16-bit device number or id further distinguishes a device on the
system in addition to the device type. This is meant to be used for
the very first identification of the device for further probing. Any
further info is available by userspace mapping and probing.
2009-11-22 21:34:18 +02:00
Bahadir Balban
19b4c6c4c1 Moved capability struct to api/capability.h for userspace coherence
Userspace often breaks as we change the capability structure. Now
structure is under api/ so userspace can also update with changes.
2009-11-22 15:08:29 +02:00
Bahadir Balban
f1efee2475 Compiles with new changes but not still in progress 2009-11-22 00:17:58 +02:00
Bahadir Balban
a3cfa2ac9b Added a device attribute to capabilities - In progress
Followed the kernel physical memory reservation convention
with devices. Devices that are possessable by userspace
are created as boot-time capabilities and placed under the kernel
resources devmem_free capability list. Any userspace container
that is defined with the possession of the device would delete the
device capability making it unavailable to further requests.
2009-11-21 23:45:58 +02:00
Bahadir Balban
d826de2eea Initial work to introduce device types and device capabilities 2009-11-21 15:00:42 +02:00
Bahadir Balban
caa7ac0764 Put cinfo array into initdata section. Added more precision in bootmem
cinfo array is now freed along with other init memory.
bootmem allocator memory is reduced to be completely used up.
free boot memory now prints the used free memory as well.
2009-11-21 13:35:53 +02:00
Bahadir Balban
5bff5b5fbf Reduced maximum number of pagers to 1, and boot-time capabilities to 16
Each container was taking up more than 3KB of space at boot-time structures
This was due to having 4 pagers and 32 boot-time capabilities for each. This
caused the boot-time kernel size to vary a lot with capabilities. The new
numbers are optimum.

Particularly we always have a single pager per container, even though the
array structures allow more. Single pager makes container-wide privileges
and management simpler.
2009-11-21 12:31:03 +02:00
Bahadir Balban
5ebc0bb9ac Removed capinfo target_type field. Same info expressed in rtype field 2009-11-17 13:43:25 +02:00
Bahadir Balban
b933db1e36 Fixed target symbol parsing in pre-typed capabilities
Also renamed CONT to CONTAINER on certain symbols
2009-11-17 12:34:59 +02:00
Bahadir Balban
8856609896 cinfo is compiling with new changes 2009-11-16 21:25:38 +02:00
Bahadir Balban
b50c3f6f2b Half-way through prepare_capability() 2009-11-16 18:51:36 +02:00
Bahadir Balban
2ba4736a8b Cleaned up various bits with capability syscalls.
Made grant interace same as other calls.
Corrected counting and reading of task capabilities by applying it
to all cap lists that a task has right.
2009-11-10 16:15:14 +02:00
Bahadir Balban
d43fa1d3ae Simplified cap id finding and destroying it.
It is not very straightforward to reach a capabilities list. We
now use a single function to find out a capability by its id and
its list, since the two are used frequently together (i.e. cap
removal and destruction)
2009-11-09 23:50:03 +02:00
Bahadir Balban
f912f28731 Clarified a few confusing definitions in ipc.c 2009-11-09 22:59:24 +02:00
Bahadir Balban
8b12db741f Moved generic ipc flags to api/ipc.h 2009-11-09 22:01:44 +02:00
Bahadir Balban
78917835c7 Substantially fixed cap_split() behaviour.
Need to fix ipc flags capability checking yet.
2009-11-09 19:15:52 +02:00