diff options
author | Raul E Rangel <rrangel@chromium.org> | 2021-09-22 10:45:51 -0600 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-09-27 13:41:41 +0000 |
commit | da68c9d3784d997115f3967a3cd5f96369e04f7e (patch) | |
tree | 8ac8f2a73c5e96194a4d7ce13b44eaf5910f1492 /src/cpu/x86 | |
parent | 9f17fa33f9eb393b71bff98cfbbac3501ad0d422 (diff) |
arch/x86,cpu/x86: Move cpu_info initialization instructions into macro
This will help reduce duplication and make it easier to add new members
to the cpu_info struct.
BUG=b:194391185, b:179699789
TEST=Compare assembly of romstage and ramstage before and after
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: I31f264f4bb8b605fa3cb3bfff0d9bf79224072aa
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57859
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Diffstat (limited to 'src/cpu/x86')
-rw-r--r-- | src/cpu/x86/cpu_info.S.inc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cpu/x86/cpu_info.S.inc b/src/cpu/x86/cpu_info.S.inc new file mode 100644 index 0000000000..62b47ca52a --- /dev/null +++ b/src/cpu/x86/cpu_info.S.inc @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +/* Push struct cpu_info */ +.macro push_cpu_info index=$0 +#if CONFIG(COOP_MULTITASKING) + push $0 /* *thread */ +#endif + push \index /* index */ + push $0 /* *cpu */ +.endm |