This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Re: Patch for x86 bootstrap
On Wed, Apr 25, 2001 at 07:52:04PM +0100, Jonathan Larmour wrote:
> > I have been unable to make redboot work. I'm told there are some
> > patches to fix this that are out of date. When I enabled posix for
> > x86 on the current version in cvs, the configuration (ecosconfig)
> > fails with an unresolved constraint.
>
> Make sure you are using the ecosconfig off of
> http://sources.redhat.com/ecos/anoncvs.html. If you already are, then I'd
> be interested to know the problem.
I'm attaching the typescript from a session where I attempt to
configure posix. Note that my repository is attached to the anoncvs
repository.
> > I'm told that the bootstrap loader was patched a while back. I don't
> > know if they added support for partition tables. If they did, I'd
> > like to see the patch. If they didn't, then IMHO, my patch is better
> > because it fixes other bugs in the loader code.
>
> The patch Fabrice was talking about was the patch that made loading over
> 64K boundaries work. That patch was in the code you had editted, and he was
> querying why you removed it.
I believe there was some bugs in the patch. There was some code to
make sure that the destination pointer was properly aligned to prevent
writing past the end of a segment. However, after it rereads the
first sector and writes it to _start, there is a long jump
jmp $0,$_start
This means that the symbol _start must exist within the first 64K of
the real address space.
My patch eliminates both of these problems in two ways. First, it
converts the destination pointer to es:bx just before every read
operation. This means that it can write anywhere with any alignment
within the first megabyte of address space. Second, I copy the first
block to _start before reading anything from the floppy, and then do
an indirect jump to _start.
Furthermore, I believe that the previous code wasn't clearing bx
before every read sector interrupt. This may not have been a problem,
but it seems risky to depend on the BIOS to maintain this register's
value.
I made these changes incidentally, since my primary interest was in
booting to flash on my given platform. I'm told there has been a
patch to make this work. Do you have it?
> > I'm glad to contribute to eCos as long as the work is put back into
> > the source tree. I'll look at the assignment links and take care of
> > what needs to be done.
>
> I can guarantee that if your change is useful it will appear. It may not
> appear instantaneously, but it will. We've already done quite a bit on the
> x86 internally, but for various reasons we are unable to release it yet. We
> hope to work it out soon.
Have you fixed the bootstrap to boot from hard drives?
>
> Jifl
> --
> Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
> Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine