public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Linux OS boilerplate
@ 2001-02-18 20:24 Scott Long
  2001-02-18 20:32 ` Jeremy Jackson
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Scott Long @ 2001-02-18 20:24 UTC (permalink / raw)
  To: linux-kernel

I've been poring over the x86 boot code for a while now and I've been
considering writing a FAQ on the boot process (mostly for my own use,
but maybe others will be interested). This would include all relevant
information on setting up the x86 hardware for a boot (timers, PIC, A20,
protected mode, GDT, initial page tables, initial TSS, etc).

The motivation behind this is that I would like to use the Linux boot
system as a boilerplate booter for some experimental code. It's probably
much cleaner and more robust than any boot loader I might come up with.

Does there exist an outline (detailed or not) of the boot process from
the point of BIOS bootsector load to when the kernel proper begins
execution? If not would anyone be willing to help me understand
bootsect.S and setup.S enough so that I might write such an outline?

If no one can help me, would you consider it appropriate for me to send
email to the people listed in bootsect.S and setup.S asking for
assistance?

Thanks,
Scott

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Linux OS boilerplate
  2001-02-18 20:24 Scott Long
@ 2001-02-18 20:32 ` Jeremy Jackson
  2001-02-18 21:46 ` TeknoDragon
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Jeremy Jackson @ 2001-02-18 20:32 UTC (permalink / raw)
  To: Scott Long; +Cc: linux-kernel

Scott Long wrote:

> Does there exist an outline (detailed or not) of the boot process from
> the point of BIOS bootsector load to when the kernel proper begins
> execution? If not would anyone be willing to help me understand
> bootsect.S and setup.S enough so that I might write such an outline?

I have been over it, and would be willing to help.  You should first read all

of the LILO documentation, and check out some of the LinuxBIOS
project at www.linuxbios.org.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Linux OS boilerplate
@ 2001-02-18 21:13 Rick Hohensee
  0 siblings, 0 replies; 10+ messages in thread
From: Rick Hohensee @ 2001-02-18 21:13 UTC (permalink / raw)
  To: linux-kernel

Have you seen Janet_Reno? 

ftp://linux01.gwdg.de/pub/cLIeNUX/interim/Janet_Reno.tgz IIRC.
Janet is an x86 bootsector that gets into protected mode and can
use the AT BIOS in pmode interrupts. It's written with a bunch of
m4 macros I call asmacs that I'm currently basing an assembler in 
Bash on. That's shasm in the same directory as Janet.

Rick Hohensee
www.cLIeNUX.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Linux OS boilerplate
  2001-02-18 20:24 Scott Long
  2001-02-18 20:32 ` Jeremy Jackson
@ 2001-02-18 21:46 ` TeknoDragon
  2001-02-19  1:47 ` Alan Cox
  2001-02-19  9:03 ` Paul Gortmaker
  3 siblings, 0 replies; 10+ messages in thread
From: TeknoDragon @ 2001-02-18 21:46 UTC (permalink / raw)
  To: Scott Long; +Cc: linux-kernel

On Sun, 18 Feb 2001, Scott Long wrote:

> Does there exist an outline (detailed or not) of the boot process from
> the point of BIOS bootsector load to when the kernel proper begins
> execution? If not would anyone be willing to help me understand
> bootsect.S and setup.S enough so that I might write such an outline?

It might be a little fundamental but there is *a* boot loading process
documented here: http://www.eecs.wsu.edu/~cs460/

Look over all the lecture notes and lab assignments up to the booter lab.

I'd offer up my own explanation, but I'm just starting to learn this
stuff.


-karl


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Linux OS boilerplate
  2001-02-18 20:24 Scott Long
  2001-02-18 20:32 ` Jeremy Jackson
  2001-02-18 21:46 ` TeknoDragon
@ 2001-02-19  1:47 ` Alan Cox
  2001-02-19 10:07   ` Eric W. Biederman
  2001-02-19  9:03 ` Paul Gortmaker
  3 siblings, 1 reply; 10+ messages in thread
From: Alan Cox @ 2001-02-19  1:47 UTC (permalink / raw)
  To: Scott Long; +Cc: linux-kernel

> I've been poring over the x86 boot code for a while now and I've been
> considering writing a FAQ on the boot process (mostly for my own use,
> but maybe others will be interested). This would include all relevant
> information on setting up the x86 hardware for a boot (timers, PIC, A20,
> protected mode, GDT, initial page tables, initial TSS, etc).

It would certainly be a valuable piece for the kernel Documentation dir.
Paticularly as people with embedded x86 grow keener and keener to boot 
biosless to save money and flash.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Linux OS boilerplate
  2001-02-18 20:24 Scott Long
                   ` (2 preceding siblings ...)
  2001-02-19  1:47 ` Alan Cox
@ 2001-02-19  9:03 ` Paul Gortmaker
  2001-02-20  4:29   ` H. Peter Anvin
  2001-05-18  6:14   ` H. Peter Anvin
  3 siblings, 2 replies; 10+ messages in thread
From: Paul Gortmaker @ 2001-02-19  9:03 UTC (permalink / raw)
  To: Scott Long; +Cc: linux-kernel, hpa

Scott Long wrote:
> 
> I've been poring over the x86 boot code for a while now and I've been
> considering writing a FAQ on the boot process (mostly for my own use,

[...]

> Does there exist an outline (detailed or not) of the boot process from
> the point of BIOS bootsector load to when the kernel proper begins

IIRC, there is some useful info contained within loadlin.  Also, I
found a doc by hpa called "THE LINUX/I386 BOOT PROTOCOL" in my local
archive of cruft -  I just assumed it was in Documentation/ but
apparently it never made it there (yet).

Paul.


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Linux OS boilerplate
  2001-02-19  1:47 ` Alan Cox
@ 2001-02-19 10:07   ` Eric W. Biederman
  2001-02-22  1:24     ` Tim Wright
  0 siblings, 1 reply; 10+ messages in thread
From: Eric W. Biederman @ 2001-02-19 10:07 UTC (permalink / raw)
  To: Alan Cox; +Cc: Scott Long, linux-kernel

Alan Cox <alan@lxorguk.ukuu.org.uk> writes:

> > I've been poring over the x86 boot code for a while now and I've been
> > considering writing a FAQ on the boot process (mostly for my own use,
> > but maybe others will be interested). This would include all relevant
> > information on setting up the x86 hardware for a boot (timers, PIC, A20,
> > protected mode, GDT, initial page tables, initial TSS, etc).
> 
> It would certainly be a valuable piece for the kernel Documentation dir.
> Paticularly as people with embedded x86 grow keener and keener to boot 
> biosless to save money and flash.

Actually biosless is nice.  You don't actually need to do things like enable
a20 as there isn't a BIOS to disable it...

As for working code see the linuxBIOS project.  http://www.linuxbios.org
There aren't a lot of chipsets supported yet but progress is being made.
And you do need something like a BIOS to enable memory and cache
before you jump to the linux kernel.

Alan working on all booting x86 biosless, keeps making me chuckle over
your hatred towards BIOSes, it is absolutely amazing what linux
assumes the BIOS will setup correctly.  With linux-2.4 able to do a
complete PCI bus setup it isn't as bad it used to be, but it's still
pretty significant.

You wouldn't happen to know a good place to put drivers for superio
chips, and pci-isa bridges with the superio functions integrated?

I should have a proposal written up (and the code to implement it) in
the next month, on how to change the boot process to be more friendly
to BIOS less situations.   What we do with the ``empty_zero_page'' is
nasty, and it isn't even the empty_zero_page.

And if anyone has any questions on how the boot process works,
I'd be glad to answer specific questions.  As I've traced it fairly
thoroughly. 

Eric

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Linux OS boilerplate
  2001-02-19  9:03 ` Paul Gortmaker
@ 2001-02-20  4:29   ` H. Peter Anvin
  2001-05-18  6:14   ` H. Peter Anvin
  1 sibling, 0 replies; 10+ messages in thread
From: H. Peter Anvin @ 2001-02-20  4:29 UTC (permalink / raw)
  To: Paul Gortmaker; +Cc: Scott Long, linux-kernel

Paul Gortmaker wrote:
> 
> Scott Long wrote:
> >
> > I've been poring over the x86 boot code for a while now and I've been
> > considering writing a FAQ on the boot process (mostly for my own use,
> 
> [...]
> 
> > Does there exist an outline (detailed or not) of the boot process from
> > the point of BIOS bootsector load to when the kernel proper begins
> 
> IIRC, there is some useful info contained within loadlin.  Also, I
> found a doc by hpa called "THE LINUX/I386 BOOT PROTOCOL" in my local
> archive of cruft -  I just assumed it was in Documentation/ but
> apparently it never made it there (yet).
> 

It's in there (Documentation/i386/boot.txt).

	-hpa

-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Linux OS boilerplate
  2001-02-19 10:07   ` Eric W. Biederman
@ 2001-02-22  1:24     ` Tim Wright
  0 siblings, 0 replies; 10+ messages in thread
From: Tim Wright @ 2001-02-22  1:24 UTC (permalink / raw)
  To: Eric W. Biederman; +Cc: Alan Cox, Scott Long, linux-kernel

On Mon, Feb 19, 2001 at 03:07:33AM -0700, Eric W. Biederman wrote:
> With linux-2.4 able to do a complete PCI bus setup it isn't as bad it used
> to be, but it's still pretty significant.
 
For an incomplete subset of chipsets. Serverworks doesn't work correctly for
a start (see the threads relating to having to kill the Serverworks fixup code
and rely on the BIOS to see all the PCI busses on larger systems). Of course,
this is due to Serverworks refusal to release documentation (yes, I've heard
the excuses regarding protection of IP), and it's a worrisome. What else are
we potentially failing to setup on this chipset ?

Tim

-- 
Tim Wright - timw@splhi.com or timw@aracnet.com or twright@us.ibm.com
IBM Linux Technology Center, Beaverton, Oregon
Interested in Linux scalability ? Look at http://lse.sourceforge.net/
"Nobody ever said I was charming, they said "Rimmer, you're a git!"" RD VI

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Linux OS boilerplate
  2001-02-19  9:03 ` Paul Gortmaker
  2001-02-20  4:29   ` H. Peter Anvin
@ 2001-05-18  6:14   ` H. Peter Anvin
  1 sibling, 0 replies; 10+ messages in thread
From: H. Peter Anvin @ 2001-05-18  6:14 UTC (permalink / raw)
  To: linux-kernel

Followup to:  <3A90E16D.DB868F2@yahoo.com>
By author:    Paul Gortmaker <p_gortmaker@yahoo.com>
In newsgroup: linux.dev.kernel
> 
> > Does there exist an outline (detailed or not) of the boot process from
> > the point of BIOS bootsector load to when the kernel proper begins
> 
> IIRC, there is some useful info contained within loadlin.  Also, I
> found a doc by hpa called "THE LINUX/I386 BOOT PROTOCOL" in my local
> archive of cruft -  I just assumed it was in Documentation/ but
> apparently it never made it there (yet).
> 

Documentation/i386/boot.txt

	-hpa
-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2001-05-18  6:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-02-18 21:13 Linux OS boilerplate Rick Hohensee
  -- strict thread matches above, loose matches on Subject: below --
2001-02-18 20:24 Scott Long
2001-02-18 20:32 ` Jeremy Jackson
2001-02-18 21:46 ` TeknoDragon
2001-02-19  1:47 ` Alan Cox
2001-02-19 10:07   ` Eric W. Biederman
2001-02-22  1:24     ` Tim Wright
2001-02-19  9:03 ` Paul Gortmaker
2001-02-20  4:29   ` H. Peter Anvin
2001-05-18  6:14   ` H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox