linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: Linux boot code
       [not found] <3F12AC57.2080609@tiscalinet.it>
@ 2003-07-14 16:15 ` Riley Williams
  2003-07-15  9:17   ` Koala GNU
  0 siblings, 1 reply; 4+ messages in thread
From: Riley Williams @ 2003-07-14 16:15 UTC (permalink / raw)
  To: koala.gnu; +Cc: Linux-Kernel

Hi.

 > I am looking at the boot code in bootsect.S and I have some doubt.
 > I tried to search the answers to my questions on
 > marc.theaimsgroup.com and on Google but I haven't found them.

I know nothing about the former site, so can't comment thereon.

 > Probably these are newbie question but I'll appreciate if someone
 > of you help me.

I'll do what I can.

 > 1) In the bootsect code the first thing that is done is to copy
 >    the boot sector to 0x90000 and move the program count to
 >    0x9000, go. Why it is necessary move the code there? Is it not
 >    possible continue the process from 0x7C00?

Following moving the boot code there, the next step is to load the
kernel image, either from 0x10000 (64k) or from 1M upwards, this
being dependent on various factors. However, the boot sector holds
several flags whose values are important AFTER the kernel image has
been loaded, so is moved out the way first.

 > 2) Another step is to move the parameters table from 0x78:0 to
 >    0x9000:0x4000-12. What are the info contained in this table?
 >    Can you send me a link to a site that specify these info?
 >    Without these info I am not able to understand these three
 >    line of code
 >
 >        movb    $36, 0x4(%di)           # patch sector count
 >        movw    %di, %fs:(%bx)
 >        movw    %es, %fs:2(%bx)

That area of memory contains parameters configured by the BIOS of
the machine in question. I would suspect it's the parameters for
the floppy drives, and the code that follows is presumably that
used to determine how many sectors per track the floppy in /dev/fd0
actually has.

 > Thanks in advance for your help

No problem.

Best wishes from Riley.
---
 * Nothing as pretty as a smile, nothing as ugly as a frown.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.500 / Virus Database: 298 - Release Date: 10-Jul-2003


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

* Re: Linux boot code
  2003-07-14 16:15 ` Linux boot code Riley Williams
@ 2003-07-15  9:17   ` Koala GNU
  2003-07-15 16:03     ` Randy.Dunlap
  2003-07-15 18:01     ` Hua Zhong
  0 siblings, 2 replies; 4+ messages in thread
From: Koala GNU @ 2003-07-15  9:17 UTC (permalink / raw)
  To: Riley Williams, linux-kernel

Hi, Riley,

thanks for your reply.

I noticed the native boot code for floppy is not supported any more. In 
fact in the current code display a message and reboot the machine after 
the press of a key.

But I am interested on how the old native boot code worked.

Do you know if there is a particular reason why the boot sector is moved 
to 0x9000:0 (excuse me if I repeat the question, but I need help on this)?

I hope someone else can point me a site where is reported the format of 
the floppy parameter table at address 0x0:0x78.

Thanks in advance and excuse me for this other post.

Riley Williams wrote:

>Hi.
>
> > I am looking at the boot code in bootsect.S and I have some doubt.
> > I tried to search the answers to my questions on
> > marc.theaimsgroup.com and on Google but I haven't found them.
>
>I know nothing about the former site, so can't comment thereon.
>
> > Probably these are newbie question but I'll appreciate if someone
> > of you help me.
>
>I'll do what I can.
>
> > 1) In the bootsect code the first thing that is done is to copy
> >    the boot sector to 0x90000 and move the program count to
> >    0x9000, go. Why it is necessary move the code there? Is it not
> >    possible continue the process from 0x7C00?
>
>Following moving the boot code there, the next step is to load the
>kernel image, either from 0x10000 (64k) or from 1M upwards, this
>being dependent on various factors. However, the boot sector holds
>several flags whose values are important AFTER the kernel image has
>been loaded, so is moved out the way first.
>
> > 2) Another step is to move the parameters table from 0x78:0 to
> >    0x9000:0x4000-12. What are the info contained in this table?
> >    Can you send me a link to a site that specify these info?
> >    Without these info I am not able to understand these three
> >    line of code
> >
> >        movb    $36, 0x4(%di)           # patch sector count
> >        movw    %di, %fs:(%bx)
> >        movw    %es, %fs:2(%bx)
>
>That area of memory contains parameters configured by the BIOS of
>the machine in question. I would suspect it's the parameters for
>the floppy drives, and the code that follows is presumably that
>used to determine how many sectors per track the floppy in /dev/fd0
>actually has.
>
> > Thanks in advance for your help
>
>No problem.
>
>Best wishes from Riley.
>---
> * Nothing as pretty as a smile, nothing as ugly as a frown.
>
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.500 / Virus Database: 298 - Release Date: 10-Jul-2003
>
>-
>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] 4+ messages in thread

* Re: Linux boot code
  2003-07-15  9:17   ` Koala GNU
@ 2003-07-15 16:03     ` Randy.Dunlap
  2003-07-15 18:01     ` Hua Zhong
  1 sibling, 0 replies; 4+ messages in thread
From: Randy.Dunlap @ 2003-07-15 16:03 UTC (permalink / raw)
  To: koala.gnu; +Cc: Riley, linux-kernel

On Tue, 15 Jul 2003 11:17:46 +0200 Koala GNU <koala.gnu@tiscalinet.it> wrote:

| Hi, Riley,
| 
| thanks for your reply.
| 
| I noticed the native boot code for floppy is not supported any more. In 
| fact in the current code display a message and reboot the machine after 
| the press of a key.
| 
| But I am interested on how the old native boot code worked.
| 
| Do you know if there is a particular reason why the boot sector is moved 
| to 0x9000:0 (excuse me if I repeat the question, but I need help on this)?

Why do you need to know?

IIRC, it's because the code being loaded also (usually) is written
as a boot loader also, and boot loaders often assume that they are
loaded at 0:7c00.  (disclaimer: it's been a few years since I worked
on boot loaders.)

| I hope someone else can point me a site where is reported the format of 
| the floppy parameter table at address 0x0:0x78.

http://www.delorie.com/djgpp/doc/rbinter/id/55/24.html (for one)

--
~Randy
| http://developer.osdl.org/rddunlap/ | http://www.xenotime.net/linux/ |

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

* RE: Linux boot code
  2003-07-15  9:17   ` Koala GNU
  2003-07-15 16:03     ` Randy.Dunlap
@ 2003-07-15 18:01     ` Hua Zhong
  1 sibling, 0 replies; 4+ messages in thread
From: Hua Zhong @ 2003-07-15 18:01 UTC (permalink / raw)
  To: koala.gnu, 'Riley Williams', 'linux-kernel'

How It Works: 
DOS Floppy Disk Boot Sector

http://www.ata-atapi.com/hiwdos.htm#T8

> -----Original Message-----
> From: linux-kernel-owner@vger.kernel.org 
> [mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of Koala GNU
> Sent: Tuesday, July 15, 2003 2:18 AM
> To: Riley Williams; linux-kernel
> Subject: Re: Linux boot code
> 
> 
> Hi, Riley,
> 
> thanks for your reply.
> 
> I noticed the native boot code for floppy is not supported 
> any more. In 
> fact in the current code display a message and reboot the 
> machine after 
> the press of a key.
> 
> But I am interested on how the old native boot code worked.
> 
> Do you know if there is a particular reason why the boot 
> sector is moved 
> to 0x9000:0 (excuse me if I repeat the question, but I need 
> help on this)?
> 
> I hope someone else can point me a site where is reported the 
> format of 
> the floppy parameter table at address 0x0:0x78.
> 
> Thanks in advance and excuse me for this other post.
> 
> Riley Williams wrote:
> 
> >Hi.
> >
> > > I am looking at the boot code in bootsect.S and I have some doubt.
> > > I tried to search the answers to my questions on
> > > marc.theaimsgroup.com and on Google but I haven't found them.
> >
> >I know nothing about the former site, so can't comment thereon.
> >
> > > Probably these are newbie question but I'll appreciate if someone
> > > of you help me.
> >
> >I'll do what I can.
> >
> > > 1) In the bootsect code the first thing that is done is to copy
> > >    the boot sector to 0x90000 and move the program count to
> > >    0x9000, go. Why it is necessary move the code there? Is it not
> > >    possible continue the process from 0x7C00?
> >
> >Following moving the boot code there, the next step is to load the
> >kernel image, either from 0x10000 (64k) or from 1M upwards, this
> >being dependent on various factors. However, the boot sector holds
> >several flags whose values are important AFTER the kernel image has
> >been loaded, so is moved out the way first.
> >
> > > 2) Another step is to move the parameters table from 0x78:0 to
> > >    0x9000:0x4000-12. What are the info contained in this table?
> > >    Can you send me a link to a site that specify these info?
> > >    Without these info I am not able to understand these three
> > >    line of code
> > >
> > >        movb    $36, 0x4(%di)           # patch sector count
> > >        movw    %di, %fs:(%bx)
> > >        movw    %es, %fs:2(%bx)
> >
> >That area of memory contains parameters configured by the BIOS of
> >the machine in question. I would suspect it's the parameters for
> >the floppy drives, and the code that follows is presumably that
> >used to determine how many sectors per track the floppy in /dev/fd0
> >actually has.
> >
> > > Thanks in advance for your help
> >
> >No problem.
> >
> >Best wishes from Riley.
> >---
> > * Nothing as pretty as a smile, nothing as ugly as a frown.
> >
> >---
> >Outgoing mail is certified Virus Free.
> >Checked by AVG anti-virus system (http://www.grisoft.com).
> >Version: 6.0.500 / Virus Database: 298 - Release Date: 10-Jul-2003
> >
> >-
> >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/
> >
> >  
> >
> 
> 
> -
> 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] 4+ messages in thread

end of thread, other threads:[~2003-07-15 17:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <3F12AC57.2080609@tiscalinet.it>
2003-07-14 16:15 ` Linux boot code Riley Williams
2003-07-15  9:17   ` Koala GNU
2003-07-15 16:03     ` Randy.Dunlap
2003-07-15 18:01     ` Hua Zhong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).