Thanks Greg,
I think, that is very good overview about the flow. It may be good idea to continue this flow on this thread or somewhere else. I think,One cannot expect Greg to do all the documentation as Peter said 8-10 hours is a lot of time. May be out of the many implementors in this forum, if one contributes by giving more details about any one of these files in detail of one's own choice ,basically significance,flow about it and Do's and Dont's,etc and any experiences. Probably a structure needs to be proposed as well and rest should fall in place for documentation at least. If not 8 hours by one person, atleast an hour can be contributed may not be an issue.
As Greg has listed the files flow in the order of execution. cpu/i386/entry16.inc cpu/i386/entry32.inc superio/sis/950/setup_serial.inc pc80/serial.inc arch/i386/lib/console.inc cpu/k7/earlymtrr.inc northsouthbridge/sis/735/raminit.inc arch/i386/config/crt0.base
May in the top of the mail, one can take list his favourite file and contribute his knowledge on it. So that in future, if one reads this thread or one integrates these inputs into a formal document, it would be easy for him or her.
This again a suggestion to further get more documentation on this.
Thanks and Regards Deepak
-----Original Message----- From: linuxbios-admin@clustermatic.org [mailto:linuxbios-admin@clustermatic.org]On Behalf Of Greg Watson Sent: Friday, March 28, 2003 10:20 PM To: linuxbios@clustermatic.org Subject: Re: Information about BIOS and the boot process
Other people probably know much more about this than me, but here's my experience.
There seem to be two main parts to linuxbios. The first is arch/{arch}/config/ctr0.base which does the very low level initialization, like turning on memory, etc. The second is arch/{arch}/lib/c_start.S which does whatever else is necessary to call the C function hardwaremain(). hardwaremain() then does whatever else is necessary to load linux.
c_start.S is linked with linuxbios.a, a library containing generic support routines (those found in the lib directory) and anything specified using the 'object' directive in a Config file (and other stuff). The resultant 'executable' is called linuxbios_c. The loader script used to link linuxbios_c is config/linuxbios_c.ld, and is configured to be loaded relative to _RAMBASE.
crt0.base is not linked against anything. Any additional assembly routines you need must be specified using the 'mainboardinit' directive in a Config file. This causes the specified assembly file to be added to "crt0_includes.h" which is in turn included at the start of crt0.base (or at the end in the case of the ppc version). The loader script used to link crt0.base is in arch/{arch}/config/ldscript.base. The resultant 'executable' is called linuxbios and will be loaded at _ROMBASE. The tricky thing is that this loader script will also load the linuxbios_c 'executable' at a location called _payload in this file. The main task of crt0.base is then to initialize enough hardware so that this payload can be copied from rom into ram (which may also involve uncompressing code). Then control is transferred to _start, which is the first location in linuxbios_c.
To get an idea of how crt0.base works, look at the following files. This is the order of execution specified by the configuration file for sis735.
cpu/i386/entry16.inc cpu/i386/entry32.inc superio/sis/950/setup_serial.inc pc80/serial.inc arch/i386/lib/console.inc cpu/k7/earlymtrr.inc northsouthbridge/sis/735/raminit.inc arch/i386/config/crt0.base
Next look at c_start.S which will show you what happens once control is transferred to _start. Finally, look at arch/{arch}/lib/hardwaremain.c to see what other stuff is done to get linux loaded.
Most other files are specific to particular hardware, so it can be pretty confusing to just browse the tree.
Hope this helps,
Greg
At 7:00 PM +0500 3/28/03, dkotian3@vsnl.net wrote:
Agreed, I am also looking for a good documention. Atleast the flow in terms of implemented functions or assembly code and some kind of Do's and Dont's if any. One good advantage would be more and more people would be easily aware about the code architecture and would get invovled in LinuxBIOS if one is interested.
ivan@munix.com.br wrote I am writing some code to fixup the video chipset trident cyberblade and V1621 RGB->CS encoder , and also trying to fix the IDE_BOOT for my mainboard (B860T or EPIA), so I am looking for information about the real bios process, and about the layout of the common bios files, and of course, any information about bios as possible.
My main problem is to find good documentation about the post, the boot process.
I read on some places which the CS is set F000 and EIP FFF0, so
in other websites I had seen CS is FFF0, in other 000F , causing some confusion with me.
I need some documentation about 20bits addressing lines, and the GATE A20 function also.
Tanks in advance.
Linuxbios mailing list Linuxbios@clustermatic.org http://www.clustermatic.org/mailman/listinfo/linuxbios
Linuxbios mailing list Linuxbios@clustermatic.org http://www.clustermatic.org/mailman/listinfo/linuxbios
_______________________________________________ Linuxbios mailing list Linuxbios@clustermatic.org
On Sat, Mar 29, 2003 at 12:40:17PM +0500, dkotian3@vsnl.net wrote:
Thanks Greg,
I think, that is very good overview about the flow. It may be good idea to continue this flow on this thread or somewhere else. I think,One cannot expect Greg to do all the documentation as Peter said 8-10 hours is a lot of time. May be out of the many implementors in this forum, if one contributes by giving more details about any one of these files in detail of one's own choice ,basically significance,flow about it and Do's and Dont's,etc and any experiences. Probably a structure needs to be proposed as well and rest should fall in place for documentation at least. If not 8 hours by one person, atleast an hour can be contributed may not be an issue.
There has been a lot of good information sent to the mailing list but unfortunately it can be hard to find in the archives because of the low S/N ratio. Please don't get me wrong though, I think this list is very nice, I'm just saying that I've thought to myself "that's good documentation, it should be saved somewhere" a couple of times when reading some emails with stuff that's completely trivial to several readers, but quite valuable to myself and other (relative to complete) newbies.
//Peter
Agreed on all points.That is why I suggested to maintain this thread and the contributors may contribute their view on basically significance,flow about the individual ,Do's and Dont's,etc, so next time when someone ask for some documentation, atleast there would be only one thread to look for... And one can easily take these material and produce a good formal one out of it whenever there is some time.
Regards Deepak
----- Original Message ----- From: "Peter Stuge" stuge-linuxbios@cdy.org To: linuxbios@clustermatic.org Sent: Saturday, March 29, 2003 10:57 PM Subject: Re: Information about BIOS and the boot process
On Sat, Mar 29, 2003 at 12:40:17PM +0500, dkotian3@vsnl.net wrote:
Thanks Greg,
I think, that is very good overview about the flow. It may be good idea to continue this flow on this thread or somewhere else. I think,One cannot expect Greg to do all the documentation as Peter said 8-10 hours is a lot of time. May be out of the many implementors in this forum, if one contributes by giving more details about any one of these files in detail of one's own choice ,basically significance,flow about it and Do's and Dont's,etc and any experiences. Probably a structure needs to be proposed as well and rest should fall in place for documentation at least. If not 8 hours by one person, atleast an hour can be contributed may not be an issue.
There has been a lot of good information sent to the mailing list but unfortunately it can be hard to find in the archives because of the low
S/N
ratio. Please don't get me wrong though, I think this list is very nice, I'm just saying that I've thought to myself "that's good documentation, it should be saved somewhere" a couple of times when reading some emails with stuff that's completely trivial to several readers, but quite valuable to myself and other (relative to complete) newbies.
//Peter _______________________________________________ Linuxbios mailing list Linuxbios@clustermatic.org http://www.clustermatic.org/mailman/listinfo/linuxbios
What I most want is the documentation IN THE CODE, so that make documentation gives you the docs for that motherboard.
ron
Agreed, That is right. Many would like to reuse the code for a new motherboard, it would be very handy to be have some reference guide, so may be an overall documentation/or some kind of experience will probably show him the methodology of how to go about to implement LinuxBIOS on one's motherboard.
Thanks and Regards Deepak
----- Original Message ----- From: "ron minnich" rminnich@lanl.gov To: "Deepak Kotian" dkotian3@vsnl.net Cc: "Peter Stuge" stuge-linuxbios@cdy.org; linuxbios@clustermatic.org Sent: Sunday, March 30, 2003 5:12 AM Subject: Re: Information about BIOS and the boot process
What I most want is the documentation IN THE CODE, so that make documentation gives you the docs for that motherboard.
ron