aboutsummaryrefslogtreecommitdiffstats
path: root/extras/mini-os/arch
Commit message (Collapse)AuthorAgeFilesLines
* mini-os/x86-64 entry: check against nested events and try to fix upXu Zhang2013-04-221-14/+73
| | | | | | | | | | In hypervisor_callback, check against event re-entrant. If we came from the critical region in interrupt context, try to fix up by coalescing the two stack frames. The execution is resumed as if the second event never happened. Signed-off-by: Xu Zhang <xzhang@cs.uic.edu> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* mini-os/x86-64 entry: defer RESTORE_REST until returnXu Zhang2013-04-221-8/+8
| | | | | | | | | | No need to do a RESTORE_REST at this point because if we saw pending events after we enabled event delivery, we have to do a SAVE_REST again. Instead, we do a "lazy" RESTORE_REST, deferring it until actual return. The offset of saved-on-stack rflags register is changed as well. Signed-off-by: Xu Zhang <xzhang@cs.uic.edu> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* mini-os/x86-64 entry: remove unnecessary event blockingXu Zhang2013-04-221-1/+0
| | | | | | | | | | | | We don't need to block events here because: - if we came from "hypervisor_callback", events are disabled at this point, no need to block again; - if we came from "error_entry", we shouldn't touch event mask, for exception hanlding are meant to be interrupted by Xen events (virtual irq). Signed-off-by: Xu Zhang <xzhang@cs.uic.edu> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* mini-os/x86-64 entry: code refactoring; no functional changesXu Zhang2013-04-221-56/+57
| | | | | | | | | Re-arrange assembly code blocks so that they are in called order instead of jumping around, enhancing readability. Macros are grouped together as well. Signed-off-by: Xu Zhang <xzhang@cs.uic.edu> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* mini-os/x86-64 entry: define macros for registers partial save and restoreXu Zhang2013-04-221-15/+22
| | | | | | | | | | No functional changes. For saving and restoring registers rbx, rbp, and r12-r15, define and use macros SAVE_REST and RESTORE_REST respectively. Signed-off-by: Xu Zhang <xzhang@cs.uic.edu> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* mini-os/x86-64 entry: code clean-ups; no functional changesXu Zhang2013-04-221-30/+31
| | | | | | | Make use of tabs and spaces consistent in arch/x86/x86_64.S Signed-off-by: Xu Zhang <xzhang@cs.uic.edu> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* minios: setup fpu and sse in mini-osMatthew Fioravante2012-10-081-0/+20
| | | | | | | | | | This patch adds floating point and sse support to mini-os by initializing the floating point unit and the see unit during domain boot up. 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>
* minios: Disable the mfn_is_ram() check, it doesn't work correctly on all systemsMatthew Fioravante2012-10-082-29/+0
| | | | | | | | | This patch disables the mfn_is_ram check in mini-os. The current check is insufficient and fails on some systems with larger than 4gb memory. 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>
* minios: Add ioread/iowrite functions to mini-osMatthew Fioravante2012-10-081-0/+35
| | | | | | | | | | | This patch adds iowritexx() and ioreadxx() functions for interacting with hardware memory to mini-os. The functions are available in a header iorw.h Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Acked-by: Samuel Thibault <samuel.thibault@ens-lyons.org> Reviewed-by: George Dunlap <george.dunlap@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools: drop ia64 supportIan Campbell2012-09-1219-4057/+0
| | | | | | | | | | | | | | | | | Removed support from libxc and mini-os. This also took me under xen/include/public via various symlinks. Dropped tools/debugger/xenitp entirely, it was described upon commit as: "Xenitp is a low-level debugger for ia64" and doesn't appear to be linked into the build anywhere. 99 files changed, 14 insertions(+), 32361 deletions(-) Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* mini-os: work around ld bug causing stupid CTOR countJeremy Fitzhardinge2011-08-193-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* build: Make XEN_ROOT an absolute path.Keir Fraser2011-03-172-2/+2
| | | | | | | | 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>
* stubdom/minios: don't retrieve the address of void variableGianni Tedesco2011-01-111-1/+1
| | | | | | | | | Objects must not be declared to have type void. Declare shared_info to have the appropriate type instead. Author: Ganni Tedesco <gianni.tedesco@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* minios: implement xc_map_foreign_bulkKeir Fraser2010-01-183-15/+16
| | | | | | | 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>
* stubdom/minios: re-structure headersKeir Fraser2009-10-0120-98/+98
| | | | | | | | | As part of making stubdom usable on NetBSD, it is necessary to restructure the minios headers to avoid conflicts with NetBSD's crossbuild toolchain. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* minios: switch to C99 integer typesKeir Fraser2009-07-153-18/+18
| | | | | | This is a necessary step to make minios build on NetBSD. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* minios: Clean up and remove Linux remnants from x86_64.SKeir Fraser2009-06-031-111/+20
| | | | Sigend-off-by: Keir Fraser <keir.fraser@citrix.com>
* minios: Remove Linux attribution for mktime() as it's not true since c/s 19638.Keir Fraser2009-06-011-1/+0
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* minios: replace mktime implementationKeir Fraser2009-05-261-42/+54
| | | | | | | | | | In the efforts to clarify MiniOS license it came to my attention that few portions of MiniOS were taken from other GPL projects, one of them is the mktime implementation. This patch replaces the current GPL licensed mktime implementation with a different and BSD licensed version. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* 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>