some problems in suspend/resume on ThinkPad X61

Mitsuru IWASAKI iwasaki at jp.FreeBSD.org
Wed Apr 9 13:02:13 UTC 2008


Hi,

From: Takanori Watanabe <takawata at init-main.com>
Subject: some problems in suspend/resume on ThinkPad X61
Date: Tue, 08 Apr 2008 00:39:21 +0900
Message-ID: <200804071539.m37FdLcT026089 at sana.init-main.com>

> I bought a new laptop;ThinkPad X61 and I'm trying to hack 
> suspend/resume.

Cool!  You are trying to support suspend/resume on the dual core
systems, right?

It seems that all processors, but only one, need to be disabled (just
like using UP kernel) before the sleeping, then enabled again on resume.
I've just started investigating on the FreeBSD MP initialization code.
I hope the following summary helps something.  Good luck!

        BSP                             |       AP
----------------------------------------+------------------------------------
cpu_mp_start()
 start_all_aps()
  install_ap_tramp()
  start_ap()
   lapic_ipi_raw()                      bootMP()
                                        MPentry()
                                        mp_begin()
                                        init_secondary()
                                          lapic_disable()
   [wait for 5 sec.] <------------------- mp_naps++;
  set_interrupt_apic_ids()                while (!aps_ready)
   intr_add_cpu()                           ia32_pause();
  mp_topology()

release_aps()
 atomic_store_rel_int(&aps_ready, 1); --> lapic_setup(1)
 while (smp_started == 0) <-------------- atomic_store_rel_int(&smp_started, 1);
  ia32_pause();                           sched_throw()



More information about the freebsd-acpi mailing list