Date: Wed, 17 Jul 2013 23:56:56 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: Bruce Evans <brde@optusnet.com.au> Cc: freebsd-acpi@freebsd.org Subject: Re: Revisiting FPU context resume on i386 Message-ID: <20130717205656.GV5991@kib.kiev.ua> In-Reply-To: <20130716164612.P1088@besplex.bde.org> References: <20130716070716.15b7282b9dca2cbc8a767631@tackymt.homeip.net> <20130716052641.GE91021@kib.kiev.ua> <20130716164612.P1088@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--nccO0ldXW0cuDU6a Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 16, 2013 at 06:54:57PM +1000, Bruce Evans wrote: > ISTR disagreeing with jkim on using a special save area. I believe the normal save area cannot be used there at all, since the suspension is async and fpu.c could perform some operation on the PCB-pointed save area while suspend IPI is received. > % /* Restore CR2, CR4, CR3 and CR0 */ > % ... > % movl PCB_CR0(%ecx),%eax > % movl %eax,%cr0 > % jmp 1f > % 1: >=20 > What's this magic null jump? I think this is not needed. It seems to be an attempt to follow Intel spec, which requires to perform the long jump after enabling the paging, probably code got copied somehow from locore. The jmp is needed in i386/acpica/acpu_wakecode.S, but it is wrong there as well, since it should be a long jump. Also, the comment before the %cr0 manipulations to set CR0_PG was copied from amd64 version and is irrelevant there. --nccO0ldXW0cuDU6a Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iQIcBAEBAgAGBQJR5wUXAAoJEJDCuSvBvK1B4GcQAIdQ6PdboCvLQrfisg0UHwhC T1X1TNve8bc547IQRXo4uteYfSuDU/w7PwJK0RniLxqp0VFkF1S8Qn0bup21k6o5 qwC3P3UWe5cYg/cvq6ymrtBvoCThrgaWYTiM3tFJPrdOs+PUyEXNx+ZlvjIVjHtf 9015/QNneJOnJOXCeU9DPOIJ0CQ5FX197oPrUfayzGBbeMjaWI5fKuTJa2OrMY9e VrTnDXzampYyEfBlHPulXCOaFnH1M6PX3QfU1ak9p/x8gxCjFWEPyJIDIm6LUaq4 TH/ZNeddnF5xr3464VMSoUQhO1Hzk0v+1yToB3xQKI4sn+zMQcbAJCU80s5yOgwG rISaKJ2LHCmBGSnrhBIuaV3mgjzz4AF0kBCs2cZ++zIjaUBkFlV2uCPXbEeF9FGG hWzIAN+534pJy6XurPOi4ZOr6QLLhG+p1UeI17BT255Ly65yhY7Y3K55FjT6RPGM B3lksua5oQsvmxhURHI7+acsupMnm9ACPPp/LBv0xkgcAcYI5o+UeXvwKnp09NXn nSSo4Tgaps3D4FEEh4vaxhDYRXepFlv3/n50hLFuRPKXuVav7kU6H6v3CM+yUIa8 3K3k0wE/JmVsjgLjmA3iBJMfQ0ChqLKCkL2ZToMu6ExlumKkfD1U9eYiTCr9JDE1 zhwTWN+ZUMo8M2t4OM/f =JYUR -----END PGP SIGNATURE----- --nccO0ldXW0cuDU6a--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130717205656.GV5991>