All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ara Avanesyan" <araav@hylink.am>
To: "Jan Engelhardt" <jengelh@linux01.gwdg.de>
Cc: <linux-kernel@vger.kernel.org>, <avila@lists.unixstudios.net>
Subject: Re: Strange memory problem with Linux booted from U-Boot
Date: Tue, 29 Mar 2005 12:02:30 +0500	[thread overview]
Message-ID: <00e901c5342d$477faed0$1000000a@araavanesyan> (raw)
In-Reply-To: Pine.LNX.4.61.0503281705230.16973@yvahk01.tjqt.qr

----- Original Message ----- 
From: "Jan Engelhardt" <jengelh@linux01.gwdg.de>
To: "Ara Avanesyan" <araav@hylink.am>
Cc: <linux-kernel@vger.kernel.org>; <avila@lists.unixstudios.net>
Sent: Monday, March 28, 2005 8:06 PM
Subject: Re: Strange memory problem with Linux booted from U-Boot


> >Hi,
> >
> >I need some help on solving this strange problem.
> >Here is what I have,
> >I have a loadable module (linux.2.4.20) which contains a 2 mb static
gloabal
> >array.
> >
> >Additional information:
> >The same error occurs if I just run depmod -a.
>
> I'd be more interested in the kernel space code...
>
>
>
> Jan Engelhardt
> -- 
> No TOFU for me, please.
>

Oh, the code for kernel space is exactly the same code translated to C:
That is:

___________
#include <linux/vmalloc.h>

void mtestit(char val)
{
    char *buf;
    int i, j;
    int size = 64;
    int pass = 2 * 1024 * 1024;
    printk("starting val == %x\n", val);
    buf = vmalloc(size);
    printk("allocated memory of %d bytes. buf == %x\n", size, (int)buf);

    for (j = 0; j < pass; j++)
    {
        printk("passing %d", j);
        for (i = 0; i < size; i++)
        {
            buf[i] = val;
        }
        printk("passed\n");
    }

    printk("freeing\n");
    vfree(buf);
    printk("finished!\n");
}
___________

I call this in a module's entry point and insmod that module.
now, mtestit(0xff) works, but mtestit(0x00) crashes:(
Works fine with RedBoot. Very strange to me:)
Moreover, works fine if I do the very same thing from
within U-Boot (mw.b 100000 0 100000).

I'm interested in ideas of what could potentially be the
cause of this strange behaviour.

__
Thanks,
Ara


  reply	other threads:[~2005-03-29  7:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-27 14:40 ixdp4xx restart. watchdog enable value Ara Avanesyan
2005-01-27 14:44 ` Ben Dooks
2005-03-28 14:57   ` Strange memory problem with Linux booted from U-Boot Ara Avanesyan
2005-03-28 15:06     ` Jan Engelhardt
2005-03-29  7:02       ` Ara Avanesyan [this message]
2005-03-28 16:17     ` linux-os
2005-03-30  7:21     ` Eugene Surovegin
2005-03-31 13:39       ` Ara Avanesyan
2005-01-27 16:01 ` ixdp4xx restart. watchdog enable value David Vrabel

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='00e901c5342d$477faed0$1000000a@araavanesyan' \
    --to=araav@hylink.am \
    --cc=avila@lists.unixstudios.net \
    --cc=jengelh@linux01.gwdg.de \
    --cc=linux-kernel@vger.kernel.org \
    /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.