Patchwork endless loop when use qemu-system-mipsel to load bios

login
register
mail settings
Submitter rui chen
Date Nov. 11, 2011, 6:26 p.m.
Message ID <CAMOKqh+d7d56d+3jgaAH2yncMJSq-Z23dVZO7YHVgw9xTesBZQ@mail.gmail.com>
Download mbox | patch
Permalink /patch/125259/
State New
Headers show

Comments

rui chen - Nov. 11, 2011, 6:26 p.m.
Hi all,
    When I try to use command line "qemu-system-mipsel -M malta -L .
-nographic" to run redboot,  it will have an endless loop, then I find this
bug, here is my patch:


Author: Chen Rui <chennrui@gmail.com>
Date:   Sat Nov 12 01:38:23 2011 +0800

    resolve an endless loop when use qemu-system-mipsel to load bios

    Signed-off-by: Chen Rui <chennrui@gmail.com>
Markus Armbruster - Nov. 15, 2011, 2:41 p.m.
rui chen <chennrui@gmail.com> writes:

> Hi all,
>     When I try to use command line "qemu-system-mipsel -M malta -L .
> -nographic" to run redboot,  it will have an endless loop, then I find this
> bug, here is my patch:
>
>
> Author: Chen Rui <chennrui@gmail.com>
> Date:   Sat Nov 12 01:38:23 2011 +0800
>
>     resolve an endless loop when use qemu-system-mipsel to load bios
>
>     Signed-off-by: Chen Rui <chennrui@gmail.com>

Please use git-format-patch, not git-show.  And please put all of the
description in the commit message.

Finally, it helps to cc: the maintainer.  scripts/get_maintainer.pl can
help find him.  For your patch, it points to Aurelien (cc'ed).

> diff --git a/hw/mips_malta.c b/hw/mips_malta.c
> index bb49749..e7dfbd6 100644
> --- a/hw/mips_malta.c
> +++ b/hw/mips_malta.c
> @@ -911,6 +911,7 @@ void mips_malta_init (ram_addr_t ram_size,
>              uint32_t *end = addr + bios_size;
>              while (addr < end) {
>                  bswap32s(addr);
> +                addr++;
>              }
>          }
>  #endif

Patch

diff --git a/hw/mips_malta.c b/hw/mips_malta.c
index bb49749..e7dfbd6 100644
--- a/hw/mips_malta.c
+++ b/hw/mips_malta.c
@@ -911,6 +911,7 @@  void mips_malta_init (ram_addr_t ram_size,
             uint32_t *end = addr + bios_size;
             while (addr < end) {
                 bswap32s(addr);
+                addr++;
             }
         }
 #endif