linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86, efi: print debug values in Kib not MB
@ 2014-07-29 17:09 Prarit Bhargava
       [not found] ` <1406653761-3884-1-git-send-email-prarit-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 22+ messages in thread
From: Prarit Bhargava @ 2014-07-29 17:09 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: Prarit Bhargava, lszubowi-H+wXaHxf7aLQT0dZR+AlfA, Matt Fleming,
	Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86-DgEjT+Ai2ygdnm+yROfE0A, linux-efi-u79uwXL29TY76Z2rM5mHXA

The current debug print in EFI does

[    0.000000] efi: mem84: type=3, attr=0xf, range=[0x00000000645b5000-0x00000000645fb000) (0MB)

and rounds off the size to 0MB and isn't very useful.  We should print this in
Kib.  After applying this patch we get better info with

[    0.000000] efi: mem84: type=3, attr=0xf, range=[0x00000000645b5000-0x00000000645fb000) (280kiB)

Signed-off-by: Prarit Bhargava <prarit-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: lszubowi-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Cc: Matt Fleming <matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
Cc: Ingo Molnar <mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: "H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
Cc: x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
Cc: linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
---
 arch/x86/platform/efi/efi.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index 87fc96b..3875090 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -384,10 +384,10 @@ static void __init print_efi_memmap(void)
 	     p < memmap.map_end;
 	     p += memmap.desc_size, i++) {
 		md = p;
-		pr_info("mem%02u: type=%u, attr=0x%llx, range=[0x%016llx-0x%016llx) (%lluMB)\n",
+		pr_info("mem%02u: type=%u, attr=0x%llx, range=[0x%016llx-0x%016llx) (%lluKiB)\n",
 			i, md->type, md->attribute, md->phys_addr,
 			md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT),
-			(md->num_pages >> (20 - EFI_PAGE_SHIFT)));
+			(md->num_pages << 2));
 	}
 #endif  /*  EFI_DEBUG  */
 }
-- 
1.7.9.3

^ permalink raw reply related	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2014-07-30 20:43 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-29 17:09 [PATCH] x86, efi: print debug values in Kib not MB Prarit Bhargava
     [not found] ` <1406653761-3884-1-git-send-email-prarit-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-07-29 20:29   ` David Rientjes
2014-07-29 22:02     ` Joe Perches
2014-07-29 22:05       ` Prarit Bhargava
     [not found]     ` <alpine.DEB.2.02.1407291327450.13073-X6Q0R45D7oAcqpCFd4KODRPsWskHk0ljAL8bYrjMMd8@public.gmane.org>
2014-07-29 22:05       ` Prarit Bhargava
2014-07-29 22:29   ` Borislav Petkov
     [not found]     ` <20140729222932.GA17481-fF5Pk5pvG8Y@public.gmane.org>
2014-07-29 22:32       ` Prarit Bhargava
     [not found]         ` <53D82118.6090202-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-07-29 22:36           ` Borislav Petkov
     [not found]             ` <20140729223603.GC17241-fF5Pk5pvG8Y@public.gmane.org>
2014-07-29 22:42               ` David Rientjes
2014-07-29 23:01                 ` Borislav Petkov
     [not found]                   ` <20140729230102.GD17241-fF5Pk5pvG8Y@public.gmane.org>
2014-07-29 23:03                     ` Prarit Bhargava
     [not found]                 ` <alpine.DEB.2.02.1407291541480.20991-X6Q0R45D7oAcqpCFd4KODRPsWskHk0ljAL8bYrjMMd8@public.gmane.org>
2014-07-29 23:07                   ` Joe Perches
2014-07-29 23:44                     ` David Rientjes
2014-07-29 22:54               ` Prarit Bhargava
     [not found]                 ` <53D82623.4080903-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-07-30  3:25                   ` Steven Noonan
2014-07-30 14:48       ` Matt Fleming
     [not found]         ` <20140730144803.GB15082-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2014-07-30 15:05           ` Colin Ian King
     [not found]             ` <53D909C3.9050205-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2014-07-30 17:04               ` Prarit Bhargava
2014-07-30 17:10                 ` Randy Dunlap
     [not found]                   ` <53D92700.3040803-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2014-07-30 17:21                     ` H. Peter Anvin
     [not found]                       ` <53D92996.1050906-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2014-07-30 19:58                         ` Borislav Petkov
2014-07-30 20:43                           ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).