boot - What information does BIOS load into RAM? -


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

So, the memory from 0x7c00 to 0x7dff has been captured. Is any other part of RAM that is captured?

If I am programming an operating system, can I exclude all objects except the 0x7c00 for my own purposes and leave the Ox 7 def? Or, at the boot time is full of "valuable" information that I should not overwrite?

I know that in a moment, I can overwrite loaded MBR on memory, my question focuses on ... Is the share of memory available for an operating system?

Sorry for my bad english Thanks for your reply!

The x86 Real Mode Memory Map is as follows:

- 0x00000000 - 0x000003FF - Actual Mode Interrupt Vector Table - 0x00000400 - 0x000004FF - BIOS Data Area - 0x00000500 - 0x00007BFF - Unused - 0x00007C00 - 0x00007 DFF - Our bootloader - 0x00007E00 - 0x0009FFFF - Unused - 0x000A0000 - 0x000BFFFF - Video RAM (VRAM) Memory - 0x000B0000 - 0x000B7777 - Monochrome Video Memory - 0x000B8000 - 0x000BFFFF - Color Video Memory - 0x000C0000 - 0x000C7FFF - Video ROM BIOS - 0x000C8000 - 0x000EFFFF - BIOS Shadow Area - 0x000F0000 - 0x000FFFFF - System BIOS

In my actual mode programming, I usually stick to 0x00007E00 - 0x0009FFFF (not all this). I use the segment offset addressing to use megate. To move one step from the bootloader to a second kernel or bootloader, I use:

 ; Bootloader SIT16ORG 0x7C00CLIJMP0xE000; JMP 0x7C00: 200 HLT time 510 - ($ - $$) DB 0 DW 0xAA55  

-

  may be; Something.s bits 16 ORG 0x7E00; ORG0x7C00: 200; Code goes here for your purposes .. whether it is the second step; Bootloader or your 16bit kernel .. CLI HLT  

If you are going in protected mode, you will need a stub as shown above. Something.s Mode can program routines (GDT, A20, set video mode, etc.)

To explain the memory space on the 0x7c00 (bootloader entry point), 0x7C00 - 0x7DFF, where You have your bootloader (bootloader.s above). You keep it there because the BIOS jumps to that place after its location, it should be exactly 512 bytes in the size of the bootloader (notice time instructions). From there, your code can be of any size (unless it fits in the memory map), and you will be able to work entirely on the OS.

If you go into 32-bit protected mode, you will be able to use anything about the 1MiB icon.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -