The attached patch is for:

* kexec: Increase the upper limit for RAM segments (LP: #1663400)

This patch applies cleanly on Zesty kexec-tools:
https://pastebin.ubuntu.com/23995216/

[TESTING with Zesty kexec-tools on hardware]
ubuntu@ubuntu:~$ dpkg -l | grep kexec-tools
ii  kexec-tools                       1:2.0.14-1ubuntu2.1                 arm64 
       tools to support fast kexec reboots
ubuntu@ubuntu:~$

ubuntu@ubuntu:~$ sudo kexec -d -l /boot/vmlinuz-4.7.0-2-generic --reuse-cmd 
--initrd=/boot/initrd.img-4.7.0-2-generic
arch_process_options:141: command_line: 
root=UUID=6c2f8a0a-5a0a-4f7b-8427-6e119e950aaa ro splash quiet vt.handoff=7
arch_process_options:143: initrd: /boot/initrd.img-4.7.0-2-generic
arch_process_options:144: dtb: (null)
Try gzip decompression.
kernel: 0xffffa9e5e010 kernel_size: 0xf36800
get_memory_ranges_iomem_cb: 0000000000200000 - 000000000020ffff : System RAM
get_memory_ranges_iomem_cb: 0000000000820000 - 000000000307ffff : System RAM
get_memory_ranges_iomem_cb: 0000000003080000 - 000000000308ffff : System RAM
get_memory_ranges_iomem_cb: 0000000003090000 - 00000000031fffff : System RAM
get_memory_ranges_iomem_cb: 0000000003200000 - 00000000033fffff : System RAM
get_memory_ranges_iomem_cb: 0000000003410000 - 000000000589ffff : System RAM
get_memory_ranges_iomem_cb: 00000000058a0000 - 00000000058affff : System RAM
get_memory_ranges_iomem_cb: 00000000058b0000 - 00000000058bffff : System RAM
get_memory_ranges_iomem_cb: 00000000058c0000 - 000000000597ffff : System RAM
get_memory_ranges_iomem_cb: 0000000005980000 - 0000000005987fff : System RAM
get_memory_ranges_iomem_cb: 0000000005988000 - 000000000598bfff : System RAM
get_memory_ranges_iomem_cb: 000000000598c000 - 0000000005a0ffff : System RAM
get_memory_ranges_iomem_cb: 0000000005a10000 - 0000000005aaffff : System RAM
get_memory_ranges_iomem_cb: 0000000005ab0000 - 0000000005ca0fff : System RAM
get_memory_ranges_iomem_cb: 0000000005ca1000 - 0000000008caffff : System RAM
get_memory_ranges_iomem_cb: 0000000008cb0000 - 0000000008cfffff : System RAM
get_memory_ranges_iomem_cb: 0000000008d00000 - 0000000008edffff : System RAM
get_memory_ranges_iomem_cb: 0000000008ee0000 - 0000000008ee0fff : System RAM
get_memory_ranges_iomem_cb: 0000000008ee1000 - 0000000008ee3fff : System RAM
get_memory_ranges_iomem_cb: 0000000008ee4000 - 0000000008eeffff : System RAM
get_memory_ranges_iomem_cb: 0000000008ef0000 - 00000000092affff : System RAM
get_memory_ranges_iomem_cb: 00000000092b0000 - 00000000092dffff : System RAM
get_memory_ranges_iomem_cb: 00000000092e0000 - 0000000009422fff : System RAM
get_memory_ranges_iomem_cb: 0000000009423000 - 000000000949ffff : System RAM
get_memory_ranges_iomem_cb: 00000000094a0000 - 000000000957ffff : System RAM
get_memory_ranges_iomem_cb: 0000000009580000 - 000000000958cfff : System RAM
get_memory_ranges_iomem_cb: 000000000958d000 - 00000000098cffff : System RAM
get_memory_ranges_iomem_cb: 00000000098d0000 - 00000000098d0fff : System RAM
get_memory_ranges_iomem_cb: 00000000098d1000 - 00000000098dbfff : System RAM
get_memory_ranges_iomem_cb: 00000000098dc000 - 000000000e8bffff : System RAM
get_memory_ranges_iomem_cb: 000000000e8c0000 - 000000000e8effff : System RAM
get_memory_ranges_iomem_cb: 000000000e8f0000 - 000000000fffffff : System RAM
get_memory_ranges_iomem_cb: 0000000010800000 - 0000000017feffff : System RAM
get_memory_ranges_iomem_cb: 000000001c020000 - 000000001c7fffff : System RAM
get_memory_ranges_iomem_cb: 000000001c800000 - 000000001c80ffff : System RAM
get_memory_ranges_iomem_cb: 000000001c810000 - 000000007efbffff : System RAM
get_memory_ranges_iomem_cb: 000000007efc0000 - 000000007efdffff : System RAM
get_memory_ranges_iomem_cb: 000000007efe0000 - 000000007efeffff : System RAM
get_memory_ranges_iomem_cb: 000000007eff0000 - 000000007effffff : System RAM
get_memory_ranges_iomem_cb: 000000007f000000 - 00000017ffffffff : System RAM
elf_arm64_probe: Not an ELF executable.
image_arm64_load: kernel_segment: 0000000000a00000
image_arm64_load: text_offset:    0000000000080000
image_arm64_load: image_size:     0000000001030000
image_arm64_load: phys_offset:    0000000000200000
image_arm64_load: vp_offset:      ffffffffffffffff
image_arm64_load: PE format:      yes
read_1st_dtb: found /sys/firmware/fdt
initrd: base 3410000, size 1c7b7e4h (29865956)
dtb_set_initrd: start 54591488, end 84457444, size 29865956 (29165 KiB)
dtb:    base 1ab0000, size 1f2h (498)
sym: sha256_starts info: 12 other: 00 shndx: 1 value: e80 size: 58
sym: sha256_starts value: 1ab1e80 addr: 1ab1014
machine_apply_elf_rel: CALL26 5800065394000000->580006539400039b
sym: sha256_update info: 12 other: 00 shndx: 1 value: 2de0 size: c
sym: sha256_update value: 1ab3de0 addr: 1ab1030
machine_apply_elf_rel: CALL26 eb16027f94000000->eb16027f94000b6c
sym: sha256_finish info: 12 other: 00 shndx: 1 value: 2df0 size: 1bc
sym: sha256_finish value: 1ab3df0 addr: 1ab1048
machine_apply_elf_rel: CALL26 d280040294000000->d280040294000b6a
sym:     memcmp info: 12 other: 00 shndx: 1 value: 604 size: 34
sym: memcmp value: 1ab1604 addr: 1ab1058
machine_apply_elf_rel: CALL26 340003a094000000->340003a09400016b
sym:     printf info: 12 other: 00 shndx: 1 value: 524 size: 80
sym: printf value: 1ab1524 addr: 1ab1068
machine_apply_elf_rel: CALL26 5800042094000000->580004209400012f
sym:     printf info: 12 other: 00 shndx: 1 value: 524 size: 80
sym: printf value: 1ab1524 addr: 1ab1070
machine_apply_elf_rel: CALL26 5800043694000000->580004369400012d
sym:     printf info: 12 other: 00 shndx: 1 value: 524 size: 80
sym: printf value: 1ab1524 addr: 1ab1084
machine_apply_elf_rel: CALL26 f100827f94000000->f100827f94000128
sym:     printf info: 12 other: 00 shndx: 1 value: 524 size: 80
sym: printf value: 1ab1524 addr: 1ab10a0
machine_apply_elf_rel: CALL26 5800032094000000->5800032094000121
sym:     printf info: 12 other: 00 shndx: 1 value: 524 size: 80
sym: printf value: 1ab1524 addr: 1ab10a8
machine_apply_elf_rel: CALL26 38736a8194000000->38736a819400011f
sym:     printf info: 12 other: 00 shndx: 1 value: 524 size: 80
sym: printf value: 1ab1524 addr: 1ab10b8
machine_apply_elf_rel: CALL26 f100827f94000000->f100827f9400011b
sym:     printf info: 12 other: 00 shndx: 1 value: 524 size: 80
sym: printf value: 1ab1524 addr: 1ab10c8
machine_apply_elf_rel: CALL26 5280002094000000->5280002094000117
sym:      .data info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .data value: 1ab4028 addr: 1ab10e0
machine_apply_elf_rel: ABS64 0000000000000000->0000000001ab4028
sym: .rodata.str1.1 info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata.str1.1 value: 1ab3fb8 addr: 1ab10e8
machine_apply_elf_rel: ABS64 0000000000000000->0000000001ab3fb8
sym: .rodata.str1.1 info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata.str1.1 value: 1ab3fd8 addr: 1ab10f0
machine_apply_elf_rel: ABS64 0000000000000000->0000000001ab3fd8
sym: .rodata.str1.1 info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata.str1.1 value: 1ab3fe8 addr: 1ab10f8
machine_apply_elf_rel: ABS64 0000000000000000->0000000001ab3fe8
sym: .rodata.str1.1 info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata.str1.1 value: 1ab3fee addr: 1ab1100
machine_apply_elf_rel: ABS64 0000000000000000->0000000001ab3fee
sym: .rodata.str1.1 info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata.str1.1 value: 1ab3ff0 addr: 1ab1108
machine_apply_elf_rel: ABS64 0000000000000000->0000000001ab3ff0
sym:     printf info: 12 other: 00 shndx: 1 value: 524 size: 80
sym: printf value: 1ab1524 addr: 1ab111c
machine_apply_elf_rel: CALL26 9400000094000000->9400000094000102
sym: setup_arch info: 12 other: 00 shndx: 1 value: e78 size: 4
sym: setup_arch value: 1ab1e78 addr: 1ab1120
machine_apply_elf_rel: CALL26 9400000094000000->9400000094000356
sym: verify_sha256_digest info: 12 other: 00 shndx: 1 value: 0 size: e0
sym: verify_sha256_digest value: 1ab1000 addr: 1ab1124
machine_apply_elf_rel: CALL26 3400004094000000->3400004097ffffb7
sym: post_verification_setup_arch info: 12 other: 00 shndx: 1 value: e74 size: 4
sym: post_verification_setup_arch value: 1ab1e74 addr: 1ab1134
machine_apply_elf_rel: JUMP26 0000000014000000->0000000014000350
sym: .rodata.str1.1 info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata.str1.1 value: 1ab4000 addr: 1ab1138
machine_apply_elf_rel: ABS64 0000000000000000->0000000001ab4000
sym:    putchar info: 12 other: 00 shndx: 1 value: e70 size: 4
sym: putchar value: 1ab1e70 addr: 1ab11cc
machine_apply_elf_rel: CALL26 2a1303e194000000->2a1303e194000329
sym:    putchar info: 12 other: 00 shndx: 1 value: e70 size: 4
sym: putchar value: 1ab1e70 addr: 1ab1240
machine_apply_elf_rel: CALL26 b9406ba194000000->b9406ba19400030c
sym:    putchar info: 12 other: 00 shndx: 1 value: e70 size: 4
sym: putchar value: 1ab1e70 addr: 1ab149c
machine_apply_elf_rel: CALL26 f94037a194000000->f94037a194000275
sym: .rodata.str1.1 info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata.str1.1 value: 1ab4012 addr: 1ab14a8
machine_apply_elf_rel: ABS64 0000000000000000->0000000001ab4012
sym:   vsprintf info: 12 other: 00 shndx: 1 value: 140 size: 368
sym: vsprintf value: 1ab1140 addr: 1ab1518
machine_apply_elf_rel: CALL26 a8d07bfd94000000->a8d07bfd97ffff0a
sym:   vsprintf info: 12 other: 00 shndx: 1 value: 140 size: 368
sym: vsprintf value: 1ab1140 addr: 1ab1598
machine_apply_elf_rel: CALL26 a8d17bfd94000000->a8d17bfd97fffeea
sym:  purgatory info: 12 other: 00 shndx: 1 value: 110 size: 28
sym: purgatory value: 1ab1110 addr: 1ab1648
machine_apply_elf_rel: CALL26 5800001194000000->5800001197fffeb2
sym: arm64_kernel_entry info: 10 other: 00 shndx: 4 value: 120 size: 8
sym: arm64_kernel_entry value: 1ab4148 addr: 1ab164c
machine_apply_elf_rel: LD_PREL_LO19 5800000058000011->58000000580157f1
sym: arm64_dtb_addr info: 10 other: 00 shndx: 4 value: 128 size: 8
sym: arm64_dtb_addr value: 1ab4150 addr: 1ab1650
machine_apply_elf_rel: LD_PREL_LO19 aa1f03e158000000->aa1f03e158015800
sym: sha256_process info: 12 other: 00 shndx: 1 value: ed8 size: 1dec
sym: sha256_process value: 1ab1ed8 addr: 1ab3d4c
machine_apply_elf_rel: CALL26 eb15027f94000000->eb15027f97fff863
sym:     memcpy info: 12 other: 00 shndx: 1 value: 5e4 size: 20
sym: memcpy value: 1ab15e4 addr: 1ab3dac
machine_apply_elf_rel: JUMP26 9100c29314000000->9100c29317fff60e
sym:     memcpy info: 12 other: 00 shndx: 1 value: 5e4 size: 20
sym: memcpy value: 1ab15e4 addr: 1ab3dc4
machine_apply_elf_rel: CALL26 d280001794000000->d280001797fff608
sym: sha256_process info: 12 other: 00 shndx: 1 value: ed8 size: 1dec
sym: sha256_process value: 1ab1ed8 addr: 1ab3dd4
machine_apply_elf_rel: CALL26 17ffffd394000000->17ffffd397fff841
sym:      .data info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .data value: 1ab4158 addr: 1ab3fb0
machine_apply_elf_rel: ABS64 0000000000000000->0000000001ab4158
kexec_load: entry = 0x1ab1640 flags = 0xb70000
nr_segments = 4
segment[0].buf   = 0xffffa9e5e010
segment[0].bufsz = 0xf36800
segment[0].mem   = 0xa80000
segment[0].memsz = 0x1030000
segment[1].buf   = 0x3c5cf1a0
segment[1].bufsz = 0x1f2
segment[1].mem   = 0x1ab0000
segment[1].memsz = 0x1000
segment[2].buf   = 0x3c5cf760
segment[2].bufsz = 0x3198
segment[2].mem   = 0x1ab1000
segment[2].memsz = 0x4000
segment[3].buf   = 0xffffa81e2010
segment[3].bufsz = 0x1c7b7e4
segment[3].mem   = 0x3410000
segment[3].memsz = 0x1c7c000
ubuntu@ubuntu:~$ sudo kexec -e 

ubuntu login: [  516.350136] mmc0: Reset 0x1 never completed.
[  519.887054] kexec_core: Starting new kernel
[    0.000000] arch_timer: Failed to initialize memory-mapped timer, skipping
[    1.160867] coresight-tmc ARMHFFF0:00: Byte-cntr-irq not specified
[    1.169247] Failed to find cpu0 device node
[    1.438884] mmc0: Reset 0x1 never completed.
[    1.542495] mmc0: Reset 0x1 never completed.
[    1.646273] mmc0: Reset 0x1 never completed.

 
ubuntu@ubuntu:~$ sudo cat /proc/iomem | grep "System RAM"
[sudo] password for ubuntu: 
00200000-0020ffff : System RAM
00820000-0307ffff : System RAM
03080000-0308ffff : System RAM
03090000-031fffff : System RAM
03200000-033fffff : System RAM
03410000-0589ffff : System RAM
058a0000-058affff : System RAM
058b0000-058bffff : System RAM
058c0000-0597ffff : System RAM
05980000-05987fff : System RAM
05988000-0598bfff : System RAM
0598c000-05a0ffff : System RAM
05a10000-05aaffff : System RAM
05ab0000-05ca0fff : System RAM
05ca1000-08caffff : System RAM
08cb0000-08cfffff : System RAM
08d00000-08edffff : System RAM
08ee0000-08ee0fff : System RAM
08ee1000-08ee3fff : System RAM
08ee4000-08eeffff : System RAM
08ef0000-092affff : System RAM
092b0000-092dffff : System RAM
092e0000-09422fff : System RAM
09423000-0949ffff : System RAM
094a0000-0957ffff : System RAM
09580000-0958cfff : System RAM
0958d000-098cffff : System RAM
098d0000-098d0fff : System RAM
098d1000-098dbfff : System RAM
098dc000-0e8bffff : System RAM
0e8c0000-0e8effff : System RAM
0e8f0000-0fffffff : System RAM
10800000-17feffff : System RAM
1c020000-1c7fffff : System RAM
1c800000-1c80ffff : System RAM
1c810000-7efbffff : System RAM
7efc0000-7efdffff : System RAM
7efe0000-7efeffff : System RAM
7eff0000-7effffff : System RAM
7f000000-17ffffffff : System RAM
ubuntu@ubuntu:~$


** Patch added: "[Zesty] kexec increase the upper limit for RAM segments"
   
https://bugs.launchpad.net/ubuntu/+source/kexec-tools/+bug/1659618/+attachment/4818862/+files/zesty-kexec-Increase-the-upper-limit-for-RAM-segments.patch

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to kexec-tools in Ubuntu.
https://bugs.launchpad.net/bugs/1659618

Title:
  Enable ARM64 support in kexec-tools

Status in kexec-tools package in Ubuntu:
  Fix Released
Status in kexec-tools source package in Xenial:
  In Progress
Status in kexec-tools source package in Yakkety:
  In Progress
Status in kexec-tools package in Debian:
  Fix Released

Bug description:
  [IMPACT]
   * kexec-tools in Xenial (16.04) currently does not support ARM64
     architecture.
   * Backport support for ARM64 arch from upstream
     https://github.com/horms/kexec-tools
   * Majority of the patches are contained in kexec/arch/arm64/ except for
     one patch that impacts purgatory and common device tree routines.

  [TEST CASE]
   * I built kexec-tools for ARM64 and tested it on HW using the following
     testcase:
     $ sudo kexec -l /boot/vmlinuz-<version>-generic
       --initrd=/boot/initrd.img-<version>-generic
       --command-line="root=UUID=<uuid> ro vt.handoff=7"
     $ sudo kexec -e
   * I was able to kexec the new kernel successfully.
   * [ 6702.357899] kexec_core: Starting new kernel
     [    0.000000] Booting Linux on physical CPU 0x200
     [    0.000000] Linux version <version>-generic (buildd@bos01-arm64-008)
     (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) )
     [    0.000000] Boot CPU: AArch64 Processor [510f8000]

  [REGRESSION POTENTIAL]
   * Since patches are confined to arm[64] there is a low overall risk of
     regression.

  [OTHER INFO]
   * You can find a Xenial kexec-tools package built for AMD64, i386 and
     ARM64 in my PPA
     https://launchpad.net/~manjo/+archive/ubuntu/kexec-tools
   * This package is built using the Xenial source package for kexec-tools
     with ARM64 enablement patches applied.
   * Please pull the changes from my PPA package and integrate into Ubuntu
     Xenial kexec-tools after review.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/kexec-tools/+bug/1659618/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to