mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-22 13:37:10 +00:00
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 <jason.cj.chen@intel.com>
This commit is contained in:
parent
51bfafd6fb
commit
b54f23316a
@ -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)
|
void interrupt_init(uint16_t pcpu_id)
|
||||||
{
|
{
|
||||||
struct host_idt_descriptor *idtd = &HOST_IDTR;
|
struct host_idt_descriptor *idtd = &HOST_IDTR;
|
||||||
|
@ -74,14 +74,6 @@ struct host_idt_descriptor {
|
|||||||
extern struct host_idt HOST_IDT;
|
extern struct host_idt HOST_IDT;
|
||||||
extern struct host_idt_descriptor HOST_IDTR;
|
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 /* end #ifndef ASSEMBLER */
|
||||||
|
|
||||||
#endif /* IDT_H */
|
#endif /* IDT_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user