OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 11:30 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: If is kernel bigger than 44 kb, qemu have error
PostPosted: Tue Jul 23, 2019 10:16 am 
Offline
Member
Member

Joined: Sat Mar 10, 2018 10:16 am
Posts: 296
Good day!

If is my kernel bigger than 44 kb, qemu crash and say:

Code:
qemu: fatal: Trying to execute code outside RAM or ROM at 0x000b0000


My bootloader code is in https://github.com/Klaykap/LightningOS/blob/master/bootloader.asm

Please where is error?

_________________
https://github.com/VendelinSlezak/BleskOS


Top
 Profile  
 
 Post subject: Re: If is kernel bigger than 44 kb, qemu have error
PostPosted: Tue Jul 23, 2019 10:19 am 
Offline
Member
Member
User avatar

Joined: Mon Sep 03, 2018 2:25 am
Posts: 66
Because you're running into the BIOS MMIO space, you shouldn't allocate your kernel under the 1meg mark and IMHO use grub or something


Top
 Profile  
 
 Post subject: Re: If is kernel bigger than 44 kb, qemu have error
PostPosted: Tue Jul 23, 2019 10:24 am 
Offline
Member
Member

Joined: Sat Mar 10, 2018 10:16 am
Posts: 296
ummm... :? I have my kernel on 0x10000. But please how I can load my kernel from my bootloader with bios read function 0x13 on 0x100000?

_________________
https://github.com/VendelinSlezak/BleskOS


Top
 Profile  
 
 Post subject: Re: If is kernel bigger than 44 kb, qemu have error
PostPosted: Tue Jul 23, 2019 11:01 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4591
Location: Chichester, UK
Use Grub.


Top
 Profile  
 
 Post subject: Re: If is kernel bigger than 44 kb, qemu have error
PostPosted: Tue Jul 23, 2019 11:12 am 
Offline
Member
Member

Joined: Sat Mar 10, 2018 10:16 am
Posts: 296
I dont want use GRUB because I want install my os on hard disc and easiest way is use my own bootloader.

_________________
https://github.com/VendelinSlezak/BleskOS


Top
 Profile  
 
 Post subject: Re: If is kernel bigger than 44 kb, qemu have error
PostPosted: Tue Jul 23, 2019 1:13 pm 
Offline
Member
Member
User avatar

Joined: Mon Sep 03, 2018 2:25 am
Posts: 66
Why wouldn't grub work on a harddrive?


Top
 Profile  
 
 Post subject: Re: If is kernel bigger than 44 kb, qemu have error
PostPosted: Tue Jul 23, 2019 1:22 pm 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4591
Location: Chichester, UK
Klakap wrote:
easiest way is use my own bootloader.

Fair enough - do so.

You could have installed Grub in the time it took to post and answer this question, but if you r own bootloader is easier....


Top
 Profile  
 
 Post subject: Re: If is kernel bigger than 44 kb, qemu have error
PostPosted: Tue Jul 23, 2019 4:07 pm 
Offline
Member
Member

Joined: Fri Aug 26, 2016 1:41 pm
Posts: 671
Out of curiosity what command line option do you use to launch your bootloader with QEMU? When you say 44kb did you mean 64kb?


Top
 Profile  
 
 Post subject: Re: If is kernel bigger than 44 kb, qemu have error
PostPosted: Wed Jul 24, 2019 4:02 am 
Offline
Member
Member
User avatar

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

It seems to me that you think your own loader is easier simply because you don't want to read the GRUB documentation. +1 to iansjack - you could have installed GRUB by now. If you think you can easily code a bootloader that will work on as big a range of configurations as GRUB then good luck to you.

What is the last instruction executed before the error message? I bet your code doesn't just naturally run in to 0xb0000. I expect the most likely thing is that you are using ret where 0xb0000 is on the stack.

One other thing that makes no difference. Your comments say "load to 1000h". If you need that comment, it's worth making it obvious that you mean *segment* 1000h.

Cheers,
Adam


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 90 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