diff options
| author | Simon Glass <sjg@chromium.org> | 2025-01-10 17:00:20 -0700 | 
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2025-01-22 17:08:23 -0600 | 
| commit | 44e39ff6acf080379c279de402ec58731d0fe66a (patch) | |
| tree | 42cfd8f15d30dd5b6f5bfd0a06c9029176087a7d /arch/x86/lib | |
| parent | 97425461e7be88c047f7acb3d701c74cf2acac39 (diff) | |
x86: Show an error if video fails
If video is enabled we expect it to work. Avoid silent failure by adding
a panic if things go wrong.
Expand the SPL malloc-area for qemu-x86_64 to avoid a panic.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/x86/lib')
| -rw-r--r-- | arch/x86/lib/spl.c | 9 | 
1 files changed, 7 insertions, 2 deletions
| diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c index f761fbc8bc3..aad748532d0 100644 --- a/arch/x86/lib/spl.c +++ b/arch/x86/lib/spl.c @@ -300,9 +300,14 @@ void spl_board_init(void)  	if (CONFIG_IS_ENABLED(VIDEO)) {  		struct udevice *dev; +		int ret;  		/* Set up PCI video in SPL if required */ -		uclass_first_device_err(UCLASS_PCI, &dev); -		uclass_first_device_err(UCLASS_VIDEO, &dev); +		ret = uclass_first_device_err(UCLASS_PCI, &dev); +		if (ret) +			panic("Failed to set up PCI"); +		ret = uclass_first_device_err(UCLASS_VIDEO, &dev); +		if (ret) +			panic("Failed to set up video");  	}  } | 
