diff options
author | Amaan Cheval <amaan.cheval@gmail.com> | 2018-08-13 16:20:38 +0530 |
---|---|---|
committer | Joel Sherrill <joel@rtems.org> | 2018-08-13 10:48:20 -0500 |
commit | 686932125dd249a237bcb6d2f0ddb9f2ff1ce1b3 (patch) | |
tree | a83e550123771683c0bb6a77496abfe10729b36c /cpukit/score/cpu/x86_64/x86_64-context-initialize.c | |
parent | bsps/x86_64: Add paging support with 1GiB super pages (diff) | |
download | rtems-686932125dd249a237bcb6d2f0ddb9f2ff1ce1b3.tar.bz2 |
bsps/x86_64: Add support for RTEMS interrupts
Updates #2898.
Diffstat (limited to 'cpukit/score/cpu/x86_64/x86_64-context-initialize.c')
-rw-r--r-- | cpukit/score/cpu/x86_64/x86_64-context-initialize.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/cpukit/score/cpu/x86_64/x86_64-context-initialize.c b/cpukit/score/cpu/x86_64/x86_64-context-initialize.c index 2324d16990..35e7d7cb60 100644 --- a/cpukit/score/cpu/x86_64/x86_64-context-initialize.c +++ b/cpukit/score/cpu/x86_64/x86_64-context-initialize.c @@ -76,11 +76,14 @@ void _CPU_Context_Initialize( (void) is_fp; // XXX: Should be used in the future - (void) new_level; (void) tls_area; - // XXX: Leaving interrupts off regardless of `new_level` for now - the_context->rflags = CPU_EFLAGS_INTERRUPTS_OFF; + if ( new_level ) { + the_context->rflags = CPU_EFLAGS_INTERRUPTS_OFF; + } + else { + the_context->rflags = CPU_EFLAGS_INTERRUPTS_ON; + } _stack = ((uintptr_t) stack_area_begin) + stack_area_size; _stack &= ~(CPU_STACK_ALIGNMENT - 1); |