tags:

views:

470

answers:

2

I know that, on booting, BIOS loads the first sector (512 bytes) of a pre-defined device drive on memory 0x7c00 and then jump to that address.

So, memory from 0x7c00 to 0x7dff is occupied. Is there any other section of RAM that is occupied?

If I'm programming an Operating System, could I use all the RAM except 0x7c00 to ox7dff for my own purposes?, or, is there any other section filled with "precious" information at boot time that I must not overwrite?

I know that at a given moment, I can overwrite MBR loaded on memory (chainloading), my question is focused on... what part of the memory is available for an Operating System?

Sorry for my bad english. Thanks for your answers!!

A: 

If you write an OS, as soon as you go into protected mode, you get forget the BIOS (unless you are working with some bad device) and use all you have.

Or are you writing a bootloader?

J-16 SDiZ
You can't forget the BIOS. It may need some regions of memory protected for MMIO regions, or for use by SMM code.
bdonlan
There are a lot of physical memory regions that aren't usable specifically with memory mapped hardware.
+4  A: 

With any remotely recent BIOS, you can obtain memory map information by using the BIOS Int 15/AX=E820h call. This will tell you what memory you can use for your OS.

A more detailed explanation on how to detect available memory, and the contents of the BIOS memory map can be found at OSDev.

bdonlan