diff --git a/cokernel/smp/x86_64/bootparam.h b/cokernel/smp/x86_64/bootparam.h index b5ac3209..d0568c25 100644 --- a/cokernel/smp/x86_64/bootparam.h +++ b/cokernel/smp/x86_64/bootparam.h @@ -113,6 +113,7 @@ struct smp_boot_param { unsigned long multi_intr_mode_addr; unsigned long mckernel_do_futex; unsigned long linux_kernel_pgt_phys; + unsigned long page_offset_base; unsigned long dma_address; unsigned long ident_table; diff --git a/cokernel/smp/x86_64/setup.c b/cokernel/smp/x86_64/setup.c index 0b2ef11b..a9125768 100644 --- a/cokernel/smp/x86_64/setup.c +++ b/cokernel/smp/x86_64/setup.c @@ -26,6 +26,7 @@ extern void init_boot_processor_local(void); extern struct ihk_kmsg_buf *kmsg_buf; extern int no_turbo; +unsigned long linux_page_offset_base; unsigned long x86_kernel_phys_base; unsigned long ap_trampoline = 0; unsigned int ihk_ikc_irq = 0; @@ -49,6 +50,7 @@ void arch_start(unsigned long param_addr, unsigned long phys_address, ihk_ikc_irq = boot_param->ihk_ikc_irq; bootstrap_mem_end = boot_param->bootstrap_mem_end; boot_param_size = boot_param->param_size; + linux_page_offset_base = boot_param->page_offset_base; /* Set up initial (temporary) stack */ asm volatile("movq %0, %%rsp" : : "r" (stack + sizeof(stack))); diff --git a/linux/driver/smp/arch/x86_64/smp-arch-driver.c b/linux/driver/smp/arch/x86_64/smp-arch-driver.c index 35bdd5a1..6317f0d6 100644 --- a/linux/driver/smp/arch/x86_64/smp-arch-driver.c +++ b/linux/driver/smp/arch/x86_64/smp-arch-driver.c @@ -418,6 +418,7 @@ void smp_ihk_setup_trampoline(void *priv) os->param->ihk_ikc_irq = ihk_smp_irq; #endif // IHK_IKC_USE_LINUX_WORK_IRQ + os->param->page_offset_base = page_offset_base; os->param->linux_kernel_pgt_phys = __pa(&_init_level4_pgt[0]); dprintf("%s: Linux kernel init PT: 0x%lx, phys: 0x%lx\n", __func__, &_init_level4_pgt[0], os->param->linux_kernel_pgt_phys);