6

I have an Asus eee 4G (AMI BIOS), I want to ask if this product actually overwrites the entire RAM during cold boot. I have the "Quick boot" feature turned off and I can see the memory being tested during the BIOS post, but I read that it might not actually work that way.

Why do old computers perform a long memory test on every boot?

Here the user @Bitbang3r wrote:

Adding fuel to the fire... on a modern PC, performing naive "write bytes, read them back" tests of RAM might not even directly touch the ram that's ostensibly being tested AT ALL... modern PCs have so much primary & secondary cache, a strategy that fails to explicitly take cache-management into account is potentially doing nothing more than wasting the user's time by repeatedly exercising the cache while ignoring the underlying RAM. Even IF the values eventually got written to "real" RAM, it might not happen until long AFTER you seemingly read the bytes back & decided they matched.

So what is the truth, will the entire RAM be overwritten in my case?

Is the whole CPU cache (L1 64 + L2 512 in my case) also tested during BIOS POST?

16
  • 2
    Surely a BIOS would be able to control the caches in a way that it actually tests the memory. There may be just a shorter quick test for memory and other items when performing a quick boot.
    – Justme
    Dec 14, 2022 at 21:42
  • 2
    @Justme the question isn’t whether BIOSs are hypothetically able to do so, but whether or not they actually do it. (BIOS writers are notoriously lazy, tending to change as little as possible, and only when mandatory.)
    – RonJohn
    Dec 14, 2022 at 22:14
  • 1
    @RonJohn Even if the cache is on, you would think that writing a block of RAM larger than what fits in cache and then reading the block of RAM back would actually be read from RAM because it didn't fit in the cache to begin with.
    – Justme
    Dec 14, 2022 at 23:24
  • 6
    @RonJohn, "BIOS writers are notoriously lazy, tending to..." Where is this notoriety known, though, and what weight does it carry? Thanks because the way those comments are written, it just reads like hearsay applied as a blanket statement. It would seem difficult to believe that a significant number, or any, BIOS coders have not taken account of cache memory operation in a memory test put into such low-level software as a BIOS. Caches have been around since the 1980s so surely most BIOS coders wouldn't know life without it.
    – TonyM
    Dec 15, 2022 at 9:47
  • 2
    I believe at some point, the purpose of the "memory test" was no longer to actually check every bit, but merely to verify that the memory map read from the hardware was correct. And for that, it should be safe to assume that memory is installed in units of some fixed size, let's say 16KB. So then it suffices to just check that you can write and read one byte out of each 16KB block that the hardware claims is RAM. But maybe that's what your Quick Boot did. Dec 16, 2022 at 21:56

1 Answer 1

6

Because dynamic RAM's switch-on contents is random, the memory of a computer needs to be brought to a defined state anyways. The clearing (and clear-check afterwards) is and was also the method of choice to detect the amount of RAM installed in the computer. Maintaining (or rather, not clearing) RAM on reset can also be considered a security issue.

In the early days, when RAM was rather unreliable and tended to fail, the good practice to do an (at least rudimentary) RAM test was established. Most BIOS RAM tests, even in the past, did check for rather basic faults, like not being able to clear or set a byte, which didn't cover all possible RAM failures (like e.g. changing one bit corrupting another) anyhow.

On modern computers with Gigabytes of (relatively reliable) memory, this has proven to be very time-consuming and somewhat unnecessary. Modern computers normally don't do a thorough RAM test anymore. They will do spot tests to detect the amount of installed RAM and verify RAM is generally working (typically, by clearing all available RAM), some BIOSes (HPe, for example) even allow the memory clear on reset to be switched off.

Thorough memory tests have to be either done in hardware (parity RAM) or by specific applications that the computer is being booted into.

2
  • For clarification: From en.wikipedia.org/wiki/Power-on_self-test "In earlier BIOSes, up to around the turn of the millennium, the POST would perform a thorough test of all devices, including a complete memory test."
    – Hasbo
    Feb 5 at 16:58
  • On other machines, mainly high-end desktops and servers that support ECC memory, we found that the BIOS cleared memory contents without any override option. ECC memory must be set to a known state to avoid spurious errors if memory is read without being initialized, and we believe many ECC-capable systems perform this wiping operation whether or not ECC memory is installed.
    – Hasbo
    Feb 5 at 17:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .