diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sandbox/dts/sandbox.dtsi | 13 | ||||
-rw-r--r-- | arch/sandbox/dts/test.dts | 15 | ||||
-rw-r--r-- | arch/sandbox/include/asm/test.h | 11 | ||||
-rw-r--r-- | arch/x86/lib/bios.c | 12 | ||||
-rw-r--r-- | arch/x86/lib/coreboot_table.c | 2 | ||||
-rw-r--r-- | arch/x86/lib/fsp/fsp_graphics.c | 4 |
6 files changed, 48 insertions, 9 deletions
diff --git a/arch/sandbox/dts/sandbox.dtsi b/arch/sandbox/dts/sandbox.dtsi index aa22b8765c8..56e6b38bfa7 100644 --- a/arch/sandbox/dts/sandbox.dtsi +++ b/arch/sandbox/dts/sandbox.dtsi @@ -12,6 +12,19 @@ chosen { stdout-path = "/serial"; + + fwupd { + compatible = "simple-bus"; + firmware { + compatible = "fwupd,vbe-simple"; + cur-version = "1.2.3"; + bootloader-version = "2022.01"; + storage = "mmc1"; + area-start = <0x0>; + area-size = <0x1000000>; + skip-offset = <0x8000>; + }; + }; }; audio: audio-codec { diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index d1a8cc7bfb7..2761588f0da 100644 --- a/arch/sandbox/dts/test.dts +++ b/arch/sandbox/dts/test.dts @@ -1387,6 +1387,21 @@ compatible = "denx,u-boot-fdt-test"; reg = <9 1>; }; + + fwupd { + compatible = "simple-bus"; + firmware0 { + compatible = "fwupd,vbe-simple"; + storage = "mmc1"; + area-start = <0x400>; + area-size = <0x1000>; + skip-offset = <0x200>; + state-offset = <0x400>; + state-size = <0x40>; + version-offset = <0x800>; + version-size = <0x100>; + }; + }; }; translation-test@8000 { diff --git a/arch/sandbox/include/asm/test.h b/arch/sandbox/include/asm/test.h index 015e96d53f8..53a036b3abf 100644 --- a/arch/sandbox/include/asm/test.h +++ b/arch/sandbox/include/asm/test.h @@ -304,4 +304,15 @@ int sandbox_cros_ec_get_pwm_duty(struct udevice *dev, uint index, uint *duty); */ int sandbox_sdl_set_bpp(struct udevice *dev, enum video_log2_bpp l2bpp); +/** + * sandbox_set_fake_efi_mgr_dev() - Control EFI bootmgr producing valid bootflow + * + * This is only used for testing. + * + * @dev: efi_mgr bootmeth device + * @fake_dev: true to produce a valid bootflow when requested, false to produce + * an error + */ +void sandbox_set_fake_efi_mgr_dev(struct udevice *dev, bool fake_dev); + #endif diff --git a/arch/x86/lib/bios.c b/arch/x86/lib/bios.c index 98cc05de2eb..94349ba8073 100644 --- a/arch/x86/lib/bios.c +++ b/arch/x86/lib/bios.c @@ -10,7 +10,7 @@ #include <bios_emul.h> #include <irq_func.h> #include <log.h> -#include <vbe.h> +#include <vesa.h> #include <linux/linkage.h> #include <asm/cache.h> #include <asm/processor.h> @@ -190,7 +190,7 @@ static void setup_realmode_idt(void) } #ifdef CONFIG_FRAMEBUFFER_SET_VESA_MODE -static u8 vbe_get_mode_info(struct vbe_mode_info *mi) +static u8 vbe_get_mode_info(struct vesa_state *mi) { u16 buffer_seg; u16 buffer_adr; @@ -204,13 +204,13 @@ static u8 vbe_get_mode_info(struct vbe_mode_info *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 vbe_mode_info)); + memcpy(mi->mode_info_block, buffer, sizeof(struct vesa_state)); mi->valid = true; return 0; } -static u8 vbe_set_mode(struct vbe_mode_info *mi) +static u8 vbe_set_mode(struct vesa_state *mi) { int video_mode = mi->video_mode; @@ -225,7 +225,7 @@ static u8 vbe_set_mode(struct vbe_mode_info *mi) return 0; } -static void vbe_set_graphics(int vesa_mode, struct vbe_mode_info *mode_info) +static void vbe_set_graphics(int vesa_mode, struct vesa_state *mode_info) { unsigned char *framebuffer; @@ -249,7 +249,7 @@ static void vbe_set_graphics(int vesa_mode, struct vbe_mode_info *mode_info) #endif /* CONFIG_FRAMEBUFFER_SET_VESA_MODE */ void bios_run_on_x86(struct udevice *dev, unsigned long addr, int vesa_mode, - struct vbe_mode_info *mode_info) + struct vesa_state *mode_info) { pci_dev_t pcidev = dm_pci_get_bdf(dev); u32 num_dev; diff --git a/arch/x86/lib/coreboot_table.c b/arch/x86/lib/coreboot_table.c index 6eab0452fda..05519d851a9 100644 --- a/arch/x86/lib/coreboot_table.c +++ b/arch/x86/lib/coreboot_table.c @@ -6,7 +6,7 @@ #include <common.h> #include <malloc.h> #include <net.h> -#include <vbe.h> +#include <vesa.h> #include <acpi/acpi_s3.h> #include <asm/coreboot_tables.h> #include <asm/e820.h> diff --git a/arch/x86/lib/fsp/fsp_graphics.c b/arch/x86/lib/fsp/fsp_graphics.c index 02fd05c9faf..b07c666caf7 100644 --- a/arch/x86/lib/fsp/fsp_graphics.c +++ b/arch/x86/lib/fsp/fsp_graphics.c @@ -9,7 +9,7 @@ #include <dm.h> #include <init.h> #include <log.h> -#include <vbe.h> +#include <vesa.h> #include <video.h> #include <acpi/acpi_table.h> #include <asm/fsp/fsp_support.h> @@ -106,7 +106,7 @@ static int fsp_video_probe(struct udevice *dev) vesa->phys_base_ptr = dm_pci_read_bar32(dev, 2); gd->fb_base = vesa->phys_base_ptr; - ret = vbe_setup_video_priv(vesa, uc_priv, plat); + ret = vesa_setup_video_priv(vesa, uc_priv, plat); if (ret) goto err; |