flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > Where does the BIOS code reside? |
Author |
|
Ralph 03 Mar 2004, 00:58
http://board.flatassembler.net/download.php?id=583
Quote:
|
|||
03 Mar 2004, 00:58 |
|
milind 04 Mar 2004, 12:07
This is a paragraph from the Intel System Programming Manual:
The first instruction that is fetched and executed following a hardware reset is located at physical address FFFFFFF0H. This address is 16 bytes below the processor’s uppermost physical address. The EPROM containing the software-initialization code must be located at this address. Therefor the BIOS ROM should be present in that address to but this memory map doesn't show that |
|||
04 Mar 2004, 12:07 |
|
Gomer73 04 Mar 2004, 18:34
Rom can exist anywhere basically, it is all how the motherboard configures it.
The first jump does go to address fffffff0. Chances are it just jumps to somewhere in f0000-fffff range so that real mode stuff works. Most rom is located between a0000 and fffff. A search is done to see which cards use up memory between a0000 and fffff. Usually the bios copies the rom to memory for speed purposes. Com ports do not use up any memory but use up IO space. The 0000:0400 is a DOS thing I believe(I don't think it is a BIOS thing) So basically to answer your original question, the interrupt vector table uses 0000-03ff which is totally relocateable. BIOS interrups would point to code in the a0000-fffff range. Once DOS is loaded some of the interrupts will point to where ever DOS is loaded. |
|||
04 Mar 2004, 18:34 |
|
Gomer73 04 Mar 2004, 19:47
Sorry, I guess it is bios and not DOS that uses the 0400-04ff because I believe the timer tick thing is somewhere in this area.
It makes sense since bios can't write to rom. |
|||
04 Mar 2004, 19:47 |
|
milind 04 Mar 2004, 21:32
Actually I did not mean COM ports use up memory in the range 0000:0400 but BIOS places their base addresses there. Secondly the Interrupt vector table is not relocatable in Real mode but in the Protected mode.
The memory map I found on a website is described to be like this: from * - to * in what ---------- - -------- --------- --------------------------------------- 0 - START 0 - 400 RAM Real-Mode Interrupt Vector Table (IVT) 400 - 500 RAM BIOS data area (BDA) 500 - 9FC00 RAM Conventional memory (free for use) 9FC00 - A0000 RAM Extended BIOS data area (EBDA) A0000 - C0000 video RAM VGA Framebuffers C0000 - C8000 ROM Video BIOS (32K is typical size) C8000 - F0000 NOTHING F0000 - 100000 ROM Motherboard BIOS (64K is typical size) 100000 - FEC00000 RAM Extended memory (free for use) FEC00000 - FFFFFFFF various Motherboard BIOS, PnP NVRAM, ACPI, etc. - FFFFFFFF END But this map does not show any space in the memory map where the BIOS interrupts are loaded. The vector table is from 0000 to 03FF but where are the actual ISRs?? Isn't the area where they are copied in memory supposed to be reserved, even if we switch to protected mode??? |
|||
04 Mar 2004, 21:32 |
|
Gomer73 05 Mar 2004, 02:52
The ISR's are stored in the a0000-fffff range. And yes, this memory is still valid in Protected mode.
Just run debug after you boot-up with dos and type the following: d 0:0 You will see a few entries that start with f000:something. DOS takes over some of the interupts, but not all. These would point at the bottom of the 500-9ffff or top depending how dos chooses to put it's routines. You can relocate the Interrupt Vector Table in real mode. Check out the DOS fasm source code. Once you switch to protected mode, unless you are going back to real mode, you can basically use everything under A0000 since it is useless in protected mode. You can also use everything above 10000 though there might be some memory holes(I think between 15meg and 16meg). Some video cards have some protected modes calls in their rom, but that is about the only useful code area between a0000 and fffff. Of course your video memory is still valid between those locations. |
|||
05 Mar 2004, 02:52 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.