From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 00/10] arm64 kexec kernel patches V5
Date: Thu, 6 Nov 2014 18:39:40 +0000 [thread overview]
Message-ID: <20141106183940.GB2052@leverpostej> (raw)
In-Reply-To: <CAFdej01wki9btKiDj7TW8_frtZFLVMjsyS5LsZWqO7E+dC+D+w@mail.gmail.com>
On Thu, Nov 06, 2014 at 04:13:04PM +0000, Arun Chandran wrote:
> On Thu, Nov 6, 2014 at 8:58 PM, Mark Rutland <mark.rutland@arm.com> wrote:
> > On Thu, Nov 06, 2014 at 12:16:12PM +0000, Arun Chandran wrote:
> >> Hi Geoff,
> >>
> >> I am trying this on my hardware (apm-mustang.dtb)
> >>
> >> On Fri, Oct 24, 2014 at 4:40 AM, Geoff Levand <geoff@infradead.org> wrote:
> >> > Hi All,
> >> >
> >> > This series adds the core support for kexec re-boots on arm64. I have tested
> >> > with the ARM VE fast model, the ARM Base model and the ARM Foundation
> >> > model with various kernel config options for both the first and second stage
> >> > kernels.
> >> >
> >> > To load a second stage kernel and execute a kexec re-boot on arm64 my patches to
> >> > kexec-tools [2], which have not yet been merged upstream, are needed.
> >> >
> >> > Patches 1-4 rework the arm64 hcall mechanism to give the arm64 soft_restart()
> >> > routine the ability to switch exception levels from EL1 to EL2 for kernels that
> >> > were entered in EL2.
> >> >
> >> > Patches 5 and 6 convert the use of device tree /memreserve/ to device tree
> >> > reserved-memory nodes.
> >> >
> >> > Patch 7 moves proc-macros.S from arm64/mm to arm64/include/asm so that the
> >> > dcache_line_size macro it defines can be uesd by kexec's relocate kernel
> >> > routine.
> >> >
> >> > Patches 8-10 add the actual kexec support.
> >> >
> >> > Please consider all patches for inclusion. Any comments or suggestions on how
> >> > to improve are welcome.
> >> >
> >> > [1] https://git.linaro.org/people/geoff.levand/linux-kexec.git
> >> > [2] https://git.linaro.org/people/geoff.levand/kexec-tools.git
> >> >
> >> > Several things are known to have problems on kexec re-boot:
> >> >
> >> > spin-table
> >> > ----------
> >> >
> >> > PROBLEM: The spin-table enable method does not implement all the methods needed
> >> > for CPU hot-plug, so the first stage kernel cannot be shutdown properly.
> >> >
> >> > WORK-AROUND: Upgrade to system firmware that provides PSCI enable method
> >> > support, OR build the first stage kernel with CONFIG_SMP=n, OR pass 'maxcpus=1'
> >> > on the first stage kernel command line.
> >>
> >> I have CONFIG_SMP=n
> >>
> >> >
> >> > FIX: Upgrade system firmware to provide PSCI enable method support.
> >> >
> >> > KVM
> >> > ---
> >> >
> >> > PROBLEM: KVM acquires hypervisor resources on startup, but does not free those
> >> > resources on shutdown, so the first stage kernel cannot be shutdown properly.
> >> >
> >> > WORK-AROUND: Build the first stage kernel with CONFIG_KVM=n.
> >>
> >> KVM also disabled.
> >>
> >> /root at genericarmv8:~# usr/local/sbin/kexec --lite -l vmlinux
> >> --dtb=apm-mustang.dtb --command-line=
> >> "root=/dev/nfs rw
> >> nfsroot=10.162.103.145:/nfs_root/linaro-image-lamp-genericarmv8,nfsvers=3
> >> ip=:::::eth0:dhcp panic=1 console=ttyS0,115200
> >> earlyprintk=uart8250-32bit,0x1c020000"
> >>
> >> kexec version: 14.10.21.16.36-ga38e0a6
> >> arch_process_options:85: command_line: root=/dev/nfs rw
> >> nfsroot=10.162.103.145:/nfs_root/linaro-image-lamp-genericarmv8,nfsvers=3
> >> ip=:::::eth0:dhcp panic=1 console=ttyS0,115200
> >> earlyprintk=uart8250-32bit,0x1
> >> c020000
> >> arch_process_options:87: initrd: (null)
> >> arch_process_options:88: dtb: apm-mustang.dtb
> >> arch_process_options:89: lite: 1
> >> kernel: 0x7f756e7010 kernel_size: 0x488a308
> >> Modified cmdline: root=/dev/nfs
> >> Unable to find /proc/device-tree//chosen/linux,stdout-path, printing
> >> from purgatory is diabled
> >> get_memory_ranges_dt:638: node_1516 memory
> >> get_memory_ranges_dt:664: RAM: 0000004000000000 - 0000004400000000
Does this look correct to you? That doesn't match what I see in
apm-mustang.dts in mainline (where memory starts at 0x1_00000000).
> >> get_memory_ranges_dt:659: SKIP: 0000000000000000 - 0000000000000000
> >> get_memory_ranges_dt:659: SKIP: 0000000000000000 - 0000000000000000
> >> get_memory_ranges_dt:659: SKIP: 0000000000000000 - 0000000000000000
This looks suspicious, but I haven't investigated the underlying code.
> >> get_memory_ranges_dt:678: Success
> >> elf_arm64_load: PE format: yes
> >> p_vaddr: ffffffc000080000
> >> virt_to_phys: ffffffc000080000 -> 0000004000080000
> >> add_segment_phys_virt: 0000007f756f7010 - 0000007f75d3cf70 (00645f60)
> >> -> 0000004000080000 - 00000040006fb000 (0067b000)
> >> elf_arm64_load: text_offset: 0000000000080000
> >> elf_arm64_load: image_size: 000000000067f000
> >> elf_arm64_load: page_offset: ffffffc000000000
> >> elf_arm64_load: memstart: 0000004000000000
> >> virt_to_phys: ffffffc000080000 -> 0000004000080000
> >> elf_arm64_load: e_entry: ffffffc000080000 -> 0000004000080000
> >> virt_to_phys: ffffffc000080000 -> 0000004000080000
So we'll load the kernel at this address...
[...]
> root at genericarmv8:~# /usr/local/sbin/kexec --lite -e
> kexec version: 14.10.21.16.36-ga38e0a6
> arch_process_options:85: command_line: (null)
> arch_process_options:87: initrd: (null)
> arch_process_options:88: dtb: (null)
> arch_process_options:89: lite: 1
> sd 0:0:0:0: [sda] Synchronizing SCSI cache
> kexec: Starting new kernel
> Bye!
> Initializing cgroup subsys cpu
> Linux version 3.17.0-rc4+ (arun at arun-OptiPlex-9010) (gcc version 4.9.1
> 20140505 (prerelease) (crosstool-NG linaro-1.13.1-4.9-2014.05 - Linaro
> GCC 4.9-2014.05) ) #12 PREEMPT Thu Nov 6 21:38:03 IST 2014
> CPU: AArch64 Processor [500f0000] revision 0
> Detected PIPT I-cache on CPU0
> Ignoring memory block 0x100000000 - 0x180000000
... then the kernel finds the single memory region described in
apm-mustang.dts which happens to be below PHYS_OFFSET for your board. So
the kernel ignores it because it cannot address it ...
> Early serial console at MMIO32 0x1c020000 (options '')
> bootconsole [uart0] enabled
> efi: Getting EFI parameters from FDT:
> efi: UEFI not found.
> cma: Failed to reserve 16 MiB
> Kernel panic - not syncing: ERROR: Failed to allocate 0x1000 bytes below 0x0.
... and then explodes because it knows of no memory outside of the kernel
Image.
Mark.
next prev parent reply other threads:[~2014-11-06 18:39 UTC|newest]
Thread overview: 72+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-23 23:10 [PATCH 00/10] arm64 kexec kernel patches V5 Geoff Levand
2014-10-23 23:10 ` [PATCH 05/10] arm64: Convert dts to use reserved-memory nodes Geoff Levand
2014-10-24 10:51 ` Mark Rutland
2014-10-24 10:59 ` Grant Likely
2014-10-24 12:27 ` Mark Rutland
2014-10-24 14:45 ` Grant Likely
2014-10-31 23:44 ` Geoff Levand
2014-11-03 20:02 ` Mark Rutland
2014-11-03 22:26 ` Rob Herring
2014-11-04 11:35 ` Mark Rutland
2014-11-04 11:37 ` Grant Likely
2014-10-23 23:10 ` [PATCH 07/10] arm64: Move proc-macros.S to include/asm Geoff Levand
2014-10-23 23:10 ` [PATCH 08/10] arm64/kexec: Add core kexec support Geoff Levand
2014-10-24 10:28 ` Mark Rutland
2014-11-13 2:19 ` Geoff Levand
2014-11-17 16:38 ` Mark Rutland
2014-11-17 20:20 ` Geoff Levand
2014-11-07 11:01 ` Arun Chandran
2014-11-12 21:54 ` Geoff Levand
2014-11-13 9:52 ` Arun Chandran
2014-11-17 3:52 ` Dave Young
2014-10-23 23:10 ` [PATCH 03/10] arm64: Add new hcall HVC_CALL_FUNC Geoff Levand
2014-10-23 23:10 ` [PATCH 06/10] arm64: Update booting.txt to reserved-memory nodes Geoff Levand
2014-10-24 10:54 ` Mark Rutland
2014-10-24 11:04 ` Grant Likely
2014-10-24 12:18 ` Mark Rutland
2014-10-24 13:54 ` Grant Likely
2014-10-24 14:10 ` Mark Rutland
2014-10-24 14:47 ` Grant Likely
2014-10-23 23:10 ` [PATCH 02/10] arm64: Convert hcalls to use ISS field Geoff Levand
2014-10-23 23:10 ` [PATCH 01/10] arm64/kvm: Fix assembler compatibility of macros Geoff Levand
2014-10-24 9:24 ` Mark Rutland
2014-10-27 12:13 ` Will Deacon
2014-10-27 12:45 ` Christoffer Dall
2014-10-31 23:06 ` [PATCH V2 " Geoff Levand
2014-10-23 23:10 ` [PATCH 04/10] arm64: Add EL2 switch to soft_restart Geoff Levand
2014-10-24 10:57 ` Mark Rutland
2014-10-31 23:47 ` Geoff Levand
2014-10-23 23:10 ` [PATCH 10/10] arm64/kexec: Add pr_devel output Geoff Levand
2014-10-23 23:10 ` [PATCH 09/10] arm64/kexec: Enable kexec in the arm64 defconfig Geoff Levand
2014-10-24 10:31 ` Mark Rutland
2014-10-31 23:50 ` Geoff Levand
2014-11-03 20:05 ` Mark Rutland
2014-11-04 1:49 ` Geoff Levand
2014-10-31 7:52 ` [PATCH 00/10] arm64 kexec kernel patches V5 Dave Young
2014-10-31 23:25 ` Geoff Levand
2014-11-06 2:01 ` Dave Young
2014-11-13 8:37 ` Dave Young
2014-11-13 23:50 ` Geoff Levand
2014-11-17 3:49 ` Dave Young
2014-11-03 19:46 ` Mark Rutland
2014-11-06 1:56 ` Dave Young
2014-11-06 15:08 ` Mark Rutland
2014-11-07 0:41 ` Grant Likely
2014-11-07 10:16 ` Mark Rutland
2014-11-07 10:41 ` Ard Biesheuvel
2014-11-07 10:45 ` Ard Biesheuvel
2014-11-07 10:46 ` Ard Biesheuvel
2014-11-07 11:35 ` Mark Rutland
2014-11-07 11:42 ` Ard Biesheuvel
2014-11-07 22:34 ` Grant Likely
2014-11-06 12:16 ` Arun Chandran
2014-11-06 15:28 ` Mark Rutland
2014-11-06 16:13 ` Arun Chandran
2014-11-06 18:25 ` Geoff Levand
2014-11-07 6:26 ` Arun Chandran
2014-11-06 18:39 ` Mark Rutland [this message]
2014-11-07 6:36 ` Arun Chandran
2014-11-10 7:17 ` Dave Young
2014-11-10 8:35 ` Arun Chandran
2014-11-10 9:24 ` Dave Young
2014-11-12 9:56 ` Dave Young
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141106183940.GB2052@leverpostej \
--to=mark.rutland@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox