OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Apr 19, 2024 8:17 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Where to put stage 2?
PostPosted: Fri Jul 21, 2017 9:25 am 
Offline

Joined: Fri Jul 21, 2017 9:08 am
Posts: 2
Hello. I've just finished developing the ISO9660 stage 1 bootloader. But i don't know where to put stage 2.
Stage 1 locates at 0x0000:0x7c00 - 0x0000:0x8400.
So, where is the optimal place to put the stage 2 bootloader?


Top
 Profile  
 
 Post subject: Re: Where to put stage 2?
PostPosted: Fri Jul 21, 2017 10:35 am 
Offline
Member
Member
User avatar

Joined: Sun Oct 22, 2006 7:01 am
Posts: 2646
Location: Devon, UK
Hi,

Short answer: wherever you like.

If it's a normal sized stage 2, why not place in in RAM immediately after stage 1? You have all that space up to the start of the BDA. If your stage 2 is more like a kernel, you will want somewhere above 1MiB.

The wiki article [wiki]Memory Map (x86)[/wiki] tells you of a few areas that are guaranteed free. You are also generally safe in the area from 1MiB - 14MiB if the RAM exists and you don't intend to place your kernel there. It's also worth generating a system memory map early on.

Cheers,
Adam


Top
 Profile  
 
 Post subject: Re: Where to put stage 2?
PostPosted: Fri Jul 21, 2017 10:56 am 
Offline

Joined: Fri Jul 21, 2017 9:08 am
Posts: 2
AJ wrote:
Hi,

Short answer: wherever you like.

If it's a normal sized stage 2, why not place in in RAM immediately after stage 1? You have all that space up to the start of the BDA. If your stage 2 is more like a kernel, you will want somewhere above 1MiB.

The wiki article [wiki]Memory Map (x86)[/wiki] tells you of a few areas that are guaranteed free. You are also generally safe in the area from 1MiB - 14MiB if the RAM exists and you don't intend to place your kernel there. It's also worth generating a system memory map early on.

Cheers,
Adam


OK. Thanks for the answer.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot], SemrushBot [Bot] and 83 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group