RFC: x86: relocatable kernel changes
Subsystems (5)
PATCH 1/14 x86, boot: align the .bss section in the decompressor
In reply to H. Peter AnvinFrom: H. Peter Anvin <[email protected]>
Aligning the .bss section makes it trivially faster, and makes using larger transfers for the clear slightly easier.
[ Impact: trivial performance enhancement, future patch prep ]
--- arch/x86/boot/compressed/vmlinux.lds.S | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/x86/boot/compressed/vmlinux.lds.S +1 -0
@@ -42,6 +42,7 @@ SECTIONS *(.data.*) _edata = . ; } + . = ALIGN(32); .bss : { _bss = . ; *(.bss)
Signature · 7 lines
1.6.0.6 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
cover RFC: x86: relocatable kernel changes
This series is currently in -tip; the goal of it is to make the semantics of the relocatable kernel fully the same as the non-relocatable kernel when loaded by a relocating bootloader. That means CONFIG_PHYSICAL_START is honored to (a) be able to keep ZONE_DMA free, and avoid the once-again-increasingly-common 15-16 MB hole (don't ask me *why* this abortion is cropping up again, but I'm seeing an increasing number of reports to the effect that it *is*) and (b) make vmlinux match the runtime code in the normal case.
To deal with that constraint, CONFIG_PHYSICAL_START is taken as a minimum address for the kernel. Since a relocating bootloader may have real reasons to load the kernel lower than that (for example, because it has detected that it is on a small-memory system), this adds two new fields to the bzImage header:
runtime_start - CONFIG_PHYSICAL_START
runtime_size - The contiguous memory space consumed by the kernel
The latter is the union of contiguous memory consumed by the kernel during decompression and initialization; this is now possible thanks to Jeremy's .brk patchset. This isn't the same thing as the amount of memory the kernel needs, but rather the amount of memory it will assume that it can use before it starts to be able to read the memory map.
The runtime_start field can be *written* by the bootloader if the kernel is relocatable; e.g. by setting it to zero to indicate that the load address should be used no matter what.
The physical address at which the kernel starts is now:
align_up(max(load_address, runtime_start), kernel_alignment)
This seems to be the best possible compromise between the current behaviors for relocatable and non-relocatable kernels.
This patchset also bumps up the default alignment to a PMD boundary (2 MB for x86-64 and PAE; 4 MB for !PAE). I also change the default CONFIG_PHYSICAL_START to 16 MB (4 MB for CONFIG_EMBEDDED).
The patchset also includes some plain optimizations.
Documentation/x86/boot.txt | 41 +++++++++ arch/x86/Kconfig | 28 ++++-- arch/x86/boot/Makefile | 24 ++++-- arch/x86/boot/compressed/Makefile | 51 +++-------- arch/x86/boot/compressed/head_32.S | 131 +++++++++++++--------------- arch/x86/boot/compressed/head_64.S | 129 ++++++++++++---------------- arch/x86/boot/compressed/mkpiggy.c | 97 +++++++++++++++++++++ arch/x86/boot/compressed/vmlinux.lds.S | 1 + arch/x86/boot/compressed/vmlinux.scr | 10 -- arch/x86/boot/header.S | 21 ++++- arch/x86/configs/i386_defconfig | 148 ++++++++++++++++++++++++------- arch/x86/configs/x86_64_defconfig | 148 ++++++++++++++++++++++++-------- arch/x86/include/asm/boot.h | 13 +++- arch/x86/include/asm/bootparam.h | 2 + arch/x86/kernel/asm-offsets_32.c | 1 + arch/x86/kernel/asm-offsets_64.c | 1 + scripts/Makefile.lib | 11 ++- scripts/bin_size | 8 ++- 18 files changed, 575 insertions(+), 290 deletions(-)
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
PATCH 4/14 x86, boot: unify use LOAD_PHYSICAL_ADDR and LOAD_PHYSICAL_ALIGN
From: H. Peter Anvin <[email protected]>
Instead of using CONFIG_PHYSICAL_ALIGN and CONFIG_PHYSICAL_START directly, use LOAD_PHYSICAL_ALIGN (CONFIG_PHYSICAL_ALIGN or the smallest valid number, whichever is greater) and LOAD_PHYSICAL_ADDR (CONFIG_PHYSICAL_START rounded up to the nearest alignment datum) for both 32 and 64-bit mode.
[ Impact: Avoids problems in case of kernel misconfiguration ]
--- arch/x86/boot/compressed/head_32.S | 4 ++-- arch/x86/boot/compressed/head_64.S | 21 +++++++++------------ arch/x86/boot/header.S | 2 +- arch/x86/include/asm/boot.h | 13 +++++++++++-- 4 files changed, 23 insertions(+), 17 deletions(-)
arch/x86/boot/compressed/head_32.S +2 -2
@@ -70,8 +70,8 @@ ENTRY(startup_32) jbe 1f movl %eax, %ebx 1: - addl $(CONFIG_PHYSICAL_ALIGN - 1), %ebx - andl $(~(CONFIG_PHYSICAL_ALIGN - 1)), %ebx + addl $(LOAD_PHYSICAL_ALIGN - 1), %ebx + andl $(~(LOAD_PHYSICAL_ALIGN - 1)), %ebx #else movl $LOAD_PHYSICAL_ADDR, %ebx #endif
arch/x86/boot/compressed/head_64.S +9 -12
@@ -22,7 +22,6 @@ #include <linux/linkage.h> #include <asm/segment.h> #include <asm/pgtable_types.h> -#include <asm/page_types.h> #include <asm/boot.h> #include <asm/msr.h> #include <asm/processor-flags.h>
@@ -72,19 +71,17 @@ ENTRY(startup_32) * contains the address where we should move the kernel image temporarily * for safe in-place decompression. */ -ALIGN_MASK = (CONFIG_PHYSICAL_ALIGN-1) | (PMD_PAGE_SIZE-1) - #ifdef CONFIG_RELOCATABLE - movl $CONFIG_PHYSICAL_START, %eax + movl $LOAD_PHYSICAL_ADDR, %eax movl %ebp, %ebx - addl $ALIGN_MASK, %ebx - andl $~ALIGN_MASK, %ebx + addl $(LOAD_PHYSICAL_ALIGN - 1), %ebx + andl $~(LOAD_PHYSICAL_ALIGN - 1), %ebx cmpl %ebx, %eax jbe 1f movl %eax, %ebx 1: #else - movl $CONFIG_PHYSICAL_START, %ebx + movl $LOAD_PHYSICAL_ADDR, %ebx #endif /* Replace the compressed data size with the uncompressed size */
@@ -216,21 +213,21 @@ ENTRY(startup_64) * * If it is a relocatable kernel then decompress and run the kernel * from load address aligned to 2MB addr, otherwise decompress and - * run the kernel from CONFIG_PHYSICAL_START + * run the kernel from LOAD_PHYSICAL_ADDR */ /* Start with the delta to where the kernel will run at. */ #ifdef CONFIG_RELOCATABLE leaq startup_32(%rip) /* - $startup_32 */, %rbp - movq $CONFIG_PHYSICAL_START, %rax - addq $ALIGN_MASK, %rbp - andq $~ALIGN_MASK, %rbp + movq $LOAD_PHYSICAL_ADDR, %rax + addq $(LOAD_PHYSICAL_ALIGN - 1), %rbp + andq $~(LOAD_PHYSICAL_ALIGN - 1), %rbp cmpq %rbp, %rax jbe 1f movq %rax, %rbp 1: #else - movq $CONFIG_PHYSICAL_START, %rbp + movq $LOAD_PHYSICAL_ADDR, %rbp #endif movq %rbp, %rbx
arch/x86/boot/header.S +1 -1
@@ -192,7 +192,7 @@ ramdisk_max: .long 0x7fffffff # but leave it at 2 GB to avoid # possible bootloader bugs. -kernel_alignment: .long CONFIG_PHYSICAL_ALIGN #physical addr alignment +kernel_alignment: .long LOAD_PHYSICAL_ALIGN #physical addr alignment #required for protected mode #kernel #ifdef CONFIG_RELOCATABLE
arch/x86/include/asm/boot.h +11 -2
@@ -8,10 +8,19 @@#ifdef __KERNEL__ +#include <asm/page_types.h> + +/* Permitted physical alignment of the kernel */ +#if defined(CONFIG_X86_64 ) &&CONFIG_PHYSICAL_ALIGN <PMD_PAGE_SIZE +#define LOAD_PHYSICAL_ALIGN PMD_PAGE_SIZE +#else +#define LOAD_PHYSICAL_ALIGN CONFIG_PHYSICAL_ALIGN +#endif +/* Physical address where kernel should be loaded. */ #define LOAD_PHYSICAL_ADDR ((CONFIG_PHYSICAL_START \ - + (CONFIG_PHYSICAL_ALIGN - 1)) \ - & ~(CONFIG_PHYSICAL_ALIGN - 1)) + + (LOAD_PHYSICAL_ALIGN - 1)) \ + & ~(LOAD_PHYSICAL_ALIGN - 1))#ifdef CONFIG_KERNEL_BZIP2 #define BOOT_HEAP_SIZE 0x400000
Signature · 7 lines
1.6.0.6 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
PATCH 2/14 x86, boot: honor CONFIG_PHYSICAL_START when relocatable
In reply to H. Peter AnvinFrom: H. Peter Anvin <[email protected]>
Currently, when building a relocatable kernel, CONFIG_PHYSICAL_START is ignored. This is undesirable, as we would like to keep the kernel out of ZONE_DMA and away from the possible memory hole at 15 MB (which some vendors for some bizarre reason still have.)
With this patch, CONFIG_PHYSICAL_START is considered the *minimum* address at which the kernel can be located; a relocating bootloader can locate it higher, but not lower. This also restores the originally intended behavior that CONFIG_RELOCATABLE is functionally a noop if used with a non-relocating bootloader.
This patch also change movsb and stosb to movsl, stosl and stosq, to shave a small fraction off the boot time.
--- arch/x86/boot/compressed/head_32.S | 77 ++++++++++++++++++----------------- arch/x86/boot/compressed/head_64.S | 37 ++++++++++------- 2 files changed, 61 insertions(+), 53 deletions(-)
arch/x86/boot/compressed/head_32.S +40 -37
@@ -39,11 +39,11 @@ ENTRY(startup_32) cli movl $(__BOOT_DS),%eax - movl %eax,%ds - movl %eax,%es - movl %eax,%fs - movl %eax,%gs - movl %eax,%ss + movl %eax, %ds + movl %eax, %es + movl %eax, %fs + movl %eax, %gs + movl %eax, %ss 1: /* Calculate the delta between where we were compiled to run
@@ -64,12 +64,18 @@ ENTRY(startup_32) */ #ifdef CONFIG_RELOCATABLE - movl %ebp, %ebx - addl $(CONFIG_PHYSICAL_ALIGN - 1), %ebx - andl $(~(CONFIG_PHYSICAL_ALIGN - 1)), %ebx + movl $LOAD_PHYSICAL_ADDR, %eax + movl %ebp, %ebx + cmpl %ebx, %eax + jbe 1f + movl %eax, %ebx +1: + addl $(CONFIG_PHYSICAL_ALIGN - 1), %ebx + andl $(~(CONFIG_PHYSICAL_ALIGN - 1)), %ebx #else movl $LOAD_PHYSICAL_ADDR, %ebx #endif + movl %ebx, %edi /* Save kernel target address */ /* Replace the compressed data size with the uncompressed size */ subl input_len(%ebp), %ebx
@@ -84,27 +90,30 @@ ENTRY(startup_32) addl $4095, %ebx andl $~4095, %ebx -/* Copy the compressed kernel to the end of our buffer +/* + * Set up the stack + */ + leal boot_stack_end(%ebx), %esp + pushl %edi /* Saved kernel target address */ + +/* + * Copy the compressed kernel to the end of our buffer * where decompression in place becomes safe. */ pushl %esi - leal _ebss(%ebp), %esi - leal _ebss(%ebx), %edi - movl $(_ebss - startup_32), %ecx + leal (_bss-4)(%ebp), %esi + leal (_bss-4)(%ebx), %edi + movl $(_bss - startup_32), %ecx + shrl $2, %ecx std - rep - movsb + rep; movsl cld popl %esi -/* Compute the kernel start address. +/* + * %ebp -> kernel target address */ -#ifdef CONFIG_RELOCATABLE - addl $(CONFIG_PHYSICAL_ALIGN - 1), %ebp - andl $(~(CONFIG_PHYSICAL_ALIGN - 1)), %ebp -#else - movl $LOAD_PHYSICAL_ADDR, %ebp -#endif + popl %ebp /* * Jump to the relocated address.
@@ -117,20 +126,14 @@ ENDPROC(startup_32) relocated: /* - * Clear BSS - */ - xorl %eax,%eax - leal _edata(%ebx),%edi - leal _ebss(%ebx), %ecx - subl %edi,%ecx - cld - rep - stosb - -/* - * Setup the stack for the decompressor + * Clear BSS - note: stack is currently empty */ - leal boot_stack_end(%ebx), %esp + xorl %eax, %eax + leal _bss(%ebx), %edi + leal (_ebss+3)(%ebx), %ecx + subl %edi, %ecx + shrl $2, %ecx + rep; stosl /* * Do the decompression, and jump to the new kernel..
@@ -178,12 +181,12 @@ relocated: /* * Jump to the decompressed kernel. */ - xorl %ebx,%ebx + xorl %ebx, %ebx jmp *%ebp -.bss /* Stack and heap for uncompression */ -.balign 4 + .bss + .balign 4 boot_heap: .fill BOOT_HEAP_SIZE, 1, 0 boot_stack:
arch/x86/boot/compressed/head_64.S +21 -16
@@ -7,11 +7,6 @@ /* * head.S contains the 32-bit startup code. * - * NOTE!!! Startup happens at absolute address 0x00001000, which is also where - * the page directory will exist. The startup code will be overwritten by - * the page directory. [According to comments etc elsewhere on a compressed - * kernel it will end up at 0x1000 + 1Mb I hope so as I assume this. - AC] - * * Page 0 is deliberately kept safe, since System Management Mode code in * laptops may need to access the BIOS data stored there. This is also * useful for future device drivers that either access the BIOS via VM86
@@ -77,11 +72,17 @@ ENTRY(startup_32) * contains the address where we should move the kernel image temporarily * for safe in-place decompression. */ +ALIGN_MASK = (CONFIG_PHYSICAL_ALIGN-1) | (PMD_PAGE_SIZE-1) #ifdef CONFIG_RELOCATABLE + movl $CONFIG_PHYSICAL_START, %eax movl %ebp, %ebx - addl $(PMD_PAGE_SIZE -1), %ebx - andl $PMD_PAGE_MASK, %ebx + addl $ALIGN_MASK, %ebx + andl $~ALIGN_MASK, %ebx + cmpl %ebx, %eax + jbe 1f + movl %eax, %ebx +1: #else movl $CONFIG_PHYSICAL_START, %ebx #endif
@@ -221,13 +222,17 @@ ENTRY(startup_64) /* Start with the delta to where the kernel will run at. */ #ifdef CONFIG_RELOCATABLE leaq startup_32(%rip) /* - $startup_32 */, %rbp - addq $(PMD_PAGE_SIZE - 1), %rbp - andq $PMD_PAGE_MASK, %rbp - movq %rbp, %rbx + movq $CONFIG_PHYSICAL_START, %rax + addq $ALIGN_MASK, %rbp + andq $~ALIGN_MASK, %rbp + cmpq %rbp, %rax + jbe 1f + movq %rax, %rbp +1: #else movq $CONFIG_PHYSICAL_START, %rbp - movq %rbp, %rbx #endif + movq %rbp, %rbx /* Replace the compressed data size with the uncompressed size */ movl input_len(%rip), %eax
@@ -266,13 +271,13 @@ relocated: /* * Clear BSS */ - xorq %rax, %rax - leaq _edata(%rbx), %rdi - leaq _end_before_pgt(%rbx), %rcx + xorl %eax, %eax + leaq _edata(%rip), %rdi + leaq _end_before_pgt(%rip), %rcx subq %rdi, %rcx + shrq $3, %rcx cld - rep - stosb + rep stosq /* Setup the stack */ leaq boot_stack_end(%rip), %rsp
Signature · 7 lines
1.6.0.6 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
PATCH 3/14 x86, config: change defaults PHYSICAL_START and PHYSICAL_ALIGN
In reply to H. Peter AnvinFrom: H. Peter Anvin <[email protected]>
Change the default for CONFIG_PHYSICAL_START to 16 MB; 4 MB if EMBEDDED. Change the default for CONFIG_PHYSICAL_ALIGN to match up with a large page alignment datum (4 MB for non-PAE, 2 MB for PAE.)
The default of 16 MB is designed to avoid occupying ZONE_DMA, as well as avoiding a 15-16 MB memory hole, which some vendors inexplicably still have in their systems.
[ Impact: minor performance improvement, leave ZONE_DMA free ]
--- arch/x86/Kconfig | 19 +++++++++++-------- 1 files changed, 11 insertions(+), 8 deletions(-)
arch/x86/Kconfig +11 -8
@@ -1455,17 +1455,20 @@ config KEXEC_JUMP config PHYSICAL_START hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP) - default "0x1000000" if X86_NUMAQ - default "0x200000" if X86_64 - default "0x100000" + default "0x400000" if EMBEDDED + default "0x1000000" ---help--- This gives the physical address where the kernel is loaded. If kernel is a not relocatable (CONFIG_RELOCATABLE=n) then bzImage will decompress itself to above physical address and - run from there. Otherwise, bzImage will run from the address where - it has been loaded by the boot loader and will ignore above physical - address. + run from there. Otherwise, bzImage will run from the either + the above physical address or where it has been loaded by + the boot loader, whichever is higher. + + For embedded machines with very small memory (less than + about 24 MB) this may need to be adjusted downward from the + default value of 0x1000000 (16 MB). In normal kdump cases one does not have to set/change this option as now bzImage can be compiled as a completely relocatable image
@@ -1516,8 +1519,8 @@ config RELOCATABLE config PHYSICAL_ALIGN hex prompt "Alignment value to which kernel should be aligned" if X86_32 - default "0x100000" if X86_32 - default "0x200000" if X86_64 + default "0x200000" if X86_64 || X86_PAE + default "0x400000" range 0x2000 0x400000 ---help--- This value puts the alignment restrictions on physical address
Signature · 7 lines
1.6.0.6 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
PATCH 5/14 kbuild: allow compressors (gzip, bzip2, lzma) to take multiple inputs
In reply to H. Peter AnvinFrom: H. Peter Anvin <[email protected]>
Allow the compression commands in Kbuild (i.e. gzip, bzip2, lzma) to take multiple input files and emit the concatenated compressed output. This avoids an intermediate step when a kernel image is built from multiple components, such as the relocatable x86-32 kernel.
[ Impact: new build feature, not yet used ]
--- scripts/Makefile.lib | 11 ++++++++--- scripts/bin_size | 8 ++++++-- 2 files changed, 14 insertions(+), 5 deletions(-)
scripts/Makefile.lib +8 -3
@@ -183,7 +183,8 @@ cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@ # --------------------------------------------------------------------------- quiet_cmd_gzip = GZIP $@ -cmd_gzip = gzip -f -9 < $< > $@ +cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -f -9 > $@) || \ + (rm -f $@ ; false) # Bzip2
@@ -193,10 +194,14 @@ cmd_gzip = gzip -f -9 < $< > $@ size_append=$(CONFIG_SHELL) $(srctree)/scripts/bin_size quiet_cmd_bzip2 = BZIP2 $@ -cmd_bzip2 = (bzip2 -9 < $< && $(size_append) $<) > $@ || (rm -f $@ ; false) +cmd_bzip2 = (cat $(filter-out FORCE,$^) | \ + bzip2 -9 && $(size_append) $(filter-out FORCE,$^)) > $@ || \ + (rm -f $@ ; false) # Lzma # --------------------------------------------------------------------------- quiet_cmd_lzma = LZMA $@ -cmd_lzma = (lzma -9 -c $< && $(size_append) $<) >$@ || (rm -f $@ ; false) +cmd_lzma = (cat $(filter-out FORCE,$^) | \ + lzma -9 && $(size_append) $(filter-out FORCE,$^)) > $@ || \ + (rm -f $@ ; false)
scripts/bin_size +6 -2
@@ -1,10 +1,14 @@ #!/bin/sh if [ $# = 0 ] ; then - echo Usage: $0 file + echo Usage: $0 file... fi -size_dec=`stat -c "%s" $1` +size_dec=0 +for file; do + fsize=`stat -c "%s" $file` + size_dec=`expr $size_dec + $fsize` +done size_hex_echo_string=`printf "%08x" $size_dec | sed 's/\(..\)\(..\)\(..\)\(..\)/\\\\x\4\\\\x\3\\\\x\2\\\\x\1/g'` /bin/echo -ne $size_hex_echo_string
Signature · 7 lines
1.6.0.6 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
PATCH 6/14 x86: add a Kconfig symbol for when relocations are needed
In reply to H. Peter AnvinFrom: H. Peter Anvin <[email protected]>
We only need to build relocations when we are building a 32-bit relocatable kernel. Rather than unnecessarily complicating the Makefiles, make an explicit Kbuild symbol for this.
[ Impact: permits future cleanup ]
--- arch/x86/Kconfig | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
arch/x86/Kconfig +5 -0
@@ -1516,6 +1516,11 @@ config RELOCATABLE it has been loaded at and the compile time physical address (CONFIG_PHYSICAL_START) is ignored. +# Relocation on x86-32 needs some additional build support +config X86_NEED_RELOCS + def_bool y + depends on X86_32 && RELOCATABLE + config PHYSICAL_ALIGN hex prompt "Alignment value to which kernel should be aligned" if X86_32
Signature · 7 lines
1.6.0.6 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
PATCH 7/14 x86, boot: simplify arch/x86/boot/compressed/Makefile
In reply to H. Peter AnvinFrom: H. Peter Anvin <[email protected]>
Simplify the arch/x86/boot/compressed/Makefile, by using the new capability of specifying multiple inputs to a compressor, and the CONFIG_X86_NEED_RELOCS Kconfig symbol.
--- arch/x86/boot/compressed/Makefile | 39 +++++------------------------------- 1 files changed, 6 insertions(+), 33 deletions(-)
arch/x86/boot/compressed/Makefile +6 -33
@@ -29,7 +29,7 @@ $(obj)/vmlinux.bin: vmlinux FORCE targets += vmlinux.bin.all vmlinux.relocs relocs -hostprogs-$(CONFIG_X86_32) += relocs +hostprogs-$(CONFIG_X86_NEED_RELOCS) += relocs quiet_cmd_relocs = RELOCS $@ cmd_relocs = $(obj)/relocs $< > $@;$(obj)/relocs --abs-relocs $<
@@ -37,46 +37,19 @@ $(obj)/vmlinux.relocs: vmlinux $(obj)/relocs FORCE $(call if_changed,relocs) vmlinux.bin.all-y := $(obj)/vmlinux.bin -vmlinux.bin.all-$(CONFIG_RELOCATABLE) += $(obj)/vmlinux.relocs -quiet_cmd_relocbin = BUILD $@ - cmd_relocbin = cat $(filter-out FORCE,$^) > $@ -$(obj)/vmlinux.bin.all: $(vmlinux.bin.all-y) FORCE - $(call if_changed,relocbin) +vmlinux.bin.all-$(CONFIG_X86_NEED_RELOCS) += $(obj)/vmlinux.relocs -ifeq ($(CONFIG_X86_32),y) - -ifdef CONFIG_RELOCATABLE -$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin.all FORCE - $(call if_changed,gzip) -$(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin.all FORCE - $(call if_changed,bzip2) -$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin.all FORCE - $(call if_changed,lzma) -else -$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE - $(call if_changed,gzip) -$(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE - $(call if_changed,bzip2) -$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE - $(call if_changed,lzma) -endif -LDFLAGS_piggy.o := -r --format binary --oformat elf32-i386 -T - -else - -$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE +$(obj)/vmlinux.bin.gz: $(vmlinux.bin.all-y) FORCE $(call if_changed,gzip) -$(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE +$(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) FORCE $(call if_changed,bzip2) -$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE +$(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE $(call if_changed,lzma) -LDFLAGS_piggy.o := -r --format binary --oformat elf64-x86-64 -T -endif - suffix_$(CONFIG_KERNEL_GZIP) = gz suffix_$(CONFIG_KERNEL_BZIP2) = bz2 suffix_$(CONFIG_KERNEL_LZMA) = lzma +LDFLAGS_piggy.o := -r --format binary --oformat $(CONFIG_OUTPUT_FORMAT) -T $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix_y) FORCE $(call if_changed,ld)
Signature · 7 lines
1.6.0.6 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
PATCH 9/14 x86, boot: add new runtime_address and runtime_size bzImage fields
In reply to H. Peter AnvinFrom: H. Peter Anvin <[email protected]>
Make the (minimum) runtime address and the required amount of linear address space available to the boot loader. A relocating boot loader can use this information to select a kernel location; furthermore, it is permitted to modify the minimum runtime address field in order for the boot loader to force a specific location for the kernel (as long as it fits the alignment constraints.)
This means that the address space layout for the kernel compressor has to be determined at compile time. Since we have to do that, we might as well reap the benefit and remove some runtime calculations in assembly.
Note: bounding the amount of linear address space (not necessarily bounding the amount of memory needed, but the amount that has to be linearly contiguous before the memory map is consulted) was only possible since Jeremy Fitzhardinge's brk support work.
[ Impact: new feature; simplication of compressed/head_*.S ]
--- arch/x86/boot/Makefile | 24 ++++++--- arch/x86/boot/compressed/Makefile | 14 ++++-- arch/x86/boot/compressed/head_32.S | 54 ++++++------------- arch/x86/boot/compressed/head_64.S | 52 +++++------------- arch/x86/boot/compressed/mkpiggy.c | 97 ++++++++++++++++++++++++++++++++++ arch/x86/boot/compressed/vmlinux.scr | 10 ---- arch/x86/boot/header.S | 19 +++++-- arch/x86/include/asm/bootparam.h | 2 + arch/x86/kernel/asm-offsets_32.c | 1 + arch/x86/kernel/asm-offsets_64.c | 1 + 10 files changed, 173 insertions(+), 101 deletions(-) create mode 100644 arch/x86/boot/compressed/mkpiggy.c delete mode 100644 arch/x86/boot/compressed/vmlinux.scr
arch/x86/boot/Makefile +16 -8
@@ -86,19 +86,27 @@ $(obj)/vmlinux.bin: $(obj)/compressed/vmlinux FORCE SETUP_OBJS = $(addprefix $(obj)/,$(setup-y)) -sed-offsets := -e 's/^00*/0/' \ - -e 's/^\([0-9a-fA-F]*\) . \(input_data\|input_data_end\)$$/\#define \2 0x\1/p' +sed-voffset := -e 's/^\([0-9a-fA-F]*\) . \(_text\|_end\)$$/\#define VO_\2 0x\1/p' -quiet_cmd_offsets = OFFSETS $@ - cmd_offsets = $(NM) $< | sed -n $(sed-offsets) > $@ +quiet_cmd_voffset = VOFFSET $@ + cmd_voffset = $(NM) $< | sed -n $(sed-voffset) > $@ -$(obj)/offsets.h: $(obj)/compressed/vmlinux FORCE - $(call if_changed,offsets) +targets += voffset.h +$(obj)/voffset.h: vmlinux FORCE + $(call if_changed,voffset) + +sed-zoffset := -e 's/^\([0-9a-fA-F]*\) . \(input_data\|_ebss\|z_.*\)$$/\#define ZO_\2 0x\1/p' + +quiet_cmd_zoffset = ZOFFSET $@ + cmd_zoffset = $(NM) $< | sed -n $(sed-zoffset) > $@ + +targets += zoffset.h +$(obj)/zoffset.h: $(obj)/compressed/vmlinux FORCE + $(call if_changed,zoffset) -targets += offsets.h AFLAGS_header.o += -I$(obj) -$(obj)/header.o: $(obj)/offsets.h +$(obj)/header.o: $(obj)/voffset.h $(obj)/zoffset.h LDFLAGS_setup.elf := -T $(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE
arch/x86/boot/compressed/Makefile +10 -4
@@ -4,7 +4,8 @@ # create a compressed vmlinux image from the original vmlinux # -targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma head_$(BITS).o misc.o piggy.o +targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 \ + vmlinux.bin.lzma head_$(BITS).o misc.o KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2 KBUILD_CFLAGS += -fno-strict-aliasing -fPIC
@@ -19,6 +20,8 @@ KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ LDFLAGS := -m elf_$(UTS_MACHINE) LDFLAGS_vmlinux := -T +hostprogs-y := mkpiggy + $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/head_$(BITS).o $(obj)/misc.o $(obj)/piggy.o FORCE $(call if_changed,ld) @:
@@ -50,6 +53,9 @@ suffix_$(CONFIG_KERNEL_GZIP) = gz suffix_$(CONFIG_KERNEL_BZIP2) = bz2 suffix_$(CONFIG_KERNEL_LZMA) = lzma -LDFLAGS_piggy.o := -r --format binary --oformat $(CONFIG_OUTPUT_FORMAT) -T -$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix_y) FORCE - $(call if_changed,ld) +quiet_cmd_mkpiggy = MKPIGGY $@ + cmd_mkpiggy = $(obj)/mkpiggy $< > $@ + +targets += piggy.S +$(obj)/piggy.S: $(obj)/vmlinux.bin.$(suffix_y) $(obj)/mkpiggy FORCE + $(call if_changed,mkpiggy)
arch/x86/boot/compressed/head_32.S +17 -37
90 lines not on this page · raw message
arch/x86/boot/compressed/head_64.S +14 -38
87 lines not on this page · raw message
arch/x86/boot/compressed/mkpiggy.c new file +97 -0
97 lines not on this page · raw message
arch/x86/boot/compressed/vmlinux.scr deleted +0 -10
@@ -1,10 +0,0 @@ -SECTIONS -{ - .rodata.compressed : { - input_len = .; - LONG(input_data_end - input_data) input_data = .; - *(.data) - output_len = . - 4; - input_data_end = .; - } -}
arch/x86/boot/header.S +15 -4
@@ -22,7 +22,8 @@ #include <asm/page_types.h> #include <asm/setup.h> #include "boot.h" -#include "offsets.h" +#include "voffset.h" +#include "zoffset.h" BOOTSEG = 0x07C0 /* original address of boot-sector */ SYSSEG = 0x1000 /* historical load address >> 4 */
@@ -115,7 +116,7 @@ _start: # Part 2 of the header, from the old setup.S .ascii "HdrS" # header signature - .word 0x0209 # header version number (>= 0x0105) + .word 0x020a # header version number (>= 0x0105) # or else old loadlin-1.5 will fail) .globl realmode_swtch realmode_swtch: .word 0, 0 # default_switch, SETUPSEG
@@ -212,13 +213,23 @@ hardware_subarch: .long 0 # subarchitecture, added with 2.07 hardware_subarch_data: .quad 0 -payload_offset: .long input_data -payload_length: .long input_data_end-input_data +payload_offset: .long ZO_input_data +payload_length: .long ZO_z_input_len setup_data: .quad 0 # 64-bit physical pointer to # single linked list of # struct setup_data +runtime_start: .long LOAD_PHYSICAL_ADDR +#define ZO_RUNTIME_SIZE (ZO__ebss+ZO_z_expand_offset) +#define VO_RUNTIME_SIZE (VO__end-VO__text) +#if VO_RUNTIME_SIZE > ZO_RUNTIME_SIZE +#define RUNTIME_SIZE VO_RUNTIME_SIZE +#else +#define RUNTIME_SIZE ZO_RUNTIME_SIZE +#endif +runtime_size: .long RUNTIME_SIZE # Minimum contiguous memory + # End of setup header ##################################################### .section ".inittext", "ax"
arch/x86/include/asm/bootparam.h +2 -0
@@ -62,6 +62,8 @@ struct setup_header {__u32 payload_offset;__u32 payload_length;__u64 setup_data; +__u32 runtime_start; +__u32 runtime_size; } __attribute__((packed));struct sys_desc_table {
arch/x86/kernel/asm-offsets_32.c +1 -0
@@ -146,4 +146,5 @@ void foo(void)OFFSET (BP_loadflags, boot_params, hdr.loadflags);OFFSET (BP_hardware_subarch, boot_params, hdr.hardware_subarch);OFFSET (BP_version, boot_params, hdr.version); +OFFSET (BP_runtime_start, boot_params, hdr.runtime_start); }
arch/x86/kernel/asm-offsets_64.c +1 -0
@@ -125,6 +125,7 @@ int main(void)OFFSET (BP_loadflags, boot_params, hdr.loadflags);OFFSET (BP_hardware_subarch, boot_params, hdr.hardware_subarch);OFFSET (BP_version, boot_params, hdr.version); +OFFSET (BP_runtime_start, boot_params, hdr.runtime_start);BLANK ();DEFINE (PAGE_SIZE_asm,PAGE_SIZE );
Signature · 7 lines
1.6.0.6 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
PATCH 10/14 x86, doc: document the runtime_start and runtime_size bzImage fields
In reply to H. Peter AnvinFrom: H. Peter Anvin <[email protected]>
Add documentation for the runtime_start and runtime_size fields; bzImage protocol version 2.10 (0x020a).
[ Impact: documentation only ]
--- Documentation/x86/boot.txt | 41 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 41 insertions(+), 0 deletions(-)
Documentation/x86/boot.txt +41 -0
@@ -50,6 +50,10 @@ Protocol 2.08: (Kernel 2.6.26) Added crc32 checksum and ELF format Protocol 2.09: (Kernel 2.6.26) Added a field of 64-bit physical pointer to single linked list of struct setup_data. +Protocol 2.10: (Kernel 2.6.31) Added the runtime_start and + runtime_size fields for the post-decompression address + and memory requirements of the kernel. + **** MEMORY LAYOUT The traditional memory map for the kernel loader, used for Image or
@@ -182,6 +186,8 @@ Offset Proto Name Meaning 024C/4 2.08+ payload_length Length of kernel payload 0250/8 2.09+ setup_data 64-bit physical pointer to linked list of struct setup_data +0258/4 2.10+ runtime_start (Minimum) post-decompression address +025C/4 2.10+ runtime_size Minimum linear memory required (1) For backwards compatibility, if the setup_sects field contains 0, the real value is 4.
@@ -582,6 +588,41 @@ Protocol: 2.09+ sure to consider the case where the linked list already contains entries. +Field name: runtime_start +Type: modify (optional, reloc) +Offset/size: 0x258/4 +Protocol: 2.10+ + + For a non-relocatable kernel, this is a readonly field indicating + the post-decompression address of the kernel. This will typically + be larger than the load address (0x100000). + + For a relocatable kernel, this is a read-write field indicating the + *minimum* post-decompression address of the kernel. This allows + unchanged behavior when a non-relocating bootloader is used. If + this value is greater than the load address, this value is used; if + this value is smaller than the load address, the load address is + rounded up to the nearest multiple of the kernel_alignment field and + this field is ignored. + + A relocating bootloader can override this field, e.g. by setting it + to zero, to force the load address to control the runtime address of + the kernel. + +Field name: runtime_size +Type: read +Offset/size: 0x25C/4 +Protocol: 2.10+ + + This field informs the boot loader of the amount of linearly + contiguous memory starting at the kernel decompression address (as + given by the appropriate combination of the load address, + runtime_start, and kernel_alignment) that the kernel will require + before it becomes aware of the memory map. It does *not* guarantee + a successful boot with only this memory, but it may be a useful + guideline for a relocating bootloader when it comes to selecting an + address to load the kernel. + **** THE IMAGE CHECKSUM
Signature · 7 lines
1.6.0.6 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
PATCH 8/14 x86, boot: use BP_scratch in arch/x86/boot/compressed/head_*.S
In reply to H. Peter AnvinFrom: H. Peter Anvin <[email protected]>
Use the BP_scratch symbol from asm-offsets.h instead of hard-coding the location.
[ Impact: cleanup ]
--- arch/x86/boot/compressed/head_32.S | 2 +- arch/x86/boot/compressed/head_64.S | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/boot/compressed/head_32.S +1 -1
@@ -53,7 +53,7 @@ ENTRY(startup_32) * data at 0x1e4 (defined as a scratch field) are used as the stack * for this calculation. Only 4 bytes are needed. */ - leal (0x1e4+4)(%esi), %esp + leal (BP_scratch+4)(%esi), %esp call 1f 1: popl %ebp subl $1b, %ebp
arch/x86/boot/compressed/head_64.S +1 -1
@@ -50,7 +50,7 @@ ENTRY(startup_32) * data at 0x1e4 (defined as a scratch field) are used as the stack * for this calculation. Only 4 bytes are needed. */ - leal (0x1e4+4)(%esi), %esp + leal (BP_scratch+4)(%esi), %esp call 1f 1: popl %ebp subl $1b, %ebp
Signature · 7 lines
1.6.0.6 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
PATCH 12/14 x86, boot: zero EFLAGS on 32 bits
In reply to H. Peter AnvinFrom: H. Peter Anvin <[email protected]>
The 64-bit code already clears EFLAGS as soon as it has a stack. This seems like a reasonable precaution, so do it on 32 bits as well.
[ Impact: extra paranoia ]
--- arch/x86/boot/compressed/head_32.S | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)
arch/x86/boot/compressed/head_32.S +8 -2
@@ -12,9 +12,9 @@ * the page directory. [According to comments etc elsewhere on a compressed * kernel it will end up at 0x1000 + 1Mb I hope so as I assume this. - AC] * - * Page 0 is deliberately kept safe, since System Management Mode code in + * Page 0 is deliberately kept safe, since System Management Mode code in * laptops may need to access the BIOS data stored there. This is also - * useful for future device drivers that either access the BIOS via VM86 + * useful for future device drivers that either access the BIOS via VM86 * mode. */
@@ -84,6 +84,12 @@ ENTRY(startup_32) leal boot_stack_end(%ebx), %esp /* + * Zero EFLAGS + */ + pushl $0 + popfl + +/* * Copy the compressed kernel to the end of our buffer * where decompression in place becomes safe. */
Signature · 7 lines
1.6.0.6 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
PATCH 13/14 x86: make CONFIG_RELOCATABLE the default
In reply to H. Peter AnvinFrom: H. Peter Anvin <[email protected]>
Remove the EXPERIMENTAL tag from CONFIG_RELOCATABLE and make it the default. Relocatable kernels have been used for a while now, and should now have identical semantics to non-relocatable kernels when loaded by a non-relocating bootloader.
--- arch/x86/Kconfig | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/Kconfig +2 -2
@@ -1500,8 +1500,8 @@ config PHYSICAL_START Don't change this unless you know what you are doing. config RELOCATABLE - bool "Build a relocatable kernel (EXPERIMENTAL)" - depends on EXPERIMENTAL + bool "Build a relocatable kernel" + default y ---help--- This builds a kernel image that retains relocation information so it can be loaded someplace besides the default 1MB.
Signature · 7 lines
1.6.0.6 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
PATCH 11/14 x86, boot: use rep movsq to move kernel on 64 bits
In reply to H. Peter AnvinFrom: H. Peter Anvin <[email protected]>
rep movsq is the architecturally preferred way to move a block of data. It isn't the fastest way on all existing CPUs, but it it likely to be in the future, and perhaps more importantly, we should encourage the architecturally right thing to do.
This means saving and restoring %rsi around the copy code, which is easily done by setting up the stack early. However, we should not copy .bss (which we are about to zero anyway); we should only copy up to the *beginning* of .bss (just as on 32 bits.)
This also makes the code quite a bit more similar between 32 and 64 bits.
[ Impact: trivial optimization ]
--- arch/x86/boot/compressed/head_64.S | 41 ++++++++++++++++++++--------------- 1 files changed, 23 insertions(+), 18 deletions(-)
arch/x86/boot/compressed/head_64.S +23 -18
@@ -220,18 +220,30 @@ ENTRY(startup_64) #endif leaq z_extract_offset(%rbp), %rbx -/* Copy the compressed kernel to the end of our buffer +/* + * Set up the stack + */ + leaq boot_stack_end(%rbx), %rsp + +/* + * Zero EFLAGS after setting rsp + */ + pushq $0 + popfq + +/* + * Copy the compressed kernel to the end of our buffer * where decompression in place becomes safe. */ - leaq _end_before_pgt(%rip), %r8 - leaq _end_before_pgt(%rbx), %r9 - movq $_end_before_pgt /* - $startup_32 */, %rcx -1: subq $8, %r8 - subq $8, %r9 - movq 0(%r8), %rax - movq %rax, 0(%r9) - subq $8, %rcx - jnz 1b + pushq %rsi /* Kernel structure pointer */ + leaq (_bss-8)(%rip), %rsi + leaq (_bss-8)(%rbx), %rdi + movq $_bss /* - $startup_32 */, %rcx + shrq $3, %rcx + std + rep movsq + cld + popq %rsi /* * Jump to the relocated address.
@@ -243,7 +255,7 @@ ENTRY(startup_64) relocated: /* - * Clear BSS + * Clear BSS (stack is empty at this point) */ xorl %eax, %eax leaq _edata(%rip), %rdi
@@ -253,13 +265,6 @@ relocated: cld rep stosq - /* Setup the stack */ - leaq boot_stack_end(%rip), %rsp - - /* zero EFLAGS after setting rsp */ - pushq $0 - popfq - /* * Do the decompression, and jump to the new kernel.. */
Signature · 7 lines
1.6.0.6 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
PATCH 14/14 x86, defconfig: update defconfigs to relocatable
In reply to H. Peter AnvinFrom: H. Peter Anvin <[email protected]>
Update the defconfigs, in particular to make CONFIG_RELOCATABLE default on, and adjust CONFIG_PHYSICAL_START and CONFIG_PHYSICAL_ALIGN to the current default values.
--- arch/x86/configs/i386_defconfig | 148 ++++++++++++++++++++++++++++--------- arch/x86/configs/x86_64_defconfig | 148 ++++++++++++++++++++++++++++--------- 2 files changed, 226 insertions(+), 70 deletions(-)
arch/x86/configs/i386_defconfig +114 -34
@@ -1,12 +1,13 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.29-rc4 -# Tue Feb 24 15:50:58 2009 +# Linux kernel version: 2.6.30-rc2 +# Thu May 7 14:22:04 2009 # # CONFIG_64BIT is not set CONFIG_X86_32=y # CONFIG_X86_64 is not set CONFIG_X86=y +CONFIG_OUTPUT_FORMAT="elf32-i386" CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig" CONFIG_GENERIC_TIME=y CONFIG_GENERIC_CMOS_UPDATE=y
@@ -33,6 +34,7 @@ CONFIG_ARCH_HAS_CPU_RELAX=y CONFIG_ARCH_HAS_DEFAULT_IDLE=y CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y CONFIG_HAVE_SETUP_PER_CPU_AREA=y +CONFIG_HAVE_DYNAMIC_PER_CPU_AREA=y # CONFIG_HAVE_CPUMASK_OF_CPU_MAP is not set CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_ARCH_SUSPEND_POSSIBLE=y
@@ -40,15 +42,16 @@ CONFIG_ARCH_SUSPEND_POSSIBLE=y CONFIG_ARCH_POPULATES_NODE_MAP=y # CONFIG_AUDIT_ARCH is not set CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y +CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_PENDING_IRQ=y -CONFIG_X86_SMP=y CONFIG_USE_GENERIC_SMP_HELPERS=y CONFIG_X86_32_SMP=y CONFIG_X86_HT=y -CONFIG_X86_BIOS_REBOOT=y CONFIG_X86_TRAMPOLINE=y +CONFIG_X86_32_LAZY_GS=y CONFIG_KTIME_SCALAR=y CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -60,10 +63,17 @@ CONFIG_LOCK_KERNEL=y CONFIG_INIT_ENV_ARG_LIMIT=32 CONFIG_LOCALVERSION="" # CONFIG_LOCALVERSION_AUTO is not set +CONFIG_HAVE_KERNEL_GZIP=y +CONFIG_HAVE_KERNEL_BZIP2=y +CONFIG_HAVE_KERNEL_LZMA=y +CONFIG_KERNEL_GZIP=y +# CONFIG_KERNEL_BZIP2 is not set +# CONFIG_KERNEL_LZMA is not set CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_SYSVIPC_SYSCTL=y CONFIG_POSIX_MQUEUE=y +CONFIG_POSIX_MQUEUE_SYSCTL=y CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set CONFIG_TASKSTATS=y
@@ -113,23 +123,26 @@ CONFIG_PID_NS=y CONFIG_NET_NS=y CONFIG_BLK_DEV_INITRD=y CONFIG_INITRAMFS_SOURCE="" +CONFIG_RD_GZIP=y +CONFIG_RD_BZIP2=y +CONFIG_RD_LZMA=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_SYSCTL=y +CONFIG_ANON_INODES=y # CONFIG_EMBEDDED is not set CONFIG_UID16=y CONFIG_SYSCTL_SYSCALL=y CONFIG_KALLSYMS=y CONFIG_KALLSYMS_ALL=y CONFIG_KALLSYMS_EXTRA_PASS=y +# CONFIG_STRIP_ASM_SYMS is not set CONFIG_HOTPLUG=y CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_PCSPKR_PLATFORM=y -# CONFIG_COMPAT_BRK is not set CONFIG_BASE_FULL=y CONFIG_FUTEX=y -CONFIG_ANON_INODES=y CONFIG_EPOLL=y CONFIG_SIGNALFD=y CONFIG_TIMERFD=y
@@ -139,6 +152,7 @@ CONFIG_AIO=y CONFIG_VM_EVENT_COUNTERS=y CONFIG_PCI_QUIRKS=y CONFIG_SLUB_DEBUG=y +# CONFIG_COMPAT_BRK is not set # CONFIG_SLAB is not set CONFIG_SLUB=y # CONFIG_SLOB is not set
@@ -154,6 +168,8 @@ CONFIG_HAVE_IOREMAP_PROT=y CONFIG_HAVE_KPROBES=y CONFIG_HAVE_KRETPROBES=y CONFIG_HAVE_ARCH_TRACEHOOK=y +CONFIG_HAVE_DMA_API_DEBUG=y +# CONFIG_SLOW_WORK is not set CONFIG_HAVE_GENERIC_DMA_COHERENT=y CONFIG_SLABINFO=y CONFIG_RT_MUTEXES=y
@@ -167,7 +183,6 @@ CONFIG_MODULE_FORCE_UNLOAD=y CONFIG_STOP_MACHINE=y CONFIG_BLOCK=y # CONFIG_LBD is not set -CONFIG_BLK_DEV_IO_TRACE=y CONFIG_BLK_DEV_BSG=y # CONFIG_BLK_DEV_INTEGRITY is not set
@@ -194,12 +209,12 @@ CONFIG_HIGH_RES_TIMERS=y CONFIG_GENERIC_CLOCKEVENTS_BUILD=y CONFIG_SMP=y CONFIG_SPARSE_IRQ=y -CONFIG_X86_FIND_SMP_CONFIG=y CONFIG_X86_MPPARSE=y +# CONFIG_X86_BIGSMP is not set +CONFIG_X86_EXTENDED_PLATFORM=y # CONFIG_X86_ELAN is not set -# CONFIG_X86_GENERICARCH is not set -# CONFIG_X86_VSMP is not set # CONFIG_X86_RDC321X is not set +# CONFIG_X86_32_NON_STANDARD is not set CONFIG_SCHED_OMIT_FRAME_POINTER=y # CONFIG_PARAVIRT_GUEST is not set # CONFIG_MEMTEST is not set
@@ -230,8 +245,10 @@ CONFIG_M686=y # CONFIG_GENERIC_CPU is not set CONFIG_X86_GENERIC=y CONFIG_X86_CPU=y +CONFIG_X86_L1_CACHE_BYTES=64 +CONFIG_X86_INTERNODE_CACHE_BYTES=64 CONFIG_X86_CMPXCHG=y -CONFIG_X86_L1_CACHE_SHIFT=7 +CONFIG_X86_L1_CACHE_SHIFT=5 CONFIG_X86_XADD=y # CONFIG_X86_PPRO_FENCE is not set CONFIG_X86_WP_WORKS_OK=y
@@ -247,7 +264,7 @@ CONFIG_X86_DEBUGCTLMSR=y CONFIG_CPU_SUP_INTEL=y CONFIG_CPU_SUP_CYRIX_32=y CONFIG_CPU_SUP_AMD=y -CONFIG_CPU_SUP_CENTAUR_32=y +CONFIG_CPU_SUP_CENTAUR=y CONFIG_CPU_SUP_TRANSMETA_32=y CONFIG_CPU_SUP_UMC_32=y CONFIG_X86_DS=y
@@ -279,6 +296,7 @@ CONFIG_MICROCODE_AMD=y CONFIG_MICROCODE_OLD_INTERFACE=y CONFIG_X86_MSR=y CONFIG_X86_CPUID=y +# CONFIG_X86_CPU_DEBUG is not set # CONFIG_NOHIGHMEM is not set CONFIG_HIGHMEM4G=y # CONFIG_HIGHMEM64G is not set
@@ -302,6 +320,8 @@ CONFIG_ZONE_DMA_FLAG=1 CONFIG_BOUNCE=y CONFIG_VIRT_TO_BUS=y CONFIG_UNEVICTABLE_LRU=y +CONFIG_HAVE_MLOCK=y +CONFIG_HAVE_MLOCKED_PAGE_BIT=y CONFIG_HIGHPTE=y CONFIG_X86_CHECK_BIOS_CORRUPTION=y CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y
@@ -312,6 +332,7 @@ CONFIG_MTRR=y CONFIG_X86_PAT=y CONFIG_EFI=y CONFIG_SECCOMP=y +# CONFIG_CC_STACKPROTECTOR is not set # CONFIG_HZ_100 is not set # CONFIG_HZ_250 is not set # CONFIG_HZ_300 is not set
@@ -322,8 +343,9 @@ CONFIG_KEXEC=y CONFIG_CRASH_DUMP=y # CONFIG_KEXEC_JUMP is not set CONFIG_PHYSICAL_START=0x1000000 -# CONFIG_RELOCATABLE is not set -CONFIG_PHYSICAL_ALIGN=0x200000 +CONFIG_RELOCATABLE=y +CONFIG_X86_NEED_RELOCS=y +CONFIG_PHYSICAL_ALIGN=0x400000 CONFIG_HOTPLUG_CPU=y # CONFIG_COMPAT_VDSO is not set # CONFIG_CMDLINE_BOOL is not set
@@ -363,7 +385,6 @@ CONFIG_ACPI_THERMAL=y CONFIG_ACPI_BLACKLIST_YEAR=0 # CONFIG_ACPI_DEBUG is not set # CONFIG_ACPI_PCI_SLOT is not set -CONFIG_ACPI_SYSTEM=y CONFIG_X86_PM_TIMER=y CONFIG_ACPI_CONTAINER=y # CONFIG_ACPI_SBS is not set
@@ -425,6 +446,7 @@ CONFIG_PCI_BIOS=y CONFIG_PCI_DIRECT=y CONFIG_PCI_MMCONFIG=y CONFIG_PCI_DOMAINS=y +# CONFIG_DMAR is not set CONFIG_PCIEPORTBUS=y # CONFIG_HOTPLUG_PCI_PCIE is not set CONFIG_PCIEAER=y
@@ -435,6 +457,7 @@ CONFIG_PCI_MSI=y # CONFIG_PCI_DEBUG is not set # CONFIG_PCI_STUB is not set CONFIG_HT_IRQ=y +# CONFIG_PCI_IOV is not set CONFIG_ISA_DMA_API=y # CONFIG_ISA is not set # CONFIG_MCA is not set
@@ -481,7 +504,6 @@ CONFIG_NET=y # # Networking options # -CONFIG_COMPAT_NET_DEV_OPS=y CONFIG_PACKET=y CONFIG_PACKET_MMAP=y CONFIG_UNIX=y
@@ -639,6 +661,7 @@ CONFIG_LLC=y # CONFIG_LAPB is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set +# CONFIG_PHONET is not set CONFIG_NET_SCHED=y #
@@ -696,6 +719,7 @@ CONFIG_NET_SCH_FIFO=y # # CONFIG_NET_PKTGEN is not set # CONFIG_NET_TCPPROBE is not set +# CONFIG_NET_DROP_MONITOR is not set CONFIG_HAMRADIO=y #
@@ -706,12 +730,10 @@ CONFIG_HAMRADIO=y # CONFIG_IRDA is not set # CONFIG_BT is not set # CONFIG_AF_RXRPC is not set -# CONFIG_PHONET is not set CONFIG_FIB_RULES=y CONFIG_WIRELESS=y CONFIG_CFG80211=y # CONFIG_CFG80211_REG_DEBUG is not set -CONFIG_NL80211=y CONFIG_WIRELESS_OLD_REGULATORY=y CONFIG_WIRELESS_EXT=y CONFIG_WIRELESS_EXT_SYSFS=y
@@ -789,6 +811,7 @@ CONFIG_MISC_DEVICES=y # CONFIG_ICS932S401 is not set # CONFIG_ENCLOSURE_SERVICES is not set # CONFIG_HP_ILO is not set +# CONFIG_ISL29003 is not set # CONFIG_C2PORT is not set #
@@ -842,6 +865,7 @@ CONFIG_SCSI_SPI_ATTRS=y # CONFIG_SCSI_LOWLEVEL is not set # CONFIG_SCSI_LOWLEVEL_PCMCIA is not set # CONFIG_SCSI_DH is not set +# CONFIG_SCSI_OSD_INITIATOR is not set CONFIG_ATA=y # CONFIG_ATA_NONSTANDARD is not set CONFIG_ATA_ACPI=y
@@ -940,6 +964,7 @@ CONFIG_DM_ZERO=y CONFIG_MACINTOSH_DRIVERS=y CONFIG_MAC_EMUMOUSEBTN=y CONFIG_NETDEVICES=y +CONFIG_COMPAT_NET_DEV_OPS=y # CONFIG_IFB is not set # CONFIG_DUMMY is not set # CONFIG_BONDING is not set
@@ -977,6 +1002,8 @@ CONFIG_MII=y CONFIG_NET_VENDOR_3COM=y # CONFIG_VORTEX is not set # CONFIG_TYPHOON is not set +# CONFIG_ETHOC is not set +# CONFIG_DNET is not set CONFIG_NET_TULIP=y # CONFIG_DE2104X is not set # CONFIG_TULIP is not set
@@ -1026,6 +1053,7 @@ CONFIG_E1000=y CONFIG_E1000E=y # CONFIG_IP1000 is not set # CONFIG_IGB is not set +# CONFIG_IGBVF is not set # CONFIG_NS83820 is not set # CONFIG_HAMACHI is not set # CONFIG_YELLOWFIN is not set
@@ -1040,6 +1068,7 @@ CONFIG_BNX2=y # CONFIG_QLA3XXX is not set # CONFIG_ATL1 is not set # CONFIG_ATL1E is not set +# CONFIG_ATL1C is not set # CONFIG_JME is not set CONFIG_NETDEV_10000=y # CONFIG_CHELSIO_T1 is not set
@@ -1049,6 +1078,7 @@ CONFIG_CHELSIO_T3_DEPENDS=y # CONFIG_IXGBE is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set +# CONFIG_VXGE is not set # CONFIG_MYRI10GE is not set # CONFIG_NETXEN_NIC is not set # CONFIG_NIU is not set
@@ -1058,6 +1088,7 @@ CONFIG_CHELSIO_T3_DEPENDS=y # CONFIG_BNX2X is not set # CONFIG_QLGE is not set # CONFIG_SFC is not set +# CONFIG_BE2NET is not set CONFIG_TR=y # CONFIG_IBMOL is not set # CONFIG_IBMLS is not set
@@ -1073,8 +1104,8 @@ CONFIG_WLAN_80211=y # CONFIG_LIBERTAS is not set # CONFIG_LIBERTAS_THINFIRM is not set # CONFIG_AIRO is not set -# CONFIG_HERMES is not set # CONFIG_ATMEL is not set +# CONFIG_AT76C50X_USB is not set # CONFIG_AIRO_CS is not set # CONFIG_PCMCIA_WL3501 is not set # CONFIG_PRISM54 is not set
@@ -1084,21 +1115,21 @@ CONFIG_WLAN_80211=y # CONFIG_RTL8187 is not set # CONFIG_ADM8211 is not set # CONFIG_MAC80211_HWSIM is not set +# CONFIG_MWL8K is not set # CONFIG_P54_COMMON is not set CONFIG_ATH5K=y # CONFIG_ATH5K_DEBUG is not set # CONFIG_ATH9K is not set +# CONFIG_AR9170_USB is not set # CONFIG_IPW2100 is not set # CONFIG_IPW2200 is not set -# CONFIG_IWLCORE is not set -# CONFIG_IWLWIFI_LEDS is not set -# CONFIG_IWLAGN is not set -# CONFIG_IWL3945 is not set +# CONFIG_IWLWIFI is not set # CONFIG_HOSTAP is not set # CONFIG_B43 is not set # CONFIG_B43LEGACY is not set # CONFIG_ZD1211RW is not set # CONFIG_RT2X00 is not set +# CONFIG_HERMES is not set # # Enable WiMAX (Networking options) to see the WiMAX drivers
@@ -1209,6 +1240,8 @@ CONFIG_INPUT_TABLET=y # CONFIG_TABLET_USB_KBTAB is not set # CONFIG_TABLET_USB_WACOM is not set CONFIG_INPUT_TOUCHSCREEN=y +# CONFIG_TOUCHSCREEN_AD7879_I2C is not set +# CONFIG_TOUCHSCREEN_AD7879 is not set # CONFIG_TOUCHSCREEN_FUJITSU is not set # CONFIG_TOUCHSCREEN_GUNZE is not set # CONFIG_TOUCHSCREEN_ELO is not set
@@ -1303,6 +1336,7 @@ CONFIG_UNIX98_PTYS=y # CONFIG_LEGACY_PTYS is not set # CONFIG_IPMI_HANDLER is not set CONFIG_HW_RANDOM=y +# CONFIG_HW_RANDOM_TIMERIOMEM is not set CONFIG_HW_RANDOM_INTEL=y CONFIG_HW_RANDOM_AMD=y CONFIG_HW_RANDOM_GEODE=y
@@ -1390,7 +1424,6 @@ CONFIG_I2C_I801=y # CONFIG_SENSORS_PCF8574 is not set # CONFIG_PCF8575 is not set # CONFIG_SENSORS_PCA9539 is not set -# CONFIG_SENSORS_PCF8591 is not set # CONFIG_SENSORS_MAX6875 is not set # CONFIG_SENSORS_TSL2550 is not set # CONFIG_I2C_DEBUG_CORE is not set
@@ -1424,6 +1457,7 @@ CONFIG_HWMON=y # CONFIG_SENSORS_ADT7475 is not set # CONFIG_SENSORS_K8TEMP is not set # CONFIG_SENSORS_ASB100 is not set +# CONFIG_SENSORS_ATK0110 is not set # CONFIG_SENSORS_ATXP1 is not set # CONFIG_SENSORS_DS1621 is not set # CONFIG_SENSORS_I5K_AMB is not set
@@ -1433,6 +1467,7 @@ CONFIG_HWMON=y # CONFIG_SENSORS_FSCHER is not set # CONFIG_SENSORS_FSCPOS is not set # CONFIG_SENSORS_FSCHMD is not set +# CONFIG_SENSORS_G760A is not set # CONFIG_SENSORS_GL518SM is not set # CONFIG_SENSORS_GL520SM is not set # CONFIG_SENSORS_CORETEMP is not set
@@ -1448,11 +1483,14 @@ CONFIG_HWMON=y # CONFIG_SENSORS_LM90 is not set # CONFIG_SENSORS_LM92 is not set # CONFIG_SENSORS_LM93 is not set +# CONFIG_SENSORS_LTC4215 is not set # CONFIG_SENSORS_LTC4245 is not set +# CONFIG_SENSORS_LM95241 is not set # CONFIG_SENSORS_MAX1619 is not set # CONFIG_SENSORS_MAX6650 is not set # CONFIG_SENSORS_PC87360 is not set # CONFIG_SENSORS_PC87427 is not set +# CONFIG_SENSORS_PCF8591 is not set # CONFIG_SENSORS_SIS5595 is not set # CONFIG_SENSORS_DME1737 is not set # CONFIG_SENSORS_SMSC47M1 is not set
@@ -1643,7 +1681,6 @@ CONFIG_FB_EFI=y # CONFIG_FB_3DFX is not set # CONFIG_FB_VOODOO1 is not set # CONFIG_FB_VT8623 is not set -# CONFIG_FB_CYBLA is not set # CONFIG_FB_TRIDENT is not set # CONFIG_FB_ARK is not set # CONFIG_FB_PM3 is not set
@@ -1652,6 +1689,7 @@ CONFIG_FB_EFI=y # CONFIG_FB_VIRTUAL is not set # CONFIG_FB_METRONOME is not set # CONFIG_FB_MB862XX is not set +# CONFIG_FB_BROADSHEET is not set CONFIG_BACKLIGHT_LCD_SUPPORT=y # CONFIG_LCD_CLASS_DEVICE is not set CONFIG_BACKLIGHT_CLASS_DEVICE=y
@@ -1738,6 +1776,8 @@ CONFIG_SND_PCI=y # CONFIG_SND_INDIGO is not set # CONFIG_SND_INDIGOIO is not set # CONFIG_SND_INDIGODJ is not set +# CONFIG_SND_INDIGOIOX is not set +# CONFIG_SND_INDIGODJX is not set # CONFIG_SND_EMU10K1 is not set # CONFIG_SND_EMU10K1X is not set # CONFIG_SND_ENS1370 is not set
@@ -1811,15 +1851,17 @@ CONFIG_USB_HIDDEV=y # # Special HID drivers # -CONFIG_HID_COMPAT=y CONFIG_HID_A4TECH=y CONFIG_HID_APPLE=y CONFIG_HID_BELKIN=y CONFIG_HID_CHERRY=y CONFIG_HID_CHICONY=y CONFIG_HID_CYPRESS=y +# CONFIG_DRAGONRISE_FF is not set CONFIG_HID_EZKEY=y +CONFIG_HID_KYE=y CONFIG_HID_GYRATION=y +CONFIG_HID_KENSINGTON=y CONFIG_HID_LOGITECH=y CONFIG_LOGITECH_FF=y # CONFIG_LOGIRUMBLEPAD2_FF is not set
@@ -1885,11 +1927,11 @@ CONFIG_USB_PRINTER=y # CONFIG_USB_TMC is not set # -# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; +# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may # # -# see USB_STORAGE Help for more information +# also be needed; see USB_STORAGE Help for more info # CONFIG_USB_STORAGE=y # CONFIG_USB_STORAGE_DEBUG is not set
@@ -1931,7 +1973,6 @@ CONFIG_USB_LIBUSUAL=y # CONFIG_USB_LED is not set # CONFIG_USB_CYPRESS_CY7C63 is not set # CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGET is not set # CONFIG_USB_IDMOUSE is not set # CONFIG_USB_FTDI_ELAN is not set # CONFIG_USB_APPLEDISPLAY is not set
@@ -1947,6 +1988,7 @@ CONFIG_USB_LIBUSUAL=y # # OTG and related infrastructure # +# CONFIG_NOP_USB_XCEIV is not set # CONFIG_UWB is not set # CONFIG_MMC is not set # CONFIG_MEMSTICK is not set
@@ -1958,8 +2000,10 @@ CONFIG_LEDS_CLASS=y # # CONFIG_LEDS_ALIX2 is not set # CONFIG_LEDS_PCA9532 is not set +# CONFIG_LEDS_LP5521 is not set # CONFIG_LEDS_CLEVO_MAIL is not set # CONFIG_LEDS_PCA955X is not set +# CONFIG_LEDS_BD2802 is not set # # LED Triggers
@@ -1969,6 +2013,10 @@ CONFIG_LEDS_TRIGGERS=y # CONFIG_LEDS_TRIGGER_HEARTBEAT is not set # CONFIG_LEDS_TRIGGER_BACKLIGHT is not set # CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set + +# +# iptables trigger is under Netfilter config (LED target) +# # CONFIG_ACCESSIBILITY is not set # CONFIG_INFINIBAND is not set CONFIG_EDAC=y
@@ -2037,6 +2085,7 @@ CONFIG_DMADEVICES=y # DMA Devices # # CONFIG_INTEL_IOATDMA is not set +# CONFIG_AUXDISPLAY is not set # CONFIG_UIO is not set # CONFIG_STAGING is not set CONFIG_X86_PLATFORM_DEVICES=y
@@ -2071,6 +2120,7 @@ CONFIG_DMIID=y # # CONFIG_EXT2_FS is not set CONFIG_EXT3_FS=y +# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set CONFIG_EXT3_FS_XATTR=y CONFIG_EXT3_FS_POSIX_ACL=y CONFIG_EXT3_FS_SECURITY=y
@@ -2101,6 +2151,11 @@ CONFIG_AUTOFS4_FS=y CONFIG_GENERIC_ACL=y # +# Caches +# +# CONFIG_FSCACHE is not set + +# # CD-ROM/DVD Filesystems # CONFIG_ISO9660_FS=y
@@ -2151,6 +2206,7 @@ CONFIG_MISC_FILESYSTEMS=y # CONFIG_ROMFS_FS is not set # CONFIG_SYSV_FS is not set # CONFIG_UFS_FS is not set +# CONFIG_NILFS2_FS is not set CONFIG_NETWORK_FILESYSTEMS=y CONFIG_NFS_FS=y CONFIG_NFS_V3=y
@@ -2164,7 +2220,6 @@ CONFIG_NFS_ACL_SUPPORT=y CONFIG_NFS_COMMON=y CONFIG_SUNRPC=y CONFIG_SUNRPC_GSS=y -# CONFIG_SUNRPC_REGISTER_V4 is not set CONFIG_RPCSEC_GSS_KRB5=y # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set
@@ -2251,6 +2306,7 @@ CONFIG_DEBUG_FS=y CONFIG_DEBUG_KERNEL=y # CONFIG_DEBUG_SHIRQ is not set # CONFIG_DETECT_SOFTLOCKUP is not set +# CONFIG_DETECT_HUNG_TASK is not set # CONFIG_SCHED_DEBUG is not set CONFIG_SCHEDSTATS=y CONFIG_TIMER_STATS=y
@@ -2266,6 +2322,7 @@ CONFIG_TIMER_STATS=y # CONFIG_LOCK_STAT is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +CONFIG_STACKTRACE=y # CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_HIGHMEM is not set CONFIG_DEBUG_BUGVERBOSE=y
@@ -2289,13 +2346,19 @@ CONFIG_FRAME_POINTER=y # CONFIG_FAULT_INJECTION is not set # CONFIG_LATENCYTOP is not set CONFIG_SYSCTL_SYSCALL_CHECK=y +# CONFIG_DEBUG_PAGEALLOC is not set CONFIG_USER_STACKTRACE_SUPPORT=y +CONFIG_NOP_TRACER=y CONFIG_HAVE_FUNCTION_TRACER=y CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y CONFIG_HAVE_DYNAMIC_FTRACE=y CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y CONFIG_HAVE_HW_BRANCH_TRACER=y +CONFIG_HAVE_FTRACE_SYSCALLS=y +CONFIG_RING_BUFFER=y +CONFIG_TRACING=y +CONFIG_TRACING_SUPPORT=y # # Tracers
@@ -2305,13 +2368,21 @@ CONFIG_HAVE_HW_BRANCH_TRACER=y # CONFIG_SYSPROF_TRACER is not set # CONFIG_SCHED_TRACER is not set # CONFIG_CONTEXT_SWITCH_TRACER is not set +# CONFIG_EVENT_TRACER is not set +# CONFIG_FTRACE_SYSCALLS is not set # CONFIG_BOOT_TRACER is not set # CONFIG_TRACE_BRANCH_PROFILING is not set # CONFIG_POWER_TRACER is not set # CONFIG_STACK_TRACER is not set # CONFIG_HW_BRANCH_TRACER is not set +# CONFIG_KMEMTRACE is not set +# CONFIG_WORKQUEUE_TRACER is not set +CONFIG_BLK_DEV_IO_TRACE=y +# CONFIG_FTRACE_STARTUP_TEST is not set +# CONFIG_MMIOTRACE is not set CONFIG_PROVIDE_OHCI1394_DMA_INIT=y -# CONFIG_DYNAMIC_PRINTK_DEBUG is not set +# CONFIG_DYNAMIC_DEBUG is not set +# CONFIG_DMA_API_DEBUG is not set # CONFIG_SAMPLES is not set CONFIG_HAVE_ARCH_KGDB=y # CONFIG_KGDB is not set
@@ -2321,7 +2392,6 @@ CONFIG_EARLY_PRINTK=y CONFIG_EARLY_PRINTK_DBGP=y CONFIG_DEBUG_STACKOVERFLOW=y CONFIG_DEBUG_STACK_USAGE=y -# CONFIG_DEBUG_PAGEALLOC is not set # CONFIG_DEBUG_PER_CPU_MAPS is not set # CONFIG_X86_PTDUMP is not set CONFIG_DEBUG_RODATA=y
@@ -2329,7 +2399,7 @@ CONFIG_DEBUG_RODATA=y CONFIG_DEBUG_NX_TEST=m # CONFIG_4KSTACKS is not set CONFIG_DOUBLEFAULT=y -# CONFIG_MMIOTRACE is not set +CONFIG_HAVE_MMIOTRACE_SUPPORT=y CONFIG_IO_DELAY_TYPE_0X80=0 CONFIG_IO_DELAY_TYPE_0XED=1 CONFIG_IO_DELAY_TYPE_UDELAY=2
@@ -2365,6 +2435,8 @@ CONFIG_SECURITY_SELINUX_AVC_STATS=y CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 # CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set # CONFIG_SECURITY_SMACK is not set +# CONFIG_SECURITY_TOMOYO is not set +# CONFIG_IMA is not set CONFIG_CRYPTO=y #
@@ -2380,10 +2452,12 @@ CONFIG_CRYPTO_BLKCIPHER2=y CONFIG_CRYPTO_HASH=y CONFIG_CRYPTO_HASH2=y CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_PCOMP=y CONFIG_CRYPTO_MANAGER=y CONFIG_CRYPTO_MANAGER2=y # CONFIG_CRYPTO_GF128MUL is not set # CONFIG_CRYPTO_NULL is not set +CONFIG_CRYPTO_WORKQUEUE=y # CONFIG_CRYPTO_CRYPTD is not set CONFIG_CRYPTO_AUTHENC=y # CONFIG_CRYPTO_TEST is not set
@@ -2456,6 +2530,7 @@ CONFIG_CRYPTO_DES=y # Compression # # CONFIG_CRYPTO_DEFLATE is not set +# CONFIG_CRYPTO_ZLIB is not set # CONFIG_CRYPTO_LZO is not set #
@@ -2467,11 +2542,13 @@ CONFIG_CRYPTO_HW=y # CONFIG_CRYPTO_DEV_GEODE is not set # CONFIG_CRYPTO_DEV_HIFN_795X is not set CONFIG_HAVE_KVM=y +CONFIG_HAVE_KVM_IRQCHIP=y CONFIG_VIRTUALIZATION=y # CONFIG_KVM is not set # CONFIG_LGUEST is not set # CONFIG_VIRTIO_PCI is not set # CONFIG_VIRTIO_BALLOON is not set +CONFIG_BINARY_PRINTF=y # # Library routines
@@ -2489,7 +2566,10 @@ CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set CONFIG_AUDIT_GENERIC=y CONFIG_ZLIB_INFLATE=y -CONFIG_PLIST=y +CONFIG_DECOMPRESS_GZIP=y +CONFIG_DECOMPRESS_BZIP2=y +CONFIG_DECOMPRESS_LZMA=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT=y CONFIG_HAS_DMA=y +CONFIG_NLATTR=y
arch/x86/configs/x86_64_defconfig +112 -36
615 lines not on this page · raw message
Signature · 7 lines
1.6.0.6 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
Peter do you plan to update pxelinux or other bootloaders to use the relocatable kernel feature?
Can we please kill the gosh awful impact lines? They keep breaking my concentration whenever I try and review these patches. They are horrible. Something of very minimal significance jumping up and screaming at me.
The impact lines also fail to capture any of the significant ways I can easily think of that this patch could cause problems. A little screw up could cause the kernel to fail to boot for a random portion of our user base, and the patch as constructed will require changes to existing bootloaders.
The direction of this patch seems reasonable. The details are broken. The common case for relocatable kernels today is kdump. A situation with very minimal memory. In that situation the kernel needs to run where we put it, modifying the kernel to not run where it gets put is a problem.
With the code as it is today you can get the exact same behavior by simply bumping up the minimum alignment to 16MB, and a lot less code and no changes needed to any bootloaders.
Is your goal to setup a scenario where on small memory systems a bootloader like pxelinux can support a relocatable kernel and load it a lower address? If so that seems reasonable.
With that said how about we change the logic to:
if (load_addr == legacy_load_addr) /* 0x100000 */
use config_physical_start
else if aligned
noop
else
/* Crap this is bad align the kernel and hope something works. */
That gets the desired behavior we override bootloaders that are not smart and taking relocation into account. I am really not comfortable with having code that will override a bootloader doing something reasonable.
I expect we will still want to update kexec to be able to take advantage of loadtime_size (runtime_size seems like the wrong name).
Eric
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 2 lines · Eric W. Biederman
Peter do you plan to update pxelinux or other bootloaders to use the relocatable kernel feature?
Yes.
Quoted 5 lines
The direction of this patch seems reasonable. The details are broken. The common case for relocatable kernels today is kdump. A situation with very minimal memory. In that situation the kernel needs to run where we put it, modifying the kernel to not run where it gets put is a problem.
I thought in the kdump case you typically loaded it pretty high? Either which way, kdump is always loaded by kexec, so it should just be a matter of updating kexec to zero the runtime_start field, no? Basically this is the bootloader saying "do what I say, dammit." Since the existing protocol doesn't have a way to unambiguously communicate one direction versus another (see below), it seems like a relatively small issue involving only one tool. Suboptimal, yes.
Quoted 7 lines
With the code as it is today you can get the exact same behavior by simply bumping up the minimum alignment to 16MB, and a lot less code and no changes needed to any bootloaders.
Is your goal to setup a scenario where on small memory systems a bootloader like pxelinux can support a relocatable kernel and load it a lower address? If so that seems reasonable.
Yes.
Quoted 7 lines
With that said how about we change the logic to:
if (
load_addr==legacy_load_addr) /*0x100000*/
useconfig_physical_start
else if aligned
noop
else
Quoted 6 lines
/* Crap this is bad align the kernel and hope something works. */That gets the desired behavior we override bootloaders that are not smart and taking relocation into account. I am really not comfortable with having code that will override a bootloader doing something reasonable.
I'm not sure that is quite right either, because if alignment is configured to be 1 MB or less then 1 MB is a perfectly legitimate address for a relocating bootloader to want to use, even if it is not configured in. It would be more than a bit odd to not have that be permitted.
Quoted 2 lines
I expect we will still want to update kexec to be able to take advantage of
loadtime_size(runtime_sizeseems like the wrong name).
Well, it is the amount of memory the kernel needs during runtime (as opposed to during loading.) I admit it's not an ideal name, though. On the other hand, simply calling it kernel_start and kernel_size seemed ambiguous.
-hpa
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 12 lines · H. Peter Anvin
Quoted 2 lines · Eric W. Biederman
Peter do you plan to update pxelinux or other bootloaders to use the relocatable kernel feature?
Yes.
Quoted 5 lines
The direction of this patch seems reasonable. The details are broken. The common case for relocatable kernels today is kdump. A situation with very minimal memory. In that situation the kernel needs to run where we put it, modifying the kernel to not run where it gets put is a problem.
Quoted 3 lines
I thought in the kdump case you typically loaded it pretty high? Either which way, kdump is always loaded by kexec, so it should just be a matter of updating kexec to zero the
runtime_startfield, no?
Yes. In practice it doesn't matter. I just don't want to get into a contest with the kernel about who knows better how to put the kernel in memory the bootloader or the kernel decompressor.
Quoted 5 lines
Basically
this is the bootloader saying "do what I say, dammit." Since the existing protocol doesn't have a way to unambiguously communicate one direction versus another (see below), it seems like a relatively small issue involving only one tool. Suboptimal, yes.
The existing protocol doesn't have the option of anything else.
Physical start has always been <= the alignment for x86 and x86_64, in any real world configuration.
Something goofy may have happened during unification, I thought I had removed physical start as totally unnecessary from x86_64.
Hmmm....
In the non-kdump case this is interesting. I know of instances where kexec is burned in firmware. So I am strongly reluctant to make anything that feels like a true backwards incompatible change.
Those systems also don't have the stupid 15MB hole either.
Quoted 24 lines
Quoted 7 lines
With the code as it is today you can get the exact same behavior by simply bumping up the minimum alignment to 16MB, and a lot less code and no changes needed to any bootloaders.
Is your goal to setup a scenario where on small memory systems a bootloader like pxelinux can support a relocatable kernel and load it a lower address? If so that seems reasonable.
Yes.
Quoted 7 lines
With that said how about we change the logic to:
if (
load_addr==legacy_load_addr) /*0x100000*/
useconfig_physical_start
else if aligned
noop
elseQuoted 6 lines
/* Crap this is bad, align the kernel and hope something works. */That gets the desired behavior we override bootloaders that are not smart and taking relocation into account. I am really not comfortable with having code that will override a bootloader doing something reasonable.
Quoted 5 lines
I'm not sure that is quite right either, because if alignment is configured to be 1 MB or less then 1 MB is a perfectly legitimate address for a relocating bootloader to want to use, even if it is not configured in. It would be more than a bit odd to not have that be permitted.
On the 64bit kernel 2MB really is required. We run at a fixed virtual address and use 2MB pages. So anything less that 2MB really won't work.
So I think it would be a bad idea if we had bootloaders ignoring the alignment.
With the suggested start address, it probably make sense to only export our true alignment requirement.
Quoted 7 lines
Quoted 2 lines
I expect we will still want to update kexec to be able to take advantage of
loadtime_size(runtime_sizeseems like the wrong name).Well, it is the amount of memory the kernel needs during runtime (as opposed to during loading.) I admit it's not an ideal name, though. On the other hand, simply calling it
kernel_startandkernel_sizeseemed ambiguous.
It is the amount of memory we need before a true memory allocator is initialized. Essentially text+data+bss. How about we call it init_size?
Perhaps we should have:init_size
best start (As a 64bit field please)
optimum align (Or we flip it around)
Eric
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH 01/14] x86, boot: align the .bss section in the decompressor
In reply to H. Peter AnvinQuoted 17 lines · H. Peter Anvin
From: H. Peter Anvin <[email protected]>
Aligning the .bss section makes it trivially faster, and makes using larger transfers for the clear slightly easier.
[ Impact: trivial performance enhancement, future patch prep ]
Signed-off-by H. Peter Anvin <[email protected]>--- arch/x86/boot/compressed/vmlinux.lds.S | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)arch/x86/boot/compressed/vmlinux.lds.S +0
-0
arch/x86/boot/compressed/vmlinux.lds.S SECTIONS · line 45
Quoted 4 lines
arch/x86/boot/compressed/vmlinux.lds.S +1
-0@@ -42,6 +42,7 @@ SECTIONS *(.data.*) _edata = . ; } + . = ALIGN(32);
Where does this magic 32 comes from?
I would assume the better choice would be:
. = ALIGN(L1_CACHE_BYTES);
So we match the relevant CPU.
In general for alignmnet of output sections I see the need for:
1) Function call
2) L1_CACHE_BYTES
3) PAGE_SIZE
4) 2*PAGE_SIZE
But I see magic constant used here and there that does not match the above (when looking at all archs).
So I act when I see a new 'magic' number..
Sam
Re: [PATCH 02/14] x86, boot: honor CONFIG_PHYSICAL_START when relocatable
In reply to H. Peter AnvinQuoted 7 lines · H. Peter Anvin
From: H. Peter Anvin <[email protected]>
Currently, when building a relocatable kernel,
CONFIG_PHYSICAL_STARTis ignored. This is undesirable, as we would like to keep the kernel out ofZONE_DMAand away from the possible memory hole at 15 MB (which some vendors for some bizarre reason still have.)
Quoted 8 lines
With this patch,
CONFIG_PHYSICAL_STARTis considered the *minimum* address at which the kernel can be located; a relocating bootloader can locate it higher, but not lower. This also restores the originally intended behavior thatCONFIG_RELOCATABLEis functionally a noop if used with a non-relocating bootloader.This patch also change movsb and stosb to movsl, stosl and stosq, to shave a small fraction off the boot time.
On the coding style side of thing...
arch/x86/boot/compressed/head_32.S ENTRY(startup_32) · line 71
Quoted 4 lines
arch/x86/boot/compressed/head_32.S +4
-0+ movl %ebp, %ebx + cmpl %ebx, %eax + jbe 1f + movl %eax, %ebx
This looks messy with different idention of the operand.
Compare it to this:
arch/x86/boot/compressed/head_32.S ENTRY(startup_32) · line 71
Quoted 4 lines
arch/x86/boot/compressed/head_32.S +4
-0+ movl %ebp, %ebx + cmpl %ebx, %eax + jbe 1f + movl %eax, %ebx
I like the latter more with vertical alignment of the operand. I see that you add spaces around operators (,) - good.
Quoted 22 lines
*/
#ifdef
CONFIG_RELOCATABLEarch/x86/boot/compressed/head_32.S +9
-3- movl %ebp, %ebx - addl $(CONFIG_PHYSICAL_ALIGN - 1), %ebx - andl $(~(CONFIG_PHYSICAL_ALIGN - 1)), %ebx + movl $LOAD_PHYSICAL_ADDR, %eax + movl %ebp, %ebx + cmpl %ebx, %eax + jbe 1f + movl %eax, %ebx +1: + addl $(CONFIG_PHYSICAL_ALIGN - 1), %ebx + andl $(~(CONFIG_PHYSICAL_ALIGN - 1)), %ebx #else movl $LOAD_PHYSICAL_ADDR, %ebx #endif + movl %ebx, %edi /* Save kernel target address */ /* Replace the compressed data size with the uncompressed size */ subl input_len(%ebp), %ebx
arch/x86/boot/compressed/head_32.S ENTRY(startup_32) · line 91
Quoted 2 lines
arch/x86/boot/compressed/head_32.S +0
-0@@ -84,27 +90,30 @@ ENTRY(startup_32) addl $4095, %ebx andl $~4095, %ebx
Not part of your patch...
But this is most likely (PAGE_SIZE - 1) so it would be better to write so.
Quoted 10 lines
arch/x86/boot/compressed/head_32.S +8
-1-/* Copy the compressed kernel to the end of our buffer +/* + * Set up the stack + */ + leal boot_stack_end(%ebx), %esp + pushl %edi /* Saved kernel target address */ + +/* + * Copy the compressed kernel to the end of our buffer
arch/x86/boot/compressed/head_32.S ENTRY(startup_32) · line 107
Quoted 10 lines
arch/x86/boot/compressed/head_32.S +4
-3* where decompression in place becomes safe. */ pushl %esi - leal _ebss(%ebp), %esi - leal _ebss(%ebx), %edi - movl $(_ebss - startup_32), %ecx + leal (_bss-4)(%ebp), %esi + leal (_bss-4)(%ebx), %edi + movl $(_bss - startup_32), %ecx + shrl $2, %ecx
I do not see why you mess around with _bss here?
Do you use .bss for decompression?
Note: I do not speak x86 assembler so I have not tried to
understand the functionality.
I tired to grasp the changes around clear bss - but faild :-(
Sam
Re: [PATCH 03/14] x86, config: change defaults PHYSICAL_START and PHYSICAL_ALIGN
In reply to H. Peter AnvinQuoted 35 lines · H. Peter Anvin
From: H. Peter Anvin <[email protected]>
Change the default for
CONFIG_PHYSICAL_STARTto 16 MB; 4 MB if EMBEDDED. Change the default forCONFIG_PHYSICAL_ALIGNto match up with a large page alignment datum (4 MB for non-PAE, 2 MB for PAE.)The default of 16 MB is designed to avoid occupying
ZONE_DMA, as well as avoiding a 15-16 MB memory hole, which some vendors inexplicably still have in their systems.[ Impact: minor performance improvement, leave
ZONE_DMAfree ]Signed-off-by H. Peter Anvin <[email protected]>--- arch/x86/Kconfig | 19 +++++++++++-------- 1 files changed, 11 insertions(+), 8 deletions(-)arch/x86/Kconfig +2
-3@@ -1455,17 +1455,20 @@ config KEXEC_JUMP config PHYSICAL_START hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP) - default "0x1000000" if X86_NUMAQ - default "0x200000" if X86_64 - default "0x100000" + default "0x400000" if EMBEDDED + default "0x1000000" ---help--- This gives the physical address where the kernel is loaded. If kernel is a not relocatable (CONFIG_RELOCATABLE=n) then bzImage will decompress itself to above physical address and
arch/x86/Kconfig config KEXEC_JUMP · line 1471
Quoted 10 lines
arch/x86/Kconfig +7
-3- run from there. Otherwise, bzImage will run from the address where - it has been loaded by the boot loader and will ignore above physical - address. + run from there. Otherwise, bzImage will run from the either + the above physical address or where it has been loaded by + the boot loader, whichever is higher. + + For embedded machines with very small memory (less than + about 24 MB) this may need to be adjusted downward from the + default value of 0x1000000 (16 MB).
But in the above you say that default is "0x400000" if EMBEDDED That is in contradiction with the help - no?
Sam
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH 05/14] kbuild: allow compressors (gzip, bzip2, lzma) to take multiple inputs
In reply to H. Peter AnvinQuoted 11 lines · H. Peter Anvin
From: H. Peter Anvin <[email protected]>
Allow the compression commands in
Kbuild(i.e. gzip, bzip2, lzma) to take multiple input files and emit the concatenated compressed output. This avoids an intermediate step when a kernel image is built from multiple components, such as the relocatable x86-32 kernel.[ Impact: new build feature, not yet used ]
Signed-off-by H. Peter Anvin <[email protected]>Cc Sam Ravnborg <[email protected]>
Quoted 47 lines
--- scripts/Makefile.lib | 11 ++++++++--- scripts/bin_size | 8 ++++++-- 2 files changed, 14 insertions(+), 5 deletions(-)scripts/Makefile.lib +8
-3@@ -183,7 +183,8 @@ cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@ # --------------------------------------------------------------------------- quiet_cmd_gzip = GZIP $@ -cmd_gzip = gzip -f -9 < $< > $@ +cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -f -9 > $@) || \ + (rm -f $@ ; false) # Bzip2@@ -193,10 +194,14 @@ cmd_gzip = gzip -f -9 < $< > $@ size_append=$(CONFIG_SHELL) $(srctree)/scripts/bin_size quiet_cmd_bzip2 = BZIP2 $@ -cmd_bzip2 = (bzip2 -9 < $< && $(size_append) $<) > $@ || (rm -f $@ ; false) +cmd_bzip2 = (cat $(filter-out FORCE,$^) | \ + bzip2 -9 && $(size_append) $(filter-out FORCE,$^)) > $@ || \ + (rm -f $@ ; false) # Lzma # --------------------------------------------------------------------------- quiet_cmd_lzma = LZMA $@ -cmd_lzma = (lzma -9 -c $< && $(size_append) $<) >$@ || (rm -f $@ ; false) +cmd_lzma = (cat $(filter-out FORCE,$^) | \ + lzma -9 && $(size_append) $(filter-out FORCE,$^)) > $@ || \ + (rm -f $@ ; false)scripts/bin_size +1
-1@@ -1,10 +1,14 @@ #!/bin/sh if [ $# = 0 ] ; then - echo Usage: $0 file + echo Usage: $0 file... fi
scripts/bin_size line 14
Quoted 10 lines
scripts/bin_size +5
-1-size_dec=`stat -c "%s" $1` +size_dec=0 +for file; do + fsize=`stat -c "%s" $file` + size_dec=`expr $size_dec + $fsize` +done size_hex_echo_string=`printf "%08x" $size_dec | sed 's/\(..\)\(..\)\(..\)\(..\)/\\\\x\4\\\\x\3\\\\x\2\\\\x\1/g'` /bin/echo -ne $size_hex_echo_string
But I would rather have had this inside makefile.lib...
Sam
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH 07/14] x86, boot: simplify arch/x86/boot/compressed/Makefile
In reply to H. Peter AnvinQuoted 8 lines · H. Peter Anvin
From: H. Peter Anvin <[email protected]>
Simplify the
arch/x86/boot/compressed/Makefile, by using the new capability of specifying multiple inputs to a compressor, and theCONFIG_X86_NEED_RELOCSKconfigsymbol.Signed-off-by H. Peter Anvin <[email protected]>Cc Sam Ravnborg <[email protected]>
Very nice cleanup!
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH 09/14] x86, boot: add new runtime_address and runtime_size bzImage fields
In reply to H. Peter AnvinQuoted 84 lines · H. Peter Anvin
From: H. Peter Anvin <[email protected]>
Make the (minimum) runtime address and the required amount of linear address space available to the boot loader. A relocating boot loader can use this information to select a kernel location; furthermore, it is permitted to modify the minimum runtime address field in order for the boot loader to force a specific location for the kernel (as long as it fits the alignment constraints.)
This means that the address space layout for the kernel compressor has to be determined at compile time. Since we have to do that, we might as well reap the benefit and remove some runtime calculations in assembly.
Note: bounding the amount of linear address space (not necessarily bounding the amount of memory needed, but the amount that has to be linearly contiguous before the memory map is consulted) was only possible since Jeremy Fitzhardinge's brk support work.
[ Impact: new feature; simplication of
compressed/head_*.S]Signed-off-by H. Peter Anvin <[email protected]>Cc Jeremy Fitzhardinge <[email protected]>Cc Sam Ravnborg <[email protected]>--- arch/x86/boot/Makefile | 24 ++++++--- arch/x86/boot/compressed/Makefile | 14 ++++-- arch/x86/boot/compressed/head_32.S | 54 ++++++------------- arch/x86/boot/compressed/head_64.S | 52 +++++------------- arch/x86/boot/compressed/mkpiggy.c | 97 ++++++++++++++++++++++++++++++++++ arch/x86/boot/compressed/vmlinux.scr | 10 ---- arch/x86/boot/header.S | 19 +++++-- arch/x86/include/asm/bootparam.h | 2 + arch/x86/kernel/asm-offsets_32.c | 1 + arch/x86/kernel/asm-offsets_64.c | 1 + 10 files changed, 173 insertions(+), 101 deletions(-) create mode 100644 arch/x86/boot/compressed/mkpiggy.c delete mode 100644 arch/x86/boot/compressed/vmlinux.scrarch/x86/boot/Makefile +16
-8@@ -86,19 +86,27 @@ $(obj)/vmlinux.bin: $(obj)/compressed/vmlinux FORCE SETUP_OBJS = $(addprefix $(obj)/,$(setup-y)) -sed-offsets := -e 's/^00*/0/' \ - -e 's/^\([0-9a-fA-F]*\) . \(input_data\|input_data_end\)$$/\#define \2 0x\1/p' +sed-voffset := -e 's/^\([0-9a-fA-F]*\) . \(_text\|_end\)$$/\#define VO_\2 0x\1/p' -quiet_cmd_offsets = OFFSETS $@ - cmd_offsets = $(NM) $< | sed -n $(sed-offsets) > $@ +quiet_cmd_voffset = VOFFSET $@ + cmd_voffset = $(NM) $< | sed -n $(sed-voffset) > $@ -$(obj)/offsets.h: $(obj)/compressed/vmlinux FORCE - $(call if_changed,offsets) +targets += voffset.h +$(obj)/voffset.h: vmlinux FORCE + $(call if_changed,voffset) + +sed-zoffset := -e 's/^\([0-9a-fA-F]*\) . \(input_data\|_ebss\|z_.*\)$$/\#define ZO_\2 0x\1/p' + +quiet_cmd_zoffset = ZOFFSET $@ + cmd_zoffset = $(NM) $< | sed -n $(sed-zoffset) > $@ + +targets += zoffset.h +$(obj)/zoffset.h: $(obj)/compressed/vmlinux FORCE + $(call if_changed,zoffset) -targets += offsets.h AFLAGS_header.o += -I$(obj) -$(obj)/header.o: $(obj)/offsets.h +$(obj)/header.o: $(obj)/voffset.h $(obj)/zoffset.h LDFLAGS_setup.elf := -T $(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCEarch/x86/boot/compressed/Makefile +0
-0
arch/x86/boot/compressed/Makefile line 8
Quoted 6 lines
arch/x86/boot/compressed/Makefile +2
-1@@ -4,7 +4,8 @@ # create a compressed vmlinux image from the original vmlinux # -targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma head_$(BITS).o misc.o piggy.o +targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 \ + vmlinux.bin.lzma head_$(BITS).o misc.o
You still have a piggy.o target.
Quoted 13 lines
arch/x86/boot/compressed/Makefile +2
-0KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2 KBUILD_CFLAGS += -fno-strict-aliasing -fPIC@@ -19,6 +20,8 @@ KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ LDFLAGS := -m elf_$(UTS_MACHINE) LDFLAGS_vmlinux := -T +hostprogs-y := mkpiggy + $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/head_$(BITS).o $(obj)/misc.o $(obj)/piggy.o FORCE $(call if_changed,ld) @:
arch/x86/boot/compressed/Makefile suffix_$(CONFIG_KERNEL_GZIP) = gz · line 54
Quoted 2 lines
arch/x86/boot/compressed/Makefile +0
-0@@ -50,6 +53,9 @@ suffix_$(CONFIG_KERNEL_GZIP) = gz suffix_$(CONFIG_KERNEL_BZIP2) = bz2 suffix_$(CONFIG_KERNEL_LZMA) = lzma
No need for a recursive assignment here. Use ":="
Ann we usually uses "-y" not "_y".
arch/x86/boot/compressed/Makefile suffix_$(CONFIG_KERNEL_GZIP) = gz
Quoted 9 lines
arch/x86/boot/compressed/Makefile +3
-3-LDFLAGS_piggy.o := -r --format binary --oformat $(CONFIG_OUTPUT_FORMAT) -T -$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix_y) FORCE - $(call if_changed,ld) +quiet_cmd_mkpiggy = MKPIGGY $@ + cmd_mkpiggy = $(obj)/mkpiggy $< > $@ + cmd_mkpiggy = $(obj)/mkpiggy $< > $@ || (rm -f $@; false)
So we delete the file on error.
arch/x86/boot/compressed/Makefile suffix_$(CONFIG_KERNEL_GZIP) = gz · line 61
Quoted 4 lines
arch/x86/boot/compressed/Makefile +4
-0+ +targets += piggy.S +$(obj)/piggy.S: $(obj)/vmlinux.bin.$(suffix_y) $(obj)/mkpiggy FORCE + $(call if_changed,mkpiggy)
Sam
Re: [PATCH 01/14] x86, boot: align the .bss section in the decompressor
In reply to H. Peter Anvin[H. Peter Anvin - Thu, May 07, 2009 at 03:26:49PM -0700]
| From: H. Peter Anvin <[email protected]> | | Aligning the .bss section makes it trivially faster, and makes using | larger transfers for the clear slightly easier. | | [ Impact: trivial performance enhancement, future patch prep ] | | Signed-off-by: H. Peter Anvin <[email protected]> | --- | arch/x86/boot/compressed/vmlinux.lds.S | 1 + | 1 files changed, 1 insertions(+), 0 deletions(-) | | diff --git a/arch/x86/boot/compressed/vmlinux.lds.S b/arch/x86/boot/compressed/vmlinux.lds.S | index 0d26c92..27c168d 100644 | --- a/arch/x86/boot/compressed/vmlinux.lds.S | +++ b/arch/x86/boot/compressed/vmlinux.lds.S | @@ -42,6 +42,7 @@ SECTIONS | *(.data.*) | _edata = . ; | } | + . = ALIGN(32); | .bss : { | _bss = . ; | *(.bss) | -- | 1.6.0.6 |
Hi Peter, should not it be ALIGN(8) rather? I thought we keep these sections as tight as possible in a sake of limitation of setup code size. Perhaps I miss something.
-- Cyrill
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH 01/14] x86, boot: align the .bss section in the decompressor
In reply to Sam RavnborgQuoted 35 lines · Sam Ravnborg
Quoted 17 lines · H. Peter Anvin
From: H. Peter Anvin <[email protected]>
Aligning the .bss section makes it trivially faster, and makes using larger transfers for the clear slightly easier.
[ Impact: trivial performance enhancement, future patch prep ]
Signed-off-by H. Peter Anvin <[email protected]>--- arch/x86/boot/compressed/vmlinux.lds.S | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)arch/x86/boot/compressed/vmlinux.lds.S +0
-0arch/x86/boot/compressed/vmlinux.lds.S SECTIONS · line 45
Quoted 4 lines
arch/x86/boot/compressed/vmlinux.lds.S +1
-0@@ -42,6 +42,7 @@ SECTIONS *(.data.*) _edata = . ; } + . = ALIGN(32);Where does this magic 32 comes from?
I would assume the better choice would be:. = ALIGN(L1_CACHE_BYTES);So we match the relevant CPU.
In general for alignmnet of output sections I see the need for:
1) Function call
2)L1_CACHE_BYTES
3)PAGE_SIZE
4) 2*PAGE_SIZE
Quoted 4 lines
But I see magic constant used here and there that does not match the above (when looking at all archs).
So I act when I see a new 'magic' number..
I totally agree
gcc itself has a strange 32 bytes alignement rule (unless using -Os) for object of a >= 32 bytes size. Did you know that ?
$ cat try.c
char foo[32] = {1};
$ gcc -O -S try.c
.file "try.c"
.globl foo
.data
.align 32 <<< HERE , what a mess >>
.type foo, @object
.size foo, 32
foo:
.byte 1
.zero 31
.ident "GCC: (GNU) 4.4.0"
.section .note.GNU-stack,"",@progbitsIt makes many .o kernel files marked with a 2**5 alignement of .data or percpudata At link time, it creates many holes.
In my opinion, gcc should have a separate option than -Os, as this as too expensive side effects on the code speed.
I can save lot of data space if I patch gcc-4.4.0/config/i386/i386.c
to :
/* Compute the alignment for a static variable.
TYPE is the data type, and ALIGN is the alignment that the object would ordinarily have. The value of this function is used instead of that alignment to align the object. */
intix86_data_alignment (tree type, int align)
{
- int max_align = optimize_size ? BITS_PER_WORD : MIN (256, MAX_OFILE_ALIGNMENT);
+ int max_align = BITS_PER_WORD;
if (AGGREGATE_TYPE_P (type)
&& TYPE_SIZE (type)
&& TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST
&& (TREE_INT_CST_LOW (TYPE_SIZE (type)) >= (unsigned) max_align
|| TREE_INT_CST_HIGH (TYPE_SIZE (type)))
&& align < max_align)
align = max_align;
/* x86-64 ABI requires arrays greater than 16 bytes to be aligned
to 16byte boundary. */
if (TARGET_64BIT)
{
if (AGGREGATE_TYPE_P (type)
&& TYPE_SIZE (type)
&& TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST
&& (TREE_INT_CST_LOW (TYPE_SIZE (type)) >= 128
|| TREE_INT_CST_HIGH (TYPE_SIZE (type))) && align < 128)
return 128;_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH 03/14] x86, config: change defaults PHYSICAL_START and PHYSICAL_ALIGN
In reply to Sam RavnborgQuoted 34 lines · Sam Ravnborg
Quoted 33 lines · H. Peter Anvin
From: H. Peter Anvin <[email protected]>
Change the default for
CONFIG_PHYSICAL_STARTto 16 MB; 4 MB if EMBEDDED. Change the default forCONFIG_PHYSICAL_ALIGNto match up with a large page alignment datum (4 MB for non-PAE, 2 MB for PAE.)The default of 16 MB is designed to avoid occupying
ZONE_DMA, as well as avoiding a 15-16 MB memory hole, which some vendors inexplicably still have in their systems.[ Impact: minor performance improvement, leave
ZONE_DMAfree ]Signed-off-by H. Peter Anvin <[email protected]>--- arch/x86/Kconfig | 19 +++++++++++-------- 1 files changed, 11 insertions(+), 8 deletions(-)arch/x86/Kconfig +2
-3@@ -1455,17 +1455,20 @@ config KEXEC_JUMP config PHYSICAL_START hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP) - default "0x1000000" if X86_NUMAQ - default "0x200000" if X86_64 - default "0x100000" + default "0x400000" if EMBEDDED + default "0x1000000" ---help--- This gives the physical address where the kernel is loaded.
Quoted 15 lines
arch/x86/Kconfig config KEXEC_JUMP · line 1471
Quoted 12 lines
arch/x86/Kconfig +7
-3If kernel is a not relocatable (CONFIG_RELOCATABLE=n) then bzImage will decompress itself to above physical address and - run from there. Otherwise, bzImage will run from the address where - it has been loaded by the boot loader and will ignore above physical - address. + run from there. Otherwise, bzImage will run from the either + the above physical address or where it has been loaded by + the boot loader, whichever is higher. + + For embedded machines with very small memory (less than + about 24 MB) this may need to be adjusted downward from the + default value of 0x1000000 (16 MB).But in the above you say that default is "
0x400000" if EMBEDDED That is in contradiction with the help - no?
Yes, the help text is wrong.
Ingo
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
H. Peter Anvin
reviewerRe: [PATCH 01/14] x86, boot: align the .bss section in the decompressor
In reply to Sam RavnborgQuoted 15 lines · Sam Ravnborg
arch/x86/boot/compressed/vmlinux.lds.S SECTIONS · line 45
Quoted 2 lines
arch/x86/boot/compressed/vmlinux.lds.S +1
-0} + . = ALIGN(32);Where does this magic 32 comes from?
I would assume the better choice would be:. = ALIGN(L1_CACHE_BYTES);So we match the relevant CPU.
In general for alignmnet of output sections I see the need for:
1) Function call
2)L1_CACHE_BYTES
3)PAGE_SIZE
4) 2*PAGE_SIZE
Quoted 4 lines
But I see magic constant used here and there that does not match the above (when looking at all archs).
So I act when I see a new 'magic' number..
I picked 32 as being larger than the maximum known size that affects rep performance, but L1_CACHE_BYTES really would make more sense, you're right.
-hpa
Signature · 8 lines
H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf. _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
H. Peter Anvin
reviewerRe: [PATCH 02/14] x86, boot: honor CONFIG_PHYSICAL_START when relocatable
In reply to Sam RavnborgQuoted 10 lines · Sam Ravnborg
On the coding style side of thing...
arch/x86/boot/compressed/head_32.S ENTRY(startup_32) · line 71
Quoted 4 lines
arch/x86/boot/compressed/head_32.S +4
-0+ movl %ebp, %ebx + cmpl %ebx, %eax + jbe 1f + movl %eax, %ebxThis looks messy with different idention of the operand.
Compare it to this:
Quoted 8 lines
arch/x86/boot/compressed/head_32.S ENTRY(startup_32) · line 71
Quoted 4 lines
arch/x86/boot/compressed/head_32.S +4
-0+ movl %ebp, %ebx + cmpl %ebx, %eax + jbe 1f + movl %eax, %ebxI like the latter more with vertical alignment of the operand. I see that you add spaces around operators (,) - good.
head_32.S was already written in the style with space (rather than tab) between opcode and operands. There was a total of three instructions that didn't follow the pattern. Re-styling the whole file is possible, of course, but should be a separate patch entirely.
Quoted 11 lines
arch/x86/boot/compressed/head_32.S ENTRY(startup_32) · line 107
Quoted 8 lines
arch/x86/boot/compressed/head_32.S +4
-3pushl %esi - leal _ebss(%ebp), %esi - leal _ebss(%ebx), %edi - movl $(_ebss - startup_32), %ecx + leal (_bss-4)(%ebp), %esi + leal (_bss-4)(%ebx), %edi + movl $(_bss - startup_32), %ecx + shrl $2, %ecxI do not see why you mess around with
_bsshere?
Do you use .bss for decompression?
This chunk of code is about moving the initialized segments into place.
Moving the contents of the bss is a bug (and it clobbers the stack, the
setup of which I moved earlier in the code.)
However, using _edata would give an unaligned symbol, so use _bss instead as being an aligned symbol at the beginning of the _bss; we thus move the range from startup_32 to _bss.
-hpa
Signature · 8 lines
H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf. _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
H. Peter Anvin
reviewerRe: [PATCH 03/14] x86, config: change defaults PHYSICAL_START and PHYSICAL_ALIGN
In reply to Sam RavnborgQuoted 17 lines · Sam Ravnborg
Quoted 17 lines
arch/x86/Kconfig +2
-3@@ -1455,17 +1455,20 @@ config KEXEC_JUMP config PHYSICAL_START hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP) - default "0x1000000" if X86_NUMAQ - default "0x200000" if X86_64 - default "0x100000" + default "0x400000" if EMBEDDED + default "0x1000000" ---help--- This gives the physical address where the kernel is loaded.
Quoted 16 lines
arch/x86/Kconfig config KEXEC_JUMP · line 1471
Quoted 12 lines
arch/x86/Kconfig +7
-3If kernel is a not relocatable (CONFIG_RELOCATABLE=n) then bzImage will decompress itself to above physical address and - run from there. Otherwise, bzImage will run from the address where - it has been loaded by the boot loader and will ignore above physical - address. + run from there. Otherwise, bzImage will run from the either + the above physical address or where it has been loaded by + the boot loader, whichever is higher. + + For embedded machines with very small memory (less than + about 24 MB) this may need to be adjusted downward from the + default value of 0x1000000 (16 MB).But in the above you say that default is "
0x400000" if EMBEDDED That is in contradiction with the help - no?
0x1000000 really should be the default value. The "0x400000" if EMBEDDED I put in to make the risk of throwing something surprising on embedded people somewhat smaller; I'm not sure if it should go away entirely. Even if it doesn't, I do think referring to 16 MB as the "default value" is right.
BTW, it would be nice to have Kconfig deal with:
a) numbers that must be powers of 2;
b) suffixes like "16M" instead of "0x1000000". ;)
-hpa
Signature · 8 lines
H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf. _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
H. Peter Anvin
reviewerRe: [PATCH 01/14] x86, boot: align the .bss section in the decompressor
In reply to Cyrill GorcunovQuoted 17 lines · Cyrill Gorcunov
|
| diff --git a/arch/x86/boot/compressed/vmlinux.lds.S b/arch/x86/boot/compressed/vmlinux.lds.S
| index 0d26c92..27c168d 100644
| --- a/arch/x86/boot/compressed/vmlinux.lds.S
| +++ b/arch/x86/boot/compressed/vmlinux.lds.S
| @@ -42,6 +42,7 @@ SECTIONS
| *(.data.*)
| _edata = . ;
| }
| + . = ALIGN(32);
| .bss : {
| _bss = . ;
| *(.bss)
| --
| 1.6.0.6
| Quoted 4 lines
Hi Peter, should not it be ALIGN(8) rather? I thought we keep these sections as tight as possible in a sake of limitation of setup code size. Perhaps I miss something.
This isn't the setup code at all. This is the actual kernel, although in its compressed form. Furthermore, this is the bss, so it doesn't affect the compressed image size.
-hpa
Signature · 8 lines
H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf. _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH 01/14] x86, boot: align the .bss section in the decompressor
[H. Peter Anvin - Fri, May 08, 2009 at 10:03:34AM -0700]
| Cyrill Gorcunov wrote:
| > |
| > | diff --git a/arch/x86/boot/compressed/vmlinux.lds.S b/arch/x86/boot/compressed/vmlinux.lds.S
| > | index 0d26c92..27c168d 100644
| > | --- a/arch/x86/boot/compressed/vmlinux.lds.S
| > | +++ b/arch/x86/boot/compressed/vmlinux.lds.S
| > | @@ -42,6 +42,7 @@ SECTIONS
| > | *(.data.*)
| > | _edata = . ;
| > | }
| > | + . = ALIGN(32);
| > | .bss : {
| > | _bss = . ;
| > | *(.bss)
| > | --
| > | 1.6.0.6
| > |
| >
| > Hi Peter, should not it be ALIGN(8) rather? I thought
| > we keep these sections as tight as possible in a sake
| > of limitation of setup code size. Perhaps I miss something.
| >
|
| This isn't the setup code at all. This is the actual kernel, although
| in its compressed form. Furthermore, this is the bss, so it doesn't
| affect the compressed image size.
|
| -hpa
| yeah, unfortunately I reveal that when my mail already gone. though I don't understand why 32 is there... could you please?
-- Cyrill
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
H. Peter Anvin
reviewerRe: [PATCH 01/14] x86, boot: align the .bss section in the decompressor
Quoted 4 lines · Cyrill Gorcunov
yeah, unfortunately I reveal that when my mail already gone. though I don't understand why 32 is there... could you please?
See my answer to Sam asking the same question.
-hpa
Signature · 8 lines
H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf. _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
Quoted 20 lines · Eric W. Biederman
Quoted 9 lines
Quoted 6 lines
The direction of this patch seems reasonable. The details are broken. The common case for relocatable kernels today is kdump. A situation with very minimal memory. In that situation the kernel needs to run where we put it, modifying the kernel to not run where it gets put is a problem.
I thought in the kdump case you typically loaded it pretty high? Either which way, kdump is always loaded by kexec, so it should just be a matter of updating kexec to zero the
runtime_startfield, no?Yes. In practice it doesn't matter. I just don't want to get into a contest with the kernel about who knows better how to put the kernel in memory the bootloader or the kernel decompressor.
Quoted 5 lines
Basically
this is the bootloader saying "do what I say, dammit." Since the existing protocol doesn't have a way to unambiguously communicate one direction versus another (see below), it seems like a relatively small issue involving only one tool. Suboptimal, yes.
Quoted 4 lines
The existing protocol doesn't have the option of anything else.
Physical start has always been <= the alignment for x86 and
x86_64, in any real world configuration.
That assumption seems to be the fundamental flaw of the relocation protocol as written, and rather quite what provoked this whole thing. We really would want to run at above 16 MB for not just 15 MB hole but also for ZONE_DMA reasons.
Quoted 8 lines
Something goofy may have happened during unification, I thought I had removed physical start as totally unnecessary from
x86_64.In the non-kdump case this is interesting. I know of instances where kexec is burned in firmware. So I am strongly reluctant to make anything that feels like a true backwards incompatible change.
Those systems also don't have the stupid 15MB hole either.
OK, kexec in firmware is probably a showstopper... assuming *those* kexec instances care about the exact final location of the code. Otherwise, if all they are doing is loading the kernel and want it to take over the machine, the proposed behavior (realign the kernel to a more optimal point) is pretty much The Right Thing. Could you expand on this use case? This seems like a key piece of the puzzle.
It's pretty well understood that we can't require changes for the tons of deployed bootloaders, but at the same time we're stuck in a case with overloading semantics that have to be disambiguated.
Quoted 8 lines
On the 64bit kernel 2MB really is required. We run at a fixed virtual address and use 2MB pages. So anything less that 2MB really won't work.
So I think it would be a bad idea if we had bootloaders ignoring the alignment.
With the suggested start address, it probably make sense to only export our true alignment requirement.
On 32 bits (which is the only case where one megabyte could possibly matter) we *can* run at 1 MB, and that was the main case I was worrying about there. On the other hand, even very early Linux just barely ran in 4 MB of RAM, and perhaps an alignment restriction of 4 MB (the non-PAE case) handles even the smallest configurations? If so we can probably get away with just disallowing alignment < 2 MB and use your solution.
Quoted 7 lines
Quoted 6 lines
Quoted 2 lines
I expect we will still want to update kexec to be able to take advantage of
loadtime_size(runtime_sizeseems like the wrong name).Well, it is the amount of memory the kernel needs during runtime (as opposed to during loading.) I admit it's not an ideal name, though. On the other hand, simply calling it
kernel_startandkernel_sizeseemed ambiguous.
Quoted 7 lines
It is the amount of memory we need before a true memory allocator is initialized. Essentially text+data+bss. How about we call it
init_size?Perhaps we should have:
init_size
best start (As a 64bit field please)
optimum align (Or we flip it around)
I did think about that (64 bits), but I came to the conclusion that in any case were we're supporting loading over 4 GB we need to be fully relocatable anyway -- plus we need a whole bunch of other protocol changes. This is not in itself a reason not to do it, but the size of the initialized header is limited to just over 127 bytes without a much bigger change (since the size of the structure has to fit inside a single signed byte at 0x201).
-hpa
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 6 lines · Eric W. Biederman
Perhaps we should have:
init_size
best start (As a 64bit field please)
optimum align (Or we flip it around)
Thinking about this some more, I think you have a very good idea here.
Specifically, if we retcon the existing kernel_alignment field as "preferred alignment" (ignoring the naming issue for a bit), we can set that to 16 MB, which should give us correct behavior for all previously existing bootloaders. Then we create a new "minimum alignment" field that newer bootloaders can use to relax the alignment requirement -- all the way down to 4K in the case of i386. We document this field indicating that the bootloader should find the highest power of 2 <= preferred alignment, but down to this number.
The preferred address field becomes a readonly, advisory field; with it being readonly there aren't any funny issues with a strange loader writing a 64-bit address for a kernel which can't handle it (64-bit loading will still need substantial protocol changes, including how to find the entry point.)
Does that work for you? That *should* address all your concerns, right?
-hpa
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH 05/14] kbuild: allow compressors (gzip, bzip2, lzma) to take multiple inputs
In reply to Sam RavnborgQuoted 12 lines · Sam Ravnborg
Quoted 12 lines
scripts/bin_size +1
-1@@ -1,10 +1,14 @@ #!/bin/sh if [ $# = 0 ] ; then - echo Usage: $0 file + echo Usage: $0 file... fi
Quoted 12 lines
scripts/bin_size line 14
Quoted 9 lines
scripts/bin_size +5
-1-size_dec=`stat -c "%s" $1` +size_dec=0 +for file; do + fsize=`stat -c "%s" $file` + size_dec=`expr $size_dec + $fsize` +done size_hex_echo_string=`printf "%08x" $size_dec | sed 's/\(..\)\(..\)\(..\)\(..\)/\\\\x\4\\\\x\3\\\\x\2\\\\x\1/g'` /bin/echo -ne $size_hex_echo_stringBut I would rather have had this inside makefile.lib...
It's messy enough as a shell script... it seems like baking it into Makefile syntax would make it even worse.
-hpa
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH 05/14] kbuild: allow compressors (gzip, bzip2, lzma) to take multiple inputs
Quoted 26 lines · H. Peter Anvin
Quoted 12 lines · Sam Ravnborg
Quoted 12 lines
scripts/bin_size +0
-0@@ -1,10 +1,14 @@ #!/bin/shif [ $# = 0 ] ; then
scripts/bin_size +1
-1- echo Usage: $0 file + echo Usage: $0 file...fi
Quoted 12 lines
Quoted 9 lines
scripts/bin_size +5
-1-size_dec=`stat -c "%s" $1` +size_dec=0 +for file; do + fsize=`stat -c "%s" $file` + size_dec=`expr $size_dec + $fsize` +donesize_hex_echo_string=`printf "%08x" $size_dec |
sed 's/\(..\)\(..\)\(..\)\(..\)/\\\\x\4\\\\x\3\\\\x\2\\\\x\1/g'`
/bin/echo-ne $size_hex_echo_stringBut I would rather have had this inside makefile.lib...
Quoted 2 lines
It's messy enough as a shell script... it seems like baking it into
Makefilesyntax would make it even worse.
I did a quick attempt to integrate it in the Makefile - not pretty. So I dropped that idea.
It is mainly that we should not fill up scripts/ with small undocumented scripts.
Could you add something like this in the top of the file:
# Find the sum of the size of all files specified and
# output the size as an escaped hex string. # # Sample: # $ ls -l foo # $ -rw-rw-r-- 1 xxx xxx 146 May 8 22:28 foo # $ bin_size foo # $ \\x92\\x00\\x00\\x00 # 146 equals 92 hex
Sam
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
H. Peter Anvin
reviewerRe: [PATCH 05/14] kbuild: allow compressors (gzip, bzip2, lzma) to take multiple inputs
Quoted 10 lines · Sam Ravnborg
I did a quick attempt to integrate it in the
Makefile- not pretty. So I dropped that idea.It is mainly that we should not fill up
scripts/with small undocumented scripts.Could you add something like this in the top of the file:
# Find the sum of the size of all files specified and
Quoted 9 lines
# output the size as an escaped hex string. # # Sample: # $ ls -l foo # $ -rw-rw-r-- 1 xxx xxx 146 May 8 22:28 foo # $ bin_size foo # $ \\x92\\x00\\x00\\x00 # 146 equals 92 hex
OK, I see your point (especially since that's not what it does.)
To be honest, how ugly would it be to get a C program in here? Doing this in shell is horrid, and people tend to whine about Perl (which is perfect for this kind of job.)
-hpa
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
H. Peter Anvin
reviewerRe: [PATCH 09/14] x86, boot: add new runtime_address and runtime_size bzImage fields
In reply to Sam RavnborgQuoted 8 lines · Sam Ravnborg
arch/x86/boot/compressed/Makefile suffix_$(CONFIG_KERNEL_GZIP) = gz · line 54
Quoted 4 lines
arch/x86/boot/compressed/Makefile +0
-0@:@@ -50,6 +53,9 @@ suffix_$(CONFIG_KERNEL_GZIP) = gz suffix_$(CONFIG_KERNEL_BZIP2) = bz2 suffix_$(CONFIG_KERNEL_LZMA) = lzmaNo need for a recursive assignment here. Use ":="
Ann we usually uses "-y" not "_y".
Wasn't part of the patch, but OK :)
-hpa
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Sam Ravnborg
Acked-byRe: [PATCH 05/14] kbuild: allow compressors (gzip, bzip2, lzma) to take multiple inputs
In reply to H. Peter AnvinQuoted 21 lines · H. Peter Anvin
Quoted 10 lines · Sam Ravnborg
I did a quick attempt to integrate it in the
Makefile- not pretty. So I dropped that idea.It is mainly that we should not fill up
scripts/with small undocumented scripts.Could you add something like this in the top of the file:
# Find the sum of the size of all files specified and
Quoted 9 lines
# output the size as an escaped hex string. # # Sample: # $ ls -l foo # $ -rw-rw-r-- 1 xxx xxx 146 May 8 22:28 foo # $ bin_size foo # $ \\x92\\x00\\x00\\x00 # 146 equals 92 hex
Quoted 5 lines
OK, I see your point (especially since that's not what it does.)
To be honest, how ugly would it be to get a C program in here? Doing this in shell is horrid, and people tend to whine about Perl (which is perfect for this kind of job.)
Lets just include it in the Makefile and be done with it. I took our patch and ended up with this - untested - patch.
If you are OK with this you can add my:
I forgot to delete bin_size - it is no longer needed...
Sam
scripts/Makefile.lib +18 -4
@@ -188,20 +188,34 @@ cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@ # --------------------------------------------------------------------------- quiet_cmd_gzip = GZIP $@ -cmd_gzip = gzip -f -9 < $< > $@ +cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -f -9 > $@) || \ + (rm -f $@ ; false) # Bzip2 # --------------------------------------------------------------------------- # Bzip2 does not include size in file... so we have to fake that -size_append=$(CONFIG_SHELL) $(srctree)/scripts/bin_size +size_append = $(shell \ +dec_size=0; \ +for F in $1; do \ + fsize=$$(stat -c "%s" $$F); \ + dec_size=$$(expr $$dec_size + $$fsize); \ +done; \ +hex=$$(printf "%08x" $$dec_size | \ +sed 's/\(..\)\(..\)\(..\)\(..\)/\\\\x\4\\\\x\3\\\\x\2\\\\x\1/g'); \ +echo -ne $$hex \ +) quiet_cmd_bzip2 = BZIP2 $@ -cmd_bzip2 = (bzip2 -9 < $< && $(size_append) $<) > $@ || (rm -f $@ ; false) +cmd_bzip2 = (cat $(filter-out FORCE,$^) | \ + bzip2 -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ + (rm -f $@ ; false) # Lzma # --------------------------------------------------------------------------- quiet_cmd_lzma = LZMA $@ -cmd_lzma = (lzma -9 -c $< && $(size_append) $<) >$@ || (rm -f $@ ; false) +cmd_lzma = (cat $(filter-out FORCE,$^) | \ + lzma -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ + (rm -f $@ ; false)
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH 09/14] x86, boot: add new runtime_address and runtime_size bzImage fields
In reply to H. Peter AnvinQuoted 11 lines · H. Peter Anvin
Quoted 8 lines · Sam Ravnborg
Quoted 4 lines
@:(quoted diff) +0
-0@@ -50,6 +53,9 @@ suffix_$(CONFIG_KERNEL_GZIP) = gzsuffix_$(CONFIG_KERNEL_BZIP2) = bz2
suffix_$(CONFIG_KERNEL_LZMA) = lzmaNo need for a recursive assignment here. Use ":="
Ann we usually uses "-y" not "_y".Wasn't part of the patch, but OK :)
I overlooked that fact - I often just review what I can see. (In other words - I should have caught that detail when the original patch was posted...)
Sam
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
H. Peter Anvin
reviewerRFC: x86: relocatable kernel changes (revised spec)
In reply to H. Peter AnvinRevised proposal to address Eric's comments. This is intended to provide full backwards compatibility while at the same time giving us the future flexibility.
The intent will be to set by default:
kernel_alignment = 16 MB min_alignment = log2(4K) or log2(2M) pref_address = 16 MB
The reason to represent min_alignment as a logarithm is that I'm getting very concerned about the diminishing space that is left without a fundamental change to the initialized part of the header; specifically, right now we rely on the signed byte at offset 0x201 to contain the (additional) size of the header, which means end at 0x281 without a major format change of some sort.
Comments appreciated.
-hpa
Signature · 2 lines
H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf.
Documentation/x86/boot.txt +52 -4
@@ -50,6 +50,11 @@ Protocol 2.08: (Kernel 2.6.26) Added crc32 checksum and ELF format Protocol 2.09: (Kernel 2.6.26) Added a field of 64-bit physical pointer to single linked list of struct setup_data. +Protocol 2.10: (Kernel 2.6.31?) A protocol for relaxed alignment + beyond the kernel_alignment added, new init_size and + pref_address fields. + + **** MEMORY LAYOUT The traditional memory map for the kernel loader, used for Image or
@@ -173,7 +178,7 @@ Offset Proto Name Meaning 022C/4 2.03+ ramdisk_max Highest legal initrd address 0230/4 2.05+ kernel_alignment Physical addr alignment required for kernel 0234/1 2.05+ relocatable_kernel Whether kernel is relocatable or not -0235/1 N/A pad2 Unused +0235/1 2.10+ min_alignment Minimum alignment, as a power of 2 0236/2 N/A pad3 Unused 0238/4 2.06+ cmdline_size Maximum size of the kernel command line 023C/4 2.07+ hardware_subarch Hardware subarchitecture
@@ -182,6 +187,8 @@ Offset Proto Name Meaning 024C/4 2.08+ payload_length Length of kernel payload 0250/8 2.09+ setup_data 64-bit physical pointer to linked list of struct setup_data +0258/8 2.10+ pref_address Preferred loading address +0260/4 2.10+ init_size Linear memory required during initialization (1) For backwards compatibility, if the setup_sects field contains 0, the real value is 4.
@@ -482,11 +489,15 @@ Protocol: 2.03+ 0x37FFFFFF, you can start your ramdisk at 0x37FE0000.) Field name: kernel_alignment -Type: read (reloc) +Type: read/modify (reloc) Offset/size: 0x230/4 -Protocol: 2.05+ +Protocol: 2.05+ (read), 2.10+ (modify) - Alignment unit required by the kernel (if relocatable_kernel is true.) + Alignment unit required by the kernel (if relocatable_kernel is + true.) Starting with protocol version 2.10, this reflects the + kernel alignment preferred for optimal performance and can be + modified by the loader; see the min_alignment and pref_address field + below. Field name: relocatable_kernel Type: read (reloc)
@@ -498,6 +509,22 @@ Protocol: 2.05+ After loading, the boot loader must set the code32_start field to point to the loaded code, or to a boot loader hook. +Field name: min_alignment +Type: read (reloc) +Offset/size: 0x235/1 +Protocol: 2.10+ + + This field, if nonzero, indicates as a power of 2 the minimum + alignment required, as opposed to preferred, by the kernel to boot. + If a boot loader makes use of this field, it should update the + kernel_alignment field with the alignment unit desired; typically: + + kernel_alignment = 1 << min_alignment + + There may be a considerable performance cost with an excessively + misaligned kernel. Therefore, a loader should typically try each + power-of-two alignment from kernel_alignment down to this alignment. + Field name: cmdline_size Type: read Offset/size: 0x238/4
@@ -582,6 +609,27 @@ Protocol: 2.09+ sure to consider the case where the linked list already contains entries. +Field name: pref_address +Type: read (reloc) +Offset/size: 0x258/8 +Protocol: 2.10+ + + This field, if nonzero, represents a preferred load address for the + kernel. A relocating bootloader should attempt to load at this + address if possible. + + +Field name: init_size +Type: read +Offset/size: 0x25c/4 + + This field indicates the amount of linear contiguous memory starting + at the kernel load address (rounded up to kernel_alignment) that the + kernel needs before it is capable of examining its memory map. This + is not the same thing as the total amount of memory the kernel needs + to boot, but it can be used by a relocating boot loader to help + select a safe load address for the kernel. + **** THE IMAGE CHECKSUM
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Re: RFC: x86: relocatable kernel changes (revised spec)
Quoted 10 lines · H. Peter Anvin
Revised proposal to address Eric's comments. This is intended to provide full backwards compatibility while at the same time giving us the future flexibility.
The intent will be to set by default:
kernel_alignment = 16 MB min_alignment = log2(4K) or log2(2M) pref_address = 16 MB
Quoted 6 lines
The reason to represent
min_alignmentas a logarithm is that I'm getting very concerned about the diminishing space that is left without a fundamental change to the initialized part of the header; specifically, right now we rely on the signed byte at offset0x201to contain the (additional) size of the header, which means end at0x281without a major format change of some sort.
Thanks for concentrating on this.
Here is my first round of comments.
Quoted 49 lines
Comments appreciated.
-hpa
Signature · 2 lines
H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf.Documentation/x86/boot.txt +9
-2@@ -50,6 +50,11 @@ Protocol 2.08: (Kernel 2.6.26) Added crc32 checksum and ELF format Protocol 2.09: (Kernel 2.6.26) Added a field of 64-bit physical pointer to single linked list of struct setup_data. +Protocol 2.10: (Kernel 2.6.31?) A protocol for relaxed alignment + beyond the kernel_alignment added, new init_size and + pref_address fields. + + **** MEMORY LAYOUT The traditional memory map for the kernel loader, used for Image or@@ -173,7 +178,7 @@ Offset Proto Name Meaning 022C/4 2.03+ ramdisk_max Highest legal initrd address 0230/4 2.05+ kernel_alignment Physical addr alignment required for kernel 0234/1 2.05+ relocatable_kernel Whether kernel is relocatable or not -0235/1 N/A pad2 Unused +0235/1 2.10+ min_alignment Minimum alignment, as a power of 2 0236/2 N/A pad3 Unused 0238/4 2.06+ cmdline_size Maximum size of the kernel command line 023C/4 2.07+ hardware_subarch Hardware subarchitecture@@ -182,6 +187,8 @@ Offset Proto Name Meaning 024C/4 2.08+ payload_length Length of kernel payload 0250/8 2.09+ setup_data 64-bit physical pointer to linked list of struct setup_data +0258/8 2.10+ pref_address Preferred loading address +0260/4 2.10+ init_size Linear memory required during initialization (1) For backwards compatibility, if the setup_sects field contains 0, the real value is 4.@@ -482,11 +489,15 @@ Protocol: 2.03+ 0x37FFFFFF, you can start your ramdisk at 0x37FE0000.) Field name: kernel_alignment -Type: read (reloc) +Type: read/modify (reloc) Offset/size: 0x230/4
Documentation/x86/boot.txt Protocol: 2.03+ · line 501
Quoted 10 lines
Documentation/x86/boot.txt +6
-2-Protocol: 2.05+ +Protocol: 2.05+ (read), 2.10+ (modify) - Alignment unit required by the kernel (if relocatable_kernel is true.) + Alignment unit required by the kernel (if relocatable_kernel is + true.) Starting with protocol version 2.10, this reflects the + kernel alignment preferred for optimal performance and can be + modified by the loader; see the min_alignment and pref_address field + below.
Can we say:
This reflects the kernel alignment preferred for optimal performance.
A relocatable kernel will always run with the alignment specified in this field so a relocating bootloader that loads the kernel at a lesser alignment must update this field.
Quoted 27 lines
Documentation/x86/boot.txt +16
-0Field name: relocatable_kernel Type: read (reloc)@@ -498,6 +509,22 @@ Protocol: 2.05+ After loading, the boot loader must set the code32_start field to point to the loaded code, or to a boot loader hook. +Field name: min_alignment +Type: read (reloc) +Offset/size: 0x235/1 +Protocol: 2.10+ + + This field, if nonzero, indicates as a power of 2 the minimum + alignment required, as opposed to preferred, by the kernel to boot. + If a boot loader makes use of this field, it should update the + kernel_alignment field with the alignment unit desired; typically: + + kernel_alignment = 1 << min_alignment + + There may be a considerable performance cost with an excessively + misaligned kernel. Therefore, a loader should typically try each + power-of-two alignment from kernel_alignment down to this alignment. + Field name: cmdline_size Type: read Offset/size: 0x238/4@@ -582,6 +609,27 @@ Protocol: 2.09+ sure to consider the case where the linked list already contains
Documentation/x86/boot.txt Protocol: 2.09+ · line 619
Quoted 10 lines
Documentation/x86/boot.txt +8
-0entries. +Field name: pref_address +Type: read (reloc) +Offset/size: 0x258/8 +Protocol: 2.10+ + + This field, if nonzero, represents a preferred load address for the + kernel. A relocating bootloader should attempt to load at this + address if possible.
We should document that a non-relocating kernel moves itself here.
Documentation/x86/boot.txt Protocol: 2.09+ · line 631
Quoted 10 lines
Documentation/x86/boot.txt +10
-0+Field name: init_size +Type: read +Offset/size: 0x25c/4 + + This field indicates the amount of linear contiguous memory starting + at the kernel load address (rounded up to kernel_alignment) that the + kernel needs before it is capable of examining its memory map. This + is not the same thing as the total amount of memory the kernel needs + to boot, but it can be used by a relocating boot loader to help + select a safe load address for the kernel.
This wording is a bit unclear.
Can we finally say that it is safe to put the initrd immediately after the kernel?
The rounding up part of that comment is unclear.
...
Peter did your implementation of init_size take into account the maximum expansion during decompression? At a quick glance at your previous patches I couldn't tell. I know were in that direction with zoffset.h and voffset.h but I don't recognize the formula for where I put the pic decompressor in your calculation of this.
Eric
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
H. Peter Anvin
reviewerRe: RFC: x86: relocatable kernel changes (revised spec)
Quoted 14 lines · Eric W. Biederman
Documentation/x86/boot.txt Protocol: 2.09+ · line 631
Quoted 11 lines
Documentation/x86/boot.txt +10
-0+Field name: init_size +Type: read +Offset/size: 0x25c/4 + + This field indicates the amount of linear contiguous memory starting + at the kernel load address (rounded up to kernel_alignment) that the + kernel needs before it is capable of examining its memory map. This + is not the same thing as the total amount of memory the kernel needs + to boot, but it can be used by a relocating boot loader to help + select a safe load address for the kernel.This wording is a bit unclear.
Quoted 3 lines
Can we finally say that it is safe to put the initrd immediately after the kernel?
I *believe* we can, as the brk limit checking should catch overruns. The only question is whether or not there will me memory allocated off the memory map before the initrd is reserved; I *think* the answer is no but I haven't done the audit.
Quoted 1 line
The rounding up part of that comment is unclear.
The rounding up was to reflect the automatic moving upwards from the load address to the next kernel_alignment datum.
Quoted 5 lines
Peter did your implementation of
init_sizetake into account the maximum expansion during decompression? At a quick glance at your previous patches I couldn't tell. I know were in that direction withzoffset.handvoffset.hbut I don't recognize the formula for where I put the pic decompressor in your calculation of this.
It does take it into account. The pic decompressor is located at (ZO_)z_extract_offset; the actual formula moved into mkpiggy.c.
I have regenerated the tip:x86/kbuild-phys branch to be only cleanups (with the intent of putting the policy changes cleanly on top), and much better structured. I hadn't originally expected this to turn into so much of a cleanup effort.
http://git.kernel.org/?p=linux/kernel/git/x86/linux-2.6-tip.git;a=shortlog;h=x86/kbuild-phys
This checkin, in particular, should answer that question, I believe:
-hpa
Signature · 8 lines
H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf. _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
H. Peter Anvin
reviewerRe: RFC: x86: relocatable kernel changes (revised spec v2)
In reply to Eric W. BiedermanDoes this look better?
-hpa
Documentation/x86/boot.txt +65 -4
@@ -50,6 +50,11 @@ Protocol 2.08: (Kernel 2.6.26) Added crc32 checksum and ELF format Protocol 2.09: (Kernel 2.6.26) Added a field of 64-bit physical pointer to single linked list of struct setup_data. +Protocol 2.10: (Kernel 2.6.31?) A protocol for relaxed alignment + beyond the kernel_alignment added, new init_size and + pref_address fields. + + **** MEMORY LAYOUT The traditional memory map for the kernel loader, used for Image or
@@ -173,7 +178,7 @@ Offset Proto Name Meaning 022C/4 2.03+ ramdisk_max Highest legal initrd address 0230/4 2.05+ kernel_alignment Physical addr alignment required for kernel 0234/1 2.05+ relocatable_kernel Whether kernel is relocatable or not -0235/1 N/A pad2 Unused +0235/1 2.10+ min_alignment Minimum alignment, as a power of 2 0236/2 N/A pad3 Unused 0238/4 2.06+ cmdline_size Maximum size of the kernel command line 023C/4 2.07+ hardware_subarch Hardware subarchitecture
@@ -182,6 +187,8 @@ Offset Proto Name Meaning 024C/4 2.08+ payload_length Length of kernel payload 0250/8 2.09+ setup_data 64-bit physical pointer to linked list of struct setup_data +0258/8 2.10+ pref_address Preferred loading address +0260/4 2.10+ init_size Linear memory required during initialization (1) For backwards compatibility, if the setup_sects field contains 0, the real value is 4.
@@ -482,11 +489,19 @@ Protocol: 2.03+ 0x37FFFFFF, you can start your ramdisk at 0x37FE0000.) Field name: kernel_alignment -Type: read (reloc) +Type: read/modify (reloc) Offset/size: 0x230/4 -Protocol: 2.05+ +Protocol: 2.05+ (read), 2.10+ (modify) - Alignment unit required by the kernel (if relocatable_kernel is true.) + Alignment unit required by the kernel (if relocatable_kernel is + true.) A relocatable kernel that is loaded at an alignment + incompatible with the value in this field will be realigned during + kernel initialization. + + Starting with protocol version 2.10, this reflects the kernel + alignment preferred for optimal performance; it is possible for the + loader to modify this field to permit a lesser alignment. See the + min_alignment and pref_address field below. Field name: relocatable_kernel Type: read (reloc)
@@ -498,6 +513,22 @@ Protocol: 2.05+ After loading, the boot loader must set the code32_start field to point to the loaded code, or to a boot loader hook. +Field name: min_alignment +Type: read (reloc) +Offset/size: 0x235/1 +Protocol: 2.10+ + + This field, if nonzero, indicates as a power of 2 the minimum + alignment required, as opposed to preferred, by the kernel to boot. + If a boot loader makes use of this field, it should update the + kernel_alignment field with the alignment unit desired; typically: + + kernel_alignment = 1 << min_alignment + + There may be a considerable performance cost with an excessively + misaligned kernel. Therefore, a loader should typically try each + power-of-two alignment from kernel_alignment down to this alignment. + Field name: cmdline_size Type: read Offset/size: 0x238/4
@@ -582,6 +613,36 @@ Protocol: 2.09+ sure to consider the case where the linked list already contains entries. +Field name: pref_address +Type: read (reloc) +Offset/size: 0x258/8 +Protocol: 2.10+ + + This field, if nonzero, represents a preferred load address for the + kernel. A relocating bootloader should attempt to load at this + address if possible. + + A non-relocatable kernel will unconditionally move itself and to run + at this address. + +Field name: init_size +Type: read +Offset/size: 0x25c/4 + + This field indicates the amount of linear contiguous memory starting + at the kernel runtime start address that the kernel needs before it + is capable of examining its memory map. This is not the same thing + as the total amount of memory the kernel needs to boot, but it can + be used by a relocating boot loader to help select a safe load + address for the kernel. + + The kernel runtime start address is determined by the following algorithm: + + if (relocatable_kernel) + runtime_start = align_up(load_address, kernel_alignment) + else + runtime_start = pref_address + **** THE IMAGE CHECKSUM
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec