From da68c9d3784d997115f3967a3cd5f96369e04f7e Mon Sep 17 00:00:00 2001 From: Raul E Rangel Date: Wed, 22 Sep 2021 10:45:51 -0600 Subject: 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 Change-Id: I31f264f4bb8b605fa3cb3bfff0d9bf79224072aa Reviewed-on: https://review.coreboot.org/c/coreboot/+/57859 Tested-by: build bot (Jenkins) Reviewed-by: Karthik Ramasubramanian --- src/cpu/x86/cpu_info.S.inc | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/cpu/x86/cpu_info.S.inc (limited to 'src/cpu/x86') 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 -- cgit v1.2.3