[ELDK] mmap: first byte always wrong

Alberto Caballero alberto.kavan at gmail.com
Fri Nov 26 09:16:46 CET 2010


Hi,

Just a clarification: I used U-Boot to store the image at the Flash memory.
Then, using the U-Boot command line I am able to see the contents of the
memory. So the U-Boot operation has nothing to do with any memory mapping.
This is just a way of checking that the bytes are there directly accessing
the physical memory.

Although the EP440xS board is currently unsupported, I cannot understand why
the access to the mmap returned pointer is wrong. Is there a particular mmap
code for each board type? Would it have something to do with issuing
commands to the flash memory?

Regards,

Alberto

2010/11/26 Wolfgang Denk <wd at denx.de>

> Dear Alberto Caballero,
>
> In message <AANLkTikG-GnFz416=VLG1ByrPkHTF25Qq9om2wD6dJC3 at mail.gmail.com>
> you wrote:
> >
> > At my project, I will have a data configuration file stored in the board
> > Flash memory using an U-Boot filesystem image. At the initialization
> stage,
> > I read the image from the Flash and store it in the Linux filesystem.
>
> I have to admit that I don't understand what you mean or what you are
> trying to acchieve.
>
> > Of course at the U-Boot prompt I am able to check that image header at
> Flash
> > is correctly stored and all the bytes has the right values. I was
> wondering
> > if this has something to do with first access to mapped memory.
>
> I don;t understand this either.  What has the operation of U-Boot to
> do with any mapped memory?  U-boot doesn;t need any such mapping. It
> dierectly accesses the physical memory.
>
> > When Linux initializes it creates a series of MTD partitions by its own.
> Now
>
> No. Linux _never_ does anything "on it's own". It does only what you
> instruct it to do.  You are responsibe to configure the partitions you
> need or want on your system, either as a fixed mapping, or through the
> device tree, or using aan appropriate "mtdparts" command line argument
> (which then allows you to use the "mtdparts" command in U-Boot to make
> sure both U-Boot and Linus have a consistemt view of your MTD
> partitions).
>
> > the data in the Flash will be overlapped in two partitions so I will try
> to
> > use just one of them.
>
> Why don't you fix the root cause of the problem? Set up the partitions
> as you need them!
>
> > Regarding the mmap usage, I was able to check with another board with
> > another PowerPC processor using ELDK also, and in this case there is no
> > issue with Flash access.
>
> Of course there are also chances that your kernel port is broken - as
> mentioned, your board is unsupported both in mainline and in our tree.
>
> Best regards,
>
> Wolfgang Denk
>
> --
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> Applying computer technology is simply finding the  right  wrench  to
> pound in the correct screw.
>


More information about the eldk mailing list