Skip to content

Commit

Permalink
Merge tag 'x86-pull-20230809' of https://source.denx.de/u-boot/custod…
Browse files Browse the repository at this point in the history
…ians/u-boot-x86

- x86: Fixes for distro booting
- x86: Move some boards to text environment
  • Loading branch information
trini committed Aug 9, 2023
2 parents f26eda9 + 9234b77 commit ec58228
Show file tree
Hide file tree
Showing 103 changed files with 404 additions and 326 deletions.
2 changes: 1 addition & 1 deletion arch/x86/cpu/qemu/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ config QEMU
imply SYS_NS16550
imply USB
imply USB_EHCI_HCD
imply VIDEO_BOCHS
imply VIDEO_VESA

if QEMU

Expand Down
1 change: 1 addition & 0 deletions arch/x86/cpu/qemu/dram.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions arch/x86/cpu/qemu/e820.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion arch/x86/cpu/qemu/qemu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
14 changes: 14 additions & 0 deletions arch/x86/include/asm/qemu.h
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion arch/x86/lib/bios.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions arch/x86/lib/i8254.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion arch/x86/lib/physmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
Expand Down
4 changes: 3 additions & 1 deletion arch/x86/lib/spl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
9 changes: 9 additions & 0 deletions board/coreboot/coreboot/coreboot.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright (C) 2018, Bin Meng <[email protected]>
*/

#include <env/x86.env>

splashsource=virtio_fs
splashimage=0x1000000
6 changes: 6 additions & 0 deletions board/efi/efi-x86_app/efi-x86_app.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright (c) 2015 Google, Inc
*/

#include <env/x86.env>
6 changes: 6 additions & 0 deletions board/efi/efi-x86_payload/efi-x86_payload.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright (C) 2018, Bin Meng <[email protected]>
*/

#include <env/x86.env>
6 changes: 6 additions & 0 deletions board/emulation/qemu-x86/qemu-x86.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright (C) 2015, Bin Meng <[email protected]>
*/

#include <env/x86.env>
9 changes: 9 additions & 0 deletions board/intel/bayleybay/bayleybay.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright (C) 2015, Bin Meng <[email protected]>
*/

#include <env/x86.env>

/* don't use i8042-kbd */
stdin=serial,usbkbd
9 changes: 9 additions & 0 deletions board/intel/cherryhill/cherryhill.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright (C) 2017, Bin Meng <[email protected]>
*/

#include <env/x86.env>

/* don't use i8042-kbd */
stdin=serial,usbkbd
6 changes: 6 additions & 0 deletions board/intel/cougarcanyon2/cougarcanyon2.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright (C) 2016, Bin Meng <[email protected]>
*/

#include <env/x86.env>
6 changes: 6 additions & 0 deletions board/intel/crownbay/crownbay.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright (C) 2014, Bin Meng <[email protected]>
*/

#include <env/x86.env>
6 changes: 6 additions & 0 deletions board/intel/edison/edison.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright (c) 2017 Intel Corp.
*/

/* empty environment */
11 changes: 11 additions & 0 deletions board/intel/galileo/galileo.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright (C) 2015, Bin Meng <[email protected]>
*/

#include <env/x86.env>

/* use just serial */
stdin=serial
stdout=serial
stderr=serial
11 changes: 11 additions & 0 deletions board/intel/minnowmax/minnowmax.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright (C) 2015 Google, Inc
*/

#include <env/x86.env>

/* don't use i8042-kbd */
stdin=usbkbd,serial

usb_pgood_delay=40
23 changes: 23 additions & 0 deletions board/intel/slimbootloader/slimbootloader.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright (C) 2019 Intel Corporation <www.intel.com>
*/

#include <env/x86.env>

/* don't use video */
stdout=serial
stderr=serial

usb_pgood_delay=40

ramdiskaddr=0x4000000
ramdiskfile=initrd
bootdev=usb
bootdevnum=0
bootdevpart=0
bootfsload=fatload
bootusb=setenv bootdev usb; boot
bootscsi=setenv bootdev scsi; boot
bootmmc=setenv bootdev mmc; boot
bootargs=console=ttyS0,115200 console=tty0
4 changes: 2 additions & 2 deletions board/keymile/km83xx/km83xx.env
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ netdev=eth0
uimage=uImage
#endif

#include <environment/pg-wcom/common.env>
#include <environment/pg-wcom/powerpc.env>
#include <env/pg-wcom/common.env>
#include <env/pg-wcom/powerpc.env>

#if CONFIG_TARGET_KMCOGE5NE
add_default+= eccmode=bch
Expand Down
2 changes: 1 addition & 1 deletion board/keymile/kmcent2/kmcent2.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <environment/pg-wcom/common.env>
#include <env/pg-wcom/common.env>

EEprom_ivm=pca9547:70:9
arch=ppc_82xx
Expand Down
2 changes: 1 addition & 1 deletion board/keymile/pg-wcom-ls102xa/pg-wcom-expu1.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#include <environment/pg-wcom/ls102xa.env>
#include <env/pg-wcom/ls102xa.env>

hostname=EXPU1
2 changes: 1 addition & 1 deletion board/keymile/pg-wcom-ls102xa/pg-wcom-seli8.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#include <environment/pg-wcom/ls102xa.env>
#include <env/pg-wcom/ls102xa.env>

hostname=SELI8
2 changes: 1 addition & 1 deletion board/siemens/iot2050/iot2050.env
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Jan Kiszka <[email protected]>
*/

#include <environment/ti/ti_armv7_common.env>
#include <env/ti/ti_armv7_common.env>

usb_pgood_delay=900

Expand Down
4 changes: 2 additions & 2 deletions board/ti/am62ax/am62ax.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <environment/ti/ti_armv7_common.env>
#include <environment/ti/mmc.env>
#include <env/ti/ti_armv7_common.env>
#include <env/ti/mmc.env>

default_device_tree=ti/k3-am62a7-sk.dtb
findfdt=
Expand Down
4 changes: 2 additions & 2 deletions board/ti/am62x/am62x.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <environment/ti/ti_armv7_common.env>
#include <environment/ti/mmc.env>
#include <env/ti/ti_armv7_common.env>
#include <env/ti/mmc.env>

default_device_tree=ti/k3-am625-sk.dtb
findfdt=
Expand Down
6 changes: 3 additions & 3 deletions board/ti/am64x/am64x.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <environment/ti/ti_armv7_common.env>
#include <environment/ti/mmc.env>
#include <environment/ti/k3_dfu.env>
#include <env/ti/ti_armv7_common.env>
#include <env/ti/mmc.env>
#include <env/ti/k3_dfu.env>

findfdt=
if test $board_name = am64x_gpevm; then
Expand Down
8 changes: 4 additions & 4 deletions board/ti/am65x/am65x.env
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include <environment/ti/ti_armv7_common.env>
#include <environment/ti/mmc.env>
#include <environment/ti/k3_dfu.env>
#include <env/ti/ti_armv7_common.env>
#include <env/ti/mmc.env>
#include <env/ti/k3_dfu.env>
#if CONFIG_CMD_REMOTEPROC
#include <environment/ti/k3_rproc.env>
#include <env/ti/k3_rproc.env>
#endif

findfdt=
Expand Down
10 changes: 5 additions & 5 deletions board/ti/j721e/j721e.env
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#include <environment/ti/ti_armv7_common.env>
#include <environment/ti/mmc.env>
#include <environment/ti/ufs.env>
#include <environment/ti/k3_dfu.env>
#include <env/ti/ti_armv7_common.env>
#include <env/ti/mmc.env>
#include <env/ti/ufs.env>
#include <env/ti/k3_dfu.env>

#if CONFIG_CMD_REMOTEPROC
#include <environment/ti/k3_rproc.env>
#include <env/ti/k3_rproc.env>
#endif

default_device_tree=ti/k3-j721e-common-proc-board.dtb
Expand Down
10 changes: 5 additions & 5 deletions board/ti/j721s2/j721s2.env
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#include <environment/ti/ti_armv7_common.env>
#include <environment/ti/mmc.env>
#include <environment/ti/ufs.env>
#include <environment/ti/k3_dfu.env>
#include <env/ti/ti_armv7_common.env>
#include <env/ti/mmc.env>
#include <env/ti/ufs.env>
#include <env/ti/k3_dfu.env>

#if CONFIG_CMD_REMOTEPROC
#include <environment/ti/k3_rproc.env>
#include <env/ti/k3_rproc.env>
#endif

default_device_tree=ti/k3-j721s2-common-proc-board.dtb
Expand Down
4 changes: 2 additions & 2 deletions board/ti/ks2_evm/k2e_evm.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <environment/ti/ti_armv7_common.env>
#include <environment/ti/ti_armv7_keystone2.env>
#include <env/ti/ti_armv7_common.env>
#include <env/ti/ti_armv7_keystone2.env>

findfdt=setenv fdtfile ${name_fdt}
boot=ubi
Expand Down
6 changes: 3 additions & 3 deletions board/ti/ks2_evm/k2g_evm.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <environment/ti/ti_armv7_common.env>
#include <environment/ti/ti_armv7_keystone2.env>
#include <environment/ti/mmc.env>
#include <env/ti/ti_armv7_common.env>
#include <env/ti/ti_armv7_keystone2.env>
#include <env/ti/mmc.env>

set_name_pmmc=setenv name_pmmc ti-sci-firmware-k2g.bin
dev_pmmc=0
Expand Down
4 changes: 2 additions & 2 deletions board/ti/ks2_evm/k2hk_evm.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <environment/ti/ti_armv7_common.env>
#include <environment/ti/ti_armv7_keystone2.env>
#include <env/ti/ti_armv7_common.env>
#include <env/ti/ti_armv7_keystone2.env>

findfdt=setenv fdtfile ${name_fdt}
boot=ubi
Expand Down
4 changes: 2 additions & 2 deletions board/ti/ks2_evm/k2l_evm.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <environment/ti/ti_armv7_common.env>
#include <environment/ti/ti_armv7_keystone2.env>
#include <env/ti/ti_armv7_common.env>
#include <env/ti/ti_armv7_keystone2.env>

findfdt=setenv fdtfile ${name_fdt}
boot=ubi
Expand Down
Loading

0 comments on commit ec58228

Please sign in to comment.