[U-Boot] [PATCH 00/14] x86: qemu: Add 64-bit U-Boot support

This brings U-Boot x86 64-bit support on QEMU target.
This series is available at u-boot-x86/qemu64-working for testing.
Bin Meng (14): x86: qemu: Add missing DECLARE_GLOBAL_DATA_PTR in e820.c x86: Wrap print_ch() with config option x86: spl: Add weak arch_cpu_init_dm() x86: Compile irq.c for 64-bit x86: qemu: Hide arch_cpu_init() and print_cpuinfo() for U-Boot proper x86: qemu: Fix compiler warnings for 64-bit x86: qemu: Set up device tree for SPL x86: qemu: Mark ucode as optional for SPL in u-boot.dtsi tools: binman: Call correct init for Entry_u_boot_spl_with_ucode_ptr tools: binman: Handle optional microcode case in SPL image spl: Add a LF to the loading message x86: qemu: Add a text base for 64-bit U-Boot x86: qemu: Add build options for SPL x86: qemu: Add a config for 64-bit U-Boot
arch/x86/cpu/Makefile | 2 +- arch/x86/cpu/irq.c | 6 +- arch/x86/cpu/qemu/e820.c | 2 + arch/x86/cpu/qemu/qemu.c | 7 ++- arch/x86/cpu/x86_64/cpu.c | 2 + arch/x86/dts/emulation-u-boot.dtsi | 6 ++ arch/x86/dts/qemu-x86_i440fx.dts | 4 ++ arch/x86/dts/qemu-x86_q35.dts | 4 ++ arch/x86/lib/spl.c | 5 ++ board/emulation/Kconfig | 7 +++ board/emulation/qemu-x86/Kconfig | 6 +- board/emulation/qemu-x86/MAINTAINERS | 7 +++ common/spl/spl.c | 2 +- configs/qemu-x86_64_defconfig | 80 +++++++++++++++++++++++++ include/configs/qemu-x86.h | 9 +++ tools/binman/etype/u_boot_spl_with_ucode_ptr.py | 2 +- tools/binman/etype/u_boot_ucode.py | 6 ++ 17 files changed, 146 insertions(+), 11 deletions(-) create mode 100644 configs/qemu-x86_64_defconfig

DECLARE_GLOBAL_DATA_PTR is missing which causes 64-bit build error.
Signed-off-by: Bin Meng bmeng.cn@gmail.com ---
arch/x86/cpu/qemu/e820.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/arch/x86/cpu/qemu/e820.c b/arch/x86/cpu/qemu/e820.c index 63853e4..c1c9b89 100644 --- a/arch/x86/cpu/qemu/e820.c +++ b/arch/x86/cpu/qemu/e820.c @@ -7,6 +7,8 @@ #include <common.h> #include <asm/e820.h>
+DECLARE_GLOBAL_DATA_PTR; + unsigned install_e820_map(unsigned max_entries, struct e820entry *entries) { entries[0].addr = 0;

On 18 January 2017 at 04:32, Bin Meng bmeng.cn@gmail.com wrote:
DECLARE_GLOBAL_DATA_PTR is missing which causes 64-bit build error.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
arch/x86/cpu/qemu/e820.c | 2 ++ 1 file changed, 2 insertions(+)
Reviewed-by: Simon Glass sjg@chromium.org

On Tue, Jan 24, 2017 at 3:50 AM, Simon Glass sjg@chromium.org wrote:
On 18 January 2017 at 04:32, Bin Meng bmeng.cn@gmail.com wrote:
DECLARE_GLOBAL_DATA_PTR is missing which causes 64-bit build error.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
arch/x86/cpu/qemu/e820.c | 2 ++ 1 file changed, 2 insertions(+)
Reviewed-by: Simon Glass sjg@chromium.org
applied to u-boot-x86, thanks!

print_ch() should not be used if DEBUG_UART is off.
Signed-off-by: Bin Meng bmeng.cn@gmail.com ---
arch/x86/cpu/x86_64/cpu.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/arch/x86/cpu/x86_64/cpu.c b/arch/x86/cpu/x86_64/cpu.c index 77cbb56..82ea456 100644 --- a/arch/x86/cpu/x86_64/cpu.c +++ b/arch/x86/cpu/x86_64/cpu.c @@ -31,7 +31,9 @@ void arch_setup_gd(gd_t *new_gd) * * U-Boot SPL 2017.01 */ +#if CONFIG_IS_ENABLED(DEBUG_UART) printch(' '); +#endif }
int cpu_has_64bit(void)

Hi Bin,
On 18 January 2017 at 04:32, Bin Meng bmeng.cn@gmail.com wrote:
print_ch() should not be used if DEBUG_UART is off.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
arch/x86/cpu/x86_64/cpu.c | 2 ++ 1 file changed, 2 insertions(+)
Reviewed-by: Simon Glass sjg@chromium.org
diff --git a/arch/x86/cpu/x86_64/cpu.c b/arch/x86/cpu/x86_64/cpu.c index 77cbb56..82ea456 100644 --- a/arch/x86/cpu/x86_64/cpu.c +++ b/arch/x86/cpu/x86_64/cpu.c @@ -31,7 +31,9 @@ void arch_setup_gd(gd_t *new_gd) * * U-Boot SPL 2017.01 */ +#if CONFIG_IS_ENABLED(DEBUG_UART)
Or just #ifdef CONFIG_DEBUF_UART ?
printch(' ');
+#endif }
int cpu_has_64bit(void)
2.9.2
Regards, Simon

On Tue, Jan 24, 2017 at 3:50 AM, Simon Glass sjg@chromium.org wrote:
Hi Bin,
On 18 January 2017 at 04:32, Bin Meng bmeng.cn@gmail.com wrote:
print_ch() should not be used if DEBUG_UART is off.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
arch/x86/cpu/x86_64/cpu.c | 2 ++ 1 file changed, 2 insertions(+)
Reviewed-by: Simon Glass sjg@chromium.org
diff --git a/arch/x86/cpu/x86_64/cpu.c b/arch/x86/cpu/x86_64/cpu.c index 77cbb56..82ea456 100644 --- a/arch/x86/cpu/x86_64/cpu.c +++ b/arch/x86/cpu/x86_64/cpu.c @@ -31,7 +31,9 @@ void arch_setup_gd(gd_t *new_gd) * * U-Boot SPL 2017.01 */ +#if CONFIG_IS_ENABLED(DEBUG_UART)
Or just #ifdef CONFIG_DEBUF_UART ?
Fixed, and
applied to u-boot-x86, thanks!

arch_cpu_init_dm() might not be implemented by every platform. Implement a weak version for SPL.
Signed-off-by: Bin Meng bmeng.cn@gmail.com ---
arch/x86/lib/spl.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c index 7403d15..8c5b90f 100644 --- a/arch/x86/lib/spl.c +++ b/arch/x86/lib/spl.c @@ -15,6 +15,11 @@
DECLARE_GLOBAL_DATA_PTR;
+__weak int arch_cpu_init_dm(void) +{ + return 0; +} + static int x86_spl_init(void) { /*

Hi Bin,
On 18 January 2017 at 04:32, Bin Meng bmeng.cn@gmail.com wrote:
arch_cpu_init_dm() might not be implemented by every platform. Implement a weak version for SPL.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
arch/x86/lib/spl.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c index 7403d15..8c5b90f 100644 --- a/arch/x86/lib/spl.c +++ b/arch/x86/lib/spl.c @@ -15,6 +15,11 @@
DECLARE_GLOBAL_DATA_PTR;
+__weak int arch_cpu_init_dm(void) +{
return 0;
+}
There is already one of these in board_f.c - do we need another?
static int x86_spl_init(void) { /* -- 2.9.2
Regards, Simon

Hi Simon,
On Tue, Jan 24, 2017 at 3:50 AM, Simon Glass sjg@chromium.org wrote:
Hi Bin,
On 18 January 2017 at 04:32, Bin Meng bmeng.cn@gmail.com wrote:
arch_cpu_init_dm() might not be implemented by every platform. Implement a weak version for SPL.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
arch/x86/lib/spl.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c index 7403d15..8c5b90f 100644 --- a/arch/x86/lib/spl.c +++ b/arch/x86/lib/spl.c @@ -15,6 +15,11 @@
DECLARE_GLOBAL_DATA_PTR;
+__weak int arch_cpu_init_dm(void) +{
return 0;
+}
There is already one of these in board_f.c - do we need another?
board_f.c is not built for SPL.
Regards, Bin

On 3 February 2017 at 21:59, Bin Meng bmeng.cn@gmail.com wrote:
Hi Simon,
On Tue, Jan 24, 2017 at 3:50 AM, Simon Glass sjg@chromium.org wrote:
Hi Bin,
On 18 January 2017 at 04:32, Bin Meng bmeng.cn@gmail.com wrote:
arch_cpu_init_dm() might not be implemented by every platform. Implement a weak version for SPL.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
arch/x86/lib/spl.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c index 7403d15..8c5b90f 100644 --- a/arch/x86/lib/spl.c +++ b/arch/x86/lib/spl.c @@ -15,6 +15,11 @@
DECLARE_GLOBAL_DATA_PTR;
+__weak int arch_cpu_init_dm(void) +{
return 0;
+}
There is already one of these in board_f.c - do we need another?
board_f.c is not built for SPL.
I'm not a big fan of weak functions, but OK.
Reviewed-by: Simon Glass sjg@chromium.org

On Mon, Feb 6, 2017 at 11:35 PM, Simon Glass sjg@chromium.org wrote:
On 3 February 2017 at 21:59, Bin Meng bmeng.cn@gmail.com wrote:
Hi Simon,
On Tue, Jan 24, 2017 at 3:50 AM, Simon Glass sjg@chromium.org wrote:
Hi Bin,
On 18 January 2017 at 04:32, Bin Meng bmeng.cn@gmail.com wrote:
arch_cpu_init_dm() might not be implemented by every platform. Implement a weak version for SPL.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
arch/x86/lib/spl.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c index 7403d15..8c5b90f 100644 --- a/arch/x86/lib/spl.c +++ b/arch/x86/lib/spl.c @@ -15,6 +15,11 @@
DECLARE_GLOBAL_DATA_PTR;
+__weak int arch_cpu_init_dm(void) +{
return 0;
+}
There is already one of these in board_f.c - do we need another?
board_f.c is not built for SPL.
I'm not a big fan of weak functions, but OK.
Reviewed-by: Simon Glass sjg@chromium.org
applied to u-boot-x86, thanks!

There is no reason not to compile irq.c for 64-bit.
Signed-off-by: Bin Meng bmeng.cn@gmail.com ---
arch/x86/cpu/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/cpu/Makefile b/arch/x86/cpu/Makefile index 45f95ab..92a9023 100644 --- a/arch/x86/cpu/Makefile +++ b/arch/x86/cpu/Makefile @@ -35,8 +35,8 @@ obj-$(CONFIG_NORTHBRIDGE_INTEL_IVYBRIDGE) += ivybridge/ obj-$(CONFIG_INTEL_QUARK) += quark/ obj-$(CONFIG_INTEL_QUEENSBAY) += queensbay/ obj-y += lapic.o ioapic.o -ifndef CONFIG_$(SPL_)X86_64 obj-y += irq.o +ifndef CONFIG_$(SPL_)X86_64 obj-$(CONFIG_SMP) += mp_init.o endif obj-y += mtrr.o

On 18 January 2017 at 04:32, Bin Meng bmeng.cn@gmail.com wrote:
There is no reason not to compile irq.c for 64-bit.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
arch/x86/cpu/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Glass sjg@chromium.org

On Tue, Jan 24, 2017 at 3:50 AM, Simon Glass sjg@chromium.org wrote:
On 18 January 2017 at 04:32, Bin Meng bmeng.cn@gmail.com wrote:
There is no reason not to compile irq.c for 64-bit.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
arch/x86/cpu/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Glass sjg@chromium.org
applied to u-boot-x86, thanks!

arch_cpu_init() and print_cpuinfo() should be only available in SPL build.
Signed-off-by: Bin Meng bmeng.cn@gmail.com ---
arch/x86/cpu/qemu/qemu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/x86/cpu/qemu/qemu.c b/arch/x86/cpu/qemu/qemu.c index c3092f2..85e2481 100644 --- a/arch/x86/cpu/qemu/qemu.c +++ b/arch/x86/cpu/qemu/qemu.c @@ -137,14 +137,17 @@ static void qemu_chipset_init(void) #endif }
+#if !CONFIG_IS_ENABLED(SPL_X86_32BIT_INIT) int arch_cpu_init(void) { post_code(POST_CPU_INIT);
return x86_cpu_init_f(); } +#endif
-#ifndef CONFIG_EFI_STUB +#if !CONFIG_IS_ENABLED(EFI_STUB) && \ + !CONFIG_IS_ENABLED(SPL_X86_32BIT_INIT) int print_cpuinfo(void) { post_code(POST_CPU_INFO);

On 18 January 2017 at 04:32, Bin Meng bmeng.cn@gmail.com wrote:
arch_cpu_init() and print_cpuinfo() should be only available in SPL build.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
arch/x86/cpu/qemu/qemu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Reviewed-by: Simon Glass sjg@chromium.org

On Tue, Jan 24, 2017 at 3:51 AM, Simon Glass sjg@chromium.org wrote:
On 18 January 2017 at 04:32, Bin Meng bmeng.cn@gmail.com wrote:
arch_cpu_init() and print_cpuinfo() should be only available in SPL build.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
arch/x86/cpu/qemu/qemu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Reviewed-by: Simon Glass sjg@chromium.org
applied to u-boot-x86, thanks!

This fixes compiler warnings for QEMU in 64-bit.
Signed-off-by: Bin Meng bmeng.cn@gmail.com ---
arch/x86/cpu/irq.c | 6 +++--- arch/x86/cpu/qemu/qemu.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/x86/cpu/irq.c b/arch/x86/cpu/irq.c index 442d373..d2901de 100644 --- a/arch/x86/cpu/irq.c +++ b/arch/x86/cpu/irq.c @@ -26,7 +26,7 @@ bool pirq_check_irq_routed(struct udevice *dev, int link, u8 irq) if (priv->config == PIRQ_VIA_PCI) dm_pci_read_config8(dev->parent, LINK_N2V(link, base), &pirq); else - pirq = readb(priv->ibase + LINK_N2V(link, base)); + pirq = readb((uintptr_t)priv->ibase + LINK_N2V(link, base));
pirq &= 0xf;
@@ -56,7 +56,7 @@ void pirq_assign_irq(struct udevice *dev, int link, u8 irq) if (priv->config == PIRQ_VIA_PCI) dm_pci_write_config8(dev->parent, LINK_N2V(link, base), irq); else - writeb(irq, priv->ibase + LINK_N2V(link, base)); + writeb(irq, (uintptr_t)priv->ibase + LINK_N2V(link, base)); }
static struct irq_info *check_dup_entry(struct irq_info *slot_base, @@ -234,7 +234,7 @@ static void irq_enable_sci(struct udevice *dev) if (priv->config == PIRQ_VIA_PCI) dm_pci_write_config32(dev->parent, priv->actl_addr, 0); else - writel(0, priv->ibase + priv->actl_addr); + writel(0, (uintptr_t)priv->ibase + priv->actl_addr); } }
diff --git a/arch/x86/cpu/qemu/qemu.c b/arch/x86/cpu/qemu/qemu.c index 85e2481..7153eb2 100644 --- a/arch/x86/cpu/qemu/qemu.c +++ b/arch/x86/cpu/qemu/qemu.c @@ -47,7 +47,7 @@ static void qemu_x86_fwcfg_read_entry_pio(uint16_t entry, static void qemu_x86_fwcfg_read_entry_dma(struct fw_cfg_dma_access *dma) { /* the DMA address register is big endian */ - outl(cpu_to_be32((uint32_t)dma), FW_DMA_PORT_HIGH); + outl(cpu_to_be32((uintptr_t)dma), FW_DMA_PORT_HIGH);
while (be32_to_cpu(dma->control) & ~FW_CFG_DMA_ERROR) __asm__ __volatile__ ("pause");

On 18 January 2017 at 04:32, Bin Meng bmeng.cn@gmail.com wrote:
This fixes compiler warnings for QEMU in 64-bit.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
arch/x86/cpu/irq.c | 6 +++--- arch/x86/cpu/qemu/qemu.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org

On Wed, Jan 25, 2017 at 12:09 PM, Simon Glass sjg@chromium.org wrote:
On 18 January 2017 at 04:32, Bin Meng bmeng.cn@gmail.com wrote:
This fixes compiler warnings for QEMU in 64-bit.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
arch/x86/cpu/irq.c | 6 +++--- arch/x86/cpu/qemu/qemu.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org
applied to u-boot-x86, thanks!

Add the correct pre-relocation tag so that the required device tree nodes are present in the SPL device tree.
Signed-off-by: Bin Meng bmeng.cn@gmail.com ---
arch/x86/dts/qemu-x86_i440fx.dts | 4 ++++ arch/x86/dts/qemu-x86_q35.dts | 4 ++++ 2 files changed, 8 insertions(+)
diff --git a/arch/x86/dts/qemu-x86_i440fx.dts b/arch/x86/dts/qemu-x86_i440fx.dts index 9c3f2a0..afea14e 100644 --- a/arch/x86/dts/qemu-x86_i440fx.dts +++ b/arch/x86/dts/qemu-x86_i440fx.dts @@ -29,10 +29,12 @@ cpus { #address-cells = <1>; #size-cells = <0>; + u-boot,dm-pre-reloc;
cpu@0 { device_type = "cpu"; compatible = "cpu-qemu"; + u-boot,dm-pre-reloc; reg = <0>; intel,apic-id = <0>; }; @@ -54,9 +56,11 @@ pch@1,0 { reg = <0x00000800 0 0 0 0>; compatible = "intel,pch7"; + u-boot,dm-pre-reloc;
irq-router { compatible = "intel,irq-router"; + u-boot,dm-pre-reloc; intel,pirq-config = "pci"; intel,pirq-link = <0x60 4>; intel,pirq-mask = <0x0e40>; diff --git a/arch/x86/dts/qemu-x86_q35.dts b/arch/x86/dts/qemu-x86_q35.dts index 0d462a9..bc398dd 100644 --- a/arch/x86/dts/qemu-x86_q35.dts +++ b/arch/x86/dts/qemu-x86_q35.dts @@ -40,10 +40,12 @@ cpus { #address-cells = <1>; #size-cells = <0>; + u-boot,dm-pre-reloc;
cpu@0 { device_type = "cpu"; compatible = "cpu-qemu"; + u-boot,dm-pre-reloc; reg = <0>; intel,apic-id = <0>; }; @@ -65,9 +67,11 @@ pch@1f,0 { reg = <0x0000f800 0 0 0 0>; compatible = "intel,pch9"; + u-boot,dm-pre-reloc;
irq-router { compatible = "intel,irq-router"; + u-boot,dm-pre-reloc; intel,pirq-config = "pci"; intel,actl-8bit; intel,actl-addr = <0x44>;

On 18 January 2017 at 04:32, Bin Meng bmeng.cn@gmail.com wrote:
Add the correct pre-relocation tag so that the required device tree nodes are present in the SPL device tree.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
arch/x86/dts/qemu-x86_i440fx.dts | 4 ++++ arch/x86/dts/qemu-x86_q35.dts | 4 ++++ 2 files changed, 8 insertions(+)
Reviewed-by: Simon Glass sjg@chromium.org

On Wed, Jan 25, 2017 at 12:09 PM, Simon Glass sjg@chromium.org wrote:
On 18 January 2017 at 04:32, Bin Meng bmeng.cn@gmail.com wrote:
Add the correct pre-relocation tag so that the required device tree nodes are present in the SPL device tree.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
arch/x86/dts/qemu-x86_i440fx.dts | 4 ++++ arch/x86/dts/qemu-x86_q35.dts | 4 ++++ 2 files changed, 8 insertions(+)
Reviewed-by: Simon Glass sjg@chromium.org
applied to u-boot-x86, thanks!

QEMU does not need ucode and this is indicated in u-boot.dtsi for U-Boot proper. Now add the same for SPL.
Signed-off-by: Bin Meng bmeng.cn@gmail.com ---
arch/x86/dts/emulation-u-boot.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/arch/x86/dts/emulation-u-boot.dtsi b/arch/x86/dts/emulation-u-boot.dtsi index 56d34af..7714ed0 100644 --- a/arch/x86/dts/emulation-u-boot.dtsi +++ b/arch/x86/dts/emulation-u-boot.dtsi @@ -10,9 +10,15 @@ #ifdef CONFIG_ROM_SIZE / { binman { +#ifdef CONFIG_SPL + u-boot-spl-with-ucode-ptr { + optional-ucode; + }; +#else u-boot-with-ucode-ptr { optional-ucode; }; +#endif }; }; #endif

On 18 January 2017 at 04:32, Bin Meng bmeng.cn@gmail.com wrote:
QEMU does not need ucode and this is indicated in u-boot.dtsi for U-Boot proper. Now add the same for SPL.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
arch/x86/dts/emulation-u-boot.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)
Reviewed-by: Simon Glass sjg@chromium.org

On Wed, Jan 25, 2017 at 12:09 PM, Simon Glass sjg@chromium.org wrote:
On 18 January 2017 at 04:32, Bin Meng bmeng.cn@gmail.com wrote:
QEMU does not need ucode and this is indicated in u-boot.dtsi for U-Boot proper. Now add the same for SPL.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
arch/x86/dts/emulation-u-boot.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)
Reviewed-by: Simon Glass sjg@chromium.org
applied to u-boot-x86, thanks!

u_boot_spl_with_ucode_ptr is derived from u_boot_with_ucode_ptr, hence it should call its parent's init.
Signed-off-by: Bin Meng bmeng.cn@gmail.com ---
tools/binman/etype/u_boot_spl_with_ucode_ptr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/binman/etype/u_boot_spl_with_ucode_ptr.py b/tools/binman/etype/u_boot_spl_with_ucode_ptr.py index 764c282..1c6706d 100644 --- a/tools/binman/etype/u_boot_spl_with_ucode_ptr.py +++ b/tools/binman/etype/u_boot_spl_with_ucode_ptr.py @@ -21,7 +21,7 @@ class Entry_u_boot_spl_with_ucode_ptr(Entry_u_boot_with_ucode_ptr): process. """ def __init__(self, image, etype, node): - Entry_blob.__init__(self, image, etype, node) + Entry_u_boot_with_ucode_ptr.__init__(self, image, etype, node) self.elf_fname = 'spl/u-boot-spl'
def GetDefaultFilename(self):

On 18 January 2017 at 04:32, Bin Meng bmeng.cn@gmail.com wrote:
u_boot_spl_with_ucode_ptr is derived from u_boot_with_ucode_ptr, hence it should call its parent's init.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
tools/binman/etype/u_boot_spl_with_ucode_ptr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Glass sjg@chromium.org

On Thu, Jan 26, 2017 at 10:22 PM, Simon Glass sjg@chromium.org wrote:
On 18 January 2017 at 04:32, Bin Meng bmeng.cn@gmail.com wrote:
u_boot_spl_with_ucode_ptr is derived from u_boot_with_ucode_ptr, hence it should call its parent's init.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
tools/binman/etype/u_boot_spl_with_ucode_ptr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Glass sjg@chromium.org
applied to u-boot-x86, thanks!

On platforms which do not require microcode in SPL, handle such case like U-Boot proper.
Signed-off-by: Bin Meng bmeng.cn@gmail.com ---
tools/binman/etype/u_boot_ucode.py | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/tools/binman/etype/u_boot_ucode.py b/tools/binman/etype/u_boot_ucode.py index 8fe27ac..8e51e99 100644 --- a/tools/binman/etype/u_boot_ucode.py +++ b/tools/binman/etype/u_boot_ucode.py @@ -62,6 +62,12 @@ class Entry_u_boot_ucode(Entry_blob): self.data = '' return True
+ # Handle microcode in SPL image as well + ucode_dest_entry = self.image.FindEntryType('u-boot-spl-with-ucode-ptr') + if ucode_dest_entry and not ucode_dest_entry.target_pos: + self.data = '' + return True + # Get the microcode from the device tree entry fdt_entry = self.image.FindEntryType('u-boot-dtb-with-ucode') if not fdt_entry or not fdt_entry.ucode_data:

On 18 January 2017 at 04:33, Bin Meng bmeng.cn@gmail.com wrote:
On platforms which do not require microcode in SPL, handle such case like U-Boot proper.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
tools/binman/etype/u_boot_ucode.py | 6 ++++++ 1 file changed, 6 insertions(+)
Reviewed-by: Simon Glass sjg@chromium.org

On Thu, Jan 26, 2017 at 10:23 PM, Simon Glass sjg@chromium.org wrote:
On 18 January 2017 at 04:33, Bin Meng bmeng.cn@gmail.com wrote:
On platforms which do not require microcode in SPL, handle such case like U-Boot proper.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
tools/binman/etype/u_boot_ucode.py | 6 ++++++ 1 file changed, 6 insertions(+)
Reviewed-by: Simon Glass sjg@chromium.org
applied to u-boot-x86, thanks!

SPL prints "Trying to boot from %s" without a LF. Add one to improve reading on the serial console.
Signed-off-by: Bin Meng bmeng.cn@gmail.com ---
common/spl/spl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/spl/spl.c b/common/spl/spl.c index 8fb8da4..1210da3 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -266,7 +266,7 @@ static int boot_from_devices(struct spl_image_info *spl_image, loader = spl_ll_find_loader(spl_boot_list[i]); #if defined(CONFIG_SPL_SERIAL_SUPPORT) && defined(CONFIG_SPL_LIBCOMMON_SUPPORT) if (loader) - printf("Trying to boot from %s", loader->name); + printf("Trying to boot from %s\n", loader->name); else puts("SPL: Unsupported Boot Device!\n"); #endif

On 18 January 2017 at 04:33, Bin Meng bmeng.cn@gmail.com wrote:
SPL prints "Trying to boot from %s" without a LF. Add one to improve reading on the serial console.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
common/spl/spl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Glass sjg@chromium.org

On Wed, Jan 25, 2017 at 12:09 PM, Simon Glass sjg@chromium.org wrote:
On 18 January 2017 at 04:33, Bin Meng bmeng.cn@gmail.com wrote:
SPL prints "Trying to boot from %s" without a LF. Add one to improve reading on the serial console.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
common/spl/spl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Glass sjg@chromium.org
Drop this commit, since another commit has been merged to mainstream already:
commit cf947da19aecd1b430f22d73ad109af64a6051b5 Author: Andrew F. Davis afd@ti.com Date: Thu Jan 12 10:19:55 2017 -0600
spl: Add some missing newlines
Signed-off-by: Andrew F. Davis afd@ti.com Acked-by: Lokesh Vutla lokeshvutla@ti.com Acked-by: Michal Simek michal.simek@xilinx.com
Regards, Bin

Set up the 64-bit U-Boot text base if building for that target.
Signed-off-by: Bin Meng bmeng.cn@gmail.com ---
board/emulation/qemu-x86/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/board/emulation/qemu-x86/Kconfig b/board/emulation/qemu-x86/Kconfig index c9181fc..a773e8f 100644 --- a/board/emulation/qemu-x86/Kconfig +++ b/board/emulation/qemu-x86/Kconfig @@ -13,8 +13,8 @@ config SYS_CONFIG_NAME default "qemu-x86"
config SYS_TEXT_BASE - default 0xfff00000 if !EFI_STUB - default 0x01110000 if EFI_STUB + default 0xfff00000 if !EFI_STUB && !SUPPORT_SPL + default 0x01110000 if EFI_STUB || SUPPORT_SPL
config BOARD_SPECIFIC_OPTIONS # dummy def_bool y

On 18 January 2017 at 04:33, Bin Meng bmeng.cn@gmail.com wrote:
Set up the 64-bit U-Boot text base if building for that target.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
board/emulation/qemu-x86/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org

On Wed, Jan 25, 2017 at 12:09 PM, Simon Glass sjg@chromium.org wrote:
On 18 January 2017 at 04:33, Bin Meng bmeng.cn@gmail.com wrote:
Set up the 64-bit U-Boot text base if building for that target.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
board/emulation/qemu-x86/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org
applied to u-boot-x86, thanks!

If SPL is used we want to use the generic SPL framework and boot from SPI via a board-specific means. Add these options to the board config file.
Signed-off-by: Bin Meng bmeng.cn@gmail.com ---
include/configs/qemu-x86.h | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/include/configs/qemu-x86.h b/include/configs/qemu-x86.h index 4783563..d4acd67 100644 --- a/include/configs/qemu-x86.h +++ b/include/configs/qemu-x86.h @@ -54,4 +54,13 @@ #undef CONFIG_ENV_IS_IN_SPI_FLASH #define CONFIG_ENV_IS_NOWHERE
+#define CONFIG_SPL_FRAMEWORK + +#define CONFIG_SPL_TEXT_BASE 0xfffd0000 + +#define BOOT_DEVICE_SPI 10 + +#define CONFIG_SPL_BOARD_LOAD_IMAGE +#define BOOT_DEVICE_BOARD 11 + #endif /* __CONFIG_H */

On 18 January 2017 at 04:33, Bin Meng bmeng.cn@gmail.com wrote:
If SPL is used we want to use the generic SPL framework and boot from SPI via a board-specific means. Add these options to the board config file.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
include/configs/qemu-x86.h | 9 +++++++++ 1 file changed, 9 insertions(+)
Reviewed-by: Simon Glass sjg@chromium.org

On Wed, Jan 25, 2017 at 12:09 PM, Simon Glass sjg@chromium.org wrote:
On 18 January 2017 at 04:33, Bin Meng bmeng.cn@gmail.com wrote:
If SPL is used we want to use the generic SPL framework and boot from SPI via a board-specific means. Add these options to the board config file.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
include/configs/qemu-x86.h | 9 +++++++++ 1 file changed, 9 insertions(+)
Reviewed-by: Simon Glass sjg@chromium.org
applied to u-boot-x86, thanks!

Add a new board config which uses 64-bit U-Boot. Supported features are the same as the other 64-bit board (Google Chromebook Link). It is a start for us to test 64-bit U-Boot easily without the need to access a real hardware.
Note CONFIG_SPL_ENV_SUPPORT is required for QEMU 64-bit as without this the SPL build fails at the end. This is just a workaround as CONFIG_SPL_ENV_SUPPORT is not needed at all.
common/built-in.o:(.data.env_htab+0xc): undefined reference to 'env_flags_validate' lib/built-in.o: In function `hsearch_r': lib/hashtable.c:380: undefined reference to 'env_callback_init' lib/hashtable.c:382: undefined reference to 'env_flags_init' make[1]: *** [spl/u-boot-spl] Error 1
Except those SPL options required by 64-bit, compared to 32-bit config, the following options are different:
- CONFIG_SYS_MALLOC_F_LEN has to be increased to 0x1000 for SPL. - CONFIG_DEBUG_UART has to be included due to the weird issue. See TODO comments in arch/x86/cpu/x86_64/cpu.c:arch_setup_gd(). Once this issue gets fixed, debug uart can be optional.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
---
board/emulation/Kconfig | 7 ++++ board/emulation/qemu-x86/Kconfig | 2 +- board/emulation/qemu-x86/MAINTAINERS | 7 ++++ configs/qemu-x86_64_defconfig | 80 ++++++++++++++++++++++++++++++++++++ 4 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 configs/qemu-x86_64_defconfig
diff --git a/board/emulation/Kconfig b/board/emulation/Kconfig index 36809fd..6d55dca 100644 --- a/board/emulation/Kconfig +++ b/board/emulation/Kconfig @@ -18,6 +18,13 @@ config TARGET_QEMU_X86 supported by U-Boot. They are via QEMU '-M pc', an i440FX/PIIX chipset platform and '-M q35', a Q35/ICH9 chipset platform.
+config TARGET_QEMU_X86_64 + bool "QEMU x86 64-bit" + help + This is the QEMU emulated x86 64-bit board. With this config + U-Boot is built as a 64-bit binary. This allows testing while + this feature is being completed. + endchoice
source "board/emulation/qemu-x86/Kconfig" diff --git a/board/emulation/qemu-x86/Kconfig b/board/emulation/qemu-x86/Kconfig index a773e8f..a593f8c 100644 --- a/board/emulation/qemu-x86/Kconfig +++ b/board/emulation/qemu-x86/Kconfig @@ -1,4 +1,4 @@ -if TARGET_QEMU_X86 +if TARGET_QEMU_X86 || TARGET_QEMU_X86_64
config SYS_BOARD default "qemu-x86" diff --git a/board/emulation/qemu-x86/MAINTAINERS b/board/emulation/qemu-x86/MAINTAINERS index 54dc2c5..4cf8ac9 100644 --- a/board/emulation/qemu-x86/MAINTAINERS +++ b/board/emulation/qemu-x86/MAINTAINERS @@ -6,3 +6,10 @@ F: include/configs/qemu-x86.h F: configs/qemu-x86_defconfig F: configs/qemu-x86_efi_payload32_defconfig F: configs/qemu-x86_efi_payload64_defconfig + +QEMU X86 64-bit BOARD +M: Bin Meng bmeng.cn@gmail.com +S: Maintained +F: board/emulation/qemu-x86/ +F: include/configs/qemu-x86.h +F: configs/qemu-x86_64_defconfig diff --git a/configs/qemu-x86_64_defconfig b/configs/qemu-x86_64_defconfig new file mode 100644 index 0000000..484e2e9 --- /dev/null +++ b/configs/qemu-x86_64_defconfig @@ -0,0 +1,80 @@ +CONFIG_X86=y +CONFIG_SPL_LIBCOMMON_SUPPORT=y +CONFIG_SPL_LIBGENERIC_SUPPORT=y +CONFIG_SYS_MALLOC_F_LEN=0x1000 +CONFIG_MAX_CPUS=2 +CONFIG_SPL_SERIAL_SUPPORT=y +CONFIG_SPL_ENV_SUPPORT=y +CONFIG_SPL_DRIVERS_MISC_SUPPORT=y +CONFIG_SPL_SPI_FLASH_SUPPORT=y +CONFIG_SPL_SPI_SUPPORT=y +CONFIG_X86_RUN_64BIT=y +CONFIG_DEFAULT_DEVICE_TREE="qemu-x86_i440fx" +CONFIG_TARGET_QEMU_X86_64=y +CONFIG_SMP=y +CONFIG_GENERATE_PIRQ_TABLE=y +CONFIG_GENERATE_MP_TABLE=y +CONFIG_GENERATE_ACPI_TABLE=y +CONFIG_FIT=y +CONFIG_SPL_LOAD_FIT=y +CONFIG_BOOTSTAGE=y +CONFIG_BOOTSTAGE_REPORT=y +CONFIG_SYS_CONSOLE_INFO_QUIET=y +CONFIG_SPL_SYS_MALLOC_SIMPLE=y +CONFIG_SPL_CPU_SUPPORT=y +CONFIG_SPL_NET_SUPPORT=y +CONFIG_SPL_PCI_SUPPORT=y +CONFIG_SPL_PCH_SUPPORT=y +CONFIG_SPL_RTC_SUPPORT=y +CONFIG_SPL_TIMER_SUPPORT=y +CONFIG_HUSH_PARSER=y +CONFIG_CMD_CPU=y +# CONFIG_CMD_BOOTEFI_HELLO_COMPILE is not set +# CONFIG_CMD_IMLS is not set +# CONFIG_CMD_FLASH is not set +CONFIG_CMD_SF=y +CONFIG_CMD_SPI=y +CONFIG_CMD_USB=y +# CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_DHCP=y +# CONFIG_CMD_NFS is not set +CONFIG_CMD_PING=y +CONFIG_CMD_TIME=y +CONFIG_CMD_QFW=y +CONFIG_CMD_BOOTSTAGE=y +CONFIG_CMD_EXT2=y +CONFIG_CMD_EXT4=y +CONFIG_CMD_EXT4_WRITE=y +CONFIG_CMD_FAT=y +CONFIG_CMD_FS_GENERIC=y +CONFIG_OF_CONTROL=y +CONFIG_SPL_OF_CONTROL=y +CONFIG_SPL_DM=y +CONFIG_REGMAP=y +CONFIG_SPL_REGMAP=y +CONFIG_SYSCON=y +CONFIG_SPL_SYSCON=y +CONFIG_CPU=y +CONFIG_SPI_FLASH=y +CONFIG_SPI_FLASH_GIGADEVICE=y +CONFIG_SPI_FLASH_MACRONIX=y +CONFIG_SPI_FLASH_WINBOND=y +CONFIG_DM_ETH=y +CONFIG_E1000=y +CONFIG_DM_PCI=y +CONFIG_DM_RTC=y +CONFIG_DEBUG_UART=y +CONFIG_DEBUG_UART_BASE=0x3f8 +CONFIG_DEBUG_UART_CLOCK=1843200 +CONFIG_SYS_NS16550=y +CONFIG_TIMER=y +CONFIG_USB=y +CONFIG_DM_USB=y +CONFIG_USB_STORAGE=y +CONFIG_USB_KEYBOARD=y +CONFIG_DM_VIDEO=y +CONFIG_VIDEO_VESA=y +CONFIG_FRAMEBUFFER_SET_VESA_MODE=y +CONFIG_FRAMEBUFFER_VESA_MODE_111=y +CONFIG_CONSOLE_SCROLL_LINES=5 +CONFIG_USE_PRIVATE_LIBGCC=y

On 18 January 2017 at 04:33, Bin Meng bmeng.cn@gmail.com wrote:
Add a new board config which uses 64-bit U-Boot. Supported features are the same as the other 64-bit board (Google Chromebook Link). It is a start for us to test 64-bit U-Boot easily without the need to access a real hardware.
Note CONFIG_SPL_ENV_SUPPORT is required for QEMU 64-bit as without this the SPL build fails at the end. This is just a workaround as CONFIG_SPL_ENV_SUPPORT is not needed at all.
common/built-in.o:(.data.env_htab+0xc): undefined reference to 'env_flags_validate' lib/built-in.o: In function `hsearch_r': lib/hashtable.c:380: undefined reference to 'env_callback_init' lib/hashtable.c:382: undefined reference to 'env_flags_init' make[1]: *** [spl/u-boot-spl] Error 1
Except those SPL options required by 64-bit, compared to 32-bit config, the following options are different:
- CONFIG_SYS_MALLOC_F_LEN has to be increased to 0x1000 for SPL.
- CONFIG_DEBUG_UART has to be included due to the weird issue. See TODO comments in arch/x86/cpu/x86_64/cpu.c:arch_setup_gd(). Once this issue gets fixed, debug uart can be optional.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
board/emulation/Kconfig | 7 ++++ board/emulation/qemu-x86/Kconfig | 2 +- board/emulation/qemu-x86/MAINTAINERS | 7 ++++ configs/qemu-x86_64_defconfig | 80 ++++++++++++++++++++++++++++++++++++ 4 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 configs/qemu-x86_64_defconfig
Reviewed-by: Simon Glass sjg@chromium.org

On Wed, Jan 25, 2017 at 12:09 PM, Simon Glass sjg@chromium.org wrote:
On 18 January 2017 at 04:33, Bin Meng bmeng.cn@gmail.com wrote:
Add a new board config which uses 64-bit U-Boot. Supported features are the same as the other 64-bit board (Google Chromebook Link). It is a start for us to test 64-bit U-Boot easily without the need to access a real hardware.
Note CONFIG_SPL_ENV_SUPPORT is required for QEMU 64-bit as without this the SPL build fails at the end. This is just a workaround as CONFIG_SPL_ENV_SUPPORT is not needed at all.
common/built-in.o:(.data.env_htab+0xc): undefined reference to 'env_flags_validate' lib/built-in.o: In function `hsearch_r': lib/hashtable.c:380: undefined reference to 'env_callback_init' lib/hashtable.c:382: undefined reference to 'env_flags_init' make[1]: *** [spl/u-boot-spl] Error 1
Except those SPL options required by 64-bit, compared to 32-bit config, the following options are different:
- CONFIG_SYS_MALLOC_F_LEN has to be increased to 0x1000 for SPL.
- CONFIG_DEBUG_UART has to be included due to the weird issue. See TODO comments in arch/x86/cpu/x86_64/cpu.c:arch_setup_gd(). Once this issue gets fixed, debug uart can be optional.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
board/emulation/Kconfig | 7 ++++ board/emulation/qemu-x86/Kconfig | 2 +- board/emulation/qemu-x86/MAINTAINERS | 7 ++++ configs/qemu-x86_64_defconfig | 80 ++++++++++++++++++++++++++++++++++++ 4 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 configs/qemu-x86_64_defconfig
Reviewed-by: Simon Glass sjg@chromium.org
applied to u-boot-x86, thanks!

Hi Bin,
On 18 January 2017 at 04:32, Bin Meng bmeng.cn@gmail.com wrote:
This brings U-Boot x86 64-bit support on QEMU target.
This series is available at u-boot-x86/qemu64-working for testing.
Bin Meng (14): x86: qemu: Add missing DECLARE_GLOBAL_DATA_PTR in e820.c x86: Wrap print_ch() with config option x86: spl: Add weak arch_cpu_init_dm() x86: Compile irq.c for 64-bit x86: qemu: Hide arch_cpu_init() and print_cpuinfo() for U-Boot proper x86: qemu: Fix compiler warnings for 64-bit x86: qemu: Set up device tree for SPL x86: qemu: Mark ucode as optional for SPL in u-boot.dtsi tools: binman: Call correct init for Entry_u_boot_spl_with_ucode_ptr tools: binman: Handle optional microcode case in SPL image spl: Add a LF to the loading message x86: qemu: Add a text base for 64-bit U-Boot x86: qemu: Add build options for SPL x86: qemu: Add a config for 64-bit U-Boot
arch/x86/cpu/Makefile | 2 +- arch/x86/cpu/irq.c | 6 +- arch/x86/cpu/qemu/e820.c | 2 + arch/x86/cpu/qemu/qemu.c | 7 ++- arch/x86/cpu/x86_64/cpu.c | 2 + arch/x86/dts/emulation-u-boot.dtsi | 6 ++ arch/x86/dts/qemu-x86_i440fx.dts | 4 ++ arch/x86/dts/qemu-x86_q35.dts | 4 ++ arch/x86/lib/spl.c | 5 ++ board/emulation/Kconfig | 7 +++ board/emulation/qemu-x86/Kconfig | 6 +- board/emulation/qemu-x86/MAINTAINERS | 7 +++ common/spl/spl.c | 2 +- configs/qemu-x86_64_defconfig | 80 +++++++++++++++++++++++++ include/configs/qemu-x86.h | 9 +++ tools/binman/etype/u_boot_spl_with_ucode_ptr.py | 2 +- tools/binman/etype/u_boot_ucode.py | 6 ++ 17 files changed, 146 insertions(+), 11 deletions(-) create mode 100644 configs/qemu-x86_64_defconfig
-- 2.9.2
One point I noted in trying this out is that the binman tests fail now, since this commit:
d26a38f binman: Remove hard-coded file name for x86 CMC/FSP/VGA
Could you please take a look?
Regards, Simon

Hi Simon,
On Thu, Jan 26, 2017 at 10:23 PM, Simon Glass sjg@chromium.org wrote:
Hi Bin,
On 18 January 2017 at 04:32, Bin Meng bmeng.cn@gmail.com wrote:
This brings U-Boot x86 64-bit support on QEMU target.
This series is available at u-boot-x86/qemu64-working for testing.
Bin Meng (14): x86: qemu: Add missing DECLARE_GLOBAL_DATA_PTR in e820.c x86: Wrap print_ch() with config option x86: spl: Add weak arch_cpu_init_dm() x86: Compile irq.c for 64-bit x86: qemu: Hide arch_cpu_init() and print_cpuinfo() for U-Boot proper x86: qemu: Fix compiler warnings for 64-bit x86: qemu: Set up device tree for SPL x86: qemu: Mark ucode as optional for SPL in u-boot.dtsi tools: binman: Call correct init for Entry_u_boot_spl_with_ucode_ptr tools: binman: Handle optional microcode case in SPL image spl: Add a LF to the loading message x86: qemu: Add a text base for 64-bit U-Boot x86: qemu: Add build options for SPL x86: qemu: Add a config for 64-bit U-Boot
arch/x86/cpu/Makefile | 2 +- arch/x86/cpu/irq.c | 6 +- arch/x86/cpu/qemu/e820.c | 2 + arch/x86/cpu/qemu/qemu.c | 7 ++- arch/x86/cpu/x86_64/cpu.c | 2 + arch/x86/dts/emulation-u-boot.dtsi | 6 ++ arch/x86/dts/qemu-x86_i440fx.dts | 4 ++ arch/x86/dts/qemu-x86_q35.dts | 4 ++ arch/x86/lib/spl.c | 5 ++ board/emulation/Kconfig | 7 +++ board/emulation/qemu-x86/Kconfig | 6 +- board/emulation/qemu-x86/MAINTAINERS | 7 +++ common/spl/spl.c | 2 +- configs/qemu-x86_64_defconfig | 80 +++++++++++++++++++++++++ include/configs/qemu-x86.h | 9 +++ tools/binman/etype/u_boot_spl_with_ucode_ptr.py | 2 +- tools/binman/etype/u_boot_ucode.py | 6 ++ 17 files changed, 146 insertions(+), 11 deletions(-) create mode 100644 configs/qemu-x86_64_defconfig
-- 2.9.2
One point I noted in trying this out is that the binman tests fail now, since this commit:
d26a38f binman: Remove hard-coded file name for x86 CMC/FSP/VGA
Could you please take a look?
I will look into this.
Regards, Bin
participants (2)
-
Bin Meng
-
Simon Glass