Commit Graph
53 Commits
Author SHA1 Message Date
David Vrabel 122b798641 mini-os: build fixes for lwip 1.3.2
Various fixes to mini-os needed to build lwip 1.3.2:

- Don't build the tests.
- Add BSD-style endianness macros to endian.h.
- free() is called via a function pointer so it needs to be a real
  function.  Do the same for malloc() and realloc().

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Committed-by: Keir Fraser <keir@xen.org>
2013-01-30 02:38:37 -08:00
Matthew Fioravante e1a53273fc minios: add tpmfront, tpm_tis, and tpmback drivers
This patch adds 3 new drivers to mini-os.

tpmfront - paravirtualized tpm frontend driver
tpmback - paravirtualized tpm backend driver
tpm_tis - hardware tpm driver

Unfortunately these drivers were derived from GPL
licensed linux kernel drivers so they must carry
the GPL license. However, since mini-os now
supports conditional compilation, hopefully these
drivers can be included into the xen tree and
conditionally removed from non-gpl projects.
By default they are disabled in the makefile.

Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
2012-11-13 10:46:58 +00:00
Matthew Fioravante 6c05d819d8 minios: add CONFIG_XC conditional
This patch adds a CONFIG_XC option to mini-os, to allow conditional
support for libxc for mini-os domains.

Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyons.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
2012-10-08 14:36:31 +01:00
Daniel De Graaf c43afaf220 stubdom: enable xenstored build
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>
2012-02-09 18:33:35 +00:00
Daniel De Graaf 434a41d817 mini-os: make frontends and xenbus optional
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>
2012-02-09 18:33:32 +00:00
Daniel De Graaf 8111e0c595 mini-os: Move test functions into test.c
While useful, these test functions should not be compiled into every
mini-os instance that we compile.

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>
2012-02-09 18:33:31 +00:00
Daniel De Graaf 684315da98 mini-os: create app-specific configuration
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>
2012-02-09 18:33:31 +00:00
Ian Campbell 1a4af67d32 mini-os: use BSD sys/queue.h instead of Linux list.h
The latter is GPL which makes the whole of mini-os GPL rather than BSD
as intended. In tree users are all GPL or GPL-compatible but we should
fix this so that mini-os is BSD. Do so by using the same BSD
sys/queue.h as we use in libxl.

Tested with the builtin mini-os test app and qemu stubdomain, both of which
appear to still function as expected.

Move tools/libxl/external and the associated sed script to
tools/include/xen-external to allow more sensible access from mini-os.

Also add s/NULL/0/ in the sed script due to NULL not always being
defined in stubdom code when mini-os/wait.h is included.

As well as the obvious ABI changes there are a few API updates
associated with the change:

  - struct rw_semaphore.wait_list is unused
  - remove_waiter needs to take the wait_queue_head

The latter requires a qemu update, so there is also a QEMU_TAG
update in this changeset.

I sprinkled some extra-emacs local variables around the files I edited
which didn't have them.

I think this should be backported to the stable branches since
external users of mini-os may have been mislead into thinking they
could safely link mini-os against GPL-incompatible code.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
2012-01-31 16:06:14 +00:00
Keir Fraser 547cb1849c build: Make XEN_ROOT an absolute path.
Otherwise make can search the path relative to certain standard paths
such as /usr/include (e.g., the line '-include $(XEN_ROOT)/.config' in
Config.mk suffers from this).

Signed-off-by: Keir Fraser <keir@xen.org>
2011-03-17 10:36:25 +00:00
Keir Fraser cea7a6cd7b Fix mini-os ia64 compilation
- Avoid nested function to avoid a trampoline.
- Do not link mini-os_app.o when it is empty.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2008-12-18 11:27:37 +00:00
Keir Fraser 006e7188d4 pv-grub: On x86_64, also build an x86_32 pv-grub
This requires suffixing obj directories and having grub compiled
outside sources.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-14 13:46:48 +01:00
Keir Fraser 8f96998338 stubdom: fixes to compile with qemu-xen
This adds fixes to the stub domain build into compiling Ian Jackson's
qemu-xen.  The most notable change is that mini-os headers now
#include each other through a mini-os/ prefix, so that we can turn all
-I into -isystem and still be sure that we include Mini-OS headers
(and not qemu's console.h or blktaplib's list.h for instance...).

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-10 14:15:46 +01:00
Keir Fraser dbd56b5c30 minios,stubdom: Add OBJ_DIR parameter to compile outside sources,
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>
2008-06-17 09:36:25 +01:00
Keir Fraser f9b4231a67 stubdom: make the build more generic by moving as many stubdom parts
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>
2008-05-28 09:30:48 +01:00
Keir Fraser 8543c562dd stubdom: complete libxc support
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-23 09:35:23 +01:00
Keir Fraser 28baa78877 stubdom: sparse application's BSS by linking it separately first, put
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>
2008-04-16 10:05:57 +01:00
Keir Fraser 98c2b2bd1e stubdom: add C example target
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-03-19 16:21:39 +00:00
Keir Fraser 0243b256d6 Add stubdomain support. See stubdom/README for usage details.
- 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>
2008-02-12 14:35:39 +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 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 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
Tim Deegan 5c0ffac838 [MINIOS] fix x86_64 p2m map and CFLAGS
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-08-02 09:02:08 +01:00
kfraser@localhost.localdomain 84e23d3ec9 Fix PAE Mini-OS build.
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
2007-03-01 12:23:04 +00:00
kfraser@localhost.localdomain a5333b24d5 minios: build system cleanups.
- Added ARCH_LDFLAGS for architecture specific LDFLAGS
- Fixed build dependencies after changing makerule files
- Fixed ARCH_CFLAGS for 64bit guest, added ARCH_ASFLAGS
- Couple of variable renames

Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
2007-02-15 14:18:21 +00:00
kfraser@localhost.localdomain a352d8d69f [MINIOS] Added domctl and sysctl hypercalls to the
architecture-specific header files. Also increased the
__XEN_INTERFACE_VERSION__ to 0x00030205.

Signed-off-by: Derek Murray <Derek.Murray@cl.cam.ac.uk>
2007-01-19 12:11:52 +00:00
kfraser@localhost.localdomain f515c2cf95 [MINIOS] New make structure to support different architectures.
Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
2007-01-17 15:09:50 +00:00
kaf24@firebug.cl.cam.ac.uk f28756a627 [MINIOS] Clean up final link stage of the build.
Allow extra application objects to be linked against a partial link of
minios with non-global names localised. For now we assume that global
names ill be assigned a xenos_ prefix in due course. We may decide to
choose a different prefix.

Those who wish to finish the link from an external Makefile can link
their own objects against mini-os.o (which must be first in link
order!) and specify the appropriate architecture linker script.

Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-15 12:25:04 +00:00
kfraser@localhost.localdomain b58029254d [MINIOS] Update __XEN_INTERFACE_VERSION__
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-12 15:27:09 +00:00
kfraser@localhost.localdomain 531616bf98 [MINIOS] Refactored mm.c and sched.c. x86 arch specific code got moved to
arch/x86/mm.c and arch/x86/sched.c. Header files were also refactored:
arch specific code got moved to include/x86/arch_mm.h and
include/x86/sched_mm.h.

Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
2006-11-22 10:11:36 +00:00
kfraser@localhost.localdomain 5d3a4a3858 [MINIOS] Event channel hypercall update for 64-bit guests.
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
2006-11-17 09:16:51 +00:00
Anil Madhavapeddy 80cc11a16f [MINIOS] Declare a __XEN_INTERFACE_VERSION__ to fix the build 2006-08-31 12:07:46 +01:00
kfraser@localhost.localdomain 6b11879d81 [MINIOS] A first step to re-architecture mini-os for a port to ia64.
Create architecture specific directories below mini-os for sources
and below mini-os/include for headers.

Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
2006-08-10 10:43:20 +01:00
kfraser@dhcp93.uk.xensource.com 3f2522e1ac Use a global build configuration file, and rework libxc Makefile for PPC.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
2006-05-31 11:31:52 +01:00
kaf24@firebug.cl.cam.ac.uk 165bf6f0bd [MINIOS] Allows the use of a C library without modifying Mini-OS source files.
From: John Ramsdell
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-05-26 13:23:18 +01:00
kaf24@firebug.cl.cam.ac.uk 0306a3dcf8 [MINIOS] PAE support.
Signed-off-by: Aravindh Puthiyaparambil <aravindh.puthiyaparambil@unisys.com>
2006-05-19 16:52:52 +01:00
kaf24@firebug.cl.cam.ac.uk 395112e684 Allow linking of mini-os with application-specific object code.
From: Jacob Gorm Hansen
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-05-15 16:32:09 +01:00
kaf24@firebug.cl.cam.ac.uk f5ca520dc4 Fix fault handler for both 32 and 64 bit architecture. Clean up unused code.
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
Signed-off-by: Aravindh Puthiyaparambil 
<aravindh.puthiyaparambil@unisys.com>
2006-05-04 11:19:27 +01:00
kaf24@firebug.cl.cam.ac.uk b5fa90ac8e build: Clean up use of .PHONY
* Move .PHONY directives next to targets,
  this makes them a lot harder to miss
* Add missing .PHONY directives
* Remove nonexistent .PHONY directives
* Hopefully I didn'T miss anything...

Signed-Off-By: Horms <horms@verge.net.au>
2006-04-10 17:02:49 +01:00
kaf24@firebug.cl.cam.ac.uk c7b965a01c Fix mini-os xenbus.
From: Grzegorz Milos <gm281@cam.ac.uk>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-24 10:47:48 +01:00
kaf24@firebug.cl.cam.ac.uk a54b2baac2 Implement console for Mini-os and also fix 2 bugs:
a) in initialising new page table frames
b) in initialising idle thread.

Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
2006-03-15 20:25:50 +01:00
kaf24@firebug.cl.cam.ac.uk 44fb8b7296 64 bit pagetable builder added to mm.c
Signed-off-by: Aravindh Puthiyaparambil 
<aravindh.puthiyaparambil@unisys.com>
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
2006-03-09 15:57:32 +01:00
kaf24@firebug.cl.cam.ac.uk cdb8b09f6b Xenbus implementation ported from Linux to Mini-os, simple thread support introduced
to simplify the porting. 64 bit version of Mini-os now compiles, but does not work
because of the pagetables and some bits of scheduler not being written.

Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
2005-09-09 09:24:25 +00:00
kaf24@firebug.cl.cam.ac.uk b7d34829a3 Mini-os updates from Grzegorz Milos. 2005-07-06 10:46:29 +00:00
kaf24@scramble.cl.cam.ac.uk ec0f4bdc22 bitkeeper revision 1.1177.1.1 (420c983eSjbjDYGF-fYWrXw_L7qkLA)
Mini-OS cleanups. Bug fixes in x86_64 assembly code.
Signed-off-by: keir.fraser@cl.cam.ac.uk
2005-02-11 11:34:22 +00:00
kaf24@freefall.cl.cam.ac.uk 908871cf62 bitkeeper revision 1.1159.142.4 (4184b6d4rc3Jd2irJimPyupm4TO06A)
Rename Xen public interfaces.
 1. hypervisor-if.h is now xen.h
 2. hypervisor-ifs/ directory is now:
     <include/public/...> in Xen
     <asm/xen-public/...> in Linux
     <xen/...> in user space
2004-10-31 09:56:36 +00:00
kaf24@scramble.cl.cam.ac.uk 3072fef54d bitkeeper revision 1.825.3.18 (406aeeb6EYYfLTekemoWDRaWO8SuEQ)
highmem.c, highmem.h:
  new file
Many files:
  New bootstrap layout for DOM0 and for all Linux domains. Xenolinux now support CONFIG_HIGHMEM for up to 4GB allocated to a Xenolinux domain.
.del-highmem.h~c3cf3f6856a90f6:
  Delete: xenolinux-2.4.25-sparse/include/asm-xen/highmem.h
elf.h:
  Rename: xen/include/asm-i386/elf.h -> xen/include/xen/elf.h
.del-elf.h~57347596c85127ef:
  Delete: xen/include/asm-x86_64/elf.h
2004-03-31 16:15:50 +00:00
kaf24@scramble.cl.cam.ac.uk e4a5ef641c bitkeeper revision 1.822 (40600a0a9K2f7dR0Ky2OCGfBDHTTmQ)
Many files:
  xeno -> xen renames.
2004-03-23 09:57:30 +00:00
kaf24@scramble.cl.cam.ac.uk a2a4fd60d0 bitkeeper revision 1.695 (4017ff70oJV8517inpGbN1CixN6csw)
Many files:
  Clean up compile warnings. Added stricter gcc options for Xen build.
2004-01-28 18:29:04 +00:00
kaf24@scramble.cl.cam.ac.uk b88b24c645 bitkeeper revision 1.694 (40133166fMqipwBHlUP1QVHEO6EEOg)
Many files:
  From Kip Macy, we now are stricter when compiling the mini os.
2004-01-25 03:00:54 +00:00
kaf24@scramble.cl.cam.ac.uk d47201cc4f bitkeeper revision 1.520 (3f8d13d8qVVqxcYD--4cXYs5egqNyg)
Many files:
  Fix the minos license so that it is usable for XP and BSD ports.
minios.lds:
  Rename: extras/mini-os/vmlinux.lds -> extras/mini-os/minios.lds
.del-list.h~d612a8726e8d42e:
  Delete: extras/mini-os/h/list.h
.del-COPYING~1f9753354580bd13:
  Delete: extras/mini-os/COPYING
2003-10-15 09:31:04 +00:00