30 Sep, 2015

1 commit

  • commit 2d3862d26e67a59340ba1cf1748196c76c5787de upstream.

    When loading x86 64bit kernel above 4GiB with patched grub2, got kernel
    gunzip error.

    | early console in decompress_kernel
    | decompress_kernel:
    | input: [0x807f2143b4-0x807ff61aee]
    | output: [0x807cc00000-0x807f3ea29b] 0x027ea29c: output_len
    | boot via startup_64
    | KASLR using RDTSC...
    | new output: [0x46fe000000-0x470138cfff] 0x0338d000: output_run_size
    | decompress: [0x46fe000000-0x47007ea29b]
    Cc: Alexandre Courbot
    Cc: Jon Medhurst
    Cc: Stephen Warren
    Cc: "H. Peter Anvin"
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds
    Signed-off-by: Greg Kroah-Hartman

    Yinghai Lu
     

26 Mar, 2012

1 commit

  • All ARCHs have the same definition of MKIMAGE. Move it to Makefile.lib
    to avoid duplication.

    All ARCHs have similar definitions of cmd_uimage. Place a sufficiently
    parameterized version in Makefile.lib to avoid duplication.

    Signed-off-by: Stephen Warren
    Acked-by: Nicolas Pitre
    Tested-by: Mike Frysinger [Blackfin]
    Tested-by: Michal Simek [Microblaze]
    Tested-by: Guan Xuetao [unicore32]
    Signed-off-by: Michal Marek

    Stephen Warren
     

28 Oct, 2011

1 commit

  • Add PHYSICAL_START kernel configuration parameter to set the address at
    which the kernel should be loaded.

    It has been observed on an sh7757lcr that simply modifying MEMORY_START
    does not achieve this goal for 32bit sh. This is due to MEMORY_OFFSET in
    arch/sh/kernel/vmlinux.lds.S bot being based on MEMORY_START on such
    systems.

    Signed-off-by: Simon Horman
    Signed-off-by: Paul Mundt

    Simon Horman
     

06 Jun, 2011

1 commit

  • SH-2A is unable to combine the kernel and libgcc objects due to
    fundamental disagreements over FDPIC settings. As the kernel already
    contains all of the libgcc bits broken out, there's not much need to
    bother with the linking anymore, as everything can already be derived
    from the lib dir.

    This simply plugs in the necessary bits to ensure that everything is
    built uniformly, enabling us to wean the compressed build off of explicit
    libgcc linking.

    Reported-by: Phil Edworthy
    Signed-off-by: Paul Mundt

    Paul Mundt
     

25 Mar, 2011

1 commit

  • This is my second attempt to make this enum generally available.
    The first attempt added MMCIF_PROGRESS_* to include/linux/mmc/sh_mmcif.h.
    However this is not sufficiently generic as the enum will be
    used by SDHI boot code.

    Signed-off-by: Simon Horman
    Signed-off-by: Paul Mundt

    Simon Horman
     

15 Feb, 2011

1 commit

  • This patch enables gcov kernel profiling over the whole kernel for sh.
    Profiling of specific files individually already worked. A handful of
    files have to be explicitly excluded from the profiling to avoid
    breaking things, notably pmb.c.

    Signed-off-by: Chris Smith
    Signed-off-by: Stuart Menefy
    Signed-off-by: Paul Mundt

    Chris Smith
     

14 Jan, 2011

1 commit


08 Dec, 2010

2 commits

  • As the only caller of sh_mmcif_boot_do_read() is
    sh_mmcif_boot_slurp() the configuration portion of
    sh_mmcif_boot_slurp() can be merged into sh_mmcif_boot_do_read().

    Once this is done sh_mmcif_boot_slurp() is only a call
    to sh_mmcif_boot_do_read() with platform specific information -
    the offset that images are stored on MMC. So make the
    sh_mmcif_boot_do_read() call directly from platform code
    and remove sh_mmcif_boot_slurp() altogether.

    Cc: Magnus Damm
    Signed-off-by: Simon Horman
    Signed-off-by: Paul Mundt

    Simon Horman
     
  • Allow MMCIF_PROGRESS_* to be shared.

    Cc: Magnus Damm
    Signed-off-by: Simon Horman
    Signed-off-by: Paul Mundt

    Simon Horman
     

30 Sep, 2010

1 commit

  • Update the SH kernel to keep SR.BL set until the VBR
    register has been initialized. Useful to allow boot
    of the kernel even though exceptions are pending.

    Without this patch there is a window of time when
    exceptions such as NMI are enabled but no exception
    handlers are installed.

    This patch modifies both the zImage loader and the
    actual kernel to boot with BL=1, but the zImage
    loader is modfied in such a way that the init_sr
    value is unchanged to not break the zImage loader
    provided by kexec.

    Tested on sh7724 Ecovec and on the SH4AL-DSP core
    included in sh7372.

    Signed-off-by: Magnus Damm
    Signed-off-by: Paul Mundt

    Magnus Damm
     

05 Jun, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (23 commits)
    sh: Make intc messages consistent via pr_fmt.
    sh: make sure static declaration on ms7724se
    sh: make sure static declaration on mach-migor
    sh: make sure static declaration on mach-ecovec24
    sh: make sure static declaration on mach-ap325rxa
    clocksource: sh_cmt: compute mult and shift before registration
    clocksource: sh_tmu: compute mult and shift before registration
    sh: PIO disabling for x3proto and urquell.
    sh: mach-sdk7786: conditionally disable PIO support.
    sh: support for platforms without PIO.
    usb: r8a66597-hcd pio to mmio accessor conversion.
    usb: gadget: r8a66597-udc pio to mmio accessor conversion.
    usb: gadget: m66592-udc pio to mmio accessor conversion.
    sh: add romImage MMCIF boot for sh7724 and Ecovec V2
    sh: add boot code to MMCIF driver header
    sh: prepare MMCIF driver header file
    sh: allow romImage data between head.S and the zero page
    sh: Add support MMCIF for ecovec
    sh: remove duplicated #include
    input: serio: disable i8042 for non-cayman sh platforms.
    ...

    Linus Torvalds
     

01 Jun, 2010

1 commit

  • * 'for-35' of git://repo.or.cz/linux-kbuild: (81 commits)
    kbuild: Revert part of e8d400a to resolve a conflict
    kbuild: Fix checking of scm-identifier variable
    gconfig: add support to show hidden options that have prompts
    menuconfig: add support to show hidden options which have prompts
    gconfig: remove show_debug option
    gconfig: remove dbg_print_ptype() and dbg_print_stype()
    kconfig: fix zconfdump()
    kconfig: some small fixes
    add random binaries to .gitignore
    kbuild: Include gen_initramfs_list.sh and the file list in the .d file
    kconfig: recalc symbol value before showing search results
    .gitignore: ignore *.lzo files
    headerdep: perlcritic warning
    scripts/Makefile.lib: Align the output of LZO
    kbuild: Generate modules.builtin in make modules_install
    Revert "kbuild: specify absolute paths for cscope"
    kbuild: Do not unnecessarily regenerate modules.builtin
    headers_install: use local file handles
    headers_check: fix perl warnings
    export_report: fix perl warnings
    ...

    Linus Torvalds
     

31 May, 2010

2 commits


26 Apr, 2010

2 commits


03 Mar, 2010

1 commit


01 Mar, 2010

1 commit


18 Feb, 2010

1 commit

  • This implements a bit of rework for the PMB code, which permits us to
    kill off the legacy PMB mode completely. Rather than trusting the boot
    loader to do the right thing, we do a quick verification of the PMB
    contents to determine whether to have the kernel setup the initial
    mappings or whether it needs to mangle them later on instead.

    If we're booting from legacy mappings, the kernel will now take control
    of them and make them match the kernel's initial mapping configuration.
    This is accomplished by breaking the initialization phase out in to
    multiple steps: synchronization, merging, and resizing. With the recent
    rework, the synchronization code establishes page links for compound
    mappings already, so we build on top of this for promoting mappings and
    reclaiming unused slots.

    At the same time, the changes introduced for the uncached helpers also
    permit us to dynamically resize the uncached mapping without any
    particular headaches. The smallest page size is more than sufficient for
    mapping all of kernel text, and as we're careful not to jump to any far
    off locations in the setup code the mapping can safely be resized
    regardless of whether we are executing from it or not.

    Signed-off-by: Paul Mundt

    Paul Mundt
     

16 Feb, 2010

1 commit


28 Jan, 2010

1 commit

  • The VBR value needs to be initialized in order for any of the bios
    trapping to work, and as we don't do that until slightly later in the
    boot process, this has no real chance of working.

    The only reason for using this in the past was due to the fact that early
    serial initialization wasn't possible, but now that early sh-sci is
    supported by everyone, there's no longer any reason to support the
    sh_bios hacks in the first place. Given that, we just kill off the
    references completely.

    Signed-off-by: Paul Mundt

    Paul Mundt
     

13 Jan, 2010

2 commits

  • This introduces some much overdue chainsawing of the fixed PMB support.
    fixed PMB was introduced initially to work around the fact that dynamic
    PMB mode was relatively broken, though they were never intended to
    converge. The main areas where there are differences are whether the
    system is booted in 29-bit mode or 32-bit mode, and whether legacy
    mappings are to be preserved. Any system booting in true 32-bit mode will
    not care about legacy mappings, so these are roughly decoupled.

    Regardless of the entry point, PMB and 32BIT are directly related as far
    as the kernel is concerned, so we also switch back to having one select
    the other.

    With legacy mappings iterated through and applied in the initialization
    path it's now possible to finally merge the two implementations and
    permit dynamic remapping overtop of remaining entries regardless of
    whether boot mappings are crafted by hand or inherited from the boot
    loader.

    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • Plugs in LZO along with the others.

    Signed-off-by: Paul Mundt

    Paul Mundt
     

04 Dec, 2009

1 commit


26 Oct, 2009

2 commits


10 Oct, 2009

1 commit

  • Replace the use of PHYSADDR() with __pa(). PHYSADDR() is based on the
    idea that all addresses in P1SEG are untranslated, so we can access an
    address's physical page as an offset from P1SEG. This doesn't work for
    CONFIG_PMB/CONFIG_PMB_FIXED because pages in P1SEG and P2SEG are used
    for PMB mappings and so can be translated to any physical address.

    Likewise, replace a P1SEGADDR() use with virt_to_phys().

    Signed-off-by: Matt Fleming
    Signed-off-by: Paul Mundt

    Matt Fleming
     

20 Sep, 2009

1 commit

  • Replace the use of CROSS_COMPILE to select a customized
    installkernel script with the possibility to set INSTALLKERNEL
    to select a custom installkernel script when running make:

    make INSTALLKERNEL=arm-installkernel install

    With this patch we are now more consistent across
    different architectures - they did not all support use
    of CROSS_COMPILE.

    The use of CROSS_COMPILE was a hack as this really belongs
    to gcc/binutils and the installkernel script does not change
    just because we change toolchain.

    The use of CROSS_COMPILE caused troubles with an upcoming patch
    that saves CROSS_COMPILE when a kernel is built - it would no
    longer be installable.
    [Thanks to Peter Z. for this hint]

    This patch undos what Ian did in commit:

    0f8e2d62fa04441cd12c08ce521e84e5bd3f8a46
    ("use ${CROSS_COMPILE}installkernel in arch/*/boot/install.sh")

    The patch has been lightly tested on x86 only - but all changes
    looks obvious.

    Acked-by: Peter Zijlstra
    Acked-by: Mike Frysinger [blackfin]
    Acked-by: Russell King [arm]
    Acked-by: Paul Mundt [sh]
    Acked-by: "H. Peter Anvin" [x86]
    Cc: Ian Campbell
    Cc: Tony Luck [ia64]
    Cc: Fenghua Yu [ia64]
    Cc: Hirokazu Takata [m32r]
    Cc: Geert Uytterhoeven [m68k]
    Cc: Kyle McMartin [parisc]
    Cc: Benjamin Herrenschmidt [powerpc]
    Cc: Martin Schwidefsky [s390]
    Cc: Thomas Gleixner [x86]
    Cc: Ingo Molnar [x86]
    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     

24 Aug, 2009

1 commit

  • The SH instruction set has several instructions which accept an 8 bit
    immediate operand. For logical instructions this operand is zero extended,
    for arithmetic instructions the operand is sign extended. After adding an
    option to the assembler to check this, it was found that several pieces
    of assembly code were assuming this behaviour, and in one case
    getting it wrong.

    So this patch explicitly sign extends any immediate operands, which makes
    it obvious what is happening, and fixes the one case which got it wrong.

    Signed-off-by: Stuart Menefy
    Signed-off-by: Paul Mundt

    Stuart Menefy
     

07 Aug, 2009

1 commit


29 Jul, 2009

1 commit

  • This patch contains support for the romImage build target V2.

    The resulting romImage file should be burned to rom
    or flash and could be used as small boot loader.

    Board code should keep their setup code in the file
    romimage.h located in their mach include directory.

    Signed-off-by: Magnus Damm
    Signed-off-by: Paul Mundt

    Magnus Damm
     

21 Jul, 2009

2 commits


12 Jul, 2009

6 commits


11 Jul, 2009

1 commit

  • This adds a general CONFIG_MCOUNT in order to permit mcount generation
    without ftrace support. This is primarily for allowing platforms to
    enable aggressive stack overflow checking without having to enable ftrace
    support. Based on the sparc64 implementation.

    Signed-off-by: Paul Mundt

    Paul Mundt