Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/arch



Le 04/08/2016 à 21:09, Joerg Sonnenberger a écrit :
On Sun, Jul 24, 2016 at 02:09:22PM +0000, Maxime Villard wrote:
Fix this by properly saving and restoring the EFER MSR. It's a little
tricky since the wakeup code uses %edx, but rdmsr overwrites it. We just
save it in %esi.

Use push/pop around it, please?


Around what, where?

If you're talking about the calling convention, as far as I can tell, it is
respected here. In acpi_md_sleep_exit the CPU just woke up, so there is no need
to push anything.

If you're talking about why %edx is saved in %esi instead of being pushed on
the stack, it's because the stack pointer points to page 1 (in pa), but in the
i386 machdep code this area is referred to as BIOS callback. It didn't seem to
make much sense to me, so, not to add more confusion, I preferred to do the data
transfers between registers instead of touching the stack.

If you're talking about the msr stuff, as far as I can tell, the registers are
properly saved before being overwritten.

Unless I missed something.

Note: if you are talking about 2), I don't think pushing the register on the
stack would work, since paging is enabled and page 1 is not present in the
temporary page tree.


Home | Main Index | Thread Index | Old Index