aboutsummaryrefslogtreecommitdiffstats
path: root/extras/mini-os/arch/x86/x86_64.S
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>
* stubdom/minios: re-structure headersKeir Fraser2009-10-011-2/+2
| | | | | | | | | 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: Clean up and remove Linux remnants from x86_64.SKeir Fraser2009-06-031-111/+20
| | | | Sigend-off-by: Keir Fraser <keir.fraser@citrix.com>
* Add stubdomain support. See stubdom/README for usage details.Keir Fraser2008-02-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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: make stack size configurableKeir Fraser2008-01-171-2/+3
| | | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com> Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
* [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] Fix x86 arch_switch_threadKeir Fraser2007-11-231-0/+20
| | | | | | | | | 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-231-0/+2
| | | | | | | | 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-231-1/+2
| | | | | | | | | 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] New make structure to support different architectures.kfraser@localhost.localdomain2007-01-171-0/+385
Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>