blob: 032a011dbb2491f84cdc0a5ef76639f07aa2f476 [file] [log] [blame]
Patrick Georgi11f00792020-03-04 15:10:45 +01001/* SPDX-License-Identifier: GPL-2.0-only */
Martin Rothebabfad2016-04-10 11:09:16 -06002
Paul Menzeld06c5182017-04-22 09:35:18 +02003/*
4 * Store the initial timestamp for booting in mmx registers. This works
Kyösti Mälkkiee2e9362018-12-28 16:06:45 +02005 * because the bootblock isn't being compiled with MMX support so mm1 and
6 * mm2 will be preserved into romstage.
Paul Menzeld06c5182017-04-22 09:35:18 +02007 */
Aaron Durbin794bddf2013-09-27 11:38:36 -05008 .code32
9
10.global stash_timestamp
11stash_timestamp:
12
13 /* Save the BIST value */
Kyösti Mälkkiee2e9362018-12-28 16:06:45 +020014 movl %eax, %ebx
Aaron Durbin794bddf2013-09-27 11:38:36 -050015
16 finit
17 rdtsc
Kyösti Mälkkiee2e9362018-12-28 16:06:45 +020018 movd %ebx, %mm0
19 movd %eax, %mm1
20 movd %edx, %mm2
Aaron Durbin794bddf2013-09-27 11:38:36 -050021
22 /* Restore the BIST value to %eax */
Kyösti Mälkkiee2e9362018-12-28 16:06:45 +020023 movl %ebx, %eax