Hi,
I'm a LinuxBIOS newbie. I have downloaded the source code for the same and was trying to understand it. Looks too complicated to me. I'd started with the code for Intel440gx mainboard, but failed to understand how the northbridge and southbridge intialization routines are invoked. Can someone tell me how to go about understanding the code?
Thanks, Shubhangi
Greetings,
Probably the first thing to understand is the overall flow of control.
On powerup, the reset vector at f000:fff0 jumps to the start of the assembly code. The assembly code consists of a series of modular units that the config files paste together using include directives. It just starts at the beginning, and new pieces are tacked on as encountered in the config files. The config files are invoked by directives like northbridge and southbridge. The master config file is in the mainboard directory and is invoked by the user's config file. Most mainboard directory have example user configs.
The c code is linked together seperatly and then compressed. The last part of the asm code decompresses it into RAM and calls hardwaremain (found in src/arch/<arch>/lib/hardwaremain.c currently, <arch> can be alpha, i386 or ppc). The remainder of the C code is all invoked from there.
G'day, sjames
On Fri, 7 Mar 2003, Shubhangi Jadhav wrote:
Hi,
I'm a LinuxBIOS newbie. I have downloaded the source code for the same and was trying to understand it. Looks too complicated to me. I'd started with the code for Intel440gx mainboard, but failed to understand how the northbridge and southbridge intialization routines are invoked. Can someone tell me how to go about understanding the code?
Thanks, Shubhangi
Linuxbios mailing list Linuxbios@clustermatic.org http://www.clustermatic.org/mailman/listinfo/linuxbios
Hi,
However according to the LinuxBIOS readme the assembly code calls intel_main in freebios/chip/intel/intel_main.c which in turn calls linuxbios_main in linuxbios/inflate/main.c. So is intel_main called first or hardwaremain. Am I missing something Please elaborate more on the flow.
Thanks, Shubhangi
-----Original Message----- From: steven james [mailto:pyro@linuxlabs.com] Sent: Friday, March 07, 2003 6:29 PM To: Shubhangi Jadhav Cc: linuxbios@clustermatic.org Subject: Re: Help needed to understand code
Greetings,
Probably the first thing to understand is the overall flow of control.
On powerup, the reset vector at f000:fff0 jumps to the start of the assembly code. The assembly code consists of a series of modular units that the config files paste together using include directives. It just starts at the beginning, and new pieces are tacked on as encountered in the config files. The config files are invoked by directives like northbridge and southbridge. The master config file is in the mainboard directory and is invoked by the user's config file. Most mainboard directory have example user configs.
The c code is linked together seperatly and then compressed. The last part of the asm code decompresses it into RAM and calls hardwaremain (found in src/arch/<arch>/lib/hardwaremain.c currently, <arch> can be alpha, i386 or ppc). The remainder of the C code is all invoked from there.
G'day, sjames
On Fri, 7 Mar 2003, Shubhangi Jadhav wrote:
Hi,
I'm a LinuxBIOS newbie. I have downloaded the source code for the same
and
was trying to understand it. Looks too complicated to me. I'd started with the code for Intel440gx mainboard, but failed to understand how the northbridge and southbridge intialization routines are invoked. Can someone tell me how to go about understanding the code?
Thanks, Shubhangi
Linuxbios mailing list Linuxbios@clustermatic.org http://www.clustermatic.org/mailman/listinfo/linuxbios
-- -------------------------steven james, director of research, linux labs ... ........ ..... .... 230 peachtree st nw ste 701 the original linux labs atlanta.ga.us 30303 -since 1995 http://www.linuxlabs.com office 404.577.7747 fax 404.577.7743 -----------------------------------------------------------------------
Greetings,
By chance, are you looking at a snapshot tarball? If so, that's very old. The best bet is to check out the CVS tree from sourceforge. These days, intel_main is gone and there's nothing in the chip directory.
G'day, sjames
On Fri, 7 Mar 2003, Shubhangi Jadhav wrote:
Hi,
However according to the LinuxBIOS readme the assembly code calls intel_main in freebios/chip/intel/intel_main.c which in turn calls linuxbios_main in linuxbios/inflate/main.c. So is intel_main called first or hardwaremain. Am I missing something Please elaborate more on the flow.
Thanks, Shubhangi
-----Original Message----- From: steven james [mailto:pyro@linuxlabs.com] Sent: Friday, March 07, 2003 6:29 PM To: Shubhangi Jadhav Cc: linuxbios@clustermatic.org Subject: Re: Help needed to understand code
Greetings,
Probably the first thing to understand is the overall flow of control.
On powerup, the reset vector at f000:fff0 jumps to the start of the assembly code. The assembly code consists of a series of modular units that the config files paste together using include directives. It just starts at the beginning, and new pieces are tacked on as encountered in the config files. The config files are invoked by directives like northbridge and southbridge. The master config file is in the mainboard directory and is invoked by the user's config file. Most mainboard directory have example user configs.
The c code is linked together seperatly and then compressed. The last part of the asm code decompresses it into RAM and calls hardwaremain (found in src/arch/<arch>/lib/hardwaremain.c currently, <arch> can be alpha, i386 or ppc). The remainder of the C code is all invoked from there.
G'day, sjames
On Fri, 7 Mar 2003, Shubhangi Jadhav wrote:
Hi,
I'm a LinuxBIOS newbie. I have downloaded the source code for the same
and
was trying to understand it. Looks too complicated to me. I'd started with the code for Intel440gx mainboard, but failed to understand how the northbridge and southbridge intialization routines are invoked. Can someone tell me how to go about understanding the code?
Thanks, Shubhangi
Linuxbios mailing list Linuxbios@clustermatic.org http://www.clustermatic.org/mailman/listinfo/linuxbios
-- -------------------------steven james, director of research, linux labs ... ........ ..... .... 230 peachtree st nw ste 701 the original linux labs atlanta.ga.us 30303 -since 1995 http://www.linuxlabs.com office 404.577.7747 fax 404.577.7743
Linuxbios mailing list Linuxbios@clustermatic.org http://www.clustermatic.org/mailman/listinfo/linuxbios
Hi,
Yes I downloaded the snapshot from the website, since it mentions that it's the daily snapshot of the source. Can you please update the snapshot on the website.
Thanks, Shubhangi
-----Original Message----- From: steven james [mailto:pyro@linuxlabs.com] Sent: Friday, March 07, 2003 8:00 PM To: Shubhangi Jadhav Cc: linuxbios@clustermatic.org Subject: RE: Help needed to understand code
Greetings,
By chance, are you looking at a snapshot tarball? If so, that's very old. The best bet is to check out the CVS tree from sourceforge. These days, intel_main is gone and there's nothing in the chip directory.
G'day, sjames
On Fri, 7 Mar 2003, Shubhangi Jadhav wrote:
Hi,
However according to the LinuxBIOS readme the assembly code calls intel_main in freebios/chip/intel/intel_main.c which in turn calls linuxbios_main in linuxbios/inflate/main.c. So is intel_main called first
or
hardwaremain. Am I missing something Please elaborate more on the flow.
Thanks, Shubhangi
-----Original Message----- From: steven james [mailto:pyro@linuxlabs.com] Sent: Friday, March 07, 2003 6:29 PM To: Shubhangi Jadhav Cc: linuxbios@clustermatic.org Subject: Re: Help needed to understand code
Greetings,
Probably the first thing to understand is the overall flow of control.
On powerup, the reset vector at f000:fff0 jumps to the start of the assembly code. The assembly code consists of a series of modular units that the config files paste together using include directives. It just starts at the beginning, and new pieces are tacked on as encountered in the config files. The config files are invoked by directives like northbridge and southbridge. The master config file is in the mainboard directory and is invoked by the user's config file. Most mainboard directory have example user configs.
The c code is linked together seperatly and then compressed. The last part of the asm code decompresses it into RAM and calls hardwaremain (found in src/arch/<arch>/lib/hardwaremain.c currently, <arch> can be alpha, i386 or ppc). The remainder of the C code is all invoked from there.
G'day, sjames
On Fri, 7 Mar 2003, Shubhangi Jadhav wrote:
Hi,
I'm a LinuxBIOS newbie. I have downloaded the source code for the same
and
was trying to understand it. Looks too complicated to me. I'd started with the code for Intel440gx mainboard, but failed to understand how the northbridge and southbridge intialization routines
are
invoked. Can someone tell me how to go about understanding the code?
Thanks, Shubhangi
Linuxbios mailing list Linuxbios@clustermatic.org http://www.clustermatic.org/mailman/listinfo/linuxbios
-- -------------------------steven james, director of research, linux labs ... ........ ..... .... 230 peachtree st nw ste 701 the original linux labs atlanta.ga.us 30303 -since 1995 http://www.linuxlabs.com office 404.577.7747 fax 404.577.7743
Linuxbios mailing list Linuxbios@clustermatic.org http://www.clustermatic.org/mailman/listinfo/linuxbios
-- -------------------------steven james, director of research, linux labs ... ........ ..... .... 230 peachtree st nw ste 701 the original linux labs atlanta.ga.us 30303 -since 1995 http://www.linuxlabs.com office 404.577.7747 fax 404.577.7743 -----------------------------------------------------------------------
Hi,
Could anyone tell me what are the .inc files found in the LinuxBIOS source? Are these generated from the C code (for the sdram code I could see an association between the .c and corresponding .inc) and how ?
Thanks, Shubhangi
-----Original Message----- From: steven james [mailto:pyro@linuxlabs.com] Sent: Friday, March 07, 2003 8:00 PM To: Shubhangi Jadhav Cc: linuxbios@clustermatic.org Subject: RE: Help needed to understand code
Greetings,
By chance, are you looking at a snapshot tarball? If so, that's very old. The best bet is to check out the CVS tree from sourceforge. These days, intel_main is gone and there's nothing in the chip directory.
G'day, sjames
On Fri, 7 Mar 2003, Shubhangi Jadhav wrote:
Hi,
However according to the LinuxBIOS readme the assembly code calls intel_main in freebios/chip/intel/intel_main.c which in turn calls linuxbios_main in linuxbios/inflate/main.c. So is intel_main called first
or
hardwaremain. Am I missing something Please elaborate more on the flow.
Thanks, Shubhangi
-----Original Message----- From: steven james [mailto:pyro@linuxlabs.com] Sent: Friday, March 07, 2003 6:29 PM To: Shubhangi Jadhav Cc: linuxbios@clustermatic.org Subject: Re: Help needed to understand code
Greetings,
Probably the first thing to understand is the overall flow of control.
On powerup, the reset vector at f000:fff0 jumps to the start of the assembly code. The assembly code consists of a series of modular units that the config files paste together using include directives. It just starts at the beginning, and new pieces are tacked on as encountered in the config files. The config files are invoked by directives like northbridge and southbridge. The master config file is in the mainboard directory and is invoked by the user's config file. Most mainboard directory have example user configs.
The c code is linked together seperatly and then compressed. The last part of the asm code decompresses it into RAM and calls hardwaremain (found in src/arch/<arch>/lib/hardwaremain.c currently, <arch> can be alpha, i386 or ppc). The remainder of the C code is all invoked from there.
G'day, sjames
On Fri, 7 Mar 2003, Shubhangi Jadhav wrote:
Hi,
I'm a LinuxBIOS newbie. I have downloaded the source code for the same
and
was trying to understand it. Looks too complicated to me. I'd started with the code for Intel440gx mainboard, but failed to understand how the northbridge and southbridge intialization routines
are
invoked. Can someone tell me how to go about understanding the code?
Thanks, Shubhangi
Linuxbios mailing list Linuxbios@clustermatic.org http://www.clustermatic.org/mailman/listinfo/linuxbios
-- -------------------------steven james, director of research, linux labs ... ........ ..... .... 230 peachtree st nw ste 701 the original linux labs atlanta.ga.us 30303 -since 1995 http://www.linuxlabs.com office 404.577.7747 fax 404.577.7743
Linuxbios mailing list Linuxbios@clustermatic.org http://www.clustermatic.org/mailman/listinfo/linuxbios
-- -------------------------steven james, director of research, linux labs ... ........ ..... .... 230 peachtree st nw ste 701 the original linux labs atlanta.ga.us 30303 -since 1995 http://www.linuxlabs.com office 404.577.7747 fax 404.577.7743 -----------------------------------------------------------------------
Shubhangi Jadhav wrote:
Hi,
Could anyone tell me what are the .inc files found in the LinuxBIOS source? Are these generated from the C code (for the sdram code I could see an association between the .c and corresponding .inc) and how ?
The .inc files are assembly language files that "stack up" or include, in order, on top of crt0.base. These execute first, and eventually move the C-code (and decompress it if necessary) to RAM, ending at c_start.S, which jumps to the C-code. The .inc files do things that are necessary as a prelude to running C, which needs RAM (ie, a stack).
Each .inc file must jump around its data, it is expected to execute top to bottom and flow to the next file included below it.
-Steve
how does crt0.base move to c_start.S. I did not find any reference to c_start.S from crt0.base or any other .inc files included in crt0.base
-Shubhangi
-----Original Message----- From: linuxbios-admin@clustermatic.org [mailto:linuxbios-admin@clustermatic.org]On Behalf Of Steve Gehlbach Sent: Saturday, March 15, 2003 10:44 PM To: Shubhangi Jadhav Cc: linuxbios@clustermatic.org Subject: Re: Help needed to understand code
Shubhangi Jadhav wrote:
Hi,
Could anyone tell me what are the .inc files found in the LinuxBIOS
source?
Are these generated from the C code (for the sdram code I could see an association between the .c and corresponding .inc) and how ?
The .inc files are assembly language files that "stack up" or include, in order, on top of crt0.base. These execute first, and eventually move the C-code (and decompress it if necessary) to RAM, ending at c_start.S, which jumps to the C-code. The .inc files do things that are necessary as a prelude to running C, which needs RAM (ie, a stack).
Each .inc file must jump around its data, it is expected to execute top to bottom and flow to the next file included below it.
-Steve
_______________________________________________ Linuxbios mailing list Linuxbios@clustermatic.org http://www.clustermatic.org/mailman/listinfo/linuxbios
Shubhangi Jadhav wrote:
how does crt0.base move to c_start.S. I did not find any reference to c_start.S from crt0.base or any other .inc files included in crt0.base
The bottom of crt0.base jumps to c_start.S using loader "magic". c_start.S runs in ram in the C code address space. crt0.base runs in rom.
-Steve
Hi,
Could you please explain to me the complete flow, right from the beginning of execution of the assembly code. How does the assembly code jump to the C code ? which is the jump instruction in crt0.base that makes it jump to c_start.S
Thanks, Shubhangi
-----Original Message----- From: Steve Gehlbach [mailto:steve@nexpath.com] Sent: Monday, March 17, 2003 11:57 PM To: Shubhangi Jadhav Cc: linuxbios@clustermatic.org Subject: Re: Help needed to understand code
Shubhangi Jadhav wrote:
how does crt0.base move to c_start.S. I did not find any reference to c_start.S from crt0.base or any other .inc files included in crt0.base
The bottom of crt0.base jumps to c_start.S using loader "magic". c_start.S runs in ram in the C code address space. crt0.base runs in rom.
-Steve