OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Apr 25, 2024 3:59 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: int 0x15 0xE820
PostPosted: Wed May 03, 2017 3:03 pm 
Offline
Member
Member

Joined: Wed Mar 15, 2017 9:22 am
Posts: 40
Hi all

Is there a way to do the same as an Int 15H from long mode or does this need to be done before switching to 64 long mode? i.e. get the memory layout. I've allocated 4GB to my OS for starters and was writing just near the limit of the 4GB (in Virtualbox) but got a reserved page error so I need to map where I can write and where I cannot.

Bipman


Top
 Profile  
 
 Post subject: Re: int 0x15 0xE820
PostPosted: Wed May 03, 2017 4:02 pm 
Offline
Member
Member

Joined: Sat Oct 16, 2010 3:38 pm
Posts: 587
You must do this before entering protected/long mode, unless you are using UEFI.


Top
 Profile  
 
 Post subject: Re: int 0x15 0xE820
PostPosted: Thu May 04, 2017 2:35 am 
Offline
Member
Member

Joined: Thu Aug 13, 2015 4:57 pm
Posts: 384
Why would you want to do it from long mode? I mean the system starts in real mode, where do you load your OS to? Are you now just blindly hoping 1M physical address space maps to actual RAM?

Without the memory map you have no way of knowing what's a valid physical address and what isn't. Note, if you are using GRUB/Multiboot then you don't need BIOS, they already provide the memory map (which they got from BIOS).


Top
 Profile  
 
 Post subject: Re: int 0x15 0xE820
PostPosted: Thu May 04, 2017 3:12 am 
Offline
Member
Member

Joined: Wed Mar 15, 2017 9:22 am
Posts: 40
Hi

I'm not using GRUB so would need to do it myself. I'll run from real mode first before getting into long mode as per the replies.

Bipman


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 218 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