On 28 Jun 2001, Eric W. Biederman wrote:
> Armin Schindler <[EMAIL PROTECTED]> writes:
> >
> > Basically I do use the linuxbios code, I just extracted the
> > parts/files I need and put them into my own directory structure.
> > The STPC code from Hamish Guthrie is also partly included. So if
> > I wanted to do this with the original code, I would have needed
> > a lot of #ifdefs which is very difficult in the state of testing
> > and creating a first running version. When the code works, I can
> > backport my changes into linuxbios.
>
> That sounds reasonable, just please don't forget :)
If we really use it that way, I won't forget !
> > I did not change the linuxbios code, I only use the parts I need
> > and added another code e.g. load kernel-image from IDE device and
> > init for STPC.
>
> People keep reinventing the IDE loader so we probably need to put
> it into the main tree...
I did not reinvent it, I just tested it with the ide.c from tiara.
It works great, but it is very slow, maybe because of reading only
sector sizes (I don't know much about IDE access, so I have to look
further).
> > Okay, I can understand that helping me in this case is not easy. Let
> > me try it with some linuxbios questions. When I use linuxbios without
> > the decompress in linuxbiosmain() and I already loaded the compressed
> > image bvmlinux.out (from linux/arch/i386/boot/compressed) to
> > 0x100000, would the jump from linuxbiosmain() to 0x100000 work ?
>
> It should.
>
> > It should work I think, because this image decompresses itself.
> > So why does linuxbios has its own decompress functions ?
>
> A design issue. We didn't want linux to be the only thing we could
> load. There is an alternative in the works, but that is what we have
> for now.
Okay, that makes sense.
> > Another question, which seems to be the only problem I have with my
> > code, is regarding x86. When I do protected mode with linuxbios code,
> > what could be missing if a "lss" instruction causes an exception ?
> > (this lss comes from arch/i386/boot/compressed/head.S)
>
> There are some ugly connections between the linux boot code and
> segments, and global descriptor tables.
>
> Basicaly if lss is failing it means you don't have a valid global
> descriptor table setup, or it doesn't have the segments that linux
> expect to be there.
>
> My memory is that linuxBIOS was getting this right, but I suspect
> there is something you changed in your code that invalidates this.
After I set up GDT and enabled PE in crt0.S with start32.inc, I did
not change it and I use the same GDT. I also tried to re-setup GDT
just before the jump to the kernel, but the same problem occurs.
Armin