Patrick Georgi | 11f0079 | 2020-03-04 15:10:45 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Martin Roth | ebabfad | 2016-04-10 11:09:16 -0600 | [diff] [blame] | 2 | |
Paul Menzel | d06c518 | 2017-04-22 09:35:18 +0200 | [diff] [blame] | 3 | /* |
| 4 | * Store the initial timestamp for booting in mmx registers. This works |
Kyösti Mälkki | ee2e936 | 2018-12-28 16:06:45 +0200 | [diff] [blame] | 5 | * because the bootblock isn't being compiled with MMX support so mm1 and |
| 6 | * mm2 will be preserved into romstage. |
Paul Menzel | d06c518 | 2017-04-22 09:35:18 +0200 | [diff] [blame] | 7 | */ |
Aaron Durbin | 794bddf | 2013-09-27 11:38:36 -0500 | [diff] [blame] | 8 | .code32 |
| 9 | |
| 10 | .global stash_timestamp |
| 11 | stash_timestamp: |
| 12 | |
| 13 | /* Save the BIST value */ |
Kyösti Mälkki | ee2e936 | 2018-12-28 16:06:45 +0200 | [diff] [blame] | 14 | movl %eax, %ebx |
Aaron Durbin | 794bddf | 2013-09-27 11:38:36 -0500 | [diff] [blame] | 15 | |
| 16 | finit |
| 17 | rdtsc |
Kyösti Mälkki | ee2e936 | 2018-12-28 16:06:45 +0200 | [diff] [blame] | 18 | movd %ebx, %mm0 |
| 19 | movd %eax, %mm1 |
| 20 | movd %edx, %mm2 |
Aaron Durbin | 794bddf | 2013-09-27 11:38:36 -0500 | [diff] [blame] | 21 | |
| 22 | /* Restore the BIST value to %eax */ |
Kyösti Mälkki | ee2e936 | 2018-12-28 16:06:45 +0200 | [diff] [blame] | 23 | movl %ebx, %eax |