aboutsummaryrefslogtreecommitdiffstats
path: root/extras/mini-os/main.c
Commit message (Collapse)AuthorAgeFilesLines
* mini-os: make frontends and xenbus optionalDaniel De Graaf2012-02-091-2/+4
| | | | | | | | | | | | | | | | | This adds compile-time logic to disable certain frontends in mini-os: - pcifront is disabled by default, enabled for ioemu - blkfront, netfront, fbfront, kbdfront, consfront are enabled by default - xenbus is required for any frontend, and is enabled by default If all frontends and xenbus are disabled, mini-os will run without needing to communicate with xenstore, making it suitable to run the xenstore daemon. The console frontend is not required for the initial console, only consoles opened via openpt or ptmx. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* mini-os: create app-specific configurationDaniel De Graaf2012-02-091-8/+8
| | | | | | | | | | | | | | Instead of using CONFIG_QEMU and CONFIG_GRUB to enable or disable minios code, create CONFIG_ items for features and use application-specific configuration files to enable or disable the features. The configuration flags are currently added to the compiler command line; as the number of flags grows this may need to move to a header. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* mini-os: work around ld bug causing stupid CTOR countJeremy Fitzhardinge2011-08-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm seeing pvgrub crashing when running CTORs. It appears its because the magic in the linker script is generating junk. If I get ld to output a map, I see: .ctors 0x0000000000097000 0x18 0x0000000000097000 __CTOR_LIST__ = . 0x0000000000097000 0x4 LONG 0x25c04 (((__CTOR_END__ - __CTOR_LIST__) / 0x4) - 0x2) *(.ctors) .ctors 0x0000000000097004 0x10 /home/jeremy/hg/xen/unstable/stubdom/mini-os-x86_32-grub/mini-os.o 0x0000000000097014 0x4 LONG 0x0 0x0000000000097018 __CTOR_END__ = . In other words, somehow ((0x97018-0x97000) / 4) - 2 = 0x25c04 The specific crash is that the ctor loop tries to call the NULL sentinel. I'm seeing the same with the DTOR list. Avoid this by terminating the loop with the NULL sentinel, and get rid of the CTOR count entirely. From: Jeremy Fitzhardinge <jeremy@goop.org> Signed-off-by: Keir Fraser <keir@xen.org>
* tools: remove fs-front/fs-backTim Deegan2011-01-111-2/+0
| | | | | | | | | | | | | | | | Its access controls are really not OK. In particular, it's not good for libxl, which stores per-VM config blobs in a directory that is exported to all VMs. This will break stub-qemu save/restore, which is the only user of fs-front that I'm aware of, but: - It's currently broken anyway (fs-back isn't run by default and crashes if it is run manually); and - Stefano has a plan to plumb qemu save records through a dedicated console channel instead. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* pcifront: implement dynamic connections and disconnectionsKeir Fraser2009-11-131-0/+2
| | | | | | | | | | this patch implements dynamic connections and disconnections in pcifront. This feature is required to properly support pci hotplug, because when no pci devices are assigned to a guest, xend will remove the pci backend altogether. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* fs-front: cope with a missing fs-backendKeir Fraser2009-07-231-5/+0
| | | | | | | | Obviously save\restore is not going to work if fs-backend is missing, but at least the stubdom will be able to work correctly in all the other cases. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* stubdom: drop lwip supportKeir Fraser2009-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | Network support is still provided the same way: using the tap interface, created in qemu using netfront. The lwip stack is still available to avoid additional compilation issues. However the stubdom is not going to have its own vif anymore, this means that the only vnc server supported is the one in dom0. You can still enable the vnc server in a stubdom at compile time, if you want so. Probably the most important change caused by this patch to xen users is that you don't have to specify two vif in the stubdom config file anymore, but just one: -vif = [ '', 'ip=10.0.1.1,mac=aa:00:00:12:23:34'] +vif = ['ip=10.0.1.1,mac=aa:00:00:12:23:34'] Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* stubdom: support quotes in argument passingKeir Fraser2008-08-271-7/+28
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* stubdom: use host's gccKeir Fraser2008-07-041-1/+1
| | | | | | | | This makes stubdom use the host's gcc instead of downloading/compiling binutils+gcc. That requires a bunch of changes and even uncovered a few bugs, but saves a lot of time. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* Add PV-GRUBKeir Fraser2008-06-181-1/+3
| | | | | | | | | | | This fetches GRUB1 sources, applies the {graphical, print function, save default, and ext3_256byte} patches from debian, and applies a patch to make it work on x86_64 and port it to Mini-OS. By using libxc, PV-GRUB can then "kexec" the loaded kernel from inside the domain itself, hence permitting to avoid the security-concerned pygrub. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios,stubdom: Add OBJ_DIR parameter to compile outside sources,Keir Fraser2008-06-171-2/+4
| | | | | | | which permits to easily compile mini-os in various flavors. Also clean some parts of stubdom build. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* stubdom: fetch command line from start_info instead of xenstoreKeir Fraser2008-06-091-21/+7
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* stubdom: permit compilation without lwipKeir Fraser2008-06-091-0/+5
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* stubdom: Save main_thread value by moving it out from app_bss whichKeir Fraser2008-05-281-2/+0
| | | | | | gets cleared. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* stubdom: make the build more generic by moving as many stubdom partsKeir Fraser2008-05-281-2/+0
| | | | | | | into stubdom/ as possible. That also permits to build all of ioemu, c and caml stubdoms at the same time. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* stubdom: support constructors and destructorsKeir Fraser2008-05-221-0/+8
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* stubdom: sparse application's BSS by linking it separately first, putKeir Fraser2008-04-161-0/+2
| | | | | | | markers at its beginning and end, and then link with mini-os. That permits to stick a bit more to upstream qemu. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* stubdom: add support for reading the command line from the configKeir Fraser2008-03-181-34/+40
| | | | | | file, and merge the dmargs with it in the case of qemu. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* Add stubdomain support. See stubdom/README for usage details.Keir Fraser2008-02-121-0/+167
- 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>