arch/x86: (Intel64) use TSS for per-CPU variables
A space is allocated in the TSS for per-CPU variables. At present, this is only a 'struct _cpu *' to find the _kernel CPU struct. The locore routines are rewritten to find _current and _nested via this pointer rather than referencing the _kernel global directly. This is obviously in preparation for SMP support. Signed-off-by: Charles E. Youse <charles.youse@intel.com>
This commit is contained in:
parent
1d8c80bc05
commit
32fc239aa2
4 changed files with 21 additions and 11 deletions
|
@ -6,6 +6,7 @@
|
|||
#include <kernel.h>
|
||||
#include <kernel_arch_data.h>
|
||||
#include <kernel_arch_func.h>
|
||||
#include <kernel_structs.h>
|
||||
|
||||
extern u8_t _exception_stack[];
|
||||
|
||||
|
@ -13,6 +14,7 @@ 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 */
|
||||
|
||||
.iomapb = 0xFFFF /* no I/O access bitmap */
|
||||
.cpu = &(_kernel.cpus[0])
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue