public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [mips] malta configuration works in qemu-1.5 does not in qemu-1.6
@ 2013-11-10 16:09 Alon Bar-Lev
  2013-11-11  9:52 ` Daniel Schwierzeck
  0 siblings, 1 reply; 6+ messages in thread
From: Alon Bar-Lev @ 2013-11-10 16:09 UTC (permalink / raw)
  To: u-boot

Hello,

master is: 15c5cdf from Fri Nov 8 15:25:29 2013 -0500
u-boot-2013.10

Working in qemu-1.5.3.
Does not work in qemu-1.6.1.

The command prompt is not displayed, 100% cpu consumption.

---
$ qemu-system-mips -M malta -nographic -drive if=pflash,file=/tmp/flash -m
256


U-Boot 2013.10-00249-g15c5cdf (Nov 10 2013 - 18:00:48)

Board: MIPS Malta CoreLV (Qemu)
DRAM:  256 MiB
---

Any idea what the difference? any fix pending somewhere?

Regards,
Alon Bar-Lev

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [mips] malta configuration works in qemu-1.5 does not in qemu-1.6
  2013-11-10 16:09 [U-Boot] [mips] malta configuration works in qemu-1.5 does not in qemu-1.6 Alon Bar-Lev
@ 2013-11-11  9:52 ` Daniel Schwierzeck
  2013-11-11 10:25   ` Gabor Juhos
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Schwierzeck @ 2013-11-11  9:52 UTC (permalink / raw)
  To: u-boot

2013/11/10 Alon Bar-Lev <alon.barlev@gmail.com>:
> Hello,
>
> master is: 15c5cdf from Fri Nov 8 15:25:29 2013 -0500
> u-boot-2013.10
>
> Working in qemu-1.5.3.
> Does not work in qemu-1.6.1.
>
> The command prompt is not displayed, 100% cpu consumption.
>
> ---
> $ qemu-system-mips -M malta -nographic -drive if=pflash,file=/tmp/flash -m
> 256
>
>
> U-Boot 2013.10-00249-g15c5cdf (Nov 10 2013 - 18:00:48)
>
> Board: MIPS Malta CoreLV (Qemu)
> DRAM:  256 MiB
> ---
>
> Any idea what the difference? any fix pending somewhere?
>

it is obviously am upstream change in qemu, which requires a fix in u-boot.

Paul or Gabor, do you have an idea?

-- 
- Daniel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [mips] malta configuration works in qemu-1.5 does not in qemu-1.6
  2013-11-11  9:52 ` Daniel Schwierzeck
@ 2013-11-11 10:25   ` Gabor Juhos
  2013-11-11 10:35     ` Alon Bar-Lev
  2013-11-11 11:14     ` Paul Burton
  0 siblings, 2 replies; 6+ messages in thread
From: Gabor Juhos @ 2013-11-11 10:25 UTC (permalink / raw)
  To: u-boot

2013.11.11. 10:52 keltez?ssel, Daniel Schwierzeck ?rta:
> 2013/11/10 Alon Bar-Lev <alon.barlev@gmail.com>:
>> Hello,
>>
>> master is: 15c5cdf from Fri Nov 8 15:25:29 2013 -0500
>> u-boot-2013.10
>>
>> Working in qemu-1.5.3.
>> Does not work in qemu-1.6.1.
>>
>> The command prompt is not displayed, 100% cpu consumption.
>>
>> ---
>> $ qemu-system-mips -M malta -nographic -drive if=pflash,file=/tmp/flash -m
>> 256
>>
>>
>> U-Boot 2013.10-00249-g15c5cdf (Nov 10 2013 - 18:00:48)
>>
>> Board: MIPS Malta CoreLV (Qemu)
>> DRAM:  256 MiB
>> ---
>>
>> Any idea what the difference? any fix pending somewhere?
>>
> 
> it is obviously am upstream change in qemu, which requires a fix in u-boot.
> 
> Paul or Gabor, do you have an idea?

It is broken since the following change in qemu:

commit a427338b222b43197c2776cbc996936df0302f51
Author: Paul Burton <paul.burton@imgtec.com>
Date:   Fri Jun 14 08:30:44 2013 +0100

    mips_malta: correct reading MIPS revision at 0x1fc00010

    Rather than modifying the BIOS code at its original location, copy it
    for the 0x1fc00000 region & modify the copy. This means the original
    ROM code is correctly readable at 0x1e000010 whilst the MIPS revision
    is readable at 0x1fc00010.

    Additionally the code previously operated on target memory which would
    later be overwritten by the BIOS image upon CPU reset if the -bios
    argument was used to specify the BIOS image. This led to the written
    MIPS revision being lost. Copying using rom_copy when -bios is used
    fixes this issue.

    Signed-off-by: Paul Burton <paul.burton@imgtec.com>
    Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
    Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

Due to that change, we are getting a CPU exception while probing the
flash at the 0x1fc00000 address.

Changing the MALTA_FLASH_BASE constant to 0x1e000000 in
'arch/mips/include/asm/malta.h' fixes the problem. I will send a patch for that.

-Gabor

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [mips] malta configuration works in qemu-1.5 does not in qemu-1.6
  2013-11-11 10:25   ` Gabor Juhos
@ 2013-11-11 10:35     ` Alon Bar-Lev
  2013-11-11 11:14     ` Paul Burton
  1 sibling, 0 replies; 6+ messages in thread
From: Alon Bar-Lev @ 2013-11-11 10:35 UTC (permalink / raw)
  To: u-boot

On Mon, Nov 11, 2013 at 12:25 PM, Gabor Juhos <juhosg@openwrt.org> wrote:
>
> 2013.11.11. 10:52 keltez?ssel, Daniel Schwierzeck ?rta:
> > 2013/11/10 Alon Bar-Lev <alon.barlev@gmail.com>:
> >> Hello,
> >>
> >> master is: 15c5cdf from Fri Nov 8 15:25:29 2013 -0500
> >> u-boot-2013.10
> >>
> >> Working in qemu-1.5.3.
> >> Does not work in qemu-1.6.1.
> >>
> >> The command prompt is not displayed, 100% cpu consumption.
> >>
> >> ---
> >> $ qemu-system-mips -M malta -nographic -drive if=pflash,file=/tmp/flash -m
> >> 256
> >>
> >>
> >> U-Boot 2013.10-00249-g15c5cdf (Nov 10 2013 - 18:00:48)
> >>
> >> Board: MIPS Malta CoreLV (Qemu)
> >> DRAM:  256 MiB
> >> ---
> >>
> >> Any idea what the difference? any fix pending somewhere?
> >>
> >
> > it is obviously am upstream change in qemu, which requires a fix in u-boot.
> >
> > Paul or Gabor, do you have an idea?
>
> It is broken since the following change in qemu:
>
> commit a427338b222b43197c2776cbc996936df0302f51
> Author: Paul Burton <paul.burton@imgtec.com>
> Date:   Fri Jun 14 08:30:44 2013 +0100
>
>     mips_malta: correct reading MIPS revision at 0x1fc00010
>
>     Rather than modifying the BIOS code at its original location, copy it
>     for the 0x1fc00000 region & modify the copy. This means the original
>     ROM code is correctly readable at 0x1e000010 whilst the MIPS revision
>     is readable at 0x1fc00010.
>
>     Additionally the code previously operated on target memory which would
>     later be overwritten by the BIOS image upon CPU reset if the -bios
>     argument was used to specify the BIOS image. This led to the written
>     MIPS revision being lost. Copying using rom_copy when -bios is used
>     fixes this issue.
>
>     Signed-off-by: Paul Burton <paul.burton@imgtec.com>
>     Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
>     Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
>
> Due to that change, we are getting a CPU exception while probing the
> flash at the 0x1fc00000 address.
>
> Changing the MALTA_FLASH_BASE constant to 0x1e000000 in
> 'arch/mips/include/asm/malta.h' fixes the problem. I will send a patch for that.
>
> -Gabor

Thanks for quick response!
I confirm this works in qemu-1.5 and qemu-1.6.

Regards,
Alon Bar-Lev.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [mips] malta configuration works in qemu-1.5 does not in qemu-1.6
  2013-11-11 10:25   ` Gabor Juhos
  2013-11-11 10:35     ` Alon Bar-Lev
@ 2013-11-11 11:14     ` Paul Burton
  2013-11-11 14:05       ` Gabor Juhos
  1 sibling, 1 reply; 6+ messages in thread
From: Paul Burton @ 2013-11-11 11:14 UTC (permalink / raw)
  To: u-boot

On 11/11/13 10:25, Gabor Juhos wrote:
> 2013.11.11. 10:52 keltez?ssel, Daniel Schwierzeck ?rta:
>> 2013/11/10 Alon Bar-Lev <alon.barlev@gmail.com>:
>>> Hello,
>>>
>>> master is: 15c5cdf from Fri Nov 8 15:25:29 2013 -0500
>>> u-boot-2013.10
>>>
>>> Working in qemu-1.5.3.
>>> Does not work in qemu-1.6.1.
>>>
>>> The command prompt is not displayed, 100% cpu consumption.
>>>
>>> ---
>>> $ qemu-system-mips -M malta -nographic -drive if=pflash,file=/tmp/flash -m
>>> 256
>>>
>>>
>>> U-Boot 2013.10-00249-g15c5cdf (Nov 10 2013 - 18:00:48)
>>>
>>> Board: MIPS Malta CoreLV (Qemu)
>>> DRAM:  256 MiB
>>> ---
>>>
>>> Any idea what the difference? any fix pending somewhere?
>>>
>>
>> it is obviously am upstream change in qemu, which requires a fix in u-boot.
>>
>> Paul or Gabor, do you have an idea?
>
> It is broken since the following change in qemu:
>
> commit a427338b222b43197c2776cbc996936df0302f51
> Author: Paul Burton <paul.burton@imgtec.com>
> Date:   Fri Jun 14 08:30:44 2013 +0100
>
>      mips_malta: correct reading MIPS revision at 0x1fc00010
>
>      Rather than modifying the BIOS code at its original location, copy it
>      for the 0x1fc00000 region & modify the copy. This means the original
>      ROM code is correctly readable at 0x1e000010 whilst the MIPS revision
>      is readable at 0x1fc00010.
>
>      Additionally the code previously operated on target memory which would
>      later be overwritten by the BIOS image upon CPU reset if the -bios
>      argument was used to specify the BIOS image. This led to the written
>      MIPS revision being lost. Copying using rom_copy when -bios is used
>      fixes this issue.
>
>      Signed-off-by: Paul Burton <paul.burton@imgtec.com>
>      Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
>      Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
>
> Due to that change, we are getting a CPU exception while probing the
> flash at the 0x1fc00000 address.
>
> Changing the MALTA_FLASH_BASE constant to 0x1e000000 in
> 'arch/mips/include/asm/malta.h' fixes the problem. I will send a patch for that.
>
> -Gabor
>

Aha, thanks for tracking that down. I guess if flash commands need to 
work at 0x1fc00000 then my QEMU patch fixed one bug but causes 
another... I'll try to find the time to fix that in QEMU soon.

Thanks,
     Paul

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [mips] malta configuration works in qemu-1.5 does not in qemu-1.6
  2013-11-11 11:14     ` Paul Burton
@ 2013-11-11 14:05       ` Gabor Juhos
  0 siblings, 0 replies; 6+ messages in thread
From: Gabor Juhos @ 2013-11-11 14:05 UTC (permalink / raw)
  To: u-boot

2013.11.11. 12:14 keltez?ssel, Paul Burton ?rta:

<...>

> Aha, thanks for tracking that down. I guess if flash commands need to work at
> 0x1fc00000 

I assume that it is working on a real Malta board, so it should be emulated
correctly if possible.

> then my QEMU patch fixed one bug but causes another... 

Correct, it was working in previous versions.

> I'll try to find the time to fix that in QEMU soon.

Thanks in advance!

BTW, I have just found another weird thing in qemu 1.6.x. Pressing Ctrl+C in
U-Boot terminates qemu:

> U-Boot 2013.10-00270-g4a45abb (Nov 11 2013 - 11:34:34)
> 
> Board: MIPS Malta CoreLV
> DRAM:  256 MiB
> Flash: 4 MiB
> *** Warning - bad CRC, using default environment
> 
> In:    serial
> Out:   serial
> Err:   serial
> Net:   pcnet#0
> Warning: pcnet#0 using MAC address from net device
> 
> malta # qemu: terminating on signal 2

With older versions of qemu it works correctly:

> U-Boot 2013.10-00270-g4a45abb (Nov 11 2013 - 11:34:34)
> 
> Board: MIPS Malta CoreLV
> DRAM:  256 MiB
> Flash: 4 MiB
> *** Warning - bad CRC, using default environment
> 
> In:    serial
> Out:   serial
> Err:   serial
> Net:   pcnet#0
> Warning: pcnet#0 using MAC address from net device
> 
> malta # <INTERRUPT>
> malta #

I did not have time to track it down yet.

-Gabor

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-11-11 14:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-10 16:09 [U-Boot] [mips] malta configuration works in qemu-1.5 does not in qemu-1.6 Alon Bar-Lev
2013-11-11  9:52 ` Daniel Schwierzeck
2013-11-11 10:25   ` Gabor Juhos
2013-11-11 10:35     ` Alon Bar-Lev
2013-11-11 11:14     ` Paul Burton
2013-11-11 14:05       ` Gabor Juhos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox