From 9af9dcc02cc54151e97bb7d3a68fbfa9d0c9e72e Mon Sep 17 00:00:00 2001 From: Reto Buerki Date: Fri, 27 Feb 2015 11:53:20 +0100 Subject: [PATCH] hw_x86_64: Reserve space for interrupt stack in mtc region The interrupt stack must reside in the mtc region in order to use it for non-core threads. The size of the stack is set to 56 bytes in order to hold the interrupt stack frame plus the additional vector number that is pushed onto the stack by the ISR. --- repos/base-hw/src/core/spec/x86_64/mode_transition.s | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/repos/base-hw/src/core/spec/x86_64/mode_transition.s b/repos/base-hw/src/core/spec/x86_64/mode_transition.s index 8f4ad81a0..db3634296 100644 --- a/repos/base-hw/src/core/spec/x86_64/mode_transition.s +++ b/repos/base-hw/src/core/spec/x86_64/mode_transition.s @@ -303,6 +303,17 @@ .global _mt_gdt_end _mt_gdt_end: + /************************************************ + ** Temporary interrupt stack ** + ** Set as RSP for privilege levels 0-2 in TSS ** + ** See Intel SDM Vol. 3A, section 7.7 ** + ************************************************/ + + .p2align 8 + .space 7 * 8 + .global _mt_kernel_interrupt_stack + _mt_kernel_interrupt_stack: + /* end of the mode transition code */ .global _mt_end _mt_end: