[PATCH 10/11] sandbox: mmc: Support a backing file

Simon Glass sjg at chromium.org
Thu Oct 21 22:17:14 CEST 2021


Hi Tom,

On Sun, 19 Sept 2021 at 21:18, Simon Glass <sjg at chromium.org> wrote:
>
> Hi Tom,
>
> On Sat, 18 Sept 2021 at 10:31, Simon Glass <sjg at chromium.org> wrote:
> >
> > Hi Tom,
> >
> > On Sat, 18 Sept 2021 at 07:16, Tom Rini <trini at konsulko.com> wrote:
> > >
> > > On Sat, Sep 18, 2021 at 03:34:54AM -0600, Simon Glass wrote:
> > > > Hi Tom,
> > > >
> > > > On Thu, 16 Sept 2021 at 12:40, Tom Rini <trini at konsulko.com> wrote:
> > > > >
> > > > > On Wed, Aug 18, 2021 at 09:40:32PM -0600, Simon Glass wrote:
> > > > >
> > > > > > Provide a way for sandbox MMC to present data from a backing file. This
> > > > > > allows a filesystem to be created on the host and easily served via an
> > > > > > emulated mmc device.
> > > > > >
> > > > > > Signed-off-by: Simon Glass <sjg at chromium.org>
> > > > > > Reviewed-by: Jaehoon Chung <jh80.chung at samsung.com>
> > > > > > ---
> > > > > >
> > > > > >  doc/device-tree-bindings/mmc/sandbox,mmc.txt | 18 ++++++++
> > > > > >  drivers/mmc/sandbox_mmc.c                    | 46 ++++++++++++++++----
> > > > > >  2 files changed, 55 insertions(+), 9 deletions(-)
> > > > > >  create mode 100644 doc/device-tree-bindings/mmc/sandbox,mmc.txt
> > > > >
> > > > > As is, this breaks how I've always run pytests on sandbox.
> > > >
> > > > How does it break it? Do you get an error? The feature is supposed to
> > > > be optional.
> > >
> > > Without doing anything to enable it, a few of the mmc unit tests failed.
> > > I don't have the logs handy right now (I made that sometimes bad
> > > decision to test 2 series at once, and now I'm waiting a bit more on
> > > final feedback on the changes the timestamp cleanup needed before I push
> > > that + the rest of this series).
> >
> > Oh dear, I will take a look and see what is going on there.
>
> The problem seems to me something going wrong with malloc(). I'm not
> really sure what but I have seen it before. Basically the mallinfo
> struct becomes corrupted somehow and from there everything goes
> haywire. It actually happens today in normal operation, but somehow it
> doesn't cause problems. I looked at it a while back and did not make
> progress.
>
> Anyway I will see if I can dig into it again.

Actually i did figure this out. Partly is was a calculation issue but
mostly it was not unmapping the memory after running, which causes
problems when it is 25MB each time.

Regards,
Simon


More information about the U-Boot mailing list