summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-08-09 20:17:34 +0300
committerTom Rini <trini@konsulko.com>2023-08-09 20:17:34 +0300
commitec58228830a1f68e8e65099387cf12c5a91c9e72 (patch)
tree391ed6ad5f3fddcb88c976b0d413fa3912e68c40 /arch
parentf26eda936bfb49c99d3c7829d416809013b95d3f (diff)
parent9234b77b9d42ebd77585091a072b4ab958ba83ed (diff)
downloadu-boot-ec58228830a1f68e8e65099387cf12c5a91c9e72.tar.xz
Merge tag 'x86-pull-20230809' of https://source.denx.de/u-boot/custodians/u-boot-x86
- x86: Fixes for distro booting - x86: Move some boards to text environment
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/cpu/qemu/Kconfig2
-rw-r--r--arch/x86/cpu/qemu/dram.c1
-rw-r--r--arch/x86/cpu/qemu/e820.c1
-rw-r--r--arch/x86/cpu/qemu/qemu.c2
-rw-r--r--arch/x86/include/asm/qemu.h14
-rw-r--r--arch/x86/lib/bios.c2
-rw-r--r--arch/x86/lib/i8254.c1
-rw-r--r--arch/x86/lib/physmem.c3
-rw-r--r--arch/x86/lib/spl.c4
9 files changed, 25 insertions, 5 deletions
diff --git a/arch/x86/cpu/qemu/Kconfig b/arch/x86/cpu/qemu/Kconfig
index aa329b0dab..f8f2f64730 100644
--- a/arch/x86/cpu/qemu/Kconfig
+++ b/arch/x86/cpu/qemu/Kconfig
@@ -12,7 +12,7 @@ config QEMU
imply SYS_NS16550
imply USB
imply USB_EHCI_HCD
- imply VIDEO_BOCHS
+ imply VIDEO_VESA
if QEMU
diff --git a/arch/x86/cpu/qemu/dram.c b/arch/x86/cpu/qemu/dram.c
index 595c397d4a..1a52d1dc52 100644
--- a/arch/x86/cpu/qemu/dram.c
+++ b/arch/x86/cpu/qemu/dram.c
@@ -8,6 +8,7 @@
#include <asm/global_data.h>
#include <asm/post.h>
#include <asm/arch/qemu.h>
+#include <linux/sizes.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/qemu/e820.c b/arch/x86/cpu/qemu/e820.c
index 19e54c5202..ebfe595644 100644
--- a/arch/x86/cpu/qemu/e820.c
+++ b/arch/x86/cpu/qemu/e820.c
@@ -12,6 +12,7 @@
#include <asm/e820.h>
#include <asm/arch/qemu.h>
#include <asm/global_data.h>
+#include <linux/sizes.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/qemu/qemu.c b/arch/x86/cpu/qemu/qemu.c
index 274978c023..7041455608 100644
--- a/arch/x86/cpu/qemu/qemu.c
+++ b/arch/x86/cpu/qemu/qemu.c
@@ -48,7 +48,7 @@ static void enable_pm_ich9(void)
pci_write_config32(ICH9_PM, PMBA, CONFIG_ACPI_PM1_BASE | 1);
}
-static void qemu_chipset_init(void)
+void qemu_chipset_init(void)
{
u16 device, xbcs;
int pam, i;
diff --git a/arch/x86/include/asm/qemu.h b/arch/x86/include/asm/qemu.h
new file mode 100644
index 0000000000..f1e95ffd7a
--- /dev/null
+++ b/arch/x86/include/asm/qemu.h
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Generic QEMU header
+ *
+ * Copyright 2023 Google LLC
+ */
+
+#ifndef __QEMU_H
+#define __QEMU_H
+
+/* set up the chipset for QEMU so that video can be used */
+void qemu_chipset_init(void);
+
+#endif
diff --git a/arch/x86/lib/bios.c b/arch/x86/lib/bios.c
index e29cae78e5..f146bbd542 100644
--- a/arch/x86/lib/bios.c
+++ b/arch/x86/lib/bios.c
@@ -204,7 +204,7 @@ static u8 vbe_get_mode_info(struct vesa_state *mi)
realmode_interrupt(0x10, VESA_GET_MODE_INFO, 0x0000, mi->video_mode,
0x0000, buffer_seg, buffer_adr);
- memcpy(mi->mode_info_block, buffer, sizeof(struct vesa_state));
+ memcpy(mi->mode_info_block, buffer, sizeof(struct vesa_mode_info));
mi->valid = true;
return 0;
diff --git a/arch/x86/lib/i8254.c b/arch/x86/lib/i8254.c
index 0f97538910..a8d1db188e 100644
--- a/arch/x86/lib/i8254.c
+++ b/arch/x86/lib/i8254.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <asm/io.h>
#include <asm/i8254.h>
+#include <asm/ibmpc.h>
#define TIMER1_VALUE 18 /* 15.6us */
#define BEEP_FREQUENCY_HZ 440
diff --git a/arch/x86/lib/physmem.c b/arch/x86/lib/physmem.c
index 1eb97ac5bb..382f768149 100644
--- a/arch/x86/lib/physmem.c
+++ b/arch/x86/lib/physmem.c
@@ -14,6 +14,7 @@
#include <asm/cpu.h>
#include <asm/global_data.h>
#include <linux/compiler.h>
+#include <linux/sizes.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -144,7 +145,7 @@ static void x86_phys_memset_page(phys_addr_t map_addr, uintptr_t offset, int c,
/* Make sure the window is below U-Boot. */
assert(window + LARGE_PAGE_SIZE <
- gd->relocaddr - CONFIG_SYS_MALLOC_LEN - CFG_SYS_STACK_SIZE);
+ gd->relocaddr - CONFIG_SYS_MALLOC_LEN - SZ_32K);
/* Map the page into the window and then memset the appropriate part. */
x86_phys_map_page(window, map_addr, 1);
memset((void *)(window + offset), c, size);
diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c
index b6812bb8ca..f99df08fbe 100644
--- a/arch/x86/lib/spl.c
+++ b/arch/x86/lib/spl.c
@@ -27,6 +27,7 @@
#include <asm/mtrr.h>
#include <asm/pci.h>
#include <asm/processor.h>
+#include <asm/qemu.h>
#include <asm/spl.h>
#include <asm-generic/sections.h>
@@ -137,7 +138,6 @@ static int x86_spl_init(void)
}
#ifndef CONFIG_SYS_COREBOOT
- log_debug("bss\n");
debug("BSS clear from %lx to %lx len %lx\n", (ulong)&__bss_start,
(ulong)&__bss_end, (ulong)&__bss_end - (ulong)&__bss_start);
memset(&__bss_start, 0, (ulong)&__bss_end - (ulong)&__bss_start);
@@ -292,6 +292,8 @@ void spl_board_init(void)
#ifndef CONFIG_TPL
preloader_console_init();
#endif
+ if (IS_ENABLED(CONFIG_QEMU))
+ qemu_chipset_init();
if (CONFIG_IS_ENABLED(VIDEO)) {
struct udevice *dev;