Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 09 Apr 2008 22:02:08 +0900 (JST)
From:      Mitsuru IWASAKI <iwasaki@jp.FreeBSD.org>
To:        takawata@init-main.com
Cc:        freebsd-acpi@freebsd.org
Subject:   Re: some problems in suspend/resume on ThinkPad X61
Message-ID:  <20080409.220208.39498804.iwasaki@jp.FreeBSD.org>
In-Reply-To: <200804071539.m37FdLcT026089@sana.init-main.com>
References:  <200804071539.m37FdLcT026089@sana.init-main.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

From: Takanori Watanabe <takawata@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@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()




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080409.220208.39498804.iwasaki>