In real-mode,video ram locates from 0xa0000
to 0xbffff,and bios rom locates from 0xc0000
to 0xfffff.I want to know in protected-mode,
if are video ram and bios rom occupied too?
video ram still display picture and text,
bios rom cannot be written too?
Ask a question about ram in protected-mode?
-
- Member
- Posts: 70
- Joined: Fri Nov 19, 2010 6:54 pm
-
- Posts: 14
- Joined: Thu May 09, 2013 5:51 pm
Re: Ask a question about ram in protected-mode?
As far as I know, the memory map its the same in pmode or rmode. Unless you have paging.
Re: Ask a question about ram in protected-mode?
Its at the same physical memory.
-
- Member
- Posts: 70
- Joined: Fri Nov 19, 2010 6:54 pm
Re: Ask a question about ram in protected-mode?
If can the BIOS rom be written?bigorenski wrote:As far as I know, the memory map its the same in pmode or rmode. Unless you have paging.
Re: Ask a question about ram in protected-mode?
You can never write to the BIOS ROM. Read Only Memory.
-
- Member
- Posts: 70
- Joined: Fri Nov 19, 2010 6:54 pm
Re: Ask a question about ram in protected-mode?
You mean in protected-mode the memory from 0xc0000 to 0xfffff never be written?iansjack wrote:You can never write to the BIOS ROM. Read Only Memory.
Re: Ask a question about ram in protected-mode?
Hi,
It's possible to reconfigure the memory controller so that both reads and writes go to RAM, and then reprogram the MTRRs so that the area uses write-back caching. This effectively makes it just like normal RAM. However:
For systems using UEFI, you can't make assumptions about what is using what. The area from 0x000C0000 to 0x000FFFFF may already be configured as usable RAM, might contain completely different things that you can't mess with, or (likely for "BIOS + UEFI hybrid" systems) might be configured by firmware the same as a legacy BIOS system.
Cheers,
Brendan
For modern-ish BIOS systems, the memory controller can be configured to send reads/writes in this area to either PCI or to RAM. Normally the firmware copies stuff into the area (e.g. the run-time part of the system ROM, the video card's ROM, etc) and then configures it so that writes go to PCI and reads come from RAM (which effectively makes it "write-only").leetow2003 wrote:You mean in protected-mode the memory from 0xc0000 to 0xfffff never be written?iansjack wrote:You can never write to the BIOS ROM. Read Only Memory.
It's possible to reconfigure the memory controller so that both reads and writes go to RAM, and then reprogram the MTRRs so that the area uses write-back caching. This effectively makes it just like normal RAM. However:
- the memory controller is either chipset specific or CPU specific, so you'd need different code for different chipsets/CPUs
- you can't assume that the firmware's SMM code doesn't rely on things in the run-time part of the system ROM, and therefore must leave that "as is"
- the remaining area (that is potentially safe to reconfigure as RAM) is only about 128 KiB; which is virtually nothing in modern systems (which have 2 GiB of RAM or more)
For systems using UEFI, you can't make assumptions about what is using what. The area from 0x000C0000 to 0x000FFFFF may already be configured as usable RAM, might contain completely different things that you can't mess with, or (likely for "BIOS + UEFI hybrid" systems) might be configured by firmware the same as a legacy BIOS system.
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.