flat assembler
Message board for the users of flat assembler.

Index > OS Construction > Memory locations

Author
Thread Post new topic Reply to topic
image6



Joined: 07 Apr 2008
Posts: 1
image6
Hi

I am attempting to write a small os but there is one small thing which I don't think I've seen mentioned anywhere, in which part of the address space are the ram, vram and bios mapped to, and can you blindly write over them without any drastic effects (I'm guessing not)?

I have seen different regions listed for different things but a lot of the information is conflicting.

Another little thing, why does Linux load its main kernel to a different location to windows, is there advantages of using different parts of ram or is it that they both lie in the same region of ram?

And finally, my apologies if I am asking what has been asked before, I have looked through a lot on this forumcand I have searched but I found little explaining ram on the whole.

Thanks,
Ian
Post 07 Apr 2008, 10:11
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4240
Location: 2018
edfed
you can write and read in ram.
some locations have effects, some other don't.

win and lin CHOOSED their location. meaning that you have to make a choice. theses choices are made based on experience and preferences.

for more details, look at the revolution's web site and type "helppc" Wink.

glad to help you!
edfed
Post 07 Apr 2008, 10:24
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
You can't just blindly write to RAM, various regions are reserved, for purposes like memory-mapped device I/O and systems-management mode. You need to discover the memory map, using methods like E280 BIOS call. Check out OS development sites Smile
Post 07 Apr 2008, 11:26
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 2940
Location: vpcmipstrm
bitRAKE
Programming to a specific chipset is also an option, but the BIOS can lock settings in modern chipsets. Confused

_________________
¯\(°_o)/¯ unlicense.org
Post 07 Apr 2008, 16:52
View user's profile Send private message Visit poster's website Reply with quote
nihilist:P



Joined: 26 May 2008
Posts: 7
nihilist:P
sorry for excavating this thread...

Is there a memory-address above which there are no more such special locations? Where is this point (in general)?
Post 26 May 2008, 19:43
View user's profile Send private message Reply with quote
bogdanontanu



Joined: 07 Jan 2004
Posts: 403
Location: Sol. Earth. Europe. Romania. Bucuresti
bogdanontanu
nihilist:P wrote:
sorry for excavating this thread...

Is there a memory-address above which there are no more such special locations? Where is this point (in general)?


No

_________________
"Any intelligent fool can make things bigger,
more complex, and more violent.
It takes a touch of genius -- and a lot of courage --
to move in the opposite direction."
Post 26 May 2008, 22:24
View user's profile Send private message Visit poster's website Reply with quote
calpol2004



Joined: 16 Dec 2004
Posts: 110
calpol2004
EDIT: wow this thread is old, it was on the first page. Apologies, didnt realise how slow this part of the forum moves.

Just use the int 0x15 0xe820 call. it returns all the available ram regions.

They're quite big. 99% of ram is useable, just a case of avoiding that 1%. I suggest loading your kernel/kernel loader at 0x7E00 (600kb region here till you hit the video ram) or 0x500 (30kb) and then get your memory map there. If its a small kernel you could probably run in the 600kb or 30kb regions (actually right next to eachother, the bootsector gets in the way :p) and just load everything else in the free regions above the 1MB mark.
Post 12 Dec 2008, 16:58
View user's profile Send private message MSN Messenger Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.