summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-07-09 09:54:22 -0400
committerTom Rini <trini@konsulko.com>2020-07-09 09:54:22 -0400
commit506d52308a2f5de48c2b9a08229fee9a0ee2842a (patch)
treed0d96d1fac8c0912155941f8b684f8654ce27d50 /arch
parentd9107930af63d88c2d84560db19e65f1a51c4cbd (diff)
parentdb17e40ccab6526a9db6ffdd071182a37dd888eb (diff)
downloadu-boot-506d52308a2f5de48c2b9a08229fee9a0ee2842a.tar.gz
u-boot-506d52308a2f5de48c2b9a08229fee9a0ee2842a.tar.xz
u-boot-506d52308a2f5de48c2b9a08229fee9a0ee2842a.zip
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86
- Add two- and three-argument versions of CONFIG_IS_ENABLED in linux/kconfig.h - Adds a new feature which supports copying modified parts of the frame buffer to the uncached hardware buffer - Enable the copy framebuffer on various x86 targets
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c2
-rw-r--r--arch/x86/cpu/apollolake/Makefile2
-rw-r--r--arch/x86/cpu/i386/cpu.c5
-rw-r--r--arch/x86/include/asm/u-boot-x86.h8
-rw-r--r--arch/x86/lib/fsp/fsp_graphics.c12
-rw-r--r--arch/x86/lib/fsp2/fsp_meminit.c1
6 files changed, 28 insertions, 2 deletions
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c b/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c
index 0722e4a891..cbf0120adc 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c
@@ -147,7 +147,7 @@ static int do_stm32prog(struct cmd_tbl *cmdtp, int flag, int argc,
/* Try bootm for legacy and FIT format image */
if (genimg_get_format((void *)uimage) != IMAGE_FORMAT_INVALID)
do_bootm(cmdtp, 0, 4, bootm_argv);
- else if CONFIG_IS_ENABLED(CMD_BOOTZ)
+ else if (CONFIG_IS_ENABLED(CMD_BOOTZ))
do_bootz(cmdtp, 0, 4, bootm_argv);
}
diff --git a/arch/x86/cpu/apollolake/Makefile b/arch/x86/cpu/apollolake/Makefile
index 11621256ae..3aa2a55676 100644
--- a/arch/x86/cpu/apollolake/Makefile
+++ b/arch/x86/cpu/apollolake/Makefile
@@ -3,6 +3,7 @@
# Copyright 2019 Google LLC
obj-$(CONFIG_SPL_BUILD) += cpu_spl.o
+obj-$(CONFIG_SPL_BUILD) += spl.o
obj-$(CONFIG_SPL_BUILD) += systemagent.o
obj-y += cpu_common.o
@@ -11,7 +12,6 @@ obj-y += cpu.o
obj-y += punit.o
obj-y += fsp_bindings.o
ifdef CONFIG_SPL_BUILD
-obj-y += spl.o
obj-y += fsp_m.o
endif
endif
diff --git a/arch/x86/cpu/i386/cpu.c b/arch/x86/cpu/i386/cpu.c
index 435e50edad..d27324cb4e 100644
--- a/arch/x86/cpu/i386/cpu.c
+++ b/arch/x86/cpu/i386/cpu.c
@@ -363,6 +363,11 @@ static void setup_cpu_features(void)
: : "i" (em_rst), "i" (mp_ne_set) : "eax");
}
+void cpu_reinit_fpu(void)
+{
+ asm ("fninit\n");
+}
+
static void setup_identity(void)
{
/* identify CPU via cpuid and store the decoded info into gd->arch */
diff --git a/arch/x86/include/asm/u-boot-x86.h b/arch/x86/include/asm/u-boot-x86.h
index 3e5d56d075..bd3f44014c 100644
--- a/arch/x86/include/asm/u-boot-x86.h
+++ b/arch/x86/include/asm/u-boot-x86.h
@@ -43,6 +43,14 @@ int x86_cpu_reinit_f(void);
*/
int x86_cpu_init_tpl(void);
+/**
+ * cpu_reinit_fpu() - Reinit the FPU if something is wrong with it
+ *
+ * The FSP-M code can leave registers in use in the FPU. This functions reinits
+ * it so that the FPU can be used safely
+ */
+void cpu_reinit_fpu(void);
+
int cpu_init_f(void);
void setup_gdt(struct global_data *id, u64 *gdt_addr);
/*
diff --git a/arch/x86/lib/fsp/fsp_graphics.c b/arch/x86/lib/fsp/fsp_graphics.c
index 6e23f3c95f..e8c1e07af1 100644
--- a/arch/x86/lib/fsp/fsp_graphics.c
+++ b/arch/x86/lib/fsp/fsp_graphics.c
@@ -117,6 +117,16 @@ err:
return ret;
}
+static int fsp_video_bind(struct udevice *dev)
+{
+ struct video_uc_platdata *plat = dev_get_uclass_platdata(dev);
+
+ /* Set the maximum supported resolution */
+ plat->size = 2560 * 1600 * 4;
+
+ return 0;
+}
+
static const struct udevice_id fsp_video_ids[] = {
{ .compatible = "fsp-fb" },
{ }
@@ -126,7 +136,9 @@ U_BOOT_DRIVER(fsp_video) = {
.name = "fsp_video",
.id = UCLASS_VIDEO,
.of_match = fsp_video_ids,
+ .bind = fsp_video_bind,
.probe = fsp_video_probe,
+ .flags = DM_FLAG_PRE_RELOC,
};
static struct pci_device_id fsp_video_supported[] = {
diff --git a/arch/x86/lib/fsp2/fsp_meminit.c b/arch/x86/lib/fsp2/fsp_meminit.c
index 1a758147b0..faf9c29aef 100644
--- a/arch/x86/lib/fsp2/fsp_meminit.c
+++ b/arch/x86/lib/fsp2/fsp_meminit.c
@@ -85,6 +85,7 @@ int fsp_memory_init(bool s3wake, bool use_spi_flash)
func = (fsp_memory_init_func)(hdr->img_base + hdr->fsp_mem_init);
ret = func(&upd, &hob);
bootstage_accum(BOOTSTAGE_ID_ACCUM_FSP_M);
+ cpu_reinit_fpu();
if (ret)
return log_msg_ret("SDRAM init fail\n", ret);