early stage debugging on a real product

Andy Shevchenko andy.shevchenko at gmail.com
Mon Nov 23 20:00:07 CET 2020


On Mon, Nov 23, 2020 at 4:05 PM Andy Shevchenko
<andy.shevchenko at gmail.com> wrote:
>
> Hi!
>
> I have been debugging U-Boot on a product (Android-based) device (*)
> which is not yet supported by U-Boot. It's x86 based.
>
> I have stumbled over the couple of things:
> 1/ it required me to enable TIMER_EARLY and by code analysing I can
> tell that DM loop fails by some reason
> 2/ it hangs
>    reserve_uboot,
>    reserve_malloc,
>    reserve_board,
>    ...here...

Basically this line in reserve_board() makes it hangs (likely page fault)
              memset(gd->bd, '\0', sizeof(struct bd_info));

I run U-Boot as a chainloader.

> My suspicion that fastboot does bad things to it (overwritten memory)
> or something I have missed. Any ideas what to try / where to look into
> besides the above which I'm on?

boot.img has the following memory map:

vmlinuz: 0x10008000
initrd: 0x11000000
u-boot: 0x01101000
Net
The working android kernel shows this:
<6>[    0.000000] e820: BIOS-provided physical RAM map:
<6>[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x0000000000097fff] usable
<6>[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x0000000003ffffff] usable
<6>[    0.000000] BIOS-e820: [mem
0x0000000004000000-0x00000000051fffff] reserved
<6>[    0.000000] BIOS-e820: [mem 0x0000000005200000-0x0000000005bfffff] usable
<6>[    0.000000] BIOS-e820: [mem
0x0000000005c00000-0x0000000005ffffff] reserved
<6>[    0.000000] BIOS-e820: [mem 0x0000000006000000-0x000000007f5fffff] usable
<6>[    0.000000] BIOS-e820: [mem
0x000000007f600000-0x00000000fec033ff] reserved
<6>[    0.000000] BIOS-e820: [mem
0x00000000fec04000-0x00000000fefff3ff] reserved
<6>[    0.000000] BIOS-e820: [mem
0x00000000ff000000-0x00000000ffffffff] reserved
<6>[    0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000017fffffff] usable

> (*) Only I can get is just an approximate place where the code is
> stuck / hangs. And it's time consuming...

-- 
With Best Regards,
Andy Shevchenko


More information about the U-Boot mailing list