Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751503AbbLUPyl (ORCPT ); Mon, 21 Dec 2015 10:54:41 -0500 Received: from mail-wm0-f45.google.com ([74.125.82.45]:34421 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751233AbbLUPyj (ORCPT ); Mon, 21 Dec 2015 10:54:39 -0500 Date: Mon, 21 Dec 2015 15:54:36 +0000 From: Matt Fleming To: Robert Elliott Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, Ard Biesheuvel , Taku Izumi Subject: Re: [PATCH 2/4] efi: add NV memory attribute Message-ID: <20151221155436.GE4227@codeblueprint.co.uk> References: <1450402114-3606-1-git-send-email-elliott@hpe.com> <1450402114-3606-3-git-send-email-elliott@hpe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1450402114-3606-3-git-send-email-elliott@hpe.com> User-Agent: Mutt/1.5.24+41 (02bc14ed1569) (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2735 Lines: 62 (Cc'ing people that have worked in this area recently) On Thu, 17 Dec, at 07:28:32PM, Robert Elliott wrote: > Add the NV memory attribute introduced in UEFI 2.5 and add a column > for it in the types and attributes string used when printing the UEFI > memory map. > > old: > efi: mem61: [type=14 | | | | | | | |WB|WT|WC|UC] range=[0x0000000880000000-0x0000000c7fffffff) (16384MB) > > new: > efi: mem61: [type=14 | | |NV| | | | | |WB|WT|WC|UC] range=[0x0000000880000000-0x0000000c7fffffff) (16384MB) > > Signed-off-by: Robert Elliott > --- > drivers/firmware/efi/efi.c | 5 ++++- > include/linux/efi.h | 1 + > 2 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c > index 027ca21..4dd5464 100644 > --- a/drivers/firmware/efi/efi.c > +++ b/drivers/firmware/efi/efi.c > @@ -611,13 +611,16 @@ char * __init efi_md_typeattr_format(char *buf, size_t size, > if (attr & ~(EFI_MEMORY_UC | EFI_MEMORY_WC | EFI_MEMORY_WT | > EFI_MEMORY_WB | EFI_MEMORY_UCE | EFI_MEMORY_RO | > EFI_MEMORY_WP | EFI_MEMORY_RP | EFI_MEMORY_XP | > + EFI_MEMORY_NV | > EFI_MEMORY_RUNTIME | EFI_MEMORY_MORE_RELIABLE)) > snprintf(pos, size, "|attr=0x%016llx]", > (unsigned long long)attr); > else > - snprintf(pos, size, "|%3s|%2s|%2s|%2s|%2s|%2s|%3s|%2s|%2s|%2s|%2s]", > + snprintf(pos, size, > + "|%3s|%2s|%2s|%2s|%2s|%2s|%2s|%3s|%2s|%2s|%2s|%2s]", > attr & EFI_MEMORY_RUNTIME ? "RUN" : "", > attr & EFI_MEMORY_MORE_RELIABLE ? "MR" : "", > + attr & EFI_MEMORY_NV ? "NV" : "", > attr & EFI_MEMORY_XP ? "XP" : "", > attr & EFI_MEMORY_RP ? "RP" : "", > attr & EFI_MEMORY_WP ? "WP" : "", > diff --git a/include/linux/efi.h b/include/linux/efi.h > index 569b5a8..9ce9e9e 100644 > --- a/include/linux/efi.h > +++ b/include/linux/efi.h > @@ -97,6 +97,7 @@ typedef struct { > #define EFI_MEMORY_WP ((u64)0x0000000000001000ULL) /* write-protect */ > #define EFI_MEMORY_RP ((u64)0x0000000000002000ULL) /* read-protect */ > #define EFI_MEMORY_XP ((u64)0x0000000000004000ULL) /* execute-protect */ > +#define EFI_MEMORY_NV ((u64)0x0000000000008000ULL) /* non-volatile */ > #define EFI_MEMORY_MORE_RELIABLE \ > ((u64)0x0000000000010000ULL) /* higher reliability */ > #define EFI_MEMORY_RO ((u64)0x0000000000020000ULL) /* read-only */ Seems straight forward to me. Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/