windows - How are reserved and ACPI NVS memory sizes counted?

07
2014-07
  • RJSmith92

    My PC has 8GB of memory installed and is running Win 7 64-bit. I ran a tool named fwmemmap that shows the firmware memory map for the system but it's showing around 60MB more than is physically installed -

    enter image description here

    The total of all type 1 (memory) adds up to 8142MB which is correct and is also correlated in Windows -

    enter image description here

    I would have expected the total of the type 2 (reserved) and type 4 (ACPI NVS) memory to equal 50 MB to bring the total to 8192 MB but it equals around 110MB? Which is more than is physically installed.

    Is anyone able to explain why this is?

    Any help would be appreciated,

    Thanks.

  • Answers
  • Oliver Salzburg

    From my understanding, the output of fwmemmap applies to a more general understanding of memory than physical memory.

    Only some of those address ranges actually map to physical memory, as pointed out on the website:

    Ranges that are addressable as RAM are marked “memory”. To interpret other values in the Type column, refer to the definition of int 15h function E820h in the Advanced Configuration and Power Interface (ACPI) Specification, Section 14, System Address Map Interfaces. Note that the map has holes: int 15h function E820h does not report “standard PC address ranges” or areas of address space that are used “for the memory mapping of PCI devices, ISA Option ROMs, and ISA Plug and Play cards”.


  • Related Question

    cpu - Learning about BIOS memory, instructions and code origins
  • M3taSpl0it

    I'm learning about the BIOS and have a few questions.

    1. What is meant by, "This is the last 16 bytes of memory at the end of the first megabyte of memory"?

    2. The first instruction of BIOS is jump, which jumps to the main BIOS program, but where does it jump?

    3. Where does the original BIOS code originate?

    I'm also interested in POST? How are POST signals executed by the processor?


  • Related Answers
  • t0mm13b

    To answer the second question, the bios jumps to 0x7c00 which is the start of the bootsector code (I gather that from debugging and creating bootsectors...) in turn the bootsector is loaded into that offset in memory.

    POST is a Power On Self Test, when the BIOS routines execute a check on the hardware devices such as memory, keyboard, disk and screen, it emits a beep if the check fails depending on the device in question such as if the hard disk fails, its 2 beeps, there are variations in the beep to signify the problems at hand. These are quite rare now that BIOS's are more reliable and that the hardware detection is far more reliable then those back then...MFM/RLL drives used to be problematic with the BIOS's unless they are from an iffy batch of disks.... Keyboards with the BIOS are notorious for displaying 'Hit F1 to continue' if there's no keyboards....

    Hope this helps, Best regards, Tom.

  • Ignacio Vazquez-Abrams
    1. Offsets 0x0ffff0 through 0x0fffff of the computer's physical memory.
    2. Into BIOS code, which someone has previously written and burned into non-volatile memory.
  • RChandra

    @tommieb75: That is where the processor will eventually jump, but only if the BIOS manages to find a boot sector on an attached peripheral (HDD, properly formatted USB Flash drive, El Torito CD, TFTP from a PXE server, etc.). This boot sector will have the 0x55AA signature at the end of it. The prototypical example is the MBR, which is free to do anything it wants, but again typically looks through the partition table for one (and only one) bootable flag, moves itself from the 0x7C00 address (to where depends on its code), loads that partition's first sector to 0x7C00, and jumps to it. This partition boot sector should also have the 0x55AA signature.

    As far as the original question...there is no fixed address to which the processor is instructed by the BIOS ROM to jump; this is dependent on whatever the BIOS author wants. The address of 16 bytes below the end of 1 megabyte is just something hardcoded into the processor itself; this is the documented/defined behavior (by Intel, and by association, AMD and others). Obviously, 16 bytes of code isn't a lot of code, so it's usually just a "long jump" (loading both the CS and IP registers) to somewhere else in the BIOS ROM. That code handles POST and the aforementioned location of a valid boot sector to execute.