Skip to contentSkip to conversation

x86: fix broken qemu and edison builds

PATCH New Ivan Gorinov 2 participants 3 messages Jun 21, 2018 – Jun 22, 2018 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: fix broken qemu and edison builds

Commit 2407183f98cf130b008125ef1718ccf89a192998 breaks the qemu-x86 and edison builds.

Move ucode_base and ucode_size into common startup code, except for configs with FSP.

---
 arch/x86/cpu/intel_common/car.S | 10 ----------
 arch/x86/cpu/start.S            | 10 ++++++++++
 2 files changed, 10 insertions(+), 10 deletions(-)
arch/x86/cpu/intel_common/car.S +0 -10
index 52a77bb..7295e0f 100644
@@ -232,13 +232,3 @@ mtrr_table:
 	.word 0x20C, 0x20D, 0x20E, 0x20F
 	.word 0x210, 0x211, 0x212, 0x213
 mtrr_table_end:
-
-	.align 4
-_dt_ucode_base_size:
-	/* These next two fields are filled in by ifdtool */
-.globl ucode_base
-ucode_base:	/* Declared in microcode.h */
-	.long	0			/* microcode base */
-.globl ucode_size
-ucode_size:	/* Declared in microcode.h */
-	.long	0			/* microcode size */
arch/x86/cpu/start.S +10 -0
index e4e997e..1fdd82a 100644
@@ -291,3 +291,13 @@ gdt_rom2:
 	.byte	0xcf		/* flags + limit_high */
 	.byte	0x00		/* base_high */
 #endif
+
+#ifndef CONFIG_HAVE_FSP
+	.align 4
+.globl ucode_base
+ucode_base:	/* Declared in microcode.h */
+	.long	0			/* microcode base */
+.globl ucode_size
+ucode_size:	/* Declared in microcode.h */
+	.long	0			/* microcode size */
+#endif
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 x86: fix broken qemu and edison builds

Hi Ivan,

Quoted 35 lines · Ivan Gorinov

Commit 2407183f98cf130b008125ef1718ccf89a192998 breaks the qemu-x86 and edison builds.

Move ucode_base and ucode_size into common startup code, except for configs with FSP.

---
 arch/x86/cpu/intel_common/car.S | 10 ----------
 arch/x86/cpu/start.S            | 10 ++++++++++
 2 files changed, 10 insertions(+), 10 deletions(-)
arch/x86/cpu/intel_common/car.S +0 -10
index 52a77bb..7295e0f 100644
@@ -232,13 +232,3 @@ mtrr_table:
        .word 0x20C, 0x20D, 0x20E, 0x20F
        .word 0x210, 0x211, 0x212, 0x213
 mtrr_table_end:
-
-       .align 4
-_dt_ucode_base_size:
-       /* These next two fields are filled in by ifdtool */
-.globl ucode_base
-ucode_base:    /* Declared in microcode.h */
-       .long   0                       /* microcode base */
-.globl ucode_size
-ucode_size:    /* Declared in microcode.h */
-       .long   0                       /* microcode size */
arch/x86/cpu/start.S +0 -0
index e4e997e..1fdd82a 100644

arch/x86/cpu/start.S gdt_rom2: · line 296

Quoted 6 lines
arch/x86/cpu/start.S +3 -0
@@ -291,3 +291,13 @@ gdt_rom2:
        .byte   0xcf            /* flags + limit_high */
        .byte   0x00            /* base_high */
 #endif
+
+#ifndef CONFIG_HAVE_FSP
+       .align 4

The _dt_ucode_base_size symbol is dropped here, so it causes build failures on several targets.

arch/x86/cpu/start.S gdt_rom2:

Quoted 8 lines
arch/x86/cpu/start.S +7 -1
+.globl ucode_base
+ucode_base:    /* Declared in microcode.h */
+       .long   0                       /* microcode base */
+.globl ucode_size
+ucode_size:    /* Declared in microcode.h */
+       .long   0                       /* microcode size */
+#endif
--

I will squash this commit into your previous commit, and fix the build issues and sent it to the ML for review.

Regards,
Bin

#2 lore raw

PATCH 1/1 x86: fix broken qemu and edison builds

Quoted 48 lines · Bin Meng

Hi Ivan,

Quoted 35 lines · Ivan Gorinov

Commit 2407183f98cf130b008125ef1718ccf89a192998 breaks the qemu-x86 and edison builds.

Move ucode_base and ucode_size into common startup code, except for configs with FSP.

---
 arch/x86/cpu/intel_common/car.S | 10 ----------
 arch/x86/cpu/start.S            | 10 ++++++++++
 2 files changed, 10 insertions(+), 10 deletions(-)
arch/x86/cpu/intel_common/car.S +0 -10
index 52a77bb..7295e0f 100644
@@ -232,13 +232,3 @@ mtrr_table:
        .word 0x20C, 0x20D, 0x20E, 0x20F
        .word 0x210, 0x211, 0x212, 0x213
 mtrr_table_end:
-
-       .align 4
-_dt_ucode_base_size:
-       /* These next two fields are filled in by ifdtool */
-.globl ucode_base
-ucode_base:    /* Declared in microcode.h */
-       .long   0                       /* microcode base */
-.globl ucode_size
-ucode_size:    /* Declared in microcode.h */
-       .long   0                       /* microcode size */
arch/x86/cpu/start.S +0 -0
index e4e997e..1fdd82a 100644

arch/x86/cpu/start.S gdt_rom2: · line 296

Quoted 6 lines
arch/x86/cpu/start.S +3 -0
@@ -291,3 +291,13 @@ gdt_rom2:
        .byte   0xcf            /* flags + limit_high */
        .byte   0x00            /* base_high */
 #endif
+
+#ifndef CONFIG_HAVE_FSP
+       .align 4

The _dt_ucode_base_size symbol is dropped here, so it causes build failures on several targets.

Quoted 11 lines

arch/x86/cpu/start.S gdt_rom2:

Quoted 8 lines
arch/x86/cpu/start.S +7 -1
+.globl ucode_base
+ucode_base:    /* Declared in microcode.h */
+       .long   0                       /* microcode base */
+.globl ucode_size
+ucode_size:    /* Declared in microcode.h */
+       .long   0                       /* microcode size */
+#endif
--

I will squash this commit into your previous commit, and fix the build issues and sent it to the ML for review.

This patch is dropped. Found another way.

Regards,
Bin