I'm come from China,My English is very poor,Please understand that.
I only set 64MiB RAM,Why "Address Range Descriptor Structure" return 4GiB RAM?
Why int 15h return 4GiB RAM?
Re: Why int 15h return 4GiB RAM?
There's space (lots of space) in between each section. You have 64 MB spread out over 4 GB. If you're using an emulator, it doesn't make much sense to do so, but it might be showing the actual ram locations that it has.
Programming is 80% Math, 20% Grammar, and 10% Creativity <--- Do not make fun of my joke!
If you're new, check this out.
If you're new, check this out.
Re: Why int 15h return 4GiB RAM?
How do you get the size of RAM? From max value found?
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Why int 15h return 4GiB RAM?
It doesn't. Anything over 64M is not marked as "usable ram". Check the last column of your table.zgxltxz wrote:Why "Address Range Descriptor Structure" return 4GiB RAM?
Re: Why int 15h return 4GiB RAM?
I'd hazard a guess as to say that the higher regions (type 0x02) are probably memory mapped devices, PCI et al. Can't be sure though.
Re: Why int 15h return 4GiB RAM?
Hi,
Decoded:
Out of 65536 KiB of RAM, that leaves 450 KiB that isn't usable. Here's where that 450 KiB is used:
Cheers,
Brendan
Decoded:
- 0x00000000 to 0x0009F800 = 638 KiB of usable RAM
- 0x0009F800 to 0x000A0000 = 2 KiB of "system" (EBDA)
- 0x000A0000 to 0x000DC000 = 240 KiB not mentioned at all (legacy video area and some "unused")
- 0x000DC000 to 0x00100000 = 144 KiB of "system" (device ROMs and legacy BIOS ROM area)
- 0x00100000 to 0x03EF0000 = 63424 KiB of usable RAM
- 0x03EF0000 to 0x03EFF000 = 60 KiB of "ACPI reclaimable"
- 0x03EFF000 to 0x03F00000 = 4 KiB of "ACPI NVS"
- 0x03F00000 to 0x04000000 = 1024 KiB of usable RAM
- 0x04000000 to 0xE0000000 = not mentioned at all (possibly used by memory mapped PCI devices)
- 0xE0000000 to 0xF0000000 = "system" (this is probably video display memory and shouldn't be listed)
- 0xF0000000 to 0xFEC00000 = not mentioned at all
- 0xFEC00000 to 0xFEC10000 = "system" (IO APIC/s, HPET, etc)
- 0xFEC10000 to 0xFEE00000 = not mentioned at all
- 0xFEE00000 to 0xFEE01000 = "system" (local APIC)
- 0xFEE01000 to 0xFFFE0000 = not mentioned at all
- 0xFFFE0000 to 0xFFFFFFFF = "system" (the actual firmware ROM)
- 0x0000000100000000 to 0xFFFFFFFFFFFFFFFF = not mentioned at all
Out of 65536 KiB of RAM, that leaves 450 KiB that isn't usable. Here's where that 450 KiB is used:
- 0x0009F800 to 0x000A0000 = 2 KiB of "system" (EBDA)
- 0x000A0000 to 0x000DC000 = 240 KiB not mentioned at all (legacy video area and some "unused")
- 0x000DC000 to 0x00100000 = 144 KiB of "system" (device ROMs and legacy BIOS ROM area)
- 0x03EF0000 to 0x03EFF000 = 60 KiB of "ACPI reclaimable"
- 0x03EFF000 to 0x03F00000 = 4 KiB of "ACPI NVS"
- The 638 KiB of usable RAM from 0x00000000 to 0x0009F800 includes the IVT and BDA. The first "almost 2 KiB" can't be used until after the OS stops using the BIOS.
- The 60 KiB of "ACPI reclaimable" from 0x03EF0000 to 0x03EFF000 is RAM used for ACPI tables that the OS can use as normal RAM after it's finished with the ACPI tables.
- For the area from 0x000A0000 to 0x000DC000; the first 128 KiB is used for the legacy video display area and typically has RAM underneath that is used by the firmware for SMM. The remaining 112 KiB is RAM that would've been used for device ROMs if they existed (e.g. SCSI controller, ethernet ROM, etc) but hasn't been used by devices (it is essentially wasted RAM, but with some trickery an OS could have something like a "motherboard driver" that converts this 112 KiB of RAM back into usable RAM by tweaking MTRRs).
- It's extremely likely that the area from 0xE0000000 to 0xF0000000 is 1 GiB of video display memory; and also extremely likely that this is a bug. The ACPI specs say that areas used by memory mapped PCI devices (including video display memory) should not be listed by the BIOS. The problem with this is that some OSs will enumerate PCI buses and re-allocate resources; and see that 0xE0000000 to 0xF0000000 is reserved and (correctly) decide that this area can't be used by any memory mapped PCI device (including the video card).
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.