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:
Jason Chen CJ 2018-11-30 20:13:06 +08:00 committed by wenlingz
parent 51bfafd6fb
commit b54f23316a
2 changed files with 8 additions and 8 deletions

View File

@ -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;

View File

@ -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 */