Re: hack for getting suspend/resume to half work on an IBM Thinkpad x60s [SMP]

John Baldwin <[email protected]>
Newsgroups gmane.os.freebsd.devel.mobile,gmane.os.freebsd.devel.acpi
Message-ID <[email protected]>
On Tuesday 03 October 2006 17:33, Andrea Bittau wrote:
> On Tue, Oct 03, 2006 at 02:03:31PM -0700, Nate Lawson wrote:
> > I agree.  The standard switch to protected mode, paging, etc. needs to 
> > be performed and then resume from the saved register context.
> 
> I guess my point was that there are two pieces of code that do that:
> 1) mpboot.s bootMP() used by system bootstrap and what my current patch 
uses.  I
>    think this is what you guys are suggesting to use, and I'm doing it 
anyway in
>    my patch, but I just want to be the devil's advocate =D.
> 
> 2) acpi_wakecode.S wakeup_16() used by the BSP to wake itself up.  This is 
what
>    I was suggesting should be generalized and used by the other cores too.  
The
>    difference of this code as opposed to #1 is that #2 can "cheat".  That 
is, we
>    can create the code for #2 on the fly and do stuff like mov old_eax,eax 
etc
>    and don't have to be smart about figuring out where the CPU should land 
and
>    how it should initialize itself [as in the case of #1].
> 
> I'm just wondering whether we should do something about the assembly "code
> duplication" in #1 and #2.  I understand they serve a different purpose, but
> arguably, they do the same thing: real-mode -> jump in kernel.  What is
> different is what happens once in kernel mode: boot or resume?  That 
difference
> could be coded in the C part of the kernel leaving a single asm entry point 
both
> for bootstrap and wakeup code.  Am I making any sense? =D

1) is already tailored to work with starting up an extra AP based on the 
STARTUP IPI, so I think we should reuse it for starting up the cores.  I need 
to think about it more though.  First we need to get APIC with UP working 
though.

-- 
John Baldwin
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-mobile
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.