From b54f23316aa19bf04134bc26b23355bcf1704dc8 Mon Sep 17 00:00:00 2001 From: Jason Chen CJ Date: Fri, 30 Nov 2018 20:13:06 +0800 Subject: [PATCH] modularization: boot component -- move functions Boot component prepares the very basic platform boot env. It finally call into platform initilization entries: - bsp_boot_init & cpu_secondary_init for start up - or restore_s3_context for wakeup this patch moves set_idt from header file to irq.c Tracked-On: #1842 Signed-off-by: Jason Chen CJ --- hypervisor/arch/x86/irq.c | 8 ++++++++ hypervisor/include/arch/x86/boot/idt.h | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hypervisor/arch/x86/irq.c b/hypervisor/arch/x86/irq.c index c0a4d1946..7ec2c1b3d 100644 --- a/hypervisor/arch/x86/irq.c +++ b/hypervisor/arch/x86/irq.c @@ -445,6 +445,14 @@ void init_default_irqs(uint16_t cpu_id) } } +static void set_idt(struct host_idt_descriptor *idtd) +{ + + asm volatile (" lidtq %[idtd]\n" : /* no output parameters */ + : /* input parameters */ + [idtd] "m"(*idtd)); +} + void interrupt_init(uint16_t pcpu_id) { struct host_idt_descriptor *idtd = &HOST_IDTR; diff --git a/hypervisor/include/arch/x86/boot/idt.h b/hypervisor/include/arch/x86/boot/idt.h index e68354989..652ae3560 100644 --- a/hypervisor/include/arch/x86/boot/idt.h +++ b/hypervisor/include/arch/x86/boot/idt.h @@ -74,14 +74,6 @@ struct host_idt_descriptor { extern struct host_idt HOST_IDT; extern struct host_idt_descriptor HOST_IDTR; -static inline void set_idt(struct host_idt_descriptor *idtd) -{ - - asm volatile (" lidtq %[idtd]\n" : /* no output parameters */ - : /* input parameters */ - [idtd] "m"(*idtd)); -} - #endif /* end #ifndef ASSEMBLER */ #endif /* IDT_H */