Re: Boot strapping and ATE

From: Ian S. Nelson (ian.nelson@echostar.com)
Date: Tue Aug 22 2000 - 17:27:13 EST


FORT David wrote:

> "Ian S. Nelson" wrote:
>
> > Two hopefully quick questions.
> >
> > I'm building an embedded device out of linux and I was having trouble
> > booting. Probably a FAQ, right?
> > I've got a loader that loads an uncompressed and stripped kernel in to
> > memory at 0x100000 (this is x86) I set up the GDT just like setup.S does
> > but when the paging bit is flipped on in head.S it goes off in to the
> > weeds. Any ideas? I've got limited diagnostic capability, I can post
> > bytes. It happens immediately when the paging bit is flipped on. It
> > looks like all my segment registers are set right, my a20 test shows
> > that it's up, my lgdt and ljmp in to protected mode seems to work. I
> > try to load it in to the exact same spot as setup.S does. We're
> > attempting to build a LinuxBIOS style boot loader on the NSC MediaGX1,
> > we're knocking on the door too, made it into the kernel and we're so so
> > close. I've been trying to debug this for months now, any ideas are
> > appriciated, I'm not really an x86 hack so even stupid ideas are good
> > ones..
> >
> > Secondly, has anyone put together some ATE type tests for running under
> > Linux? That stuff is usually kind of hardware specific but memory tests
> > and certain PCI and chip tests could be generalized. The unfortunate
> > downside of using a LinuxBIOS style boot loader is that you can't run
> > DOS or DOS programs on the hardware and DOS is the linuga franca of x86
> > based ATE tests, from what I gather.
> >
> > thanks,
> > Ian
>
> I used to code such thing and got the same result. My only way to get things
> to work was to have the
> same phys/virtual mapping when setting the paging flag. Even if linux works
> on my machine, when i
> coded myself, nothing else worked but having the same mapping.
> hope it helps......

Thanks for you suggestion.

I think I have figured it out.

I was loading the kernel, decompressed, at 0x100000. That's where a compressed
kernel should be loaded. My own overzealousness got the best of me here
instead of my traditional laziness. As it happens, the page tables end up at
0x100000 and so there is some contention for that space.

Interestingly, LinuxBIOS has their own inflate routines. I've been using there
code as a model so I was planning on inflating the kernel on my own and then
jumping into arch/i386/kernel/head.S I've been paying too much attention to
their method and not enough to the kernel's. If you put a bvmlinux.out image
into memory and run it the damn thing just decompresses itself and runs! It
looks like it panics or crashes somewhere else, video isn't working yet so I'm
not sure what happens when I let it go but it goes much further and posts the
familiar 0x9a that you see so often when linux runs.

Hopefully by the end of this week I'll be able to bring it up all the way. At
that point we should have a totally free (beer, NSC owns part of my code but
they give it away for $0 when you sign an NDA) way to start Linux on a National
MediaGX part which is pretty popular for web pads and embedded internet
devices.

thanks again,
Ian Nelson

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Aug 23 2000 - 21:00:08 EST