qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Does reboot clear RAM?


From: Jakob Bohm
Subject: Re: Does reboot clear RAM?
Date: Mon, 11 Nov 2019 15:35:28 +0100
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1

On physical machines, the following mechanisms are common:

1. DRAM chips physically loose their contents after a few seconds of power
  off, but not on a CPU reset (reset button on typical board). A CPU reset
  does not have this effect.  This also applies to the PC platform.

2. SRAM chips physically loose their contents after a few milliseconds of
  power off, otherwise as for DRAM.

3. On x86 and x86_64 PCs, the IBM compatible BIOS typically does a memory
  test and wipe during actual boot, but not upon a software initiated boot.
   This PC BIOS rule exists for the following two purposes:

3.1 Older guest operating systems use a software reset to switch the CPU
  from "protected mode" to "real mode" because the historical 80286 CPU
  chip had no other way to return to real mode and returning to real mode
  was needed to invoke BIOS APIs.

3.2 Signalling if such a non-wiping boot is desired (for speed or other
  reasons) is officially done by writing a magic value in one of the
  well-known BIOS global addresses, if this global address has not been
  set to one of those magic values, and the global RTC register with
  related semantics have not been so set either, the BIOS (in qemu's
  case SEABIOS) should do the wipe as part of the POST (Power-On-Self-Test),
  otherwise it should skip that and most other parts of the POST.

On 11/11/2019 08:24, Joachim Durchholz wrote:
What mechanisms do these platforms use?
Via CPU, or via dedicated RST lines on the RAM?
(I have no idea whether modern RAM has such a reset line, even.)

P.S.: No need to reply to me directly, replying to list is enough to reach me.

Am 10.11.19 um 19:17 schrieb Kent Dorfman:
Many non-intel platforms do wipe memory on reset (RST).  It's a
security feature to make in more dificult for folks with jtag
breakouts to examine secure code/data.

On 11/10/19, Joachim Durchholz <address@hidden> wrote:
Do physical machines wipe memory?
They don't on shutdown, and memory tends to retain bits for a while
(seconds to hours, depending on temperature and RAM technology).
I don't know what RAM chips do if they are reset. Do they even have a
reset line nowadays?

Am 09.11.19 um 10:56 schrieb Narcis Garcia via:
In my humble opinion, Qemu should wipe any released RAM area because of
guest shutdown or reboot, same as a physical machine, to guest finds
it's booting in same conditions.


El 8/11/19 a les 23:55, Nachammai Karuppiah ha escrit:
Does qemu clear the physical address on guest reboot?
Qemu is started with kernel parameters, ramoops.mem_address=0x7f00000
ramoops.mem_size=0x100000 but I do see that the memory even outside
this region is not wiped away and is retained after rebooting the
guest



Enjoy

Jakob
--
Jakob Bohm, CIO, Partner, WiseMo A/S.  https://www.wisemo.com
Transformervej 29, 2860 Søborg, Denmark.  Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded




reply via email to

[Prev in Thread] Current Thread [Next in Thread]