grub-devel
[Top][All Lists]
Advanced

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

RE: grub causing NVDIMMs to be treated as normal memory


From: Elliott, Robert (Persistent Memory)
Subject: RE: grub causing NVDIMMs to be treated as normal memory
Date: Wed, 25 Nov 2015 17:04:20 +0000

> -----Original Message-----
> From: Linux-nvdimm [mailto:address@hidden On Behalf Of
> Andrei Borzenkov
> Sent: Wednesday, November 25, 2015 8:08 AM
> To: The development of GNU GRUB <address@hidden>
> Cc: address@hidden
> Subject: Re: grub causing NVDIMMs to be treated as normal memory
> 
> On Wed, Nov 25, 2015 at 2:52 AM, Elliott, Robert (Persistent Memory)
> <address@hidden> wrote:
> > We've noticed that some combinations of grub and old linux kernels
> > end up interpreting the UEFI memory map EfiPersistentMemory type 14
> > (formerly a reserved value) as regular memory in the linux e820
> > table, causing silent data corruption on the NVDIMMs.  That occurs
> > even though grub prints this message suggesting everything is safe:
> >     Unknown memory type 14, considering reserved
> >
> > In broken versions of grub, the code parsing the UEFI memory map
> > has a "default" case that falls through to the
> > GRUB_EFI_BOOT_SERVICES_DATA case,
> 
> This is fallout of 9be4c45dbe3c877d1f4856e99ee15133c6cd2261; thank you
> for report!

Thanks, that patch was dated March 2012, which narrows the window.
Earlier versions fell through to the reserved case.
 
> > which marks the memory range
> > as GRUB_MEMORY_AVAILABLE and ends up in e820 as regular memory.
> 
> According to EFI spec, EfiPersistentMemory is "A memory region that
> operates as EfiConventionalMemory". Why it should be treated
> differently?

Hardware ensures that the data persists across reboots and power
cycles.  The address range must be managed by special drivers (e.g.,
the pmem block device driver) and not be included in the normal
memory management pool.  Some addresses might even hold registers
(for a block control window interface), not memory.

The ACPI NFIT (NVDIMM Firmware Interface Table) provides crucial
information for handling the address range.  The NFIT SPA (System
Physical Address) Range structures, for example, describe each
range in detail.

I'll work with the UEFI WG to fix that "operates as" wording.

---
Robert Elliott, HPE Persistent Memory




reply via email to

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