[U-Boot] sandbox does not complete efi_selftest

Alexander Graf agraf at suse.de
Wed Sep 19 02:25:03 UTC 2018



On 18.09.18 17:52, Heinrich Schuchardt wrote:
> On 09/19/2018 01:12 AM, Alexander Graf wrote:
>>
>>
>> On 17.09.18 15:44, Heinrich Schuchardt wrote:
>>> On 09/16/2018 07:45 AM, Simon Glass wrote:
>>>> Hi Heinrich,
>>>>
>>>
>>> With https://patchwork.ozlabs.org/patch/965315/ we can see where the
>>> problem occurs. The ConsoleSandbox seems to hang on the detection of the
>>> console size (172*42 is the size of my console). This problem does not
>>> occur when running the same interactively.
>>
>> I don't understand this. When I run u-boot with </dev/null it
>> successfully times out and proceeds.
>>
>>
>> Alex
>>
> 
> $ make mrproper && make sandbox_defconfig && make
> $ ./u-boot -v -d u-boot.dtb -c 'bootefi selftest'
> 
> leads to a segmentation fault. See output below.
> 
> This is the segmentation fault that leads to OSError when running 'make
> tests'.
> 
> Best regards
> 
> Heinrich Schuchardt
> 
> U-Boot 2018.09-00269-ga2b22dffcb (Sep 19 2018 - 02:47:16 +0200)
> 
> Model: sandbox
> DRAM:  128 MiB
> 
> Warning: host_lo MAC addresses don't match:
> Address in ROM is          f2:1a:c7:df:78:d4
> Address in environment is  00:00:11:22:33:44
> 
> Warning: host_enp2s0 MAC addresses don't match:
> Address in ROM is          f2:1a:c7:df:78:d4
> Address in environment is  00:00:11:22:33:45
> 
> Warning: host_wlp4s0 using MAC address from ROM
> MMC:
> In:    cros-ec-keyb
> Out:   vidconsole
> Err:   vidconsole
> Model: sandbox
> SCSI:
> Net:   eth0: host_lo, eth1: host_enp2s0, eth2: host_wlp4s0, eth3:
> eth at 10002000
> Found 0 disks
> Segmentation fault
> 

With this patch I no longer see the segfault. I'm not sure though why
the calculated y value is so incredibly out of range (multiples of the
overall screen height).


diff --git a/drivers/video/console_truetype.c
b/drivers/video/console_truetype.c
index 30086600fb..e95c06442f 100644
--- a/drivers/video/console_truetype.c
+++ b/drivers/video/console_truetype.c
@@ -248,6 +248,8 @@ static int console_truetype_putc_xy(struct udevice
*dev, uint x, uint y,
 						&xoff, &yoff);
 	if (!data)
 		return width_frac;
+	if ((y + height) >= vid_priv->ysize)
+		return -EAGAIN;

 	/* Figure out where to write the character in the frame buffer */
 	bits = data;


More information about the U-Boot mailing list