aboutsummaryrefslogtreecommitdiffstats
path: root/extras
Commit message (Collapse)AuthorAgeFilesLines
* Add stubdomain support. See stubdom/README for usage details.Keir Fraser2008-02-1257-103/+2324
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Move PAGE_SIZE and STACK_SIZE into __PAGE_SIZE and __STACK_SIZE in arch_limits.h so as to permit getting them from there without pulling all the internal Mini-OS defines. - Setup a xen-elf cross-compilation environment in stubdom/cross-root - Add a POSIX layer on top of Mini-OS by linking against the newlib C library and lwIP, and implementing the Unixish part in mini-os/lib/sys.c - Cross-compile zlib and libpci too. - Add an xs.h-compatible layer on top of Mini-OS' xenbus. - Cross-compile libxc with an additional xc_minios.c and a few things disabled. - Cross-compile ioemu with an additional block-vbd, but without sound, tpm and other details. A few hacks are needed: - Align ide and scsi buffers at least on sector size to permit direct transmission to the block backend. While we are at it, just page-align it to possibly save a segment. Also, limit the scsi buffer size because of limitations of the block paravirtualization protocol. - Allocate big tables dynamically rather that letting them go to bss: when Mini-OS gets installed in memory, bss is not lazily allocated, and doing so during Mini-OS is unnecessarily trick while we can simply use malloc. - Had to change the Mini-OS compilation somehow, so as to export Mini-OS compilation flags to the Makefiles of libxc and ioemu. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: Fix blkfront grant map leakKeir Fraser2008-02-072-3/+4
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: Support net/block backend in domUKeir Fraser2008-02-072-25/+29
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: Fix bug when blkfront reading into zero-mapped bufferKeir Fraser2008-01-291-1/+6
| | | | | | | by just poking the page. No need to use virtual_to_mfn() for the ring since that is a real page. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: Fix ia64 build.Keir Fraser2008-01-283-1/+126
| | | | Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
* minios: permit blkfront to write from mapped memoryKeir Fraser2008-01-231-1/+1
| | | | | | Missing call to virtual_to_mfn Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: make allocation of page tables for ondemand mapping lazyKeir Fraser2008-01-231-62/+109
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: permit blkfront to write from mapped memoryKeir Fraser2008-01-223-1/+32
| | | | | | by adding a virtual_to_mfn macro Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: POSIX fixesKeir Fraser2008-01-2212-29/+70
| | | | | | Fixes some functions which are POSIX. Also make them ifndef HAVE_LIBC. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: fix case when _text is not 0Keir Fraser2008-01-221-5/+5
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: Fix x86_32 compilationKeir Fraser2008-01-224-3/+4
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: add blkfront testingKeir Fraser2008-01-223-0/+181
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios, blkfront: set default block path.Keir Fraser2008-01-221-2/+2
| | | | | | remove unnecessary path head stripping. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: Add align support to _xmalloc().Keir Fraser2008-01-222-39/+91
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: add lwIP 1.3.0 supportKeir Fraser2008-01-2111-1/+914
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: make time interface POSIXKeir Fraser2008-01-216-31/+64
| | | | | | | timespec uses tv_sec and tv_nsec too. gettimeofday takes a tz argument. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: do not exit if FS backend not found.Keir Fraser2008-01-181-4/+1
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: support COW for a zero pageKeir Fraser2008-01-186-1/+66
| | | | | Permits to support sparse data. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: extend map_frames into being able to map a series ofKeir Fraser2008-01-185-23/+56
| | | | | | | | 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>
* minios: set text and rodata read-only, free unused pages 0 and 1Keir Fraser2008-01-185-6/+91
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* Add FS backend/frontend drivers (frontend in minios only).Keir Fraser2008-01-184-0/+1190
| | | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com> Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
* minios: add blkfrontKeir Fraser2008-01-172-0/+418
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: support several netfrontsKeir Fraser2008-01-173-120/+151
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: add xenbus token support and separate watch event queuesKeir Fraser2008-01-173-44/+143
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: add reallocKeir Fraser2008-01-172-0/+24
| | | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com> Signed-off-by: Tim Deegan <tim.deegan@eu.citrix.com>
* minios: make stack size configurableKeir Fraser2008-01-179-15/+39
| | | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com> Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
* minios: add wait_event_deadlineKeir Fraser2008-01-171-21/+23
| | | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com> Signed-off-by: Tim Deegan <tim.deegan@eu.citrix.com>
* minios: add trydownKeir Fraser2008-01-171-0/+13
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: use ASSERT for BUG_ONKeir Fraser2008-01-173-7/+2
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: Add exit_thread prototype. Make sure exit_thread doesn'tKeir Fraser2008-01-172-1/+6
| | | | | | return by accident. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: Add noreturn attribute to do_exitKeir Fraser2008-01-172-2/+2
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: Optimize IA64's get_current()Keir Fraser2008-01-171-2/+1
| | | | | | Let gcc access r13 itself, leading to better code Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
* In C99 (7.19.6.2.10), the behavior of scanf("stuff... %n", ..., &n) isKeir Fraser2007-12-281-3/+1
| | | | | | | 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>
* mini-os: No -fpic when building for x86.Keir Fraser2007-12-041-1/+1
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
* [Mini-OS] Catch NULL dereferencesKeir Fraser2007-11-281-0/+3
| | | | | | Unmap page 0 (only used early at boot) so as to catch NULL dereferences. Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
* [Mini-OS] Fix strrchr() when string doesn't contain the character.Keir Fraser2007-11-281-1/+1
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
* [Mini-OS] Make gnttab allocation/free safeKeir Fraser2007-11-282-4/+16
| | | | | | | 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>
* minios: Revert 16206:7b5b65fbaf61 (xenbus wait fixup)Keir Fraser2007-11-271-1/+0
| | | | Already fixed by 14432:f40079acf646.
* [Mini-OS] Fix domain blocking raceKeir Fraser2007-11-241-3/+20
| | | | | | | | | | 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>
* [Mini-OS] Permit x86_64 trap handlers to returnKeir Fraser2007-11-241-0/+1
| | | | | | | Trap handlers sometimes fix the problem, so they need to be able to return. Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
* [Mini-OS] Make sure schedule() is called safelyKeir Fraser2007-11-243-0/+15
| | | | | | | 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>
* [Mini-OS] Fix netfront xmit overflowKeir Fraser2007-11-241-6/+16
| | | | | | | 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>
* [Mini-OS] Fix net backend path leakKeir Fraser2007-11-241-0/+1
| | | | | | Free backend path after use. Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
* [Mini-OS] Make wake_up callback-safeKeir Fraser2007-11-241-0/+3
| | | | | | | 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>
* [Mini-OS] Fix init_waitqueue_entryKeir Fraser2007-11-241-0/+1
| | | | | | Fix initialization of thread_list in init_waitqueue_entry(). Signed-off-by: Samuel Thibault <samuel.thibault@xensource.com>
* [Mini-OS] Add init_SEMAPHOREKeir Fraser2007-11-241-2/+4
| | | | | | Add init_SEMAPHORE() to dynamically initialize semaphores. Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
* [Mini-OS] Make semaphores callback-safeKeir Fraser2007-11-241-1/+12
| | | | | | | 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>
* [Mini-OS] Add strrchr()Keir Fraser2007-11-232-0/+10
| | | | | | | Add strrchr(), useful e.g. for grabbing the last part of a xenbus path. Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
* [Mini-OS] Add ENOTSUPKeir Fraser2007-11-231-0/+1
| | | | | | Add missing ENOTSUP by defining it to EOPNOTSUPP like in Linux. Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
* [Mini-OS] Move _ctype into a moduleKeir Fraser2007-11-232-25/+28
| | | | | | | 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>