* [PATCH 1/2] x86 boot: more tweaks to hex prints of some pfn addresses
@ 2008-06-25 12:44 Paul Jackson
2008-06-25 12:44 ` [PATCH 2/2] x86 boot: only pick up additional EFI memmap if add_efi_memmap flag Paul Jackson
0 siblings, 1 reply; 3+ messages in thread
From: Paul Jackson @ 2008-06-25 12:44 UTC (permalink / raw)
To: Ingo Molnar
Cc: Thomas Gleixner, Yinghai Lu, Jack Steiner, Mike Travis,
H. Peter Anvin, linux-kernel, Huang, Ying, Andi Kleen,
Andrew Morton, Paul Jackson
From: Paul Jackson <pj@sgi.com>
Fix some problems with (and applies on top of) a previous patch:
x86 boot: show pfn addresses in hex not decimal in some kernel info printks
Primarily change "0x%8lx" format, which displays with a right aligned
space filled hex number (spaces between the "0x" prefix and the number),
into "%0#10lx" format, which zero fills instead of space fills, and
which uses the printf flag '#' to request the "0x" prefix instead of
hard coding it.
Also replace some other "0x%lx" formats with "%#lx", making use of the
'#' printf flag again.
Signed-off-by: Paul Jackson <pj@sgi.com>
diff -u linux-next/arch/x86/kernel/e820.c linux-next/arch/x86/kernel/e820.c
--- linux-next/arch/x86/kernel/e820.c 2008-06-22 06:36:16.792519156 -0700
+++ linux-next/arch/x86/kernel/e820.c 2008-06-24 19:43:19.313976897 -0700
@@ -922,7 +922,7 @@
if (last_pfn > end_user_pfn)
last_pfn = end_user_pfn;
- printk(KERN_INFO "last_pfn = 0x%lx max_arch_pfn = 0x%lx\n",
+ printk(KERN_INFO "last_pfn = %#lx max_arch_pfn = %#lx\n",
last_pfn, max_arch_pfn);
return last_pfn;
}
diff -u linux-next/mm/page_alloc.c linux-next/mm/page_alloc.c
--- linux-next/mm/page_alloc.c 2008-06-22 06:36:16.800519641 -0700
+++ linux-next/mm/page_alloc.c 2008-06-25 03:41:40.774158823 -0700
@@ -3517,7 +3517,7 @@
{
int i;
- printk(KERN_DEBUG "Entering add_active_range(%d, 0x%lx, 0x%lx) "
+ printk(KERN_DEBUG "Entering add_active_range(%d, %#lx, %#lx) "
"%d entries of %d used\n",
nid, start_pfn, end_pfn,
nr_nodemap_entries, MAX_ACTIVE_REGIONS);
@@ -3933,7 +3933,7 @@
for (i = 0; i < MAX_NR_ZONES; i++) {
if (i == ZONE_MOVABLE)
continue;
- printk(" %-8s 0x%8lx -> 0x%8lx\n",
+ printk(" %-8s %0#10lx -> %0#10lx\n",
zone_names[i],
arch_zone_lowest_possible_pfn[i],
arch_zone_highest_possible_pfn[i]);
@@ -3949,7 +3949,7 @@
/* Print out the early_node_map[] */
printk("early_node_map[%d] active PFN ranges\n", nr_nodemap_entries);
for (i = 0; i < nr_nodemap_entries; i++)
- printk(" %3d: 0x%8lx -> 0x%8lx\n", early_node_map[i].nid,
+ printk(" %3d: %0#10lx -> %0#10lx\n", early_node_map[i].nid,
early_node_map[i].start_pfn,
early_node_map[i].end_pfn);
diff -u linux-next/arch/x86/mm/init_64.c linux-next/arch/x86/mm/init_64.c
--- linux-next/arch/x86/mm/init_64.c 2008-06-22 06:36:16.812520369 -0700
+++ linux-next/arch/x86/mm/init_64.c 2008-06-24 19:45:57.299565640 -0700
@@ -286,7 +286,7 @@
continue_outer_loop:
;
}
- printk(KERN_ERR "early_ioremap(0x%lx, %lu) failed\n", addr, size);
+ printk(KERN_ERR "early_ioremap(%#lx, %lu) failed\n", addr, size);
return NULL;
}
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.650.933.1373
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH 2/2] x86 boot: only pick up additional EFI memmap if add_efi_memmap flag
2008-06-25 12:44 [PATCH 1/2] x86 boot: more tweaks to hex prints of some pfn addresses Paul Jackson
@ 2008-06-25 12:44 ` Paul Jackson
2008-06-25 16:11 ` Ingo Molnar
0 siblings, 1 reply; 3+ messages in thread
From: Paul Jackson @ 2008-06-25 12:44 UTC (permalink / raw)
To: Ingo Molnar
Cc: Thomas Gleixner, Yinghai Lu, Jack Steiner, Mike Travis,
H. Peter Anvin, linux-kernel, Huang, Ying, Andi Kleen,
Andrew Morton, Paul Jackson
From: Paul Jackson <pj@sgi.com>
Applies on top of the previous patch:
x86 boot: add code to add BIOS provided EFI memory entries to kernel
Instead of always adding EFI memory map entries (if present) to the
memory map after initially finding either E820 BIOS memory map entries
and/or kernel command line memmap entries, -instead- only add such
additional EFI memory map entries if the kernel boot option:
add_efi_memmap
is specified.
Requiring this 'add_efi_memmap' option is backward compatible with
kernels that didn't load such additional EFI memory map entries in
the first place, and it doesn't override a configuration that tries
to replace all E820 or EFI BIOS memory map entries with ones given
entirely on the kernel command line.
Signed-off-by: Paul Jackson <pj@sgi.com>
---
Documentation/kernel-parameters.txt | 3 +++
Documentation/x86/x86_64/uefi.txt | 4 ++++
arch/x86/kernel/efi.c | 16 ++++++++++++++--
3 files changed, 21 insertions(+), 2 deletions(-)
--- linux-next.orig/Documentation/kernel-parameters.txt 2008-06-22 06:35:49.000000000 -0700
+++ linux-next/Documentation/kernel-parameters.txt 2008-06-24 18:33:57.233112308 -0700
@@ -2146,6 +2146,9 @@ and is between 256 and 4096 characters.
usbhid.mousepoll=
[USBHID] The interval which mice are to be polled at.
+ add_efi_memmap [EFI; x86-32,X86-64] Include EFI memory map in
+ kernel's map of available physical RAM.
+
vdso= [X86-32,SH,x86-64]
vdso=2: enable compat VDSO (default with COMPAT_VDSO)
vdso=1: enable VDSO (default)
--- linux-next.orig/Documentation/x86/x86_64/uefi.txt 2008-06-22 06:35:49.000000000 -0700
+++ linux-next/Documentation/x86/x86_64/uefi.txt 2008-06-24 13:14:24.100601352 -0700
@@ -36,3 +36,7 @@ Mechanics:
services.
noefi turn off all EFI runtime services
reboot_type=k turn off EFI reboot runtime service
+- If the EFI memory map has additional entries not in the E820 map,
+ you can include those entries in the kernels memory map of available
+ physical RAM by using the following kernel command line parameter.
+ add_efi_memmap include EFI memory map of available physical RAM
--- linux-next.orig/arch/x86/kernel/efi.c 2008-06-22 06:40:10.000000000 -0700
+++ linux-next/arch/x86/kernel/efi.c 2008-06-24 13:14:51.830287173 -0700
@@ -64,6 +64,17 @@ static int __init setup_noefi(char *arg)
}
early_param("noefi", setup_noefi);
+int add_efi_memmap;
+EXPORT_SYMBOL(add_efi_memmap);
+
+static int __init setup_add_efi_memmap(char *arg)
+{
+ add_efi_memmap = 1;
+ return 0;
+}
+early_param("add_efi_memmap", setup_add_efi_memmap);
+
+
static efi_status_t virt_efi_get_time(efi_time_t *tm, efi_time_cap_t *tc)
{
return efi_call_virt2(get_time, tm, tc);
@@ -219,7 +230,7 @@ unsigned long efi_get_time(void)
* (zeropage) memory map.
*/
-static void __init add_efi_memmap(void)
+static void __init do_add_efi_memmap(void)
{
void *p;
@@ -406,7 +417,8 @@ void __init efi_init(void)
if (memmap.desc_size != sizeof(efi_memory_desc_t))
printk(KERN_WARNING "Kernel-defined memdesc"
"doesn't match the one from EFI!\n");
- add_efi_memmap();
+ if (add_efi_memmap)
+ do_add_efi_memmap();
/* Setup for EFI runtime service */
reboot_type = BOOT_EFI;
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.650.933.1373
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH 2/2] x86 boot: only pick up additional EFI memmap if add_efi_memmap flag
2008-06-25 12:44 ` [PATCH 2/2] x86 boot: only pick up additional EFI memmap if add_efi_memmap flag Paul Jackson
@ 2008-06-25 16:11 ` Ingo Molnar
0 siblings, 0 replies; 3+ messages in thread
From: Ingo Molnar @ 2008-06-25 16:11 UTC (permalink / raw)
To: Paul Jackson
Cc: Thomas Gleixner, Yinghai Lu, Jack Steiner, Mike Travis,
H. Peter Anvin, linux-kernel, Huang, Ying, Andi Kleen,
Andrew Morton, the arch/x86 maintainers
* Paul Jackson <pj@sgi.com> wrote:
> From: Paul Jackson <pj@sgi.com>
>
> Applies on top of the previous patch:
> x86 boot: add code to add BIOS provided EFI memory entries to kernel
>
> Instead of always adding EFI memory map entries (if present) to the
> memory map after initially finding either E820 BIOS memory map entries
> and/or kernel command line memmap entries, -instead- only add such
> additional EFI memory map entries if the kernel boot option:
>
> add_efi_memmap
>
> is specified.
>
> Requiring this 'add_efi_memmap' option is backward compatible with
> kernels that didn't load such additional EFI memory map entries in the
> first place, and it doesn't override a configuration that tries to
> replace all E820 or EFI BIOS memory map entries with ones given
> entirely on the kernel command line.
applied to tip/x86/setup-memory - thanks Paul.
Ingo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-06-25 16:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-25 12:44 [PATCH 1/2] x86 boot: more tweaks to hex prints of some pfn addresses Paul Jackson
2008-06-25 12:44 ` [PATCH 2/2] x86 boot: only pick up additional EFI memmap if add_efi_memmap flag Paul Jackson
2008-06-25 16:11 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome