2020-03-04 15:10:45 +01:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2016-04-10 19:09:16 +02:00
|
|
|
|
2017-04-22 09:35:18 +02:00
|
|
|
/*
|
|
|
|
* Store the initial timestamp for booting in mmx registers. This works
|
2018-12-28 15:06:45 +01:00
|
|
|
* because the bootblock isn't being compiled with MMX support so mm1 and
|
|
|
|
* mm2 will be preserved into romstage.
|
2017-04-22 09:35:18 +02:00
|
|
|
*/
|
2013-09-27 18:38:36 +02:00
|
|
|
.code32
|
|
|
|
|
|
|
|
.global stash_timestamp
|
|
|
|
stash_timestamp:
|
|
|
|
|
|
|
|
/* Save the BIST value */
|
2018-12-28 15:06:45 +01:00
|
|
|
movl %eax, %ebx
|
2013-09-27 18:38:36 +02:00
|
|
|
|
|
|
|
finit
|
|
|
|
rdtsc
|
2018-12-28 15:06:45 +01:00
|
|
|
movd %ebx, %mm0
|
|
|
|
movd %eax, %mm1
|
|
|
|
movd %edx, %mm2
|
2013-09-27 18:38:36 +02:00
|
|
|
|
|
|
|
/* Restore the BIST value to %eax */
|
2018-12-28 15:06:45 +01:00
|
|
|
movl %ebx, %eax
|