Commit Graph
36 Commits
Author SHA1 Message Date
Ian Campbell 26f91ef506 minios: do not export {test,set,clear}_bit etc to applications
Fixes ioemu stubdom build:
CC    i386-stubdom/piix4acpi.o
[...]/stubdom/ioemu/hw/piix4acpi.c:272: error: expected ')' before '?' token
[...]/stubdom/ioemu/hw/piix4acpi.c:277: error: conflicting types for 'set_bit'
[...]/stubdom/../extras/mini-os/include/x86/mini-os/os.h:396: error: previous definition of 'set_bit' was here
[...]/stubdom/ioemu/hw/piix4acpi.c:282: error: conflicting types for 'clear_bit'
[...]/stubdom/../extras/mini-os/include/x86/mini-os/os.h:414: error: previous definition of 'clear_bit' was here
[...]/stubdom/ioemu/hw/piix4acpi.c: In function 'gpe_sts_write':

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-02-07 12:13:24 +00:00
Keir Fraser 6127bd73bd minios: implement xc_map_foreign_bulk
In order to do so it modifies map_frames_ex and do_map_frames to take
an int *err as parameter and return any error that way.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-01-18 14:48:18 +00:00
Keir Fraser 0df54d9807 minios: switch to C99 integer types
This is a necessary step to make minios build on NetBSD.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-07-15 09:09:48 +01:00
Keir Fraser b8fb8d5f77 minios: allow to allocate machine contiguous pages
This is a port of XenLinux xen_alloc_contig_memory() to mini-os. A
sufficiently privileged mini-os guest can exchange a small number of
its pages with machine contiguous pages.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@netronome.com>
2009-03-13 07:37:24 +00:00
Keir Fraser 6976b9a7c2 minios: add ioremap/iounmap
Add ioremap and iounmap functions to minios. Also move some unmapping
code from and clean up mem_test.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@netronome.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2009-03-02 10:50:59 +00:00
Keir Fraser 9a744273ce mini-os: adding some missing posix function declarations
Adding some missing posix function declarations, to get rid of some
qemu-remote compile time warnings.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2008-09-17 13:10:36 +01:00
Keir Fraser 16519cc5e8 mini-os: add stack walking debug
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-18 14:09:14 +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 ce5c899f22 stubdom: use host's gcc
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>
2008-07-04 17:47:11 +01:00
Keir Fraser a2c7db64f5 Add PV-GRUB
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>
2008-06-18 09:36:47 +01:00
Keir Fraser ba65563c1b minios: Fix >4GB machine addresses
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-10 16:59:24 +01:00
Keir Fraser c68ffdc4fa minios: add proper shutdown facilities
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-09 13:26:30 +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 84d54d5d8b i386: Remove non-PAE hypervisor build target.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-08 14:32:11 +01:00
Keir Fraser 796b445b00 minios: call do_hypervisor_callback directly from force_evtchn_callback
instead of unnecessarily going through the hypervisor.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-04-16 10:06:19 +01: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 c69b2fa1c4 minios: permit blkfront to write from mapped memory
by adding a virtual_to_mfn macro

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-01-22 14:20:37 +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 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 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 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 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 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
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 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 1d57fa7227 [MINIOS] Switched to new interface for HYPERVISOR_sched_op().
Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
2006-11-27 10:23:19 +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 4fa75a7c3b [MINIOS] Refactor spinlock header for multi-arch support.
I separated the spinlock parts special to the x86 architecture and
moved these to include/x86/arch_spinlock.h. The common code is now in
include/spinlock.h.

Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
2006-11-17 09:18:28 +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
kfraser@localhost.localdomain 7d58e87410 [MINIOS] Move initialisation of events (masking event channels)
earlier during the boot process. Otherwise 64bit guests would
sometimes crash.

Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
2006-11-17 09:16:27 +00:00
kfraser@localhost.localdomain ff4b9c2134 [MINIOS] Added a new file arc/x86/setup.c and moved some x86 specific
initialization stuff from kernel.c there. Two new functions are added
to handle this.

Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
2006-09-23 14:00:38 +01:00
kaf24@firebug.cl.cam.ac.uk d1423b2882 [MINIOS] Fix to use new event-channel API properly.
Signed-off-by: Mark Williamson <mark.williamson@cl.cam.ac.uk>
2006-09-15 11:07:25 +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