2019-09-20 11:26:44 -04:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2019 Intel Corporation
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <kernel.h>
|
|
|
|
#include <kernel_arch_data.h>
|
|
|
|
#include <kernel_arch_func.h>
|
2019-09-23 12:47:47 -04:00
|
|
|
#include <kernel_structs.h>
|
2019-09-28 20:52:07 -04:00
|
|
|
#include <arch/x86/multiboot.h>
|
|
|
|
|
2019-09-28 21:26:00 -04:00
|
|
|
extern FUNC_NORETURN void z_x86_prep_c(int, struct multiboot_info *);
|
2019-09-20 11:26:44 -04:00
|
|
|
|
|
|
|
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,
|
2019-09-23 12:47:47 -04:00
|
|
|
.iomapb = 0xFFFF, /* no I/O access bitmap */
|
|
|
|
.cpu = &(_kernel.cpus[0])
|
2019-09-20 11:26:44 -04:00
|
|
|
};
|
2019-09-28 20:52:07 -04:00
|
|
|
|
|
|
|
struct x86_cpuboot x86_cpuboot[] = {
|
|
|
|
{
|
|
|
|
.tr = X86_KERNEL_CPU0_TR,
|
|
|
|
.gs = X86_KERNEL_CPU0_GS,
|
|
|
|
.sp = (u64_t) _interrupt_stack + CONFIG_ISR_STACK_SIZE,
|
|
|
|
.fn = z_x86_prep_c
|
|
|
|
}
|
|
|
|
};
|