From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754087AbcBBIy3 (ORCPT ); Tue, 2 Feb 2016 03:54:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54108 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751728AbcBBIy1 (ORCPT ); Tue, 2 Feb 2016 03:54:27 -0500 Subject: Re: [PATCH 12/14] efi: Add NV memory attribute To: Matt Fleming References: <1454364428-494-1-git-send-email-matt@codeblueprint.co.uk> <1454364428-494-13-git-send-email-matt@codeblueprint.co.uk> Cc: Ingo Molnar , "H . Peter Anvin" , Thomas Gleixner , linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, Robert Elliott , Ard Biesheuvel , Taku Izumi From: Laszlo Ersek Message-ID: <56B06EC0.3000009@redhat.com> Date: Tue, 2 Feb 2016 09:54:24 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1454364428-494-13-git-send-email-matt@codeblueprint.co.uk> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/01/16 23:07, Matt Fleming wrote: > From: Robert Elliott > > 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 > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: "H. Peter Anvin" > Cc: Ard Biesheuvel > Cc: Taku Izumi > Cc: Laszlo Ersek > Signed-off-by: Matt Fleming > --- > 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 0cd8f039602e..9c8c0747c8cd 100644 > --- a/drivers/firmware/efi/efi.c > +++ b/drivers/firmware/efi/efi.c > @@ -580,13 +580,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 f468f7c53236..99b88c5a6770 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 */ > Reviewed-by: Laszlo Ersek From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laszlo Ersek Subject: Re: [PATCH 12/14] efi: Add NV memory attribute Date: Tue, 2 Feb 2016 09:54:24 +0100 Message-ID: <56B06EC0.3000009@redhat.com> References: <1454364428-494-1-git-send-email-matt@codeblueprint.co.uk> <1454364428-494-13-git-send-email-matt@codeblueprint.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1454364428-494-13-git-send-email-matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org> Sender: linux-efi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Matt Fleming Cc: Ingo Molnar , "H . Peter Anvin" , Thomas Gleixner , linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Robert Elliott , Ard Biesheuvel , Taku Izumi List-Id: linux-efi@vger.kernel.org On 02/01/16 23:07, Matt Fleming wrote: > From: Robert Elliott > > 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 > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: "H. Peter Anvin" > Cc: Ard Biesheuvel > Cc: Taku Izumi > Cc: Laszlo Ersek > Signed-off-by: Matt Fleming > --- > 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 0cd8f039602e..9c8c0747c8cd 100644 > --- a/drivers/firmware/efi/efi.c > +++ b/drivers/firmware/efi/efi.c > @@ -580,13 +580,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 f468f7c53236..99b88c5a6770 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 */ > Reviewed-by: Laszlo Ersek