Coverage Report

Created: 2017-10-25 09:10

/root/src/xen/xen/include/asm-x86/mach-default/smpboot_hooks.h
Line
Count
Source
1
/* two abstractions specific to kernel/smpboot.c, mainly to cater to visws
2
 * which needs to alter them. */
3
4
static inline void smpboot_setup_warm_reset_vector(unsigned long start_eip)
5
11
{
6
11
  unsigned long flags;
7
11
8
11
  spin_lock_irqsave(&rtc_lock, flags);
9
11
  CMOS_WRITE(0xa, 0xf);
10
11
  spin_unlock_irqrestore(&rtc_lock, flags);
11
11
  flush_tlb_local();
12
11
  Dprintk("1.\n");
13
11
  *((volatile unsigned short *) TRAMPOLINE_HIGH) = start_eip >> 4;
14
11
  Dprintk("2.\n");
15
11
  *((volatile unsigned short *) TRAMPOLINE_LOW) = start_eip & 0xf;
16
11
  Dprintk("3.\n");
17
11
}
18
19
static inline void smpboot_restore_warm_reset_vector(void)
20
11
{
21
11
  unsigned long flags;
22
11
23
11
  /*
24
11
   * Install writable page 0 entry to set BIOS data area.
25
11
   */
26
11
  flush_tlb_local();
27
11
28
11
  /*
29
11
   * Paranoid:  Set warm reset code and vector here back
30
11
   * to default values.
31
11
   */
32
11
  spin_lock_irqsave(&rtc_lock, flags);
33
11
  CMOS_WRITE(0, 0xf);
34
11
  spin_unlock_irqrestore(&rtc_lock, flags);
35
11
36
11
  *((volatile int *) maddr_to_virt(0x467)) = 0;
37
11
}
38
39
static inline void smpboot_setup_io_apic(void)
40
1
{
41
1
  /*
42
1
   * Here we can be sure that there is an IO-APIC in the system. Let's
43
1
   * go and set it up:
44
1
   */
45
1
  if (!skip_ioapic_setup && nr_ioapics)
46
1
    setup_IO_APIC();
47
1
}