All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: What are .s files in arch/i386/boot
@ 2003-06-09 15:30 Lars Unin
  2003-06-09 21:06 ` Steve Brueggeman
  0 siblings, 1 reply; 12+ messages in thread
From: Lars Unin @ 2003-06-09 15:30 UTC (permalink / raw)
  To: hahn; +Cc: linux-kernel

From: Mark Hahn <hahn@physics.mcmaster.ca>
 > > > What are .s files in arch/i386/boot, are they c sources of some sort?
> 
> no.  is there some reason you can't just look at them?
> 
> > > > Where can I find the specifications documents they were made from? 
> > > 
> > > There are not c files.
> > > They are assembler files
> 
> .s files are versions of .S files that have been run through cpp (gcc -E).
> you can know this simply by looking at the makefiles or watching a build,
> or by looking at the .s file and noticing the #line directives.
> 
> > > Try running gcc on a c file with the -S option
> > > it will generate the same then you can tweak the
> > > assembler produced to make it faster.
> 
> that's useful advice, but irrelevant in this case.
> 
> > Where can I find the .c files they were made from,
> 
> they aren't.
> 
> > and the spec sheets the .c files were made from? 
> 
> what the heck is a "spec sheet"?

I mean where can I find the information from which

"* It then loads 'setup' directly after itself (0x90200), and the system
 * at 0x10000, using BIOS interrupts. "
-- bootsect.S

The ability to know how to get the BIOS to do that comes from, e.g. a
book that can tell me how to do that without taking another degree...
Where the information can be found, that says what BIOS memory 
area 0x90200 is for etc.
-- 
______________________________________________
http://www.linuxmail.org/
Now with e-mail forwarding for only US$5.95/yr

Powered by Outblaze

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

* Re: What are .s files in arch/i386/boot
  2003-06-09 15:30 What are .s files in arch/i386/boot Lars Unin
@ 2003-06-09 21:06 ` Steve Brueggeman
  0 siblings, 0 replies; 12+ messages in thread
From: Steve Brueggeman @ 2003-06-09 21:06 UTC (permalink / raw)
  To: Lars Unin; +Cc: linux-kernel

Not sure, but I think this is what you want.

http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/Linux-Init-HOWTO.html

Steve Brueggeman


On Mon, 09 Jun 2003 23:30:38 +0800, you wrote:

>From: Mark Hahn <hahn@physics.mcmaster.ca>
> > > > What are .s files in arch/i386/boot, are they c sources of some sort?
>> 
>> no.  is there some reason you can't just look at them?
>> 
>> > > > Where can I find the specifications documents they were made from? 
>> > > 
>> > > There are not c files.
>> > > They are assembler files
>> 
>> .s files are versions of .S files that have been run through cpp (gcc -E).
>> you can know this simply by looking at the makefiles or watching a build,
>> or by looking at the .s file and noticing the #line directives.
>> 
>> > > Try running gcc on a c file with the -S option
>> > > it will generate the same then you can tweak the
>> > > assembler produced to make it faster.
>> 
>> that's useful advice, but irrelevant in this case.
>> 
>> > Where can I find the .c files they were made from,
>> 
>> they aren't.
>> 
>> > and the spec sheets the .c files were made from? 
>> 
>> what the heck is a "spec sheet"?
>
>I mean where can I find the information from which
>
>"* It then loads 'setup' directly after itself (0x90200), and the system
> * at 0x10000, using BIOS interrupts. "
>-- bootsect.S
>
>The ability to know how to get the BIOS to do that comes from, e.g. a
>book that can tell me how to do that without taking another degree...
>Where the information can be found, that says what BIOS memory 
>area 0x90200 is for etc.


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

* Re: What are .s files in arch/i386/boot
@ 2003-06-09 15:37 Lars Unin
  0 siblings, 0 replies; 12+ messages in thread
From: Lars Unin @ 2003-06-09 15:37 UTC (permalink / raw)
  To: vonbrand, james; +Cc: lars_unin, linux-kernel


>You'd better get a book on ia32 (caution, the intel sytax almost all are
>written for is truly bletcherous, and does things just different enough
>from the AT&T sytax gcc/the kernel uses to make your head spin when trying
>to map back and forth). There was an HOWTO on assembly language programming
>under Linux, haven't looked at it in a long time. 

Whats sytax? ;-)
Do ya not mean syntax?
-- 
______________________________________________
http://www.linuxmail.org/
Now with e-mail forwarding for only US$5.95/yr

Powered by Outblaze

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

* Re: What are .s files in arch/i386/boot
  2003-06-07 20:05 ` James Stevenson
  2003-06-07 19:32   ` Sean Neakums
@ 2003-06-09  1:38   ` Horst von Brand
  1 sibling, 0 replies; 12+ messages in thread
From: Horst von Brand @ 2003-06-09  1:38 UTC (permalink / raw)
  To: James Stevenson; +Cc: Lars Unin, linux-kernel

Lars Unin <lars_unin@linuxmail.org> said:
> James Stevenson <james@stev.org> said:
> > > > What are .s files in arch/i386/boot, are they c sources of some sort?
> > > > Where can I find the specifications documents they were made from? 
> > > 
> > > There are not c files.
> > > They are assembler files
> > > 
> > > Try running gcc on a c file with the -S option
> > > it will generate the same then you can tweak the
> > > assembler produced to make it faster.
> > > 
> > Where can I find the .c files they were made from,

Those files are smallish routines that can't be sanely written in C, or (in
the case of the bootstrap stuff) are for running on the 8086 your latest
CPU thinks it is when booting. No support for that from gcc.

> > and the spec sheets the .c files were made from? 

If they where around once, they have been long plastered over by patches
that make them useless now.

> You would have to find the original author of the person
> who tweaks the assembler in the .s file chances are the .c
> file is long gone though.

Probably never was. Only way out is as they say: "Use the source, Luke".

You'd better get a book on ia32 (caution, the intel sytax almost all are
written for is truly bletcherous, and does things just different enough
from the AT&T sytax gcc/the kernel uses to make your head spin when trying
to map back and forth). There was an HOWTO on assembly language programming
under Linux, haven't looked at it in a long time. 

> Why do all .c files have to be generated from a spec sheet ?

Now that is a good question... never used one in my life :-)
-- 
Dr. Horst H. von Brand                   User #22616 counter.li.org
Departamento de Informatica                     Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria              +56 32 654239
Casilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513

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

* Re: What are .s files in arch/i386/boot
  2003-06-08 20:04       ` Jos Hulzink
@ 2003-06-08 21:41         ` Shawn
  0 siblings, 0 replies; 12+ messages in thread
From: Shawn @ 2003-06-08 21:41 UTC (permalink / raw)
  To: linux-kernel

Not that it's a bad thing or anything, but holy crap! I didn't think
there was this level of hand-holding on this list.

It's nice to see folks willing to tutor, but really, don't get burned
out. This list is probably better suited to handling deeper questions.

On Sun, 2003-06-08 at 15:04, Jos Hulzink wrote:
> On Saturday 07 Jun 2003 23:27, H. Peter Anvin wrote:
> > Followup to:  <6un0gty981.fsf@zork.zork.net>
> > By author:    Sean Neakums <sneakums@zork.net>
> > In newsgroup: linux.dev.kernel
> >
> > > James Stevenson <james@stev.org> writes:
> > > >> > > What are .s files in arch/i386/boot, are they c sources of some
> > > >> > > sort? Where can I find the specifications documents they were made
> > > >> > > from?
> > > >> >
> > > >> > There are not c files.
> > > >> > They are assembler files
> > > >> >
> > > >> Where can I find the .c files they were made from,
> > > >> and the spec sheets the .c files were made from?
> > > >
> > > > You would have to find the original author of the person
> > > > who tweaks the assembler in the .s file chances are the .c
> > > > file is long gone though.
> > >
> > > If there were ever C files to begin with.  It's not unheard-of for
> > > people to write assembler code from scratch.
> >
> > The ones in the Linux kernel were all written from scratch.
> 
> And for a very good reason. A few things really need asm, for example getting 
> a CPU in protected mode, setting up the MMU and stuff. Once they are set up, 
> you can use C, though sometimes you must be really sure what your compiler 
> will make from the C.
> 
> So, why assembly ? Cause it is needed. Why in arch/i386/boot ? for if it is 
> well done there, it isn't needed at many other locations. A few things will 
> still require asm though, therefore you'll find more .s files in arch/i386. 
> 
> Jos
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: What are .s files in arch/i386/boot
  2003-06-07 21:27     ` H. Peter Anvin
@ 2003-06-08 20:04       ` Jos Hulzink
  2003-06-08 21:41         ` Shawn
  0 siblings, 1 reply; 12+ messages in thread
From: Jos Hulzink @ 2003-06-08 20:04 UTC (permalink / raw)
  To: H. Peter Anvin, linux-kernel

On Saturday 07 Jun 2003 23:27, H. Peter Anvin wrote:
> Followup to:  <6un0gty981.fsf@zork.zork.net>
> By author:    Sean Neakums <sneakums@zork.net>
> In newsgroup: linux.dev.kernel
>
> > James Stevenson <james@stev.org> writes:
> > >> > > What are .s files in arch/i386/boot, are they c sources of some
> > >> > > sort? Where can I find the specifications documents they were made
> > >> > > from?
> > >> >
> > >> > There are not c files.
> > >> > They are assembler files
> > >> >
> > >> Where can I find the .c files they were made from,
> > >> and the spec sheets the .c files were made from?
> > >
> > > You would have to find the original author of the person
> > > who tweaks the assembler in the .s file chances are the .c
> > > file is long gone though.
> >
> > If there were ever C files to begin with.  It's not unheard-of for
> > people to write assembler code from scratch.
>
> The ones in the Linux kernel were all written from scratch.

And for a very good reason. A few things really need asm, for example getting 
a CPU in protected mode, setting up the MMU and stuff. Once they are set up, 
you can use C, though sometimes you must be really sure what your compiler 
will make from the C.

So, why assembly ? Cause it is needed. Why in arch/i386/boot ? for if it is 
well done there, it isn't needed at many other locations. A few things will 
still require asm though, therefore you'll find more .s files in arch/i386. 

Jos

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

* Re: What are .s files in arch/i386/boot
  2003-06-07 19:32   ` Sean Neakums
@ 2003-06-07 21:27     ` H. Peter Anvin
  2003-06-08 20:04       ` Jos Hulzink
  0 siblings, 1 reply; 12+ messages in thread
From: H. Peter Anvin @ 2003-06-07 21:27 UTC (permalink / raw)
  To: linux-kernel

Followup to:  <6un0gty981.fsf@zork.zork.net>
By author:    Sean Neakums <sneakums@zork.net>
In newsgroup: linux.dev.kernel
>
> James Stevenson <james@stev.org> writes:
> 
> >> > > What are .s files in arch/i386/boot, are they c sources of some sort?
> >> > > Where can I find the specifications documents they were made from? 
> >> > 
> >> > There are not c files.
> >> > They are assembler files
> >> > 
> >> > Try running gcc on a c file with the -S option
> >> > it will generate the same then you can tweak the
> >> > assembler produced to make it faster.
> >> > 
> >> Where can I find the .c files they were made from,
> >> and the spec sheets the .c files were made from? 
> >
> > You would have to find the original author of the person
> > who tweaks the assembler in the .s file chances are the .c
> > file is long gone though.
> 
> If there were ever C files to begin with.  It's not unheard-of for
> people to write assembler code from scratch.
> 

The ones in the Linux kernel were all written from scratch.

	-hpa
-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
Architectures needed: ia64 m68k mips64 ppc ppc64 s390 s390x sh v850 x86-64

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

* Re: What are .s files in arch/i386/boot
  2003-06-07 18:54 Lars Unin
@ 2003-06-07 20:05 ` James Stevenson
  2003-06-07 19:32   ` Sean Neakums
  2003-06-09  1:38   ` Horst von Brand
  0 siblings, 2 replies; 12+ messages in thread
From: James Stevenson @ 2003-06-07 20:05 UTC (permalink / raw)
  To: Lars Unin; +Cc: linux-kernel


> > > What are .s files in arch/i386/boot, are they c sources of some sort?
> > > Where can I find the specifications documents they were made from? 
> > 
> > There are not c files.
> > They are assembler files
> > 
> > Try running gcc on a c file with the -S option
> > it will generate the same then you can tweak the
> > assembler produced to make it faster.
> > 
> Where can I find the .c files they were made from,
> and the spec sheets the .c files were made from? 

You would have to find the original author of the person
who tweaks the assembler in the .s file chances are the .c
file is long gone though.

Why do all .c files have to be generated from a spec sheet ?




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

* Re: What are .s files in arch/i386/boot
  2003-06-07 18:36 Lars Unin
@ 2003-06-07 19:50 ` James Stevenson
  0 siblings, 0 replies; 12+ messages in thread
From: James Stevenson @ 2003-06-07 19:50 UTC (permalink / raw)
  To: Lars Unin; +Cc: linux-kernel

On Sun, 8 Jun 2003, Lars Unin wrote:

> What are .s files in arch/i386/boot, are they c sources of some sort?
> Where can I find the specifications documents they were made from? 

There are not c files.
They are assembler files

Try running gcc on a c file with the -S option
it will generate the same then you can tweak the
assembler produced to make it faster.

	James


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

* Re: What are .s files in arch/i386/boot
  2003-06-07 20:05 ` James Stevenson
@ 2003-06-07 19:32   ` Sean Neakums
  2003-06-07 21:27     ` H. Peter Anvin
  2003-06-09  1:38   ` Horst von Brand
  1 sibling, 1 reply; 12+ messages in thread
From: Sean Neakums @ 2003-06-07 19:32 UTC (permalink / raw)
  To: linux-kernel

James Stevenson <james@stev.org> writes:

>> > > What are .s files in arch/i386/boot, are they c sources of some sort?
>> > > Where can I find the specifications documents they were made from? 
>> > 
>> > There are not c files.
>> > They are assembler files
>> > 
>> > Try running gcc on a c file with the -S option
>> > it will generate the same then you can tweak the
>> > assembler produced to make it faster.
>> > 
>> Where can I find the .c files they were made from,
>> and the spec sheets the .c files were made from? 
>
> You would have to find the original author of the person
> who tweaks the assembler in the .s file chances are the .c
> file is long gone though.

If there were ever C files to begin with.  It's not unheard-of for
people to write assembler code from scratch.


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

* Re: What are .s files in arch/i386/boot
@ 2003-06-07 18:54 Lars Unin
  2003-06-07 20:05 ` James Stevenson
  0 siblings, 1 reply; 12+ messages in thread
From: Lars Unin @ 2003-06-07 18:54 UTC (permalink / raw)
  To: james; +Cc: linux-kernel

> > What are .s files in arch/i386/boot, are they c sources of some sort?
> > Where can I find the specifications documents they were made from? 
> 
> There are not c files.
> They are assembler files
> 
> Try running gcc on a c file with the -S option
> it will generate the same then you can tweak the
> assembler produced to make it faster.
> 
> 	James
> 
Where can I find the .c files they were made from,
and the spec sheets the .c files were made from? 
-- 
______________________________________________
http://www.linuxmail.org/
Now with e-mail forwarding for only US$5.95/yr

Powered by Outblaze

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

* What are .s files in arch/i386/boot
@ 2003-06-07 18:36 Lars Unin
  2003-06-07 19:50 ` James Stevenson
  0 siblings, 1 reply; 12+ messages in thread
From: Lars Unin @ 2003-06-07 18:36 UTC (permalink / raw)
  To: linux-kernel

What are .s files in arch/i386/boot, are they c sources of some sort?
Where can I find the specifications documents they were made from? 

Lars unin
-- 
______________________________________________
http://www.linuxmail.org/
Now with e-mail forwarding for only US$5.95/yr

Powered by Outblaze

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

end of thread, other threads:[~2003-06-09 20:52 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-09 15:30 What are .s files in arch/i386/boot Lars Unin
2003-06-09 21:06 ` Steve Brueggeman
  -- strict thread matches above, loose matches on Subject: below --
2003-06-09 15:37 Lars Unin
2003-06-07 18:54 Lars Unin
2003-06-07 20:05 ` James Stevenson
2003-06-07 19:32   ` Sean Neakums
2003-06-07 21:27     ` H. Peter Anvin
2003-06-08 20:04       ` Jos Hulzink
2003-06-08 21:41         ` Shawn
2003-06-09  1:38   ` Horst von Brand
2003-06-07 18:36 Lars Unin
2003-06-07 19:50 ` James Stevenson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.