Re: [REGRESSION] S3 resume on SandyBridge doesn't work with NX protection(5bd5a45)

From: matthieu castet
Date: Fri Jan 21 2011 - 17:17:18 EST


H. Peter Anvin a écrit :
On 01/20/2011 01:18 PM, matthieu castet wrote:
PS :
x86 trampoline is a mess. There are many (wakeup, smpboot) and differ between 32 and 64 bit.
H. Peter Anvin, aren't you rewriting them ?

Yes, working on it, starting with the framework used to install them.

They can't all be unified; they are used for different purposes and have
different requirements (for one thing, 32 vs 64 bits require different
trampoline code), but the install framework patchset is almost done, and
the recent change of keeping the 1:1 pagetable set around is also a
dramatic cleanup.
Of course, but for example on x64, using smp trampoline to exit rm wakecode help
to merge code in one place.

Also the start of 32/64 bits trampoline (rm part) is really similar. The main difference is the verify_cpu
check, but can't it be called latter (when we switch to 64 bits ) ?

In the end we could have something like

wakeup_code:
(common rm 16 bit code)
call trampoline

trampoline:
(common rm 16 bit code)
call startup_32_vector (either startup_32_smp for 32 bits (exit trampoline) or startup_32 for 64 bit).

startup_32:
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/