flat assembler
Message board for the users of flat assembler.

Index > OS Construction > E820 map

Author
Thread Post new topic Reply to topic
spandexyfronts



Joined: 15 Sep 2013
Posts: 6
spandexyfronts 13 Oct 2013, 21:01
Does anyone know where it's safe to store things when a computer is first turned on?

What i really mean is, where do you store things ( including the E820 map ) before you've used the E820 map to find out where it's safe to store things?!

Any suggestions?
Post 13 Oct 2013, 21:01
View user's profile Send private message Reply with quote
BAiC



Joined: 22 Mar 2011
Posts: 272
Location: California
BAiC 14 Oct 2013, 05:59
roughly half (640k I think) of the first megabyte is available to you below the 1MB RealMode boundary. whatever is left between the boot sector and the 640k address is usually the largest contiguous block of memory in Real Mode. it's smaller but you can also use memory between 0x500 and 0x7C00 (the boot sector).

once you turn on Protected Mode (32bit) you can safely use almost all addressing space in those 32bits.

Stefan

_________________
byte me.
Post 14 Oct 2013, 05:59
View user's profile Send private message Visit poster's website Reply with quote
spandexyfronts



Joined: 15 Sep 2013
Posts: 6
spandexyfronts 14 Oct 2013, 16:50
I was straying underneath the 0x500 limit you described there in real mode and wondered what was wrong. Thanks for the useful info, i'm able to 'set things in stone' and be a bit more surefooted now.
Post 14 Oct 2013, 16:50
View user's profile Send private message Reply with quote
cod3b453



Joined: 25 Aug 2004
Posts: 618
cod3b453 14 Oct 2013, 17:14
I normally avoid the following ranges:
Code:
00000-005FF (BIOS IVT & BDA)
07C00-08C00 (boot sector)
9F000-FFFFF (BIOS EBDA, VGA MMIO, BIOS, extension/additional ROMs)    
My current loader uses 0A000+ for the image and 00600-07C00 for stack/temporaries, which has been plenty for long mode and about 0.5MB to spare Smile
Post 14 Oct 2013, 17:14
View user's profile Send private message 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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.