aboutsummaryrefslogtreecommitdiffstats
path: root/extras/mini-os/arch
Commit message (Collapse)AuthorAgeFilesLines
* minios: allow to allocate machine contiguous pagesKeir Fraser2009-03-132-0/+148
| | | | | | | | 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>
* minios: Fix 18874 memory clippingKeir Fraser2009-03-091-5/+8
| | | | | | | Fix 18874's memory clipping: there are three page-sized holes between direct mapping, demand mapping, heap pages and the end of memory. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* minios: general cleanup of mm.cKeir Fraser2009-03-022-205/+292
| | | | | | | | Major clean up of mm.c. Added comments, fixed coding style, more sensible variable names, mark some local functions static etc. Signed-off-by: Rolf Neugebauer <rolf.neugebauer@netronome.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* minios: add ioremap/iounmapKeir Fraser2009-03-023-11/+204
| | | | | | | | 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>
* minios: fix p2m on x86Keir Fraser2009-02-091-0/+6
| | | | | | 15675:bf85b467ee89 Fixed p2m on x86_64, but instead broke it on x86. Signed-off-by: Samuel Thibault <samuel.thibaut@ens-lyon.org>
* minios: Clip memory not usable by Mini-OS (above 1GB)Keir Fraser2008-12-051-3/+10
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* [IA64] Remove the useless big endian stuff.dietmar.hahn@fujitsu-siemens.com2008-11-1811-270/+73
| | | | | | | | | | | | | This patch removes all the useless big endian stuff from the mini-os. Before there was an effort to support big endian for PV-guest. But the big endian support was never gotten into the common parts of the mini-os so it makes no sense to have this only in the ia64 specific sources. And as there is no open source big endian os and porting our BS2000 os to ia64 was stopped, nobody wants that stuff in the common minos. So this looks ugly then and remove the big endian stuff. Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
* [IA64] minios: Fix ctor and dtor sections.dietmar.hahn@fujitsu-siemens.com2008-11-171-2/+4
| | | | Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
* [IA64] minios: Clean up the hypervisor interfacedietmar.hahn@fujitsu-siemens.com2008-11-171-0/+125
| | | | | | move all hypervisor calls to xencomm Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
* mini-os: export allocate_ondemandKeir Fraser2008-07-182-6/+20
| | | | | | | allocate_ondemand can be used to allocate addresse space. Primarily used for mapping MFNs, it can also be used e.g. to map grant refs. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* mini-os: add stack walking debugKeir Fraser2008-07-182-11/+75
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* stubdom: fixes for old gcc & binutilsKeir Fraser2008-07-113-9/+9
| | | | 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>
* minios: do not systematically free the page under shared info, as theKeir Fraser2008-06-201-8/+3
| | | | | | guest booted by PV-GRUB will need it. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* Add PV-GRUBKeir Fraser2008-06-181-1/+1
| | | | | | | | | | | 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-172-8/+9
| | | | | | | 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>
* minios can cope with >4G CR3 since it never uses itKeir Fraser2008-06-121-1/+1
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: Fix >4GB machine addressesKeir Fraser2008-06-101-4/+4
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: add proper shutdown facilitiesKeir Fraser2008-06-095-1/+34
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: We do not need to pin the page tables, as they implicitly getKeir Fraser2008-05-271-15/+2
| | | | | | pinned when we point the permanent page directory to them. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* stubdom: fix constructors/destructors in 64bit modeKeir Fraser2008-05-232-8/+8
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* stubdom: complete libxc supportKeir Fraser2008-05-231-0/+8
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* stubdom: support constructors and destructorsKeir Fraser2008-05-223-2/+51
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* i386: Remove non-PAE hypervisor build target.Keir Fraser2008-05-085-29/+2
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* minios: fix and enforce block_domain atomicityKeir Fraser2008-05-081-0/+2
| | | | | | | | | To ensure that the timer event is not lost, block_domain requires that event delivery is disabled. SCHEDOP_block re-enables them, so for coherency (and fixing a bug actually), we should re-disable them after. Also, make sure that the caller disabled them. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* stubdom: sparse application's BSS by linking it separately first, putKeir Fraser2008-04-164-7/+7
| | | | | | | 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>
* minios: Fix lost eventsKeir Fraser2008-03-182-5/+8
| | | | | | | | | | | | | | | evtchn_bind_interdomain used to clear any already pending event before binding a handler, because else the handler may be called before it is ready. That however leads to missed events, which I had to workaround for the HVM case. This changes the semantics of bind_evtchn, and thus of all the event channel binding functions (bind_virq, evtchn_alloc_unbound, evtchn_bind_interdomain) into not unmasking the event itself, hence letting the caller initialize properly before unmasking the port (e.g. record the port number in an appropriate place). Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* Add stubdomain support. See stubdom/README for usage details.Keir Fraser2008-02-1210-12/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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 ia64 build.Keir Fraser2008-01-282-0/+125
| | | | Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.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: POSIX fixesKeir Fraser2008-01-221-2/+2
| | | | | | 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: make time interface POSIXKeir Fraser2008-01-212-18/+21
| | | | | | | timespec uses tv_sec and tv_nsec too. gettimeofday takes a tz argument. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: support COW for a zero pageKeir Fraser2008-01-182-1/+49
| | | | | 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-182-22/+49
| | | | | | | | 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-183-4/+89
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* minios: make stack size configurableKeir Fraser2008-01-175-13/+15
| | | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com> Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
* 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] 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 bind_virq return the portKeir Fraser2007-11-231-1/+1
| | | | | | | 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>
* [Mini-OS] Fix x86 arch_switch_threadKeir Fraser2007-11-232-0/+38
| | | | | | | | | 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>
* [Mini-OS] Fix stack closuresKeir Fraser2007-11-232-0/+5
| | | | | | | | 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>
* [Mini-OS] Fix x86 initial stack alignmentKeir Fraser2007-11-233-4/+6
| | | | | | | | | 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>
* minios: Remove unnecessary padding and unused sections from x86/64Keir Fraser2007-09-251-9/+0
| | | | | linker script. Signed-off-by: Keir Fraser <keir@xensource.com>
* merge with xen-unstable.hgAlex Williamson2007-08-122-3/+6
|\
| * [MINIOS] fix x86_64 p2m map and CFLAGSTim Deegan2007-08-022-3/+6
| | | | | | | | Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* | [IA64][MINIOS] PKR supportAlex Williamson2007-07-303-5/+34
|/ | | | | | | | - adds optimization feature for region 7 identity mapping - adds protection keys to region 5 and region 7 addresses, may be used for testing the hypervisor protection key support Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
* [MINIOS][IA64] mini-os without linux-optimization in hypervisorAlex Williamson2007-06-262-21/+31
| | | | | | | Make mini-os runnable again without the special linux optimization for the identity mapping in the hypervisor. Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
* merge with xen-unstable.hgawilliam@xenbuild2.aw2007-03-201-2/+2
|\