Re: [PATCH] x86, efi: print debug values in Kib not MB

2014-07-30 Thread Matt Fleming
On Wed, 30 Jul, at 12:29:32AM, Borislav Petkov wrote: On Tue, Jul 29, 2014 at 01:09:21PM -0400, Prarit Bhargava wrote: The current debug print in EFI does [0.00] efi: mem84: type=3, attr=0xf, range=[0x645b5000-0x645fb000) (0MB) and rounds off the size to 0MB

Re: [PATCH] x86, efi: print debug values in Kib not MB

2014-07-30 Thread Randy Dunlap
On 07/30/14 12:58, Borislav Petkov wrote: On Wed, Jul 30, 2014 at 10:21:26AM -0700, H. Peter Anvin wrote: Arguably the exactness is available in the range... ... and the size too. FWIW, other region dumps don't even print size: [0.00] e820: BIOS-provided physical RAM map: [

[PATCH] x86, efi: print debug values in Kib not MB

2014-07-29 Thread Prarit Bhargava
The current debug print in EFI does [0.00] efi: mem84: type=3, attr=0xf, range=[0x645b5000-0x645fb000) (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.00] efi: mem84:

Re: [PATCH] x86, efi: print debug values in Kib not MB

2014-07-29 Thread Prarit Bhargava
On 07/29/2014 04:29 PM, David Rientjes wrote: On Tue, 29 Jul 2014, Prarit Bhargava wrote: 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

Re: [PATCH] x86, efi: print debug values in Kib not MB

2014-07-29 Thread Prarit Bhargava
On 07/29/2014 06:02 PM, Joe Perches wrote: On Tue, 2014-07-29 at 13:29 -0700, David Rientjes wrote: On Tue, 29 Jul 2014, Prarit Bhargava wrote: diff --git 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)

Re: [PATCH] x86, efi: print debug values in Kib not MB

2014-07-29 Thread Joe Perches
On Tue, 2014-07-29 at 13:29 -0700, David Rientjes wrote: On Tue, 29 Jul 2014, Prarit Bhargava wrote: diff --git 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 +=

Re: [PATCH] x86, efi: print debug values in Kib not MB

2014-07-29 Thread Borislav Petkov
On Tue, Jul 29, 2014 at 01:09:21PM -0400, Prarit Bhargava wrote: The current debug print in EFI does [0.00] efi: mem84: type=3, attr=0xf, range=[0x645b5000-0x645fb000) (0MB) and rounds off the size to 0MB and isn't very useful. We should print this in Kib. After

Re: [PATCH] x86, efi: print debug values in Kib not MB

2014-07-29 Thread Prarit Bhargava
On 07/29/2014 06:29 PM, Borislav Petkov wrote: On Tue, Jul 29, 2014 at 01:09:21PM -0400, Prarit Bhargava wrote: The current debug print in EFI does [0.00] efi: mem84: type=3, attr=0xf, range=[0x645b5000-0x645fb000) (0MB) and rounds off the size to 0MB and isn't

Re: [PATCH] x86, efi: print debug values in Kib not MB

2014-07-29 Thread David Rientjes
On Wed, 30 Jul 2014, Borislav Petkov wrote: On Tue, Jul 29, 2014 at 06:32:56PM -0400, Prarit Bhargava wrote: and it was best to keep the code simple with a KiB. You're missing the point - the output doesn't get simple with KiB. Read the example I just gave you! (13893632kiB) is actively

Re: [PATCH] x86, efi: print debug values in Kib not MB

2014-07-29 Thread Prarit Bhargava
On 07/29/2014 06:36 PM, Borislav Petkov wrote: On Tue, Jul 29, 2014 at 06:32:56PM -0400, Prarit Bhargava wrote: and it was best to keep the code simple with a KiB. You're missing the point - the output doesn't get simple with KiB. Read the example I just gave you! (13893632kiB) is

Re: [PATCH] x86, efi: print debug values in Kib not MB

2014-07-29 Thread Borislav Petkov
On Tue, Jul 29, 2014 at 03:42:55PM -0700, David Rientjes wrote: If Prarit is going to implement this suggested reverse memparse() ... The only meaningful argument about the formatting here IMO is what people staring at this output are going to understand from it. And since those people most

Re: [PATCH] x86, efi: print debug values in Kib not MB

2014-07-29 Thread Prarit Bhargava
On 07/29/2014 07:01 PM, Borislav Petkov wrote: On Tue, Jul 29, 2014 at 03:42:55PM -0700, David Rientjes wrote: If Prarit is going to implement this suggested reverse memparse() ... The only meaningful argument about the formatting here IMO is what people staring at this output are going to

Re: [PATCH] x86, efi: print debug values in Kib not MB

2014-07-29 Thread Joe Perches
On Tue, 2014-07-29 at 15:42 -0700, David Rientjes wrote: On Wed, 30 Jul 2014, Borislav Petkov wrote: On Tue, Jul 29, 2014 at 06:32:56PM -0400, Prarit Bhargava wrote: and it was best to keep the code simple with a KiB. You're missing the point - the output doesn't get simple with KiB.

Re: [PATCH] x86, efi: print debug values in Kib not MB

2014-07-29 Thread David Rientjes
On Tue, 29 Jul 2014, Joe Perches wrote: Maybe yet another vsprintf extension? Maybe %pHvartype where vartype is one of [hh, h, u, ul, ull] with something like u64 t1 = (u64)*(appropriate cast)vartype; u64 t2 = t1; int index = 0; while ((t1 = 10)) {

Re: [PATCH] x86, efi: print debug values in Kib not MB

2014-07-29 Thread Steven Noonan
On Tue, Jul 29, 2014 at 3:54 PM, Prarit Bhargava pra...@redhat.com wrote: On 07/29/2014 06:36 PM, Borislav Petkov wrote: On Tue, Jul 29, 2014 at 06:32:56PM -0400, Prarit Bhargava wrote: and it was best to keep the code simple with a KiB. You're missing the point - the output doesn't get