arch/x86: (Intel64) define TSS in C, not assembly
Declare the 64-bit TSS as a struct, and define the instance in C. Add a data segment selector that overlaps the TSS and keep that loaded in GS so we can access the TSS via a segment-override prefix. Signed-off-by: Charles E. Youse <charles.youse@intel.com>
This commit is contained in:
parent
a1afde043c
commit
e4d5ab363c
7 changed files with 84 additions and 30 deletions
18
arch/x86/core/intel64/tss.c
Normal file
18
arch/x86/core/intel64/tss.c
Normal file
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* Copyright (c) 2019 Intel Corporation
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <kernel.h>
|
||||
#include <kernel_arch_data.h>
|
||||
#include <kernel_arch_func.h>
|
||||
|
||||
extern u8_t _exception_stack[];
|
||||
|
||||
Z_GENERIC_SECTION(.tss)
|
||||
struct x86_tss64 tss0 = {
|
||||
.ist1 = (u64_t) _interrupt_stack + CONFIG_ISR_STACK_SIZE,
|
||||
.ist7 = (u64_t) _exception_stack + CONFIG_EXCEPTION_STACK_SIZE,
|
||||
|
||||
.iomapb = 0xFFFF /* no I/O access bitmap */
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue