summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* LoongArch: Add kexec/kdump supportYouling Tang2022-10-102-0/+2
| | | | | | | | | | | | | | | | | | | | | | Add the 64-bit processing support of the LoongArch architecture. For the time being, the quick restart function(kexec) is supported. That is, the "kexec -l" and "kexec -e" commands can be used normally. At the same time, the crash dump function also supports, "kexec -p" operation can be successfully performed, and the vmcore file can be generated. I tested this on LoongArch 3A5000 machine and works as expected, kexec: $ sudo kexec -l /boot/vmlinux --reuse-cmdline $ sudo kexec -e kdump: $ sudo kexec -p /boot/vmlinux-kdump --reuse-cmdline --append="nr_cpus=1" # echo c > /proc/sysrq_trigger Signed-off-by: Youling Tang <tangyouling@loongson.cn> Signed-off-by: Simon Horman <horms@kernel.org>
* x86: Include kexec-mb2-x86.c and multiboot2.h in distributionSimon Horman2019-07-101-0/+1
| | | | | Fixes: 22a2ed55132e ("x86: Support multiboot2 images") Signed-off-by: Simon Horman <horms@verge.net.au>
* x86: Support multiboot2 imagesVarad Gautam2019-07-031-0/+416
| | | | | | | | | | | | Add a new type `multiboot2-x86` that allows loading multiboot2 [1] images within the relocation range specified in the image header. The image is always placed at the lowest available address, regardless of the preference information. [1] https://www.gnu.org/software/grub/manual/multiboot2/multiboot.html Signed-off-by: Varad Gautam <vrd@amazon.de> Signed-off-by: Simon Horman <horms@verge.net.au>
* x86: Update boot parameters definationKairui Song2019-05-311-2/+4
| | | | | | | | | Since kernel commit e6e094e053af75 ("x86/acpi, x86/boot: Take RSDP address from boot params if available"), kernel accept a acpi_rsdp_addr param in boot_params. Sync the x86_linux_param_header to support this param. Signed-off-by: Kairui Song <kasong@redhat.com> Signed-off-by: Simon Horman <horms@verge.net.au>
* x86: Handle 64bit framebuffer memory address properlyKairui Song2019-01-281-2/+5
| | | | | | | | | | | | | | | | | | | In a EFI system, the frame buffer address is 64bit, so currently if the address is beyound 4G, kexec will set wrong address due to truncate. Linux kernel commit ae2ee627dc87 ('efifb: Add support for 64-bit frame buffer addresses') added support for 64bit frame buffer address, an 'ext_lfb_base' field is added as the upper 32-bits of the frame buffer, and introduced a new capability flag 'VIDEO_TYPE_CAPABILITY_64BIT_BASE' to indicate if the extend field is used. This patch adopts this change, set proper extent address and capability flag when the address is beyound 4G. Signed-off-by: Kairui Song <kasong@redhat.com> Signed-off-by: Simon Horman <horms@verge.net.au>
* multiboot-x86: pass framebuffer information when requestedFriedemann Gerold2019-01-281-0/+27
| | | | | | | | | | | | | When the kernel requests video information, pass it the framebuffer information in the multiboot header from the linux framebuffer ioctl's. With the arch specific --reset-vga or --consolve-vga options, purgatory will reset the framebuffer so pass information for standard ega text mode. Signed-off-by: Friedemann Gerold <cinap_lenrek@felloff.net> Signed-off-by: Simon Horman <horms@verge.net.au>
* arm64: fix an issue with kaslr-enabled vmlinuxAKASHI Takahiro2018-04-101-1/+2
| | | | | | | | | | | | | | | | Normally vmlinux for arm64 is of ET_EXEC type, while if built with CONFIG_RANDAMIZE_BASE (that is KASLR), it will be of ET_DYN type. Meanwhile, physical address field of segments in vmlinux has actually the same value as virtual address field. Accordingly, in this case, it totally makes no sense to check for validity of segments against physical memory ranges and, if necessary, relocate them in elf_exec_load() on arm64. This patch allows to unconditionally skip the check on arm64. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Simon Horman <horms@verge.net.au>
* uImage: use 'char *' instead of 'unsigned char *' for uImage_probe()David Woodhouse2017-03-131-3/+3
| | | | | | | | | ... and friends. Again, PPC never cared about the difference, while ARM had to add an explicit cast to work around it, which we can remove now. Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Signed-off-by: Simon Horman <horms@verge.net.au>
* uImage: use 'char *' instead of 'unsigned char *' for uImage_load()David Woodhouse2017-03-131-2/+2
| | | | | | | | This was only ever used on PPC, where they are equivalent and we never saw the resulting -Wpointer-sign warnings. Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Signed-off-by: Simon Horman <horms@verge.net.au>
* uImage: Add new IH_ARCH_xxx definitionsDavid Woodhouse2017-03-131-0/+7
| | | | | Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Signed-off-by: Simon Horman <horms@verge.net.au>
* Add persistent memory supportBaoquan He2015-09-021-0/+2
| | | | | | | | | | Kernel add E820_PRAM or E820_PMEM type for NVDIMM memory device. Now support them in kexec too. Reported-by: Toshi Kani <toshi.kani@hp.com> Tested-by: Toshi Kani <toshi.kani@hp.com> Signed-off-by: Baoquan He <bhe@redhat.com> Signed-off-by: Simon Horman <horms@verge.net.au>
* kexec/ppc64 ELF ABIv2 ABI supportLaurent Dufour2014-02-041-0/+4
| | | | | | | | | | | | | When building in PPC64 little endian mode, the compiler is now using the new ABI v2. Among other changes, this new ABI removes the function descriptors and changes the way the TOC address is computed when entering a C function. The purgatory assembly part where the dot symbols are removed, and ELF relocation code are impacted in this patch. Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com> Signed-off-by: Simon Horman <horms@verge.net.au>
* Add efi_info in x86 setup headerDave Young2014-01-211-1/+2
| | | | | | | | | | For supporting efi runtime on kexec kernel we need to fill the efi_info struct in setup_header. I just get the info in kernel exported boot_params data in debugfs. Signed-off-by: Dave Young <dyoung@redhat.com> Tested-by: Toshi Kani <toshi.kani@hp.com> Signed-off-by: Simon Horman <horms@verge.net.au>
* Remove PACKED macro and use __attribute__((packed)) directlyWANG Chao2013-10-161-4/+2
| | | | | | | | | People are not always aware of PACKED macro and tend to __attribute__((packed)) more directly. So let's remove PACKED to unify things. Signed-off-by: WANG Chao <chaowang@redhat.com> Signed-off-by: Simon Horman <horms@verge.net.au>
* Revert: "kexec: lengthen the kernel command line image"Zhang Yanfei2013-03-271-1/+1
| | | | | | | | | | | This reverts commit 49320340f705694e387d794f7f19d407ad9baefa. The change of COMMAND_LINE_SIZE cannot solve Cliff's problem since the kernel side has the restriction, so it is useless. Let's recover the original value defined by kernel side. Cc: Cliff Wickman <cpw@sgi.com> Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com> Signed-off-by: Simon Horman <horms@verge.net.au>
* kexec/uImage: Recognize uImage RAM DisksSuzuki K. Poulose2013-03-081-0/+1
| | | | | | | | | | Add IH_TYPE_RAMDISK as a recognized image type. uImage_load shouldn't decompress the RAMDISK type images, since uboot doesn't do it. Signed-off-by: Suzuki K. Poulose <suzuki@in.ibm.com> Signed-off-by: Simon Horman <horms@verge.net.au>
* kexec/uImage: Introduce uImage_probe_kernelSuzuki K. Poulose2013-03-081-0/+1
| | | | | | | | | | | | | | | uImage supports different types of payloads, including kernel, ramdisks etc. uImage_probe() as of now checks whether the supplied payload is of type KERNEL ( i.e, IH_TYPE_KERNEL or IH_TYPE_KERNEL_NOLOAD ). Change this behaviour to return the image type, if it is one of the supported payloads. This change is in prepartion to support ramdisks in uImage format. Introduce a uImage_probe_kernel() which can be used by the archs to check if the supplied payload is one of the KERNEL types. Signed-off-by: Suzuki K. Poulose <suzuki@in.ibm.com> Signed-off-by: Simon Horman <horms@verge.net.au>
* kexec: lengthen the kernel command line imageCliff Wickman2013-03-051-1/+1
| | | | | | | | | | | The crash kernel's boot command line is not long enough to contain the necessary memmap= options for a large memory. The fix is simple, as long as the boot loader's command line is also long enough. I'm not sure about boot loader or kernel restrictions to this length. Signed-off-by: Cliff Wickman <cpw@sgi.com> Signed-off-by: Simon Horman <horms@verge.net.au>
* kexec, x86: add boot header member for version 2.12Yinghai Lu2013-03-051-5/+21
| | | | | | | | will use ext_ramdisk_image/size, and xloadflags to put ramdisk and bzImage high for 64bit. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Simon Horman <horms@verge.net.au>
* kexec, x86: set booloader id in setup_headerYinghai Lu2013-03-051-0/+1
| | | | | | | set LOADER_TYPE_KEXEC Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Simon Horman <horms@verge.net.au>
* x86: update x86_linux_headerOlaf Hering2013-01-181-24/+16
| | | | | | | | | | Update struct x86_linux_header with new fields, based on arch/x86/include/asm/bootparam.h as included in linux-3.7. Upcoming changes will use the payload_offset/payload_length fields. Signed-off-by: Olaf Hering <olaf@aepfle.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Simon Horman <horms@verge.net.au>
* kexec: Define some constants and structures conditionallyDaniel Kiper2012-09-181-1/+6
| | | | | | | | | | Some definitions in include/x86/x86-linux.h conflicts with definitions placed in Xen headers. Make them conditional. This patch is required by future Xen kdump fixes. Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com> Signed-off-by: Simon Horman <horms@verge.net.au>
* Support kernel_noload uImage typeAlexandre Courbot2012-06-181-0/+2
| | | | | | | | | | | | | | | Do not trigger an error when loading a uImage with the IH_TYPE_KERNEL_NOLOAD type. These images do not need to be copied to their load address before being executed. All archs (excepted PPC) do not use the uImage load and entry point parameters, so their current behavior needs not be changed further than just accepting the image type. Tested and validated on ARM. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Simon Horman <horms@verge.net.au>
* Load bzImages smaller than 32 KiBEric Biggers2012-06-131-2/+0
| | | | | | | | | | | | | | | | | | Allow bzImages smaller than 32KiB to be kexec'ed. The current code will fail to load a bzImage smaller than 32768 bytes (sizeof struct x86_linux_header), but the 'memdisk' program that comes with syslinux is only about 26 KiB. This patch changes the minimum size to 1024 bytes (2 sectors), which appears to be the limit that syslinux enforces. Removed the "tail" field of struct x86_linux_header because it doesn't seem to actually be used (is there a reason for it?). Also, note that bzImage_probe() was incorrectly using `sizeof (header)', even though header is a pointer. Signed-off-by: Eric Biggers <ebiggers3@gmail.com> Signed-off-by: Simon Horman <horms@verge.net.au>
* Use unsigned char buffers in uImage loaderSimon Horman2011-09-061-3/+3
| | | | | | | This avoids out of range comparisons (for values >= 128) and an unnecessary cast. Signed-off-by: Simon Horman <horms@verge.net.au>
* kexec-tools: Add s390 kdump supportMichael Holzheu2011-08-201-2/+6
| | | | | | | | | This patch adds kdump support for s390 to the kexec tool and enables the "--load-panic" option. When loading the kdump kernel and ramdisk we add the address of the crashkernel memory to the normal load address. Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Simon Horman <horms@verge.net.au>
* build: Include missing files in tarballSimon Horman2010-07-131-0/+1
| | | | Signed-off-by: Simon Horman <horms@verge.net.au>
* Merge branch 'ppc32' of git://git.breakpoint.cc/bigeasy/kexec-toolsSimon Horman2010-04-011-0/+13
|\
| * Split Powerpc's uImage codeSebastian Andrzej Siewior2010-03-311-0/+13
| | | | | | | | | | | | The check and uncompress code could be split and recycled by other arch. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
* | kexec-tools: Add missing include files in dist targetAmeya Palande2010-03-241-0/+1
|/ | | | | Signed-off-by: Ameya Palande <ameya.palande@nokia.com> Signed-off-by: Simon Horman <horms@verge.net.au>
* Mark unused parametersSimon Horman2010-02-021-0/+15
| | | | | Signed-off-by: Simon Horman <horms@verge.net.au>
* kexec: Bring the uImage definitions in sync with upstream.Paul Mundt2009-12-161-19/+22
| | | | | | | | u-boot has grown support for new image/architecture/OS types, reflect these changes in the image.h header, thereby bringing things back in sync with upstream. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* kexec: Move the uImage header to a better place.Paul Mundt2009-12-162-0/+162
| | | | | | | | | This is a completely generic header for uImage support and has no place being hidden away in an architecture directory. Move it up to the top-level include so that other architectures can trivially tie in uImage support, too. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* Implement EDD support for 32 bit bootBernhard Walle2008-05-211-6/+33
| | | | | | | | | | | | | | | | This patch implements EDD support. The information is read from /sys/firmware/edd (the edd driver must be loaded for this) and is written into the zero page of the 32 bit boot protocol. I successfully tested the patch on a x86_64 machine with the x86_64 kernel. This fixes a hardware detection problem, discovered in https://bugzilla.novell.com/show_bug.cgi?id=383210. The last patch that updates the E820MAX constant is required to use that patch. Signed-off-by: Bernhard Walle <bwalle@suse.de> Signed-off-by: Simon Horman <horms@verge.net.au>
* Update 32 bit boot protocolBernhard Walle2008-05-211-1/+1
| | | | | | | | | | | | This patch updates the boot protocol to match with the kernel. See Documentation/i386/zero-page.txt in kernel. The number of E820 map entries have been increased from 32 to 128. The update is necessary for the next patch that implements EDD support for kexec. when using the default 32 bit mode. Signed-off-by: Bernhard Walle <bwalle@suse.de> Signed-off-by: Simon Horman <horms@verge.net.au>
* build: include configure and include/config.h.in in dist tarballSimon Horman2008-02-261-0/+1
| | | | | Cc: Bernhard Walle <bwalle@suse.de> Signed-off-by: Simon Horman <horms@verge.net.au>
* Only include needed files in distribution tarballSimon Horman2008-02-211-0/+9
| | | | | | | | | | With the recent build changes a number of unneded files crept into tarballs, including .o and .d files. This patch is farily verbose, but hopefully in the long run this system will be obvious enough to be maintainable. Signed-off-by: Simon Horman <horms@verge.net.au>
* Clean up whitespace in include/x86/x86-linux.hSimon Horman2008-02-201-6/+6
| | | | | | | | The "Kexec command line length" command line patch introduced some trailing whitespace in include/x86/x86-linux.h. This removes that and others that I found along the way. Signed-off-by: Simon Horman <horms@verge.net.au>
* Kexec command line lengthNeil Horman2008-02-201-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fine, New patch attached. This patch does 5 things: 1) moves command line out of the zero page (struct bootparam) 2) extends command line length to support 2K command lines 3) adds a check to ensure that command line length is reasonably sized for new boot protocols 4) adds a check to ensure that command line length is reasonably sized for old boot protocols 5) imports variables from latest struct setup_header in kernel bootparams.h Incorporates simplified version checking for boot protocol and conservatively warns if the kernels boot protocol is below version 2.06 which is guaranteed to have 2K commandlines (even though some arches may have that support in older boot protocols) Neil Signed-off-by: Neil Horman <nhorman@tuxdriver.com> include/x86/x86-linux.h | 20 ++++++++++++++------ kexec/arch/i386/kexec-bzImage.c | 11 +++++++++++ kexec/arch/i386/x86-linux-setup.c | 3 ++- 3 files changed, 27 insertions(+), 7 deletions(-) Signed-off-by: Simon Horman <horms@verge.net.au>
* kexec-tools: Support loading relocatable bzImageVivek Goyal2006-11-081-2/+8
| | | | | | | | | o Modify bzImage loader to be able to recognize a relocatable bzImage and load it. Now bzImage loader can identify that bzImage is relocatable and can load the protected mode kernel code at a non 1MB addr. Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com> Signed-off-by: Simon Horman <horms@verge.net.au>
* kexec-tools-1.101v1.101Eric W. Biederman2006-07-277-0/+3113
- Initial import into git - initial nbi image formage support - ppc32 initial register setting fixes. - gzipped multiboot file support