Keir Fraser
dfba81d2fc
minios: fix case when _text is not 0
...
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com >
2008-01-22 11:35:26 +00:00
Keir Fraser
c6c6a0890d
minios: Fix x86_32 compilation
...
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com >
2008-01-22 11:19:40 +00:00
Keir Fraser
2a18de7599
minios: add blkfront testing
...
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com >
2008-01-22 09:46:33 +00:00
Keir Fraser
e5445ffa54
minios, blkfront: set default block path.
...
remove unnecessary path head stripping.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com >
2008-01-22 09:46:15 +00:00
Keir Fraser
d6398adb03
minios: Add align support to _xmalloc().
...
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com >
2008-01-22 09:45:54 +00:00
Keir Fraser
0464a12749
minios: add lwIP 1.3.0 support
...
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com >
2008-01-21 11:20:52 +00:00
Keir Fraser
afb13d4890
minios: make time interface POSIX
...
timespec uses tv_sec and tv_nsec too. gettimeofday takes a tz
argument.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com >
2008-01-21 11:20:27 +00:00
Keir Fraser
2039d19398
minios: do not exit if FS backend not found.
...
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com >
2008-01-18 16:20:47 +00:00
Keir Fraser
04383f9c0f
minios: support COW for a zero page
...
Permits to support sparse data.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com >
2008-01-18 16:20:13 +00:00
Keir Fraser
4eb8e8dc04
minios: extend map_frames into being able to map a series of
...
contiguous frames, or the same frame several times, aligned, from
another domain, with specific protection, and with potential
failures.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com >
2008-01-18 15:22:42 +00:00
Keir Fraser
c1ea56152a
minios: set text and rodata read-only, free unused pages 0 and 1
...
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com >
2008-01-18 15:22:17 +00:00
Keir Fraser
be33e2333a
Add FS backend/frontend drivers (frontend in minios only).
...
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com >
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk >
2008-01-18 13:33:37 +00:00
Keir Fraser
9d220744e6
minios: add blkfront
...
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com >
2008-01-17 16:41:46 +00:00
Keir Fraser
bdd22133fc
minios: support several netfronts
...
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com >
2008-01-17 15:50:48 +00:00
Keir Fraser
08d9a2612a
minios: add xenbus token support and separate watch event queues
...
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com >
2008-01-17 15:20:02 +00:00
Keir Fraser
f3b3ce4ae7
minios: add realloc
...
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com >
Signed-off-by: Tim Deegan <tim.deegan@eu.citrix.com >
2008-01-17 15:06:30 +00:00
Keir Fraser
22e39d084e
minios: make stack size configurable
...
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com >
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk >
2008-01-17 14:41:44 +00:00
Keir Fraser
e2edfe6c73
minios: add wait_event_deadline
...
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com >
Signed-off-by: Tim Deegan <tim.deegan@eu.citrix.com >
2008-01-17 14:41:12 +00:00
Keir Fraser
69ca1c28b4
minios: add trydown
...
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com >
2008-01-17 14:40:55 +00:00
Keir Fraser
d962772049
minios: use ASSERT for BUG_ON
...
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com >
2008-01-17 14:40:23 +00:00
Keir Fraser
41888d5a7e
minios: Add exit_thread prototype. Make sure exit_thread doesn't
...
return by accident.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com >
2008-01-17 14:40:06 +00:00
Keir Fraser
cb4baf13a2
minios: Add noreturn attribute to do_exit
...
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com >
2008-01-17 14:39:45 +00:00
Keir Fraser
c56fe82b7d
minios: Optimize IA64's get_current()
...
Let gcc access r13 itself, leading to better code
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com >
2008-01-17 14:39:21 +00:00
Keir Fraser
8f8a3b5659
In C99 (7.19.6.2.10), the behavior of scanf("stuff... %n", ..., &n) is
...
said to be undefined if the value to be put is n can't fit. I guess
we can safely consider that the same applies to printf.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com >
2007-12-28 15:23:28 +00:00
Keir Fraser
85b3f5270f
mini-os: No -fpic when building for x86.
...
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com >
2007-12-04 10:11:54 +00:00
Keir Fraser
040d9d2287
[Mini-OS] Catch NULL dereferences
...
Unmap page 0 (only used early at boot) so as to catch NULL dereferences.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com >
2007-11-28 12:42:17 +00:00
Keir Fraser
c0a00d42f4
[Mini-OS] Fix strrchr() when string doesn't contain the character.
...
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com >
2007-11-28 12:41:41 +00:00
Keir Fraser
1c0c172695
[Mini-OS] Make gnttab allocation/free safe
...
Add a semaphore to protect gnttab_list from exhaustion, and disable
callbacks during allocation/free. Fix the network frontend accordingly.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com >
2007-11-28 12:40:57 +00:00
Keir Fraser
70db19da26
minios: Revert 16206:7b5b65fbaf61 (xenbus wait fixup)
...
Already fixed by 14432:f40079acf646.
2007-11-27 12:49:16 +00:00
Keir Fraser
32946b60f1
[Mini-OS] Fix domain blocking race
...
A callback which wakes a thread may happen between the moment
schedule() gives hand to the idle thread and the latter blocks the
domain. Idle hence needs to atomically check that no thread is
running and block, else awoken threads may have to wait up to 10
seconds.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com >
2007-11-24 13:31:39 +00:00
Keir Fraser
153bf11814
[Mini-OS] Permit x86_64 trap handlers to return
...
Trap handlers sometimes fix the problem, so they need to be able to
return.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com >
2007-11-24 13:31:01 +00:00
Keir Fraser
26aa688655
[Mini-OS] Make sure schedule() is called safely
...
If a thread tries to sleep from a callback or with callbacks disabled,
Mini-OS will completely lock, so make sure this never happens.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com >
2007-11-24 13:29:20 +00:00
Keir Fraser
cf64298141
[Mini-OS] Fix netfront xmit overflow
...
Fix xmit overflow by making netfront_xmit sleep until
network_tx_buf_gc() frees an xmit request.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com >
2007-11-24 13:28:54 +00:00
Keir Fraser
051f29b827
[Mini-OS] Fix net backend path leak
...
Free backend path after use.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com >
2007-11-24 13:28:27 +00:00
Keir Fraser
984c5a39ec
[Mini-OS] Make wake_up callback-safe
...
As it may compete with event handlers waking wait queues, wake_up
needs to be callback-safe.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com >
2007-11-24 13:27:59 +00:00
Keir Fraser
00e209e059
[Mini-OS] Fix init_waitqueue_entry
...
Fix initialization of thread_list in init_waitqueue_entry().
Signed-off-by: Samuel Thibault <samuel.thibault@xensource.com >
2007-11-24 13:27:32 +00:00
Keir Fraser
e8c2d5c38a
[Mini-OS] Add init_SEMAPHORE
...
Add init_SEMAPHORE() to dynamically initialize semaphores.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com >
2007-11-24 13:27:08 +00:00
Keir Fraser
59091f2d52
[Mini-OS] Make semaphores callback-safe
...
One may want to use semaphores in event handlers to wake threads
waiting for a resource, so semaphores then need to be callback-safe.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com >
2007-11-24 13:26:39 +00:00
Keir Fraser
36cb94956a
[Mini-OS] Add strrchr()
...
Add strrchr(), useful e.g. for grabbing the last part of a xenbus
path.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com >
2007-11-23 16:42:44 +00:00
Keir Fraser
604132c3d5
[Mini-OS] Add ENOTSUP
...
Add missing ENOTSUP by defining it to EOPNOTSUPP like in Linux.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com >
2007-11-23 16:42:23 +00:00
Keir Fraser
63c4c4eabe
[Mini-OS] Move _ctype into a module
...
Move the _ctype array into its own module, instead of having it
defined in a header.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com >
2007-11-23 16:41:54 +00:00
Keir Fraser
9ebc5c7ea6
[Mini-OS] Make bind_virq return the port
...
Make bind_virq() return the port bound to the irq, which is useful
e.g. for masking/unmasking it.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com >
2007-11-23 16:25:59 +00:00
Keir Fraser
fd2f80c255
[Mini-OS] Fix x86 arch_switch_thread
...
Fix x86 arch_switch_thread by making it pure assembly.
There were missing general register clobbers for x86_64, and BP should
theorically be clobbered too, but gcc does not believe that, so the
only simple safe solution is to use pure assembly.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com >
2007-11-23 16:23:28 +00:00
Keir Fraser
a222af2ef1
[Mini-OS] Optimize get_current()
...
Let gcc perform the computation with SP itself, leading to yet better
code.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com >
2007-11-23 16:23:03 +00:00
Keir Fraser
bb44bead10
[Mini-OS] Fix stack closures
...
So as to make backtracing tools happy, correctly close x86 stacks for
new threads as well as on callback in the x86_32 case since there is
no unwind marker.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com >
2007-11-23 16:22:36 +00:00
Keir Fraser
8d71c3dfb8
[Mini-OS] Fix x86 initial stack alignment
...
This fixes the initial stack alignment for x86, which is required for
current to return a fine NULL instead of a random value or possibly
crash during initialization.
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk >
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com >
2007-11-23 16:22:13 +00:00
Keir Fraser
abbd33090a
minios: xenbus wait fixup
...
From: Samuel Thibault <samuel.thibault@xensource.com >
Signed-off-by: Keir Fraser <keir@xensource.com >
2007-10-24 14:36:18 +01:00
Keir Fraser
d06d3cfb8d
minios: Make NSEC_TO_USEC/NSEC_TO_SEC macros expression safe.
...
From: Samuel Thibault <samuel.thibault@xensource.com >
Signed-off-by: Keir Fraser <keir@xensource.com >
2007-10-24 14:35:19 +01:00
Keir Fraser
c6553c4cde
minios: Fix get_current() inline asm.
...
From: Samuel Thibault <samuel.thibault@xensource.com >
Signed-off-by: Keir Fraser <keir@xensource.com >
2007-10-16 09:30:20 +01:00
Keir Fraser
85cb55a886
MiniOS: no-stack-protector added to the cflags if needed,
...
and the default domain config file fixed.
From: Grzegorz Milos <gm281@cam.ac.uk >
Signed-off-by: Keir Fraser <keir@xensource.com >
2007-10-09 16:06:50 +01:00