All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rossier Daniel <Daniel.Rossier@heig-vd.ch>
To: u-boot@lists.denx.de
Subject: [U-Boot] FW:  U-boot & x86 & coreboot
Date: Wed, 17 Jul 2013 21:20:38 +0000	[thread overview]
Message-ID: <dfaafefb5ceb4298b5b48157b95335bf@EINTMBXC.einet.ad.eivd.ch> (raw)
In-Reply-To: CAPnjgZ28t_QTM-15g5fNVUijtPUuQ-84K3zeNRhQ8y-5f4_s1w@mail.gmail.com


Hi Simon,

> -----Original Message-----
> From: sjg at google.com [mailto:sjg at google.com] On Behalf Of Simon Glass
> Sent: mercredi 17 juillet 2013 17:43
> To: Rossier Daniel
> Cc: u-boot at lists.denx.de
> Subject: Re: [U-Boot] U-boot & x86 & coreboot
> 
> Hi Rossier,
> 
> On Wed, Jul 17, 2013 at 2:29 AM, Rossier Daniel <Daniel.Rossier@heig-vd.ch>
> wrote:
> Hi,
> 
> I would like to run U-boot on x86 emulated QEMU-based environment. I
> found some info regarding coreboot + U-boot integration, using U-boot as
> payload, etc. but I was unable to start U-boot.
> I'm using the 32-bits i686-pc-linux-gnu toolchain and I successfully cross-
> compiled coreboot and started it on qemu-system-i386.
> I also configured coreboot to use u-boot (ELF) as payload, but coreboot
> performs a reset when U-boot should show up after loading.
> Where could I have some information regarding that?
> 
> There are post codes generated in x86 U-Boot which might help with
> diagnosing this. I have not tried this on QEMU. But I suppose in that
> environment it might be possible to watch execution and see where it is
> going wrong.

Actually, I was able to dig into further details during the execution.
U-boot is starting its execution, but in early execution in setup_gdt,
the execution of instruction at 0x1111491 leads to a traps (loading 0x18 to %ds).
(see below for details)
I don't really see an issue to execute this instruction.

(gdb) si
0x01111491 in load_ds (segment=3) at cpu.c:61
61              asm volatile("movl %0, %%ds" : : "r" (segment * X86_GDT_ENTRY_SIZE));
(gdb) info reg
eax            0x18     24
ecx            0x19203f20       421543712
edx            0x20     32
ebx            0x19cf9320       433034016
esp            0x19203f10       0x19203f10
ebp            0x11dff0 0x11dff0
esi            0x7ebdc50        132897872
edi            0x1223b0 1188784
eip            0x1111491        0x1111491 <setup_gdt+135>
eflags         0x2      [ ]
cs             0x10     16
ss             0x18     24
ds             0x18     24
es             0x18     24
fs             0x18     24
gs             0x18     24
(gdb) info reg pc
pc: 0x1111491
(gdb) x/10i 0x1111491
=> 0x1111491 <setup_gdt+135>:   mov    %eax,%ds
   0x1111493 <setup_gdt+137>:   mov    %eax,%es
   0x1111495 <setup_gdt+139>:   mov    %eax,%gs
   0x1111497 <setup_gdt+141>:   mov    %eax,%ss
   0x1111499 <setup_gdt+143>:   mov    $0x20,%al
   0x111149b <setup_gdt+145>:   mov    %eax,%fs
   0x111149d <setup_gdt+147>:   add    $0x8,%esp
   0x11114a0 <setup_gdt+150>:   pop    %ebx
   0x11114a1 <setup_gdt+151>:   ret    
   0x11114a2 <x86_cpu_init_r>:  call   0x11109d3 <cpu_init_interrupts>
(gdb) si
0x0000fcb0 in ?? ()
(gdb)

Do you have an idea?

By the way, I'm passing the file u-boot in ELF format directly to coreboot as ELF payload.
Is it better to wrap the file u-boot.bin to get an ELF?

Thanks for your help

Daniel

> 
> Furthermore, I'm unable to debug anything remotely with gdb; gdb cannot
> disassemble once connected via "target remote localhost:1234".
> 
> Do you mean it cannot find the source files?
> 
> Regards,
> Simon
> 
> 
> Any hints welcome.
> Thanks so much.
> 
> Cheers
> Daniel
> 
> 
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

  reply	other threads:[~2013-07-17 21:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-17  8:29 [U-Boot] U-boot & x86 & coreboot Rossier Daniel
2013-07-17 13:35 ` Rossier Daniel
2013-07-17 15:43   ` Simon Glass
2013-07-17 15:42 ` Simon Glass
2013-07-17 21:20   ` Rossier Daniel [this message]
2013-07-17 21:20   ` [U-Boot] FW: " Rossier Daniel
2013-07-17 21:57     ` Simon Glass
     [not found]   ` <4517dc2e643743ebac2f9c8b61aafdfa@EINTMBXC.einet.ad.eivd.ch>
     [not found]     ` <CAPnjgZ3bUn-nsdfvo9=WZhfi592L7jhu1epuwh5AM3g4EaOBDA@mail.gmail.com>
2013-07-19  7:49       ` [U-Boot] " Rossier Daniel
2013-07-19 16:14         ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dfaafefb5ceb4298b5b48157b95335bf@EINTMBXC.einet.ad.eivd.ch \
    --to=daniel.rossier@heig-vd.ch \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.